This commit is contained in:
2022-12-09 13:19:23 +08:00
2 changed files with 10 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
@Transactional(rollbackFor = Exception.class)
public JSONObject confirm(JSONObject whereJson) {
String box_no = whereJson.getString("box_no");
//1-报废入库2-生产入库3-退货入库
//1-报废入库2-生产入库3-退货入库4-拆分入库
String option = whereJson.getString("option");
String material_code = whereJson.getString("material_code");
String is_virtual = whereJson.getString("is_virtual");
@@ -112,6 +112,9 @@ public class ProductInstorServiceImpl implements ProductInstorService {
if (option.equals("3")) {
mst_jo.put("bill_type", "0002");
}
if (option.equals("4")) {
mst_jo.put("bill_type", "0005");
}
//查询成品库仓库
JSONObject stor = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("is_delete = '0' AND is_used = '1' AND is_productstore = '1'").uniqueResult(0);
mst_jo.put("stor_id", stor.getString("stor_id"));

View File

@@ -2091,7 +2091,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
// 更新子卷包装关系表 状态 - 3
JSONObject jsonSub = subTab.query("container_name = '" + dis.getString("pcsn") + "' and status = '2'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonSub)) throw new BadRequestException("此子卷不存在或不为入库状态:" + dis.getString("pcsn"));
jsonSub.put("status", "3");
// 如果是拆分入库则将包装关系改为生成状态
if (jo_mst.getString("bill_type").equals("1005")){
jsonSub.put("status", "0");
} else {
jsonSub.put("status", "3");
}
subTab.update(jsonSub);
}