|
|
@@ -1229,11 +1229,11 @@ public class MESServiceImpl implements MESService {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("code",data[1]);
|
|
|
if (baseDao.checkIf("makematerial","nvl(mm_cp_user,0)=0 and nvl(mm_qty,0)>0 and mm_maid="+data[5])){
|
|
|
- Object canmadeqty = baseDao.getFieldDataByCondition("make", "(select min(case when NVL(mm_havegetqty,0)-NVL(mm_scrapqty,0)>=mm_qty then ma_qty else floor((nvl(mm_havegetqty, 0)-nvl(mm_scrapqty,0))*1.0/mm_oneuseqty)end) from makematerial where mm_maid=ma_id and nvl(mm_materialstatus,' ')=' ' and mm_oneuseqty>0 and mm_oneuseqty*ma_qty<=mm_qty+0.1 and nvl(mm_cp_user,0)=0)","ma_code='" + makeCode + "'");
|
|
|
+ Object canmadeqty = baseDao.getFieldDataByCondition("make", "(select min(case when NVL(mm_havegetqty,0)-NVL(mm_scrapqty,0)>=mm_qty then ma_qty else floor((nvl(mm_havegetqty, 0)-nvl(mm_scrapqty,0))*1.0/mm_oneuseqty)end) from makematerial where mm_maid=ma_id and nvl(mm_materialstatus,' ')=' ' and nvl(mm_oneuseqty,0)>0 and nvl(mm_cp_user,0)=0)","ma_code='" + makeCode + "'");
|
|
|
//备料齐套数量
|
|
|
map.put("canmadeqty",Double.parseDouble(StringUtil.nvl(canmadeqty,"0")));
|
|
|
}else {
|
|
|
- map.put("canmadeqty",Double.parseDouble(StringUtil.nvl(data[2],"0")));
|
|
|
+ map.put("canmadeqty",Double.parseDouble(StringUtil.nvl(data[0],"0")));
|
|
|
}
|
|
|
//工单数量
|
|
|
map.put("qty",data[2]);
|