fix:修改采购退
This commit is contained in:
parent
5c94e6958b
commit
07d4431a2d
@ -41,7 +41,8 @@ public class MESServiceImpl implements MESService{
|
|||||||
" ORDER BY m5.USEDATE,m5.SHIPREQUESTDETAILNAME FETCH FIRST ROW ONLY)WO\r\n" +
|
" ORDER BY m5.USEDATE,m5.SHIPREQUESTDETAILNAME FETCH FIRST ROW ONLY)WO\r\n" +
|
||||||
" FROM MATERIALPACKING m ,MATERIALSPEC m2 ,MATERIALSHIPREQUEST m3 ,BS_MATERIALDESCRIPTION m4 ,BS_MATERIALUNIT bm \r\n" +
|
" FROM MATERIALPACKING m ,MATERIALSPEC m2 ,MATERIALSHIPREQUEST m3 ,BS_MATERIALDESCRIPTION m4 ,BS_MATERIALUNIT bm \r\n" +
|
||||||
" WHERE m.SITENAME =:SITENAME \r\n" +
|
" WHERE m.SITENAME =:SITENAME \r\n" +
|
||||||
" AND m.SHIPREQUESTNAME =:SHIPREQUESTNAME \r\n" +
|
" AND m.SHIPREQUESTNAME =:SHIPREQUESTNAME \r\n" +
|
||||||
|
" AND m4.LANGUAGE = 'ZH' \r\n" +
|
||||||
" AND (m.RECEIVEACTNO =:RECEIVEACTNO OR :RECEIVEACTNO IS NULL ) \r\n" +
|
" AND (m.RECEIVEACTNO =:RECEIVEACTNO OR :RECEIVEACTNO IS NULL ) \r\n" +
|
||||||
" AND m.MATERIALSPECNAME =m2.MATERIALSPECNAME \r\n" +
|
" AND m.MATERIALSPECNAME =m2.MATERIALSPECNAME \r\n" +
|
||||||
" AND m.SHIPREQUESTNAME =m3.SHIPREQUESTNAME \r\n" +
|
" AND m.SHIPREQUESTNAME =m3.SHIPREQUESTNAME \r\n" +
|
||||||
|
@ -3828,7 +3828,7 @@ public class ToSAPServiceImpl {
|
|||||||
.append(" MP.MATERIALSPECNAME, ").append(SystemPropHelper.CR)
|
.append(" MP.MATERIALSPECNAME, ").append(SystemPropHelper.CR)
|
||||||
.append(" MD.ERPFACTORY, ").append(SystemPropHelper.CR)
|
.append(" MD.ERPFACTORY, ").append(SystemPropHelper.CR)
|
||||||
.append(" MP.ERPLOCATION, ").append(SystemPropHelper.CR)
|
.append(" MP.ERPLOCATION, ").append(SystemPropHelper.CR)
|
||||||
.append(" DECODE(MP.PACKINGGRADE,'OK','','NG','3','2')PACKINGGRADE, ").append(SystemPropHelper.CR)
|
.append(" DECODE(MP.PACKINGGRADE,'OK','','NG','','2')PACKINGGRADE, ").append(SystemPropHelper.CR)
|
||||||
.append(" SUM(MP.MATERIALQUANTITY) AS MATERIALQUANTITY , ").append(SystemPropHelper.CR)
|
.append(" SUM(MP.MATERIALQUANTITY) AS MATERIALQUANTITY , ").append(SystemPropHelper.CR)
|
||||||
.append(" MP.UNIT, ").append(SystemPropHelper.CR)
|
.append(" MP.UNIT, ").append(SystemPropHelper.CR)
|
||||||
.append(" MD.MATERIALUNIT, ").append(SystemPropHelper.CR)
|
.append(" MD.MATERIALUNIT, ").append(SystemPropHelper.CR)
|
||||||
|
@ -530,7 +530,7 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|||||||
arrayList.add(materialPackingKey);
|
arrayList.add(materialPackingKey);
|
||||||
}
|
}
|
||||||
billCode = UnSourcedChangeLocation(arrayList,ERPRECEIVEFACTORY,
|
billCode = UnSourcedChangeLocation(arrayList,ERPRECEIVEFACTORY,
|
||||||
ERPRECEIVELOCATION, "", eventUser );
|
ERPRECEIVELOCATION, "", eventUser, commitDate );
|
||||||
|
|
||||||
List<MaterialPackingKey> mpKeyList = new ArrayList<MaterialPackingKey> ();
|
List<MaterialPackingKey> mpKeyList = new ArrayList<MaterialPackingKey> ();
|
||||||
SetEventInfo setEventInfo = new SetEventInfo();
|
SetEventInfo setEventInfo = new SetEventInfo();
|
||||||
@ -795,7 +795,7 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|||||||
String aimFactory,
|
String aimFactory,
|
||||||
String aimERPlocation,
|
String aimERPlocation,
|
||||||
String aimLocationName,
|
String aimLocationName,
|
||||||
String user) throws Exception {
|
String user, String commitDate) throws Exception {
|
||||||
String rcode;
|
String rcode;
|
||||||
String undoId = "";
|
String undoId = "";
|
||||||
String rmsg = null;
|
String rmsg = null;
|
||||||
@ -854,9 +854,13 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|||||||
body.put("ITEM", itemArray);
|
body.put("ITEM", itemArray);
|
||||||
body.put("ITEMID", uniqueID);
|
body.put("ITEMID", uniqueID);
|
||||||
//过账日期
|
//过账日期
|
||||||
body.put("BUDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
Date date = inputFormat.parse(commitDate);
|
||||||
|
String outputDate = outputFormat.format(date);
|
||||||
|
body.put("BUDAT", outputDate);
|
||||||
//凭证日期
|
//凭证日期
|
||||||
body.put("BLDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
body.put("BLDAT", outputDate);
|
||||||
//凭证抬头文本
|
//凭证抬头文本
|
||||||
body.put("BKTXT", uniqueID);
|
body.put("BKTXT", uniqueID);
|
||||||
//用户名
|
//用户名
|
||||||
|
@ -890,7 +890,7 @@ public class MaterialShipServiceImpl implements IMaterialShipService {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
billCode=ProductionStockOut_NEW(shipRequestName, "SDK", user,materialPackingKeyList);
|
billCode=ProductionStockOut_NEW(shipRequestName, "SDK", user,materialPackingKeyList,commitDate);
|
||||||
if (billCode.isEmpty()) {
|
if (billCode.isEmpty()) {
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("SAP过账异常!").setErrorCode(400);
|
return AjaxResult.me().setSuccess(false).setMessage("SAP过账异常!").setErrorCode(400);
|
||||||
}
|
}
|
||||||
@ -906,7 +906,7 @@ public class MaterialShipServiceImpl implements IMaterialShipService {
|
|||||||
case "06"://成本中心领料
|
case "06"://成本中心领料
|
||||||
case "09"://研发领料
|
case "09"://研发领料
|
||||||
// billCode=toSAPService.orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
// billCode=toSAPService.orderStockOut(shipRequestName, "SDK", eventUser,materialPackingKeyList);
|
||||||
billCode=orderStockOut(shipRequestName, "SDK", user,materialPackingKeyList);
|
billCode=orderStockOut(shipRequestName, "SDK", user,materialPackingKeyList,commitDate);
|
||||||
//更新MES管芯数据
|
//更新MES管芯数据
|
||||||
new MESServiceImpl().updateDurable_ByCostcenter(shipRequestName, "SDK", user, materialPackingKeyList);
|
new MESServiceImpl().updateDurable_ByCostcenter(shipRequestName, "SDK", user, materialPackingKeyList);
|
||||||
//billCode = NCWServiceImpl.SaleOut2(shipRequestName, "SDK", eventUser,materialPackingKeyList,"");
|
//billCode = NCWServiceImpl.SaleOut2(shipRequestName, "SDK", eventUser,materialPackingKeyList,"");
|
||||||
@ -1103,7 +1103,7 @@ public class MaterialShipServiceImpl implements IMaterialShipService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String ProductionStockOut_NEW(String shipRequestName, String siteName, String user,List<String> boxList) throws Exception {
|
public String ProductionStockOut_NEW(String shipRequestName, String siteName, String user,List<String> boxList,String commitDate) throws Exception {
|
||||||
|
|
||||||
String rcode;
|
String rcode;
|
||||||
String undoId = "";
|
String undoId = "";
|
||||||
@ -1205,9 +1205,13 @@ public class MaterialShipServiceImpl implements IMaterialShipService {
|
|||||||
body.put("ITEM", itemArray);
|
body.put("ITEM", itemArray);
|
||||||
body.put("ITEMID", uniqueID);
|
body.put("ITEMID", uniqueID);
|
||||||
//过账日期
|
//过账日期
|
||||||
body.put("BUDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
Date date = inputFormat.parse(commitDate);
|
||||||
|
String outputDate = outputFormat.format(date);
|
||||||
|
body.put("BUDAT", outputDate);
|
||||||
//凭证日期
|
//凭证日期
|
||||||
body.put("BLDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
body.put("BLDAT", outputDate);
|
||||||
//凭证抬头文本
|
//凭证抬头文本
|
||||||
body.put("BKTXT", uniqueID);
|
body.put("BKTXT", uniqueID);
|
||||||
//用户名
|
//用户名
|
||||||
@ -1292,7 +1296,7 @@ public class MaterialShipServiceImpl implements IMaterialShipService {
|
|||||||
return undoId;
|
return undoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String orderStockOut(String shipRequestName, String siteName, String user,List<String> boxList) throws Exception {
|
public String orderStockOut(String shipRequestName, String siteName, String user,List<String> boxList, String commitDate) throws Exception {
|
||||||
|
|
||||||
String rcode;
|
String rcode;
|
||||||
String undoId = "";
|
String undoId = "";
|
||||||
@ -1374,9 +1378,13 @@ public class MaterialShipServiceImpl implements IMaterialShipService {
|
|||||||
body.put("ITEM", itemArray);
|
body.put("ITEM", itemArray);
|
||||||
body.put("ITEMID", uniqueID);
|
body.put("ITEMID", uniqueID);
|
||||||
//过账日期
|
//过账日期
|
||||||
body.put("BUDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
Date date = inputFormat.parse(commitDate);
|
||||||
|
String outputDate = outputFormat.format(date);
|
||||||
|
body.put("BUDAT", outputDate);
|
||||||
//凭证日期
|
//凭证日期
|
||||||
body.put("BLDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
body.put("BLDAT", outputDate);
|
||||||
//凭证抬头文本
|
//凭证抬头文本
|
||||||
body.put("BKTXT", uniqueID);
|
body.put("BKTXT", uniqueID);
|
||||||
//用户名
|
//用户名
|
||||||
|
Loading…
x
Reference in New Issue
Block a user