| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "请输入装箱码!"; |
| | | objJsonResult.Message = "[3783-2-003]请输入装箱码!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ds.Tables[0].Rows[0][1].ToString();//该装箱单已扫码! |
| | | objJsonResult.Message = "[0000-1-038]" + ds.Tables[0].Rows[0][1].ToString();//该装箱单已扫码! |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "false!无数据,请确认装箱码是否存在!"; |
| | | objJsonResult.Message = "[3783-2-004]false!无数据,请确认装箱码是否存在!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.Message = "[0000-1-037]Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.Message = "[0000-1-038]Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | string HMaker = list[0].HMaker;//制单人 |
| | | string HBatchNo = list[0].HBatchNo;//入库批次 |
| | | string HBarCode_Cus = list[0].HBarCode_Cus;//客户标签(黑标号) |
| | | long HOrgID = list[0].HOrgID;//递入type得到的单据ID |
| | | //校验黑标号唯一性 |
| | | ds= oCN.RunProcReturn($"select * from Sc_PackUnionBillMain where HBarCode_Cus ='{HBarCode_Cus}'", "Sc_PackUnionBillMain"); |
| | | ds = oCN.RunProcReturn($"select * from Sc_PackUnionBillMain where HBarCode_Cus ='{HBarCode_Cus}'", "Sc_PackUnionBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"黑标号{HBarCode_Cus}已存在"; |
| | | objJsonResult.Message = $"[3783-2-007]黑标号{HBarCode_Cus}已存在"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | "(" + |
| | | "HYear, HBillType, HInterID, HBillNo, HMaker" + |
| | | ", HMakeDate, HPeriod, HDate, HRemark, HICMOInterID" + |
| | | ", HICMOBillNo, HBarCode_Pack, HMaterID, HUnitID,HBatchNo,HBarCode_Cus" + |
| | | ", HICMOBillNo, HBarCode_Pack, HMaterID, HUnitID,HBatchNo,HBarCode_Cus,HProdOrgID" + |
| | | ")" + |
| | | "values" + |
| | | "(" + |
| | | "'"+ year + "', '" + HBillType + "'," + HInterID + ", '" + HBillNo + "', '" + HMaker + "'" + |
| | | ",GETDATE(),0,GETDATE(),' ',0" + |
| | | ",' ','"+ HBarCode_Pack + "',0,0,'" + HBatchNo +"','" + HBarCode_Cus + |
| | | ",' ','"+ HBarCode_Pack + "',0,0,'" + HBatchNo +"','" + HBarCode_Cus +"','"+ HOrgID+ |
| | | "')" |
| | | ); |
| | | //插入子表 |
| | |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "新增单据成功!"; |
| | | objJsonResult.Message = "[0000-1-050]新增单据成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | //oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.Message = "[0000-1-051]Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无数据!"; |
| | | objJsonResult.Message = "[0000-1-045]无数据!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.Message = "[0000-1-037]Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.Message = "[0000-1-010]Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HBarCode = '" + BarCode + "' and HBillType = '2601'"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除成功!"; |
| | | objJsonResult.Message = "[0000-1-008]删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!"; |
| | | objJsonResult.Message = "[0000-1-007]删除失败!"; |
| | | objJsonResult.data = e.ToString(); |
| | | return objJsonResult; |
| | | } |
| | |
| | | oCn.RunProc("update Sc_PackUnionBillMain set HBarCode_Cus = '" + HBarCode_Cus + "' where HInterID = " + HInterID); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "修改成功!"; |
| | | objJsonResult.Message = "[[0000-1-067]]修改成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "修改失败!"; |
| | | objJsonResult.Message = "[0000-1-066]修改失败!"; |
| | | objJsonResult.data = e.ToString(); |
| | | return objJsonResult; |
| | | } |