add 辅材出库,取消备货方法
This commit is contained in:
parent
0cbbdf3cb7
commit
cb9790a951
@ -53,5 +53,13 @@ public interface IMaterialShipService {
|
|||||||
* @return 返回信息
|
* @return 返回信息
|
||||||
*/
|
*/
|
||||||
AjaxResult MaterialShipRequestAuxiliaryStockOut(EventInfo eventInfo, String siteName, String shipRequestName, String user, List<LinkedHashMap<String,String>> boxList, String commitDate)throws Exception;
|
AjaxResult MaterialShipRequestAuxiliaryStockOut(EventInfo eventInfo, String siteName, String shipRequestName, String user, List<LinkedHashMap<String,String>> boxList, String commitDate)throws Exception;
|
||||||
|
/**
|
||||||
|
*辅材出库取下确认备货
|
||||||
|
* @param eventInfo 事件信息
|
||||||
|
* @param siteName 现地
|
||||||
|
* @param shipRequestName 单号
|
||||||
|
* @return 返回信息
|
||||||
|
*/
|
||||||
|
AjaxResult MaterialShipRequestAuxiliaryCancelConfirmStocking(EventInfo eventInfo, String siteName, String shipRequestName, String user);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -419,7 +419,77 @@ public class MaterialShipServiceImpl implements IMaterialShipService {
|
|||||||
eventInfo, info);*/
|
eventInfo, info);*/
|
||||||
return AjaxResult.me().setSuccess(true).setErrorCode(200);
|
return AjaxResult.me().setSuccess(true).setErrorCode(200);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 取消确认备货
|
||||||
|
* @param eventInfo 事件信息
|
||||||
|
* @param siteName 现地
|
||||||
|
* @param shipRequestName 单号
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public AjaxResult MaterialShipRequestAuxiliaryCancelConfirmStocking(EventInfo eventInfo, String siteName, String shipRequestName,
|
||||||
|
String user) {
|
||||||
|
String ressSql = "SELECT\r\n" +
|
||||||
|
" A.MATERIALPACKINGNAME ,A.MATERIALSPECNAME,A.MATERIALQUANTITY, CASE WHEN MATERIALQUANTITY2 > 0 THEN A.MATERIALQUANTITY2 " +
|
||||||
|
" ELSE A.MATERIALQUANTITY END MATERIALQUANTITY2,A.AREANAME ,A.SHELFNAME ,\r\n" +
|
||||||
|
" A.CHARGE ,\r\n" +
|
||||||
|
" TO_CHAR(A.RECEIVETIME, 'YYYY-MM-DD') RECEIVETIME,A.SDK_ID,A.PHASE,\r\n" +
|
||||||
|
" be.DESCRIPTION ERPLOCATION,\r\n" +
|
||||||
|
" s.DESCRIPTION LOCATIONNAME,\r\n" +
|
||||||
|
" 'Y' BHFLG, A.SHIPREQUESTNAME,MS.RECEIVEREQUESTDETAILNAME SHIPREQUESTDETAILNAME, \r\n" +
|
||||||
|
" 'N' IS_CHECK\r\n" +
|
||||||
|
"FROM\r\n" +
|
||||||
|
" MATERIALPACKINGSUB MS\n" +
|
||||||
|
"\tLEFT JOIN MATERIALPACKING A ON MS.MATERIALPACKINGNAME = A.MATERIALPACKINGNAME AND MS.RECEIVEREQUESTNAME = A.SHIPREQUESTNAME \r\n" +
|
||||||
|
"LEFT JOIN SDK_SPEC SS ON\r\n" +
|
||||||
|
" A.SDK_ID = SS.SDK_ID\r\n" +
|
||||||
|
"LEFT JOIN \r\n" +
|
||||||
|
" MATERIALSPEC B ON\r\n" +
|
||||||
|
" A.MATERIALSPECNAME = B.MATERIALSPECNAME\r\n" +
|
||||||
|
"LEFT JOIN BS_ERPLOCATION be ON\r\n" +
|
||||||
|
" A.ERPLOCATION = be.ERPLOCATIONNAME\r\n" +
|
||||||
|
"LEFT JOIN STORAGESPEC s ON\r\n" +
|
||||||
|
" A.LOCATIONNAME = s.STORAGENAME AND A.ERPFACTORY = s.ERPFACTORY AND A.ERPLOCATION = s.ERPLOCATION \r\n" +
|
||||||
|
"WHERE\r\n" +
|
||||||
|
" 1 = 1\r\n" +
|
||||||
|
" AND A.MATERIALSPECNAME = B.MATERIALSPECNAME\r\n" +
|
||||||
|
" AND A.SITENAME = B.SITENAME\r\n" +
|
||||||
|
" AND A.SITENAME =:SITENAME\r\n" +
|
||||||
|
" AND A.SHIPREQUESTNAME = :SHIPREQUESTNAME\r\n" +
|
||||||
|
" AND A.STOCKSTATE = 'Stocked'\r\n" +
|
||||||
|
" AND A.PACKINGSTATE = 'Released'\r\n" +
|
||||||
|
" AND A.HOLDSTATE = 'N'\r\n" +
|
||||||
|
" AND A.PACKINGGRADE IN ('OK', 'OKEY')\r\n" +
|
||||||
|
" AND A.MATERIALQUANTITY <> '0'\r\n" +
|
||||||
|
" AND (A.NPFLAG <> 'Y'\r\n" +
|
||||||
|
" OR A.NPFLAG IS NULL)\r\n" +
|
||||||
|
" AND (A.ETCSTATE IS NULL\r\n" +
|
||||||
|
" OR A.ETCSTATE = 'EtcIn')\r\n" +
|
||||||
|
" AND A.OQARESULTSTATE <> 'PREOQA'\r\n" +
|
||||||
|
" AND to_char(A.EXPIRINGDATE, 'yyyymmdd') >= to_char(SYSDATE, 'yyyymmdd')";
|
||||||
|
Map<String, Object> hashMap = new HashMap<String,Object> ();
|
||||||
|
hashMap.put("SITENAME", "SDK");
|
||||||
|
hashMap.put("SHIPREQUESTNAME", shipRequestName);
|
||||||
|
List<Map<String, Object>> queryForList = IDMFrameServiceProxy.getSqlTemplate().queryForList(ressSql, hashMap);
|
||||||
|
//通过单据找到所有的已备货信息
|
||||||
|
for (Map<String, Object> map : queryForList) {
|
||||||
|
String materialQuery2 = map.get("MATERIALQUANTITY2")== null ? "" : map.get("MATERIALQUANTITY2").toString();
|
||||||
|
String materialSpecName = map.get("MATERIALSPECNAME")== null ? "" : map.get("MATERIALSPECNAME").toString();
|
||||||
|
String sdk_id = map.get("SDK_ID") == null ? "" : map.get("SDK_ID").toString();
|
||||||
|
String phase = map.get("PHASE")== null ? "" : map.get("PHASE").toString();
|
||||||
|
String materialPackingName = map.get("MATERIALPACKINGNAME")== null ? "" : map.get("MATERIALPACKINGNAME").toString();
|
||||||
|
String shipRequestDetailName = map.get("SHIPREQUESTDETAILNAME") == null ? "" : map.get("SHIPREQUESTDETAILNAME").toString();
|
||||||
|
MaterialPackingKey materialPackingKey = new MaterialPackingKey("SDK",materialPackingName);
|
||||||
|
com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking selectByKey = MaterialPackingServiceProxy.getMaterialPackingService().selectByKey(materialPackingKey);
|
||||||
|
try {
|
||||||
|
AuxiliaryReserve(eventInfo,selectByKey, shipRequestName,shipRequestDetailName,materialSpecName,sdk_id,phase, "Dessign", siteName, user,materialQuery2);
|
||||||
|
} catch (CustomException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.me().setSuccess(true).setErrorCode(200);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 辅材出库-(备货/取消备货)
|
* 辅材出库-(备货/取消备货)
|
||||||
* @param materialPacking
|
* @param materialPacking
|
||||||
|
Loading…
x
Reference in New Issue
Block a user