取消重复报检
This commit is contained in:
parent
07bc6e7be8
commit
646c0d842f
|
|
@ -97,7 +97,10 @@ public class QCRptDataPushtoQmsAction implements ICommonAction {
|
||||||
validArriveList.add(arriveVO);
|
validArriveList.add(arriveVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildSyncData(arriveVOS);
|
if(validArriveList.isEmpty()){
|
||||||
|
throw new BusinessException("已经报检不允许重复报检");
|
||||||
|
}
|
||||||
|
buildSyncData(validArriveList.toArray(new ArriveVO[validArriveList.size()]));
|
||||||
|
|
||||||
} catch (BusinessException e) {
|
} catch (BusinessException e) {
|
||||||
ExceptionUtils.wrapException(e);
|
ExceptionUtils.wrapException(e);
|
||||||
|
|
@ -174,7 +177,10 @@ public class QCRptDataPushtoQmsAction implements ICommonAction {
|
||||||
singleObj.put("Content", contentArray);
|
singleObj.put("Content", contentArray);
|
||||||
pushData(singleObj);
|
pushData(singleObj);
|
||||||
update.add(hvo.getPk_arriveorder());
|
update.add(hvo.getPk_arriveorder());
|
||||||
updateArrveOrder(hvo.getPk_arriveorder());
|
// updateArrveOrder(hvo.getPk_arriveorder());
|
||||||
|
}
|
||||||
|
if(update.size() > 0) {
|
||||||
|
updateArrveOrder(update.toArray(new String[update.size()]));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -187,10 +193,12 @@ public class QCRptDataPushtoQmsAction implements ICommonAction {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateArrveOrder(String pkArriveorder) throws DAOException {
|
private void updateArrveOrder(String[] pkArriveorder) throws DAOException {
|
||||||
BaseDAO dao = new BaseDAO();
|
BaseDAO dao = new BaseDAO();
|
||||||
String sql = "update po_arriveorder_b set vbdef32='Y' where pk_arriveorder='"
|
// 将数组元素拼接为 '值1','值2',... 格式,适配IN条件
|
||||||
+ pkArriveorder + "'";
|
String ids = String.join("','", pkArriveorder);
|
||||||
|
// 构建更新语句(where条件使用IN匹配数组中的所有值)
|
||||||
|
String sql = "update po_arriveorder_b set vbdef32='Y' where pk_arriveorder in ('" + ids + "')";
|
||||||
dao.executeUpdate(sql);
|
dao.executeUpdate(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue