This commit is contained in:
2022-10-28 18:29:15 +08:00
parent bb2cc1e67a
commit 3a35fb4712
4 changed files with 44 additions and 13 deletions

View File

@@ -74,20 +74,8 @@
IF 输入.flag = "2"
QUERY
SELECT
plan.mfg_order_name,
plan.container_name,
plan.*,
ivt.point_code,
plan.split_group,
plan.manufacture_sort,
plan.manufacture_date,
plan.paper_tube_or_FRP,
plan.paper_tube_material,
plan.paper_tube_description,
plan.paper_tube_model,
plan.FRP_material,
plan.FRP_description,
plan.FRP_model,
plan.workorder_id,
ivt.sort_seq,
ivt.product_area,
ivt.point_location

View File

@@ -37,4 +37,11 @@ public class ProductInstorController {
return new ResponseEntity<>(productInstorService.boxQuery(whereJson),HttpStatus.OK);
}
@PostMapping("/confirm")
@Log("查询子卷包装关系")
@ApiOperation("查询子卷包装关系")
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson){
return new ResponseEntity<>(productInstorService.confirm(whereJson),HttpStatus.OK);
}
}

View File

@@ -17,4 +17,6 @@ public interface ProductInstorService {
* @return JSONArray /
*/
JSONObject boxQuery(JSONObject whereJson);
JSONObject confirm(JSONObject whereJson);
}

View File

@@ -7,9 +7,11 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil;
import org.nl.wms.pda.st.service.CoolInService;
import org.nl.wms.pda.st.service.ProductInstorService;
import org.nl.wms.st.inbill.service.RawAssistIStorService;
import org.springframework.stereotype.Service;
import java.util.HashMap;
@@ -23,6 +25,7 @@ import java.util.HashMap;
@RequiredArgsConstructor
@Slf4j
public class ProductInstorServiceImpl implements ProductInstorService {
private final RawAssistIStorService rawAssistIStorService;
@Override
public JSONObject boxQuery(JSONObject whereJson) {
@@ -48,4 +51,35 @@ public class ProductInstorServiceImpl implements ProductInstorService {
jo.put("message","查询成功!");
return jo;
}
@Override
public JSONObject confirm(JSONObject whereJson) {
String box_no = whereJson.getString("box_no");
//1-报废入库2-生产入库3-退货入库
String option = whereJson.getString("option");
String material_code = whereJson.getString("material_code");
String is_virtual = whereJson.getString("is_virtual");
JSONArray box_rows = whereJson.getJSONArray("box_rows");
JSONArray rows = new JSONArray();
HashMap<String,String> map = new HashMap<>();
map.put("box_no",box_no);
if (option.equals("1")){
HashMap<String,String> sub_map = new HashMap<>();
sub_map.put("box_type",material_code);
//如果是退货入库要更新子卷包装关系的木箱料号
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(sub_map,"package_box_SN = '"+box_no+"'");
}
//如果是入虚拟库直接入库并确认,如果是入成品库则生成入库单,生成一个二楼去一楼的任务
JSONObject mst_jo = new JSONObject();
mst_jo.put("tableData",box_rows);
mst_jo.put("bill_type",box_rows);
JSONObject jo = new JSONObject();
jo.put("data",rows);
jo.put("message","查询成功!");
return jo;
}
}