|
|
@@ -489,12 +489,12 @@ public class MESServiceImpl implements MESService {
|
|
|
return ApiResponse.failRsp("10025",requestId,"报废数量不能为空!");
|
|
|
}
|
|
|
//临时逻辑 重新计算报废数量
|
|
|
- int coun = baseDao.getCountByCondition("make", "ma_code='" + prodNo + "' and to_char(ma_date,'yyyyMM')<'202212'");
|
|
|
- if (baseDao.isDBSetting("MakeScrap","overQtySuccess")&&coun>0) {
|
|
|
- qty = Double.parseDouble(StringUtil.nvl(baseDao.getFieldDataByCondition("makematerial left join make on mm_maid=ma_id", "nvl(mm_havegetqty,0)-nvl(mm_returnmqty,0)+nvl(mm_addqty,0)+nvl(mm_scrapqty,0)-nvl(mm_oneuseqty,0)*nvl(ma_madeqty,0)", "mm_id=" + lineId), "0"));
|
|
|
- /*if (mmqty < qty) {
|
|
|
+ //int coun = baseDao.getCountByCondition("make", "ma_code='" + prodNo + "' and to_char(ma_date,'yyyyMM')<'202212'");
|
|
|
+ if (baseDao.isDBSetting("MakeScrap","overQtySuccess")) {
|
|
|
+ double mmqty = Double.parseDouble(StringUtil.nvl(baseDao.getFieldDataByCondition("makematerial left join make on mm_maid=ma_id", "nvl(mm_havegetqty,0)-nvl(mm_returnmqty,0)+nvl(mm_addqty,0)+nvl(mm_scrapqty,0)-nvl(mm_oneuseqty,0)*nvl(ma_madeqty,0)", "mm_id=" + lineId), "0"));
|
|
|
+ if (mmqty < qty) {
|
|
|
qty = mmqty;
|
|
|
- }*/
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
String reason = StringUtil.nvl(object.get("reason"), "");
|