From 55142f3214485c7ec12c5e414a56519f66a1eb1d Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 17 十月 2025 19:54:47 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/FangCangZhiNeng
---
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/MedicineGoodsServices.cs | 91 ++++++++++++++++++++++-----------------------
1 files changed, 45 insertions(+), 46 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/MedicineGoodsServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/MedicineGoodsServices.cs"
index 2429882..d667106 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/MedicineGoodsServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/MedicineGoodsServices.cs"
@@ -45,7 +45,7 @@
//璇锋眰鍙傛暟
var requestData = new
{
- searchDate = "2022-10-10 20:45:16" // 姝g‘鐨勬牸寮�
+ searchDate = "2009-01-10 20:45:16" // 姝g‘鐨勬牸寮�
};
//if (string.IsNullOrEmpty(SearchDate))
//{
@@ -76,28 +76,29 @@
}
//鑾峰彇鎵�鏈夊凡瀛樺湪鐨勫晢鍝佺紪鍙�
- var existingGoodsNos = BaseDal.Db.Queryable<Dt_MedicineGoods>()
- .Select(g => g.Goods_no)
+ var existingGoodsNos = BaseDal.Db.Queryable<Dt_MaterielInfo>()
+ .Select(g => g.MaterielCode)
.ToList();
// 鏀堕泦鎵�鏈夎鎻掑叆鐨勫疄浣�
- var entityList = response.data.Where(Medicat => !existingGoodsNos.Contains(Medicat.goods_no)).Select(Medicat => new Dt_MedicineGoods
+ var entityList = response.data.Where(Medicat => !existingGoodsNos.Contains(Medicat.goods_no)).Select(Medicat => new Dt_MaterielInfo
{
- Goods_no = Medicat.goods_no,
- MaterialCode=Medicat.materialCode,
- Goods_spm = Medicat.goods_spm,
- Model = Medicat.model,
+ MaterielCode = Medicat.goods_no,
+ MaterielErpType = Medicat.materialCode,
+ item = Medicat.goods_tym, //閫氱敤鍚�
+ MaterielName = Medicat.goods_spm,//鐗╂枡鍚嶇О
+ MaterielSpec = Medicat.model,
Factory = Medicat.factory,
- Unit = Medicat.unit,
+ MaterielUnit = Medicat.unit,//鍗曚綅
// 浣跨敤 ?? 杩愮畻绗︽彁渚涢粯璁ゅ��
- Item_Iength = Medicat.item_length ,
- Item_width = Medicat.item_width,
- Item_hight = Medicat.item_hight,
- Item_volumn = Medicat.item_volumn,
- Item_weight = Medicat.item_weight,
- Storage_cond = Medicat.storage_cond,
+ MaterielLength = (float?)Medicat.item_length ,
+ MaterielWide = (float?)Medicat.item_width,
+ MaterielHeight = (float?)Medicat.item_hight,
+ MaterielVolume = (float?)Medicat.item_volumn,
+ MaterielWeight = (float?)Medicat.item_weight,
+ MaterielStoragecondition = float.TryParse(Medicat.storage_confition, out var val) ? val : null, //鍌ㄥ瓨鏉′欢
Remark = Medicat.remark,
- GoodStatus = "鏈笅鍙�",
+ GoodStatusState = "鏈笅鍙�",
ModifyDate = Medicat.modify_date
}).ToList();
// 涓�娆℃�ф壒閲忔彃鍏ユ暟鎹簱
@@ -124,7 +125,8 @@
try
{
//鍏堟壘鍒版墍鏈夋湭涓嬪彂鐨勮嵂鍝�
- var list = BaseDal.QueryData(x => x.GoodStatus == "鏈笅鍙�").ToList();
+ //var list = BaseDal.QueryData(x => x.GoodStatus == "鏈笅鍙�").ToList();
+ var list =BaseDal.Db.Queryable<Dt_MaterielInfo>().Where(x => x.GoodStatusState == "鏈笅鍙�").ToList();
if (list == null || !list.Any())
{
return new WebResponseContent().OK("鏃犳湭涓嬪彂鑽搧");
@@ -137,28 +139,28 @@
//鐢ㄦ埛code
customerCode = "905",
//鐗╂枡绫诲瀷
- materialCode =item.MaterialCode,
+ materialCode =item.MaterielErpType,
//浜у搧缂栫爜
- productCode= item.Goods_no,
+ productCode= item.MaterielCode,
//浜у搧鍚�
- productName =item.Goods_spm ,
+ productName =item.MaterielName,
//浜у搧鏉$爜
- productBarCode= item.Goods_no,
+ productBarCode= item.MaterielCode,
//瑙勬牸
- productSpecifications=item.Model,
+ productSpecifications=item.MaterielSpec,
//鍗曚綅
- unit = item.Unit,
+ unit = item.MaterielUnit,
//闀�
- singleProductLongNum = item.Item_Iength.ToString(),
+ singleProductLongNum = item.MaterielLength.ToString(),
//瀹�
- singleProductWideNum = item.Item_weight.ToString(),
+ singleProductWideNum = item.MaterielWide.ToString(),
//楂�
- singleProductHighNum = item.Item_hight.ToString(),
+ singleProductHighNum = item.MaterielHeight.ToString(),
//閲嶉噺
- singleProductWeight = item.Item_weight.ToString(),
+ singleProductWeight = item.MaterielWeight.ToString(),
//浣撶Н
- singleProductVolume = item.Item_volumn.ToString(),
+ singleProductVolume = item.MaterielVolume.ToString(),
//鏄惁鍙栨秷 0鏄笉鍒犻櫎锛�1鍒犻櫎
isDelete = "0"
};
@@ -169,9 +171,9 @@
if (resp!=null&&resp.code=="0")
{
//鏇存柊鑽搧鐘舵��-宸插畬鎴�
- BaseDal.Db.Updateable<Dt_MedicineGoods>()
- .SetColumns(x => x.GoodStatus == "涓嬪彂瀹屾垚")
- .Where(x => x.Goods_no == item.Goods_no)
+ BaseDal.Db.Updateable<Dt_MaterielInfo>()
+ .SetColumns(x => x.GoodStatusState == "涓嬪彂瀹屾垚")
+ .Where(x => x.GoodStatusState == item.MaterielCode)
.ExecuteCommand();
}
else
@@ -199,10 +201,9 @@
/// <returns></returns>
public WebResponseContent DeleteProduct(string goodsno)
{
-
try
{
- var goods = BaseDal.QueryData(x => x.Goods_no == goodsno).FirstOrDefault();
+ var goods = BaseDal.Db.Queryable< Dt_MaterielInfo >().Where(x => x.MaterielCode == goodsno).First();
if (goods == null)
{
return new WebResponseContent
@@ -218,26 +219,26 @@
//鐗╂枡绫诲瀷
materialCode = "YY",
//浜у搧缂栫爜
- productCode = goods.Goods_no,
+ productCode = goods.MaterielCode,
//浜у搧鍚�
- productName = goods.Goods_spm,
+ productName = goods.MaterielName,
//浜у搧鏉$爜
- productBarCode = goods.Goods_no,
+ productBarCode = goods.MaterielCode,
//瑙勬牸
- productSpecifications = goods.Model,
+ productSpecifications = goods.MaterielSpec,
//鍗曚綅
- unit = goods.Unit,
+ unit = goods.MaterielUnit,
//闀�
- singleProductLongNum = goods.Item_Iength.ToString(),
+ singleProductLongNum = goods.MaterielLength.ToString(),
//瀹�
- singleProductWideNum = goods.Item_weight.ToString(),
+ singleProductWideNum = goods.MaterielWide.ToString(),
//楂�
- singleProductHighNum = goods.Item_hight.ToString(),
+ singleProductHighNum = goods.MaterielHeight.ToString(),
//閲嶉噺
- singleProductWeight = goods.Item_weight.ToString(),
+ singleProductWeight = goods.MaterielWeight.ToString(),
//浣撶Н
- singleProductVolume = goods.Item_volumn.ToString(),
+ singleProductVolume = goods.MaterielVolume.ToString(),
//鏄惁鍙栨秷 0鏄笉鍒犻櫎锛�1鍒犻櫎
isDelete = "1"
};
@@ -249,12 +250,10 @@
if (resp != null && resp.code == "0")
{
//鎴戣嚜宸变篃鍒犻櫎
- BaseDal.DeleteData(goods);
+ base.Db.Deleteable<Dt_MaterielInfo>().Where(x => x.MaterielCode == goodsno);
return new WebResponseContent { Status = true, Message = "鍒犻櫎鎴愬姛" };
}
return new WebResponseContent { Status = false, Message = "鍒犻櫎澶辫触璇烽噸璇�" };
-
-
}
catch (Exception ex)
{
--
Gitblit v1.9.3