Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -75,6 +75,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (StrUtil.isNotEmpty(map.get("io_type"))) {
|
||||
map.put("io_type", map.get("io_type"));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(map.get("is_upload"))) {
|
||||
map.put("is_upload", map.get("is_upload"));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(map.get("pcsn"))) {
|
||||
map.put("pcsn", "%" + map.get("pcsn") + "%");
|
||||
}
|
||||
@@ -768,6 +771,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonMap.put("material_id", dtl.getString("material_id"));
|
||||
jsonMap.put("sale_order_name", dtl.getString("source_bill_code"));
|
||||
jsonMap.put("sect_id", whereJson.getString("sect_id"));
|
||||
jsonMap.put("stor_id", whereJson.getString("stor_id"));
|
||||
|
||||
JSONObject jsonOneIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonOneIvt)) throw new BadRequestException("库存不足");
|
||||
@@ -846,6 +850,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonMap.put("material_id", dtl.getString("material_id"));
|
||||
jsonMap.put("pcsn", dtl.getString("pcsn"));
|
||||
jsonMap.put("sect_id", whereJson.getString("sect_id"));
|
||||
jsonMap.put("stor_id", whereJson.getString("stor_id"));
|
||||
|
||||
JSONObject jsonIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("库存不足");
|
||||
@@ -985,6 +990,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonMap.put("material_id", dtl.getString("material_id"));
|
||||
jsonMap.put("sale_order_name", dtl.getString("source_bill_code"));
|
||||
jsonMap.put("sect_id", whereJson.getString("sect_id"));
|
||||
jsonMap.put("stor_id", whereJson.getString("stor_id"));
|
||||
|
||||
JSONObject jsonOneIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonOneIvt)) throw new BadRequestException("库存不足");
|
||||
@@ -1063,6 +1069,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonMap.put("material_id", dtl.getString("material_id"));
|
||||
jsonMap.put("pcsn", dtl.getString("pcsn"));
|
||||
jsonMap.put("sect_id", whereJson.getString("sect_id"));
|
||||
jsonMap.put("stor_id", whereJson.getString("stor_id"));
|
||||
|
||||
JSONObject jsonIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("库存不足");
|
||||
@@ -1371,6 +1378,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
} else {
|
||||
jo_dtl.put("bill_status", "30");
|
||||
}
|
||||
|
||||
if (jo_dtl.getDoubleValue("unassign_qty") == 0) {
|
||||
jo_dtl.put("bill_status", "40");
|
||||
}
|
||||
|
||||
wo_dtl.update(jo_dtl);
|
||||
//更新主表状态
|
||||
this.updateMststatus(iostorinv_id);
|
||||
@@ -1871,7 +1883,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
assign_qty = NumberUtil.add(assign_qty,canuse_qty);
|
||||
|
||||
if (unassign_qty >= canuse_qty) {
|
||||
unassign_qty = unassign_qty - canuse_qty;
|
||||
// unassign_qty = unassign_qty - canuse_qty;
|
||||
unassign_qty = NumberUtil.sub(unassign_qty,canuse_qty);
|
||||
ivt.put("change_qty", canuse_qty + "");
|
||||
} else {
|
||||
ivt.put("change_qty", canuse_qty + "");
|
||||
@@ -1913,11 +1926,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
break;
|
||||
}
|
||||
}
|
||||
HashMap<String, String> map_dtl = new HashMap<String, String>();
|
||||
// HashMap<String, String> map_dtl = new HashMap<String, String>();
|
||||
JSONObject map_dtl = new JSONObject();
|
||||
//更新明细
|
||||
map_dtl.put("unassign_qty", unassign_qty + "");
|
||||
map_dtl.put("assign_qty", assign_qty + "");
|
||||
if (unassign_qty == 0) {
|
||||
if (map_dtl.getDoubleValue("unassign_qty") <= 0) {
|
||||
map_dtl.put("bill_status", "40");
|
||||
} else {
|
||||
map_dtl.put("bill_status", "30");
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
输入.sap_pcsn TYPEAS s_string
|
||||
输入.cust_code TYPEAS s_string
|
||||
输入.package_box_sn TYPEAS s_string
|
||||
输入.is_upload TYPEAS s_string
|
||||
输入.in_stor_id TYPEAS f_string
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -108,6 +109,10 @@
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.is_upload <> ""
|
||||
ios.is_upload = 输入.is_upload
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.io_type <> ""
|
||||
ios.io_type = 输入.io_type
|
||||
ENDOPTION
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.iostorinv_id TYPEAS s_string
|
||||
输入.iostorinvdtl_id TYPEAS s_string
|
||||
输入.stor_id TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -84,6 +85,10 @@
|
||||
ivt.pcsn = 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.stor_id <> ""
|
||||
attr.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
|
||||
order by ivt.instorage_time ASC
|
||||
|
||||
ENDSELECT
|
||||
|
||||
Reference in New Issue
Block a user