fix:修改备货出库
This commit is contained in:
parent
05516ac61c
commit
66b59eaa8e
@ -187,6 +187,20 @@ public class MaterialShipRequestDetail extends FieldAccessor implements DataInfo
|
|||||||
private String supplierNO;
|
private String supplierNO;
|
||||||
@UserColumnMark
|
@UserColumnMark
|
||||||
private String erpFactory;
|
private String erpFactory;
|
||||||
|
@UserColumnMark
|
||||||
|
private String deliveryAddress;
|
||||||
|
@UserColumnMark
|
||||||
|
private String auart;
|
||||||
|
|
||||||
|
public String getDeliveryAddress() {
|
||||||
|
return deliveryAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeliveryAddress(String deliveryAddress) {
|
||||||
|
this.deliveryAddress = deliveryAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getAuart() {
|
public String getAuart() {
|
||||||
return auart;
|
return auart;
|
||||||
@ -196,8 +210,7 @@ public class MaterialShipRequestDetail extends FieldAccessor implements DataInfo
|
|||||||
this.auart = auart;
|
this.auart = auart;
|
||||||
}
|
}
|
||||||
|
|
||||||
@UserColumnMark
|
|
||||||
private String auart;
|
|
||||||
|
|
||||||
public String getSaleOutQuantity() {
|
public String getSaleOutQuantity() {
|
||||||
return saleOutQuantity;
|
return saleOutQuantity;
|
||||||
|
@ -5851,6 +5851,7 @@ public class ToSAPServiceImpl {
|
|||||||
erplog.setEventName("盘点");
|
erplog.setEventName("盘点");
|
||||||
erplog.setInterfaceTime(TimeStampUtil.getCurrentTime(TimeStampUtil.FORMAT_DEFAULT));
|
erplog.setInterfaceTime(TimeStampUtil.getCurrentTime(TimeStampUtil.FORMAT_DEFAULT));
|
||||||
erplog.setMessageId(UUID.randomUUID().toString());
|
erplog.setMessageId(UUID.randomUUID().toString());
|
||||||
|
erplog.setSendMsg(sendData.toJSONString());
|
||||||
erplog.setSendMsg2(sendData.toJSONString());
|
erplog.setSendMsg2(sendData.toJSONString());
|
||||||
erplog.setReturnMsg2(sapreturn);
|
erplog.setReturnMsg2(sapreturn);
|
||||||
erplog.setResultCode(rcode);
|
erplog.setResultCode(rcode);
|
||||||
|
@ -140,29 +140,34 @@ public class CheckMarkController {
|
|||||||
String erpLocation = sr_erp.get(i).get("ERPLOCATION").toString();
|
String erpLocation = sr_erp.get(i).get("ERPLOCATION").toString();
|
||||||
bindMap.put("ERPLOCATION", erpLocation);
|
bindMap.put("ERPLOCATION", erpLocation);
|
||||||
//查找盘亏的批次
|
//查找盘亏的批次
|
||||||
String sql_pk = " SELECT a.*,ABS(DifferenceQuantity)NUM FROM (\r\n" +
|
String sql_pk = " SELECT a.*,ABS(DifferenceQuantity)NUM FROM (\r\n" +
|
||||||
" SELECT c.MATERIALPACKINGNAME,c.MATERIALSPECNAME,m.UNIT,c.ERPLOCATION,c.SYSLOCATION,m.ERPFACTORY,\r\n" +
|
" SELECT c.MATERIALPACKINGNAME,c.MATERIALSPECNAME,m.UNIT,c.ERPLOCATION,c.SYSLOCATION,m.ERPFACTORY,\r\n" +
|
||||||
" NVL( c.MATERIALQUANTITY,0) AS MATERIALQUANTITY,NVL(c2.MATERIALQUANTITY, 0) AS MATERIALACTQUANTITY, \r\n" +
|
" NVL( c.MATERIALQUANTITY,0) AS MATERIALQUANTITY,NVL(c2.MATERIALQUANTITY, 0) AS MATERIALACTQUANTITY, \r\n" +
|
||||||
" (NVL(c2.MATERIALQUANTITY, 0) -c.MATERIALQUANTITY) AS DifferenceQuantity,c.CHECKPLATATE,c.CHECKPLANSTATE,\r\n" +
|
" (NVL(c2.MATERIALQUANTITY, 0) -c.MATERIALQUANTITY) AS DifferenceQuantity,c.CHECKPLATATE,c.CHECKPLANSTATE,\r\n" +
|
||||||
" m.CHARGE ,m.SDK_ID ,m.PHASE ,TO_CHAR(m.EXPIRINGDATE, 'YYYY-MM-DD HH24:MI:SS') expdate,\r\n" +
|
" m.CHARGE ,m.SDK_ID ,m.PHASE ,TO_CHAR(m.EXPIRINGDATE, 'YYYY-MM-DD HH24:MI:SS') expdate,\r\n" +
|
||||||
" TO_CHAR(m.MAKEDATE, 'YYYY-MM-DD HH24:MI:SS') proddate,TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') indate\r\n" +
|
" TO_CHAR(m.MAKEDATE, 'YYYY-MM-DD HH24:MI:SS') proddate,TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') indate\r\n" +
|
||||||
" FROM CHECKPLAN c\r\n" +
|
" FROM CHECKPLAN c\r\n" +
|
||||||
" LEFT JOIN MATERIALPACKING m ON c.MATERIALPACKINGNAME=m.MATERIALPACKINGNAME \r\n" +
|
" LEFT JOIN MATERIALPACKING m ON c.MATERIALPACKINGNAME=m.MATERIALPACKINGNAME \r\n" +
|
||||||
" LEFT JOIN CHECKRECORD c2 ON c.CHECKPLANNAME = c2.CHECKPLANNAME AND c.ERPLOCATION = c2.ERPLOCATION \r\n" +
|
" LEFT JOIN CHECKRECORD c2 ON c.CHECKPLANNAME = c2.CHECKPLANNAME AND c.ERPLOCATION = c2.ERPLOCATION \r\n" +
|
||||||
" AND c.MATERIALPACKINGNAME = c2.MATERIALPACKINGNAME AND c.SYSLOCATION = c2.ACTLOCATION\r\n" +
|
" AND c.MATERIALPACKINGNAME = c2.MATERIALPACKINGNAME AND c.SYSLOCATION = c2.ACTLOCATION\r\n" +
|
||||||
" WHERE c.CHECKPLANNAME =:CHECKPLANNAME AND c.PLANDATE = :PLANDATE AND c.ERPLOCATION=:ERPLOCATION)A\r\n" +
|
" WHERE c.CHECKPLANNAME =:CHECKPLANNAME AND c.PLANDATE = :PLANDATE AND c.ERPLOCATION=:ERPLOCATION)A\r\n" +
|
||||||
" WHERE DifferenceQuantity<0 AND nvl(CHECKPLATATE,'是')='是' AND nvl(CHECKPLANSTATE,'N')<>'Approved' ";
|
" WHERE DifferenceQuantity<0 AND nvl(CHECKPLATATE,'是')='是' AND nvl(CHECKPLANSTATE,'N')<>'Approved' ";
|
||||||
List<Map<String, Object>> sr_pk = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql_pk, bindMap);
|
List<Map<String, Object>> sr_pk = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql_pk, bindMap);
|
||||||
if(sr_pk.size()>0)
|
if(sr_pk.size()>0)
|
||||||
{
|
{
|
||||||
//调用SAP接口
|
//调用SAP接口
|
||||||
billCode=toSAPServiceImpl.qtcrNoInvoiceForCheckPlan(sr_pk, "qtc", user, commitDate,opCode,costName);
|
billCode=toSAPServiceImpl.qtcrNoInvoiceForCheckPlan(sr_pk, "qtc", user, commitDate,opCode,costName);
|
||||||
|
|
||||||
|
if("".equals(billCode) || billCode == null) {
|
||||||
|
return AjaxResult.me().setErrorCode(500).setSuccess(false).setMessage("SAP过账失败");
|
||||||
|
}
|
||||||
|
|
||||||
//更新盘点计划状态
|
//更新盘点计划状态
|
||||||
String sql = "UPDATE CHECKPLAN c SET CHECKPLANSTATE = 'Approved' WHERE PLANDATE = :PLANDATE AND CHECKPLANNAME = :CHECKPLANNAME AND ERPLOCATION=:ERPLOCATION";
|
String sql = "UPDATE CHECKPLAN c SET CHECKPLANSTATE = 'Approved' WHERE PLANDATE = :PLANDATE AND CHECKPLANNAME = :CHECKPLANNAME AND ERPLOCATION=:ERPLOCATION";
|
||||||
IDMFrameServiceProxy.getSqlTemplate().update(sql, bindMap);
|
IDMFrameServiceProxy.getSqlTemplate().update(sql, bindMap);
|
||||||
//更新批次状态
|
//更新批次状态
|
||||||
List<MaterialPackingKey> mpkList=new ArrayList<>();
|
List<MaterialPackingKey> mpkList=new ArrayList<>();
|
||||||
for(int j=0;j<sr_pk.size();j++)
|
for(int j=0;j<sr_pk.size();j++)
|
||||||
{
|
{
|
||||||
MaterialPackingKey mpk=new MaterialPackingKey();
|
MaterialPackingKey mpk=new MaterialPackingKey();
|
||||||
mpk.setSiteName(siteName);
|
mpk.setSiteName(siteName);
|
||||||
@ -176,7 +181,7 @@ public class CheckMarkController {
|
|||||||
setEventInfo.setUserColumns(userc);
|
setEventInfo.setUserColumns(userc);
|
||||||
makeEventInfo = eventInfoUtil.makeEventInfo("StockOutForCheckPlan", user, "StockOutForCheckPlan");
|
makeEventInfo = eventInfoUtil.makeEventInfo("StockOutForCheckPlan", user, "StockOutForCheckPlan");
|
||||||
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(mpkList, makeEventInfo, setEventInfo);
|
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(mpkList, makeEventInfo, setEventInfo);
|
||||||
|
|
||||||
//存储物料凭证
|
//存储物料凭证
|
||||||
rs.SaveUnDoInfo(billCode, commitDate);
|
rs.SaveUnDoInfo(billCode, commitDate);
|
||||||
}
|
}
|
||||||
@ -200,7 +205,7 @@ public class CheckMarkController {
|
|||||||
bindMap.put("ERPLOCATION", erpLocation);
|
bindMap.put("ERPLOCATION", erpLocation);
|
||||||
// 查找盘盈的批次
|
// 查找盘盈的批次
|
||||||
String sql_py = " SELECT a.*,ABS(DifferenceQuantity)NUM FROM (\r\n" +
|
String sql_py = " SELECT a.*,ABS(DifferenceQuantity)NUM FROM (\r\n" +
|
||||||
" SELECT c.MATERIALPACKINGNAME,c.MATERIALSPECNAME,m.UNIT,c.ERPLOCATION,c.ACTLOCATION c.SYSLOCATION,m.ERPFACTORY,\r\n" +
|
" SELECT c.MATERIALPACKINGNAME,c.MATERIALSPECNAME,m.UNIT,c.ERPLOCATION,c.ACTLOCATION SYSLOCATION,m.ERPFACTORY,\r\n" +
|
||||||
" NVL( c.MATERIALQUANTITY,0) AS MATERIALQUANTITY,NVL(c2.MATERIALQUANTITY, 0) AS MATERIALACTQUANTITY, \r\n" +
|
" NVL( c.MATERIALQUANTITY,0) AS MATERIALQUANTITY,NVL(c2.MATERIALQUANTITY, 0) AS MATERIALACTQUANTITY, \r\n" +
|
||||||
" (NVL(c.MATERIALQUANTITY, 0) -NVL(c2.MATERIALQUANTITY, 0)) AS DifferenceQuantity,c.CHECKPLATATE,c.CHECKPLANSTATE,\r\n" +
|
" (NVL(c.MATERIALQUANTITY, 0) -NVL(c2.MATERIALQUANTITY, 0)) AS DifferenceQuantity,c.CHECKPLATATE,c.CHECKPLANSTATE,\r\n" +
|
||||||
" m.CHARGE ,m.SDK_ID ,m.PHASE ,TO_CHAR(m.EXPIRINGDATE, 'YYYY-MM-DD HH24:MI:SS') expdate,\r\n" +
|
" m.CHARGE ,m.SDK_ID ,m.PHASE ,TO_CHAR(m.EXPIRINGDATE, 'YYYY-MM-DD HH24:MI:SS') expdate,\r\n" +
|
||||||
|
@ -45,7 +45,7 @@ public class CheckPlanController {
|
|||||||
// + "FROM MATERIALPACKING m "
|
// + "FROM MATERIALPACKING m "
|
||||||
// + "WHERE m.MATERIALPACKINGNAME = :MATERIALPACKINGNAME AND m.SITENAME = :SITENAME AND STOCKSTATE = 'Stocked' ";
|
// + "WHERE m.MATERIALPACKINGNAME = :MATERIALPACKINGNAME AND m.SITENAME = :SITENAME AND STOCKSTATE = 'Stocked' ";
|
||||||
|
|
||||||
String sql = "SELECT m.MATERIALPACKINGNAME,m.ERPFACTORY ,m.ERPLOCATION ,m.LOCATIONNAME,m.MATERIALQUANTITY "
|
String sql = "SELECT m.MATERIALPACKINGNAME,m.ERPFACTORY ,m.ERPLOCATION ,m.LOCATIONNAME,m.MATERIALQUANTITY,m.StockOut "
|
||||||
+ "FROM MATERIALPACKING m "
|
+ "FROM MATERIALPACKING m "
|
||||||
+ "WHERE m.MATERIALPACKINGNAME = :MATERIALPACKINGNAME AND m.SITENAME = :SITENAME AND (STOCKSTATE = 'Stocked' OR STOCKSTATE = 'StockOut') ";
|
+ "WHERE m.MATERIALPACKINGNAME = :MATERIALPACKINGNAME AND m.SITENAME = :SITENAME AND (STOCKSTATE = 'Stocked' OR STOCKSTATE = 'StockOut') ";
|
||||||
Map<String, Object> bindMap = new HashMap<String, Object>();
|
Map<String, Object> bindMap = new HashMap<String, Object>();
|
||||||
|
@ -1292,6 +1292,7 @@ public class SAPToWMSController {
|
|||||||
|
|
||||||
String xloek= MapUtils.getString(item, "xloek"); // 删除标识
|
String xloek= MapUtils.getString(item, "xloek"); // 删除标识
|
||||||
String auart= MapUtils.getString(item, "AUART"); // 接收生产订单类型 返工ZP05 复卷ZP01
|
String auart= MapUtils.getString(item, "AUART"); // 接收生产订单类型 返工ZP05 复卷ZP01
|
||||||
|
String lifnr= MapUtils.getString(item, "LIFNR"); //
|
||||||
|
|
||||||
|
|
||||||
MaterialShipRequestDetail mrd =new MaterialShipRequestDetail();
|
MaterialShipRequestDetail mrd =new MaterialShipRequestDetail();
|
||||||
@ -1403,6 +1404,8 @@ public class SAPToWMSController {
|
|||||||
bindMapItem.put("phase", phase);
|
bindMapItem.put("phase", phase);
|
||||||
bindMapItem.put("saleOutQuantity", 0);
|
bindMapItem.put("saleOutQuantity", 0);
|
||||||
bindMapItem.put("auart", auart);
|
bindMapItem.put("auart", auart);
|
||||||
|
bindMapItem.put("deliveryAddress", lifnr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if("07".equals(shipRequestType) || "03".equals(shipRequestType)) {
|
if("07".equals(shipRequestType) || "03".equals(shipRequestType)) {
|
||||||
|
@ -364,7 +364,7 @@ public class SaleOutController {
|
|||||||
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
// return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
else if ("OEM".equals(shipRequestType)) { //委外出库
|
else if ("OEM".equals(shipRequestType) || "08".equals(shipRequestType)) { //委外出库
|
||||||
if ((allQty.subtract(minusQty)).compareTo(minQty)>0) {//只能超发一个
|
if ((allQty.subtract(minusQty)).compareTo(minQty)>0) {//只能超发一个
|
||||||
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
return AjaxResult.me().setSuccess(false).setMessage("只能超发一个不能出库了!");
|
||||||
}
|
}
|
||||||
|
@ -2581,7 +2581,8 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|||||||
String undoId = "";
|
String undoId = "";
|
||||||
String rmsg = null;
|
String rmsg = null;
|
||||||
String sql="SELECT \r\n" +
|
String sql="SELECT \r\n" +
|
||||||
" MS.DELIVERYADDRESS, \r\n" +
|
// " MS.DELIVERYADDRESS, \r\n" +
|
||||||
|
" MD.DELIVERYADDRESS, \r\n" + // 取详情
|
||||||
" MP.MATERIALSPECNAME, \r\n" +
|
" MP.MATERIALSPECNAME, \r\n" +
|
||||||
" MP.ERPFACTORY, \r\n" +
|
" MP.ERPFACTORY, \r\n" +
|
||||||
" MP.ERPLOCATION, \r\n" +
|
" MP.ERPLOCATION, \r\n" +
|
||||||
@ -2613,7 +2614,7 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|||||||
" AND MP.STOCKSTATE = 'Stocked'\r\n" +
|
" AND MP.STOCKSTATE = 'Stocked'\r\n" +
|
||||||
" AND mp.MATERIALPACKINGNAME IN (:BOXLIST)\r\n" +
|
" AND mp.MATERIALPACKINGNAME IN (:BOXLIST)\r\n" +
|
||||||
" GROUP BY \r\n" +
|
" GROUP BY \r\n" +
|
||||||
" MS.DELIVERYADDRESS, \r\n" +
|
" MD.DELIVERYADDRESS, \r\n" +
|
||||||
" MP.MATERIALSPECNAME, \r\n" +
|
" MP.MATERIALSPECNAME, \r\n" +
|
||||||
" MP.ERPFACTORY, \r\n" +
|
" MP.ERPFACTORY, \r\n" +
|
||||||
" MP.ERPLOCATION, \r\n" +
|
" MP.ERPLOCATION, \r\n" +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user