fix:修改问题

This commit is contained in:
郭飞 2025-05-13 15:26:41 +08:00
parent 4df4664fac
commit 9f5c8cb04d
3 changed files with 10 additions and 6 deletions

View File

@ -199,7 +199,7 @@ public class CheckMarkController {
bindMap.put("ERPLOCATION", erpLocation);
// 查找盘盈的批次
String sql_py = " SELECT a.*,ABS(DifferenceQuantity)NUM FROM (\r\n" +
" SELECT c.MATERIALPACKINGNAME,c.MATERIALSPECNAME,c.ERPLOCATION,c.ACTLOCATION SYSLOCATION,m.ERPFACTORY,\r\n" +
" SELECT c.MATERIALPACKINGNAME,c.MATERIALSPECNAME,m.UNIT,c.ERPLOCATION,c.ACTLOCATION c.SYSLOCATION,m.ERPFACTORY,\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" +
" m.CHARGE ,m.SDK_ID ,m.PHASE ,TO_CHAR(m.EXPIRINGDATE, 'YYYY-MM-DD HH24:MI:SS') expdate,\r\n" +

View File

@ -41,9 +41,13 @@ public class CheckPlanController {
String actlocation = CheckPlan.getACTLOCATION();
String erplocation = CheckPlan.getERPLOCATION();
String checktimekey = CheckPlan.getCHECKTIMEKEY();
// String sql = "SELECT m.MATERIALPACKINGNAME,m.ERPFACTORY ,m.ERPLOCATION ,m.LOCATIONNAME,m.MATERIALQUANTITY "
// + "FROM MATERIALPACKING m "
// + "WHERE m.MATERIALPACKINGNAME = :MATERIALPACKINGNAME AND m.SITENAME = :SITENAME AND STOCKSTATE = 'Stocked' ";
String sql = "SELECT m.MATERIALPACKINGNAME,m.ERPFACTORY ,m.ERPLOCATION ,m.LOCATIONNAME,m.MATERIALQUANTITY "
+ "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' OR STOCKSTATE = 'StockOut') ";
Map<String, Object> bindMap = new HashMap<String, Object>();
bindMap.put("SITENAME",siteName);
bindMap.put("MATERIALPACKINGNAME",materialPackingName);

View File

@ -36,7 +36,7 @@ public class ERPLocationMoveNoInvoiceServiceImpl implements ERPLocationMoveNoInv
* @throws Exception
*/
@Transactional
public boolean CommitMove(List<StorageSpec> list, String user, String timesString, String opCode) throws Exception {
public boolean CommitMove(List<StorageSpec> list, String user, String time, String opCode) throws Exception {
List<MaterialPacking> all = new ArrayList<MaterialPacking> ();
@ -72,7 +72,7 @@ public class ERPLocationMoveNoInvoiceServiceImpl implements ERPLocationMoveNoInv
arrayList.add(materialPackingKey);
}
String billCode = toSAPService.NoSourceChangeLocation(arrayList,aimErpFactory, aimErpLocation, aimLOcationName, user, "");
String billCode = toSAPService.NoSourceChangeLocation(arrayList,aimErpFactory, aimErpLocation, aimLOcationName, user, time);
List<MaterialPackingKey> mpKeyList = new ArrayList<MaterialPackingKey> ();
SetEventInfo setEventInfo = new SetEventInfo();
for (MaterialPacking materialPacking : all) {
@ -88,7 +88,7 @@ public class ERPLocationMoveNoInvoiceServiceImpl implements ERPLocationMoveNoInv
hashMap.put("unDoID", billCode);
setEventInfo.setUserColumns(hashMap);
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(mpKeyList, makeEventInfo, setEventInfo);
SaveUnDoInfo( billCode,timesString);
SaveUnDoInfo( billCode,time);
return true;
}