rev:新增二期区域、查询优化
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
)
|
||||
ENDOPTION
|
||||
OPTION 输入.areas <> ""
|
||||
LEFT(sub.container_name,2) IN 输入.areas
|
||||
(LEFT(sub.container_name,2) IN 输入.areas OR SUBSTRING(sub.container_name,2,2) IN 输入.areas)
|
||||
ENDOPTION
|
||||
OPTION 输入.material <> ""
|
||||
(
|
||||
|
||||
@@ -64,4 +64,12 @@ public class SapToLmsController {
|
||||
return new ResponseEntity<>(sapToLmsService.getReCutInfo(jo), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@SaIgnore
|
||||
@PostMapping("/getUnPlanInfo")
|
||||
@Log("SAP给LMS推送计划外子卷转单信息")
|
||||
@ApiOperation("SAP给LMS推送计划外子卷转单信息")
|
||||
public ResponseEntity<Object> getUnPlanInfo(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(sapToLmsService.getUnPlanInfo(jo), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,4 +23,6 @@ public interface SapToLmsService {
|
||||
JSONObject getCannibalize(JSONObject jo);
|
||||
|
||||
JSONObject getReCutInfo(JSONObject jo);
|
||||
|
||||
JSONObject getUnPlanInfo(JSONObject jo);
|
||||
}
|
||||
|
||||
@@ -122,6 +122,38 @@ public class SapToLmsServiceImpl implements SapToLmsService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getUnPlanInfo(JSONObject jo) {
|
||||
log.info("getUnPlanInfo的输入参数为:------------------------" + jo.toString());
|
||||
JSONObject result = new JSONObject();
|
||||
try {
|
||||
String pcsn = jo.getString("BATCH");
|
||||
if (StrUtil.isEmpty(pcsn)){
|
||||
throw new BadRequestException("批次不能为空!");
|
||||
}
|
||||
JSONArray rows = jo.getJSONArray("DATA");
|
||||
if (rows.isEmpty()){
|
||||
throw new BadRequestException("销售订单及行号不能为空!");
|
||||
}
|
||||
String sale_order_name = rows.getJSONObject(0).getString("SO");
|
||||
if (StrUtil.isEmpty(sale_order_name)){
|
||||
throw new BadRequestException("销售订单及行号不能为空!");
|
||||
}
|
||||
JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("container_name = '"+pcsn+"'").uniqueResult(0);
|
||||
sub_jo.put("sale_order_name",sale_order_name);
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(sub_jo);
|
||||
} catch (Exception exception) {
|
||||
result.put("TYPE", "E");
|
||||
result.put("MESSAGE", "推送失败!" + exception.getMessage());
|
||||
log.info("getUnPlanInfo的输出参数为:------------------------" + result.toString());
|
||||
return result;
|
||||
}
|
||||
result.put("TYPE", "S");
|
||||
result.put("MESSAGE", "推送成功!");
|
||||
log.info("getMaterialInfo的输出参数为:------------------------" + result.toString());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getMaterialInfo(JSONObject jo) {
|
||||
JSONArray rows = jo.getJSONArray("DATAS");
|
||||
|
||||
@@ -470,7 +470,7 @@
|
||||
LEFT JOIN SCH_BASE_Task task ON task.task_id = dis.task_id AND task.is_delete = '0'
|
||||
LEFT JOIN SCH_BASE_Point point2 ON point2.point_id = dis.point_id
|
||||
LEFT JOIN st_ivt_structattr attr ON attr.struct_id = dis.struct_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON sub.container_name = dis.pcsn AND ios.bill_code = sub.bill_code
|
||||
WHERE
|
||||
1=1
|
||||
OPTION 输入.iostorinvdtl_id <> ""
|
||||
|
||||
@@ -732,7 +732,7 @@
|
||||
sect.sect_type_attr = '09'
|
||||
ENDOPTION
|
||||
OPTION 输入.areas <> ""
|
||||
LEFT(sub.container_name,2) IN 输入.areas
|
||||
(LEFT(sub.container_name,2) IN 输入.areas OR SUBSTRING(sub.container_name,2,2) IN 输入.areas)
|
||||
ENDOPTION
|
||||
OPTION 输入.thickness_request <> ""
|
||||
sub.thickness_request = 输入.thickness_request
|
||||
@@ -851,12 +851,12 @@
|
||||
|
||||
OPTION 输入.is_virtual = "0"
|
||||
sect.sect_type_attr <> '09'
|
||||
ENDOPTION
|
||||
ENDOPTION
|
||||
OPTION 输入.is_virtual = "1"
|
||||
sect.sect_type_attr = '09'
|
||||
ENDOPTION
|
||||
OPTION 输入.areas <> ""
|
||||
LEFT(sub.container_name,2) IN 输入.areas
|
||||
(LEFT(sub.container_name,2) IN 输入.areas OR SUBSTRING(sub.container_name,2,2) IN 输入.areas)
|
||||
ENDOPTION
|
||||
OPTION 输入.thickness_request <> ""
|
||||
sub.thickness_request = 输入.thickness_request
|
||||
|
||||
Reference in New Issue
Block a user