修改
This commit is contained in:
@@ -3,6 +3,7 @@ package org.nl.wms.ext.acs.rest;
|
|||||||
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -32,6 +33,7 @@ public class AcsToWmsController {
|
|||||||
@PostMapping("/status")
|
@PostMapping("/status")
|
||||||
@Log("ACS给WMS反馈任务状态")
|
@Log("ACS给WMS反馈任务状态")
|
||||||
@ApiOperation("ACS给WMS反馈任务状态")
|
@ApiOperation("ACS给WMS反馈任务状态")
|
||||||
|
@SaIgnore
|
||||||
public ResponseEntity<Object> receiveTaskStatusAcs(@RequestBody String string) {
|
public ResponseEntity<Object> receiveTaskStatusAcs(@RequestBody String string) {
|
||||||
return new ResponseEntity<>(acsToWmsService.receiveTaskStatusAcs(string), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.receiveTaskStatusAcs(string), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -39,6 +41,7 @@ public class AcsToWmsController {
|
|||||||
@PostMapping("/orderFinish")
|
@PostMapping("/orderFinish")
|
||||||
@Log("ACS给WMS下发工单完成状态")
|
@Log("ACS给WMS下发工单完成状态")
|
||||||
@ApiOperation("ACS给WMS下发工单完成状态")
|
@ApiOperation("ACS给WMS下发工单完成状态")
|
||||||
|
@SaIgnore
|
||||||
public ResponseEntity<Object> orderFinish(@RequestBody String string) {
|
public ResponseEntity<Object> orderFinish(@RequestBody String string) {
|
||||||
return new ResponseEntity<>(acsToWmsService.orderFinish(string), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.orderFinish(string), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -47,6 +50,7 @@ public class AcsToWmsController {
|
|||||||
@Log("申请任务")
|
@Log("申请任务")
|
||||||
@ApiOperation("申请任务")
|
@ApiOperation("申请任务")
|
||||||
@SaCheckPermission("menu:list")
|
@SaCheckPermission("menu:list")
|
||||||
|
@SaIgnore
|
||||||
public ResponseEntity<Object> apply(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> apply(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(acsToWmsService.apply(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.apply(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -55,6 +59,7 @@ public class AcsToWmsController {
|
|||||||
@Log("二次申请任务")
|
@Log("二次申请任务")
|
||||||
@ApiOperation("二次申请任务")
|
@ApiOperation("二次申请任务")
|
||||||
@SaCheckPermission("menu:list")
|
@SaCheckPermission("menu:list")
|
||||||
|
@SaIgnore
|
||||||
public ResponseEntity<Object> againApply(@RequestBody String task_id) {
|
public ResponseEntity<Object> againApply(@RequestBody String task_id) {
|
||||||
return new ResponseEntity<>(acsToWmsService.againApply(task_id), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.againApply(task_id), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -62,6 +67,7 @@ public class AcsToWmsController {
|
|||||||
@PostMapping("/deviceApply")
|
@PostMapping("/deviceApply")
|
||||||
@Log("申请贴标、捆扎")
|
@Log("申请贴标、捆扎")
|
||||||
@ApiOperation("申请贴标、捆扎")
|
@ApiOperation("申请贴标、捆扎")
|
||||||
|
@SaIgnore
|
||||||
public ResponseEntity<Object> deviceApply(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> deviceApply(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(acsToWmsService.deviceApply(jo), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.deviceApply(jo), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -69,6 +75,7 @@ public class AcsToWmsController {
|
|||||||
@PostMapping("/process")
|
@PostMapping("/process")
|
||||||
@Log("RCS上报密集库任务异常处理")
|
@Log("RCS上报密集库任务异常处理")
|
||||||
@ApiOperation("RCS上报密集库任务异常处理")
|
@ApiOperation("RCS上报密集库任务异常处理")
|
||||||
|
@SaIgnore
|
||||||
public ResponseEntity<Object> process(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> process(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(acsToWmsService.process(jo), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.process(jo), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.nl.modules.wql.util.SpringContextHolder;
|
|||||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||||
import org.nl.wms.log.LokiLog;
|
import org.nl.wms.log.LokiLog;
|
||||||
import org.nl.wms.log.LokiLogType;
|
import org.nl.wms.log.LokiLogType;
|
||||||
|
import org.nl.wms.pda.mps.service.impl.BakingServiceImpl;
|
||||||
import org.nl.wms.pda.st.service.PrintService;
|
import org.nl.wms.pda.st.service.PrintService;
|
||||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
import org.nl.wms.sch.service.TaskService;
|
import org.nl.wms.sch.service.TaskService;
|
||||||
@@ -380,6 +381,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
result.put("box_width", box_width);
|
result.put("box_width", box_width);
|
||||||
result.put("box_high", box_high);
|
result.put("box_high", box_high);
|
||||||
result.put("bundle_times", 2);
|
result.put("bundle_times", 2);
|
||||||
|
} else if (type.equals("3")) {
|
||||||
|
//烘箱出箱任务
|
||||||
|
String device_code = whereJson.getString("device_code");
|
||||||
|
JSONObject bake_jo = new JSONObject();
|
||||||
|
bake_jo.put("point_code",device_code);
|
||||||
|
bake_jo.put("option","2");
|
||||||
|
new BakingServiceImpl().ovenInAndOut(bake_jo);
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException("请输入正确的任务类型!");
|
throw new BadRequestException("请输入正确的任务类型!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,9 @@ public class CrmToLmsServiceImpl implements CrmToLmsService {
|
|||||||
String packageboxsn = jo.getString("packageboxsn");
|
String packageboxsn = jo.getString("packageboxsn");
|
||||||
String container_name = jo.getString("container_name");
|
String container_name = jo.getString("container_name");
|
||||||
String pcsn = jo.getString("pcsn");
|
String pcsn = jo.getString("pcsn");
|
||||||
|
String thickness = jo.getString("thickness");
|
||||||
|
String thickness_request = jo.getString("thickness_request");
|
||||||
|
String width_standard = jo.getString("width_standard");
|
||||||
|
|
||||||
HashMap map = new HashMap<>();
|
HashMap map = new HashMap<>();
|
||||||
if (StrUtil.isNotEmpty(material_code)) {
|
if (StrUtil.isNotEmpty(material_code)) {
|
||||||
@@ -154,6 +157,16 @@ public class CrmToLmsServiceImpl implements CrmToLmsService {
|
|||||||
if (StrUtil.isNotEmpty(pcsn)) {
|
if (StrUtil.isNotEmpty(pcsn)) {
|
||||||
map.put("sap_pcsn", pcsn);
|
map.put("sap_pcsn", pcsn);
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isNotEmpty(width_standard)) {
|
||||||
|
map.put("width_standard", width_standard);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(thickness)) {
|
||||||
|
map.put("thickness", thickness);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(thickness_request)) {
|
||||||
|
map.put("thickness_request", thickness_request);
|
||||||
|
}
|
||||||
|
|
||||||
//将查询条件带入,查询LMS成品库库存信息
|
//将查询条件带入,查询LMS成品库库存信息
|
||||||
JSONArray rows = WQL.getWO("QCRM_001").addParamMap(map).addParam("flag", "1").process().getResultJSONArray(0);
|
JSONArray rows = WQL.getWO("QCRM_001").addParamMap(map).addParam("flag", "1").process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("iContainerName",container_name);
|
jo.put("iContainerName",container_name);
|
||||||
jo.put("iisSourceRollDeliveryComplete",1);
|
jo.put("iisSourceRollDeliveryComplete",1);
|
||||||
jo.put("iPackageBoxSN",package_box_sn);
|
jo.put("PackageBoxSN",package_box_sn);
|
||||||
jo.put("iWarehouse",warehouse);
|
jo.put("iWarehouse",warehouse);
|
||||||
jo.put("iisAirSwellAssComplete","");
|
jo.put("iisAirSwellAssComplete","");
|
||||||
jo.put("iisAirSwellDeliveryComplete","");
|
jo.put("iisAirSwellDeliveryComplete","");
|
||||||
@@ -446,8 +446,6 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray list = new JSONArray();
|
|
||||||
|
|
||||||
// String url = acsUrl + api;
|
// String url = acsUrl + api;
|
||||||
String url = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MES_URL").getValue();
|
String url = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||||
String api = "CamstarApi/ChildRollFGOutboundComplete";
|
String api = "CamstarApi/ChildRollFGOutboundComplete";
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class SapToLmsServiceImpl implements SapToLmsService {
|
|||||||
HashMap<String, JSONArray> mst_rows = new HashMap<>();
|
HashMap<String, JSONArray> mst_rows = new HashMap<>();
|
||||||
for (int i = 0; i < items.size(); i++) {
|
for (int i = 0; i < items.size(); i++) {
|
||||||
JSONObject dtl = items.getJSONObject(i);
|
JSONObject dtl = items.getJSONObject(i);
|
||||||
String vbeln = dtl.getString(" ");
|
String vbeln = dtl.getString("VBELN");
|
||||||
if (mst_rows.containsKey(vbeln)) {
|
if (mst_rows.containsKey(vbeln)) {
|
||||||
JSONArray objects = mst_rows.get(vbeln);
|
JSONArray objects = mst_rows.get(vbeln);
|
||||||
objects.add(dtl);
|
objects.add(dtl);
|
||||||
|
|||||||
@@ -24,7 +24,10 @@
|
|||||||
输入.customerdescription TYPEAS s_string
|
输入.customerdescription TYPEAS s_string
|
||||||
输入.sap_pcsn TYPEAS s_string
|
输入.sap_pcsn TYPEAS s_string
|
||||||
输入.container_name TYPEAS s_string
|
输入.container_name TYPEAS s_string
|
||||||
|
输入.thickness TYPEAS s_string
|
||||||
|
输入.thickness_request TYPEAS s_string
|
||||||
输入.width TYPEAS f_string
|
输入.width TYPEAS f_string
|
||||||
|
输入.width_standard TYPEAS f_string
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -61,6 +64,8 @@
|
|||||||
sub.date_of_FG_inbound AS dateoffginbound,
|
sub.date_of_FG_inbound AS dateoffginbound,
|
||||||
sub.package_box_sn AS packageboxsn,
|
sub.package_box_sn AS packageboxsn,
|
||||||
sub.width,
|
sub.width,
|
||||||
|
sub.width_standard,
|
||||||
|
sub.thickness_request,
|
||||||
sub.thickness,
|
sub.thickness,
|
||||||
sub.net_weight AS netweight,
|
sub.net_weight AS netweight,
|
||||||
sub.length,
|
sub.length,
|
||||||
@@ -106,6 +111,15 @@
|
|||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.sap_pcsn <> ""
|
OPTION 输入.sap_pcsn <> ""
|
||||||
sub.sap_pcsn = 输入.sap_pcsn
|
sub.sap_pcsn = 输入.sap_pcsn
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.width_standard <> ""
|
||||||
|
sub.width_standard >= 输入.width_standard
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.thickness <> ""
|
||||||
|
sub.thickness = 输入.thickness
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.thickness_request <> ""
|
||||||
|
sub.thickness_request = 输入.thickness_request
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
|
|||||||
@@ -459,6 +459,16 @@
|
|||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "15"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
point_code AS device_code
|
||||||
|
FROM
|
||||||
|
st_ivt_hotpointivt
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -16,10 +17,11 @@ public class AutoQueryDeviceStatus{
|
|||||||
private final WmsToAcsService wmsToAcsService;
|
private final WmsToAcsService wmsToAcsService;
|
||||||
public void run() {
|
public void run() {
|
||||||
//通过ACS接口获取温度
|
//通过ACS接口获取温度
|
||||||
JSONObject jo = wmsToAcsService.getPointStatus(null);
|
JSONArray device_rows = WQL.getWO("PDA_02").addParam("flag","15").process().getResultJSONArray(0);
|
||||||
JSONArray device_rows = jo.getJSONArray("device_rows");
|
JSONObject jo = wmsToAcsService.getPointStatus(device_rows);
|
||||||
for (int i = 0; i < device_rows.size(); i++) {
|
JSONArray de_rows = jo.getJSONArray("data");
|
||||||
JSONObject row = device_rows.getJSONObject(i);
|
for (int i = 0; i < de_rows.size(); i++) {
|
||||||
|
JSONObject row = de_rows.getJSONObject(i);
|
||||||
String device_code = row.getString("device_code");
|
String device_code = row.getString("device_code");
|
||||||
JSONObject point_jo = WQLObject.getWQLObject("st_ivt_hotpointivt").query("point_code = '"+device_code+"'").uniqueResult(0);
|
JSONObject point_jo = WQLObject.getWQLObject("st_ivt_hotpointivt").query("point_code = '"+device_code+"'").uniqueResult(0);
|
||||||
point_jo.put("temperature",row.getString("temperature"));
|
point_jo.put("temperature",row.getString("temperature"));
|
||||||
|
|||||||
@@ -80,10 +80,10 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
|
|
||||||
wql_StructIvtFlow.insert(from);
|
wql_StructIvtFlow.insert(from);
|
||||||
//拆拼盘不汇总到日表,库存变动记录还是要有记录
|
//拆拼盘不汇总到日表,库存变动记录还是要有记录
|
||||||
if(bill_code.startsWith("YK") || bill_code.startsWith("CPP") ){
|
if (bill_code.startsWith("YK") || bill_code.startsWith("CPP")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if("22,23,33,21,24,25,34".contains(change_type_scode)){
|
if ("22,23,33,21,24,25,34".contains(change_type_scode)) {
|
||||||
String sect_date = DateUtil.today();
|
String sect_date = DateUtil.today();
|
||||||
// 出查询更新条件
|
// 出查询更新条件
|
||||||
String sql_where = "stor_id = '" + from.getString("stor_id") +
|
String sql_where = "stor_id = '" + from.getString("stor_id") +
|
||||||
@@ -108,26 +108,26 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
from.put("in_num", from.getDoubleValue("change_qty"));
|
from.put("in_num", from.getDoubleValue("change_qty"));
|
||||||
from.put("out_num", "0");
|
from.put("out_num", "0");
|
||||||
from.put("end_num", from.getDoubleValue("start_num") + from.getDoubleValue("change_qty"));
|
from.put("end_num", from.getDoubleValue("start_num") + from.getDoubleValue("change_qty"));
|
||||||
from.put("more_num", "0");
|
from.put("more_num", "0");
|
||||||
from.put("less_num", "0");
|
from.put("less_num", "0");
|
||||||
} else if ("21,25,34".contains(change_type_scode)) {
|
} else if ("21,25,34".contains(change_type_scode)) {
|
||||||
from.put("in_num", "0");
|
from.put("in_num", "0");
|
||||||
from.put("out_num", from.getDoubleValue("change_qty"));
|
from.put("out_num", from.getDoubleValue("change_qty"));
|
||||||
from.put("end_num", from.getDoubleValue("start_num") - from.getDoubleValue("change_qty"));
|
from.put("end_num", from.getDoubleValue("start_num") - from.getDoubleValue("change_qty"));
|
||||||
from.put("more_num", "0");
|
from.put("more_num", "0");
|
||||||
from.put("less_num", "0");
|
from.put("less_num", "0");
|
||||||
}else if ("23".contains(change_type_scode)) {
|
} else if ("23".contains(change_type_scode)) {
|
||||||
from.put("in_num", "0");
|
from.put("in_num", "0");
|
||||||
from.put("out_num", "0");
|
from.put("out_num", "0");
|
||||||
from.put("end_num", from.getDoubleValue("start_num") + from.getDoubleValue("change_qty"));
|
from.put("end_num", from.getDoubleValue("start_num") + from.getDoubleValue("change_qty"));
|
||||||
from.put("more_num", from.getDoubleValue("change_qty"));
|
from.put("more_num", from.getDoubleValue("change_qty"));
|
||||||
from.put("less_num", "0");
|
from.put("less_num", "0");
|
||||||
}else if ("24".contains(change_type_scode)) {
|
} else if ("24".contains(change_type_scode)) {
|
||||||
from.put("in_num", "0");
|
from.put("in_num", "0");
|
||||||
from.put("out_num", "0");
|
from.put("out_num", "0");
|
||||||
from.put("end_num", from.getDoubleValue("start_num") - from.getDoubleValue("change_qty"));
|
from.put("end_num", from.getDoubleValue("start_num") - from.getDoubleValue("change_qty"));
|
||||||
from.put("more_num", "0");
|
from.put("more_num", "0");
|
||||||
from.put("less_num", from.getDoubleValue("change_qty"));
|
from.put("less_num", from.getDoubleValue("change_qty"));
|
||||||
}
|
}
|
||||||
|
|
||||||
from.put("stordaily_id", IdUtil.getSnowflake(1, 1).nextId() + "");
|
from.put("stordaily_id", IdUtil.getSnowflake(1, 1).nextId() + "");
|
||||||
@@ -140,10 +140,10 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
} else if ("21,25,34".contains(change_type_scode)) {
|
} else if ("21,25,34".contains(change_type_scode)) {
|
||||||
map.put("out_num", (from.getDoubleValue("change_qty") + jo.getDoubleValue("out_num")) + "");
|
map.put("out_num", (from.getDoubleValue("change_qty") + jo.getDoubleValue("out_num")) + "");
|
||||||
map.put("end_num", (jo.getDoubleValue("end_num") - from.getDoubleValue("change_qty")) + "");
|
map.put("end_num", (jo.getDoubleValue("end_num") - from.getDoubleValue("change_qty")) + "");
|
||||||
}else if ("24".contains(change_type_scode)) {
|
} else if ("24".contains(change_type_scode)) {
|
||||||
map.put("less_num", (from.getDoubleValue("change_qty") + jo.getDoubleValue("less_num")) + "");
|
map.put("less_num", (from.getDoubleValue("change_qty") + jo.getDoubleValue("less_num")) + "");
|
||||||
map.put("end_num", (jo.getDoubleValue("end_num") - from.getDoubleValue("change_qty")) + "");
|
map.put("end_num", (jo.getDoubleValue("end_num") - from.getDoubleValue("change_qty")) + "");
|
||||||
}else if ("23".contains(change_type_scode)) {
|
} else if ("23".contains(change_type_scode)) {
|
||||||
map.put("more_num", (from.getDoubleValue("change_qty") + jo.getDoubleValue("more_num")) + "");
|
map.put("more_num", (from.getDoubleValue("change_qty") + jo.getDoubleValue("more_num")) + "");
|
||||||
map.put("end_num", (from.getDoubleValue("change_qty") + jo.getDoubleValue("end_num")) + "");
|
map.put("end_num", (from.getDoubleValue("change_qty") + jo.getDoubleValue("end_num")) + "");
|
||||||
}
|
}
|
||||||
@@ -204,13 +204,13 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
sql_where.append(quality_scode_In);
|
sql_where.append(quality_scode_In);
|
||||||
sql_where.append("'");
|
sql_where.append("'");
|
||||||
|
|
||||||
// 获取仓位物料信息
|
// 获取仓位物料信息
|
||||||
JSONObject jo_in = wql.query(sql_where.toString()).uniqueResult(0);
|
JSONObject jo_in = wql.query(sql_where.toString()).uniqueResult(0);
|
||||||
switch (change_type_scode) {
|
switch (change_type_scode) {
|
||||||
case "11": //11加冻结、减可用:出库分配、移库移出
|
case "11": //11加冻结、减可用:出库分配、移库移出
|
||||||
if (jo_in != null) {
|
if (jo_in != null) {
|
||||||
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
||||||
double canuse_qty = NumberUtil.sub(jo_in.getDoubleValue("canuse_qty"),change_qty);
|
double canuse_qty = NumberUtil.sub(jo_in.getDoubleValue("canuse_qty"), change_qty);
|
||||||
if (canuse_qty < 0) {
|
if (canuse_qty < 0) {
|
||||||
throw new BadRequestException("可用数不允许为负数!");
|
throw new BadRequestException("可用数不允许为负数!");
|
||||||
}
|
}
|
||||||
@@ -231,7 +231,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
if (jo_in != null) {
|
if (jo_in != null) {
|
||||||
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
||||||
jo_in.put("canuse_qty", jo_in.getDoubleValue("canuse_qty") + change_qty);
|
jo_in.put("canuse_qty", jo_in.getDoubleValue("canuse_qty") + change_qty);
|
||||||
jo_in.put("frozen_qty", NumberUtil.sub(jo_in.getDoubleValue("frozen_qty"),change_qty));
|
jo_in.put("frozen_qty", NumberUtil.sub(jo_in.getDoubleValue("frozen_qty"), change_qty));
|
||||||
|
|
||||||
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
||||||
if (ivt_num_now != ivt_qty) {
|
if (ivt_num_now != ivt_qty) {
|
||||||
@@ -247,9 +247,9 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
break;
|
break;
|
||||||
case "21": //21减冻结、减库存:出库确认、移库移出确认
|
case "21": //21减冻结、减库存:出库确认、移库移出确认
|
||||||
if (jo_in != null) {
|
if (jo_in != null) {
|
||||||
jo_in.put("ivt_qty", NumberUtil.sub(jo_in.getDoubleValue("ivt_qty"),change_qty));
|
jo_in.put("ivt_qty", NumberUtil.sub(jo_in.getDoubleValue("ivt_qty"), change_qty));
|
||||||
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
||||||
jo_in.put("frozen_qty", NumberUtil.sub(jo_in.getDoubleValue("frozen_qty"),change_qty));
|
jo_in.put("frozen_qty", NumberUtil.sub(jo_in.getDoubleValue("frozen_qty"), change_qty));
|
||||||
|
|
||||||
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
||||||
if (ivt_num_now != ivt_qty) {
|
if (ivt_num_now != ivt_qty) {
|
||||||
@@ -310,9 +310,9 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
case "24": //24同时减:质检(旧)、损益单(溢取消)、损益单(损)
|
case "24": //24同时减:质检(旧)、损益单(溢取消)、损益单(损)
|
||||||
case "25": //25同时减:配粉出库确认
|
case "25": //25同时减:配粉出库确认
|
||||||
if (jo_in != null) {
|
if (jo_in != null) {
|
||||||
jo_in.put("ivt_qty", NumberUtil.sub(jo_in.getDoubleValue("ivt_qty"),change_qty));
|
jo_in.put("ivt_qty", NumberUtil.sub(jo_in.getDoubleValue("ivt_qty"), change_qty));
|
||||||
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
||||||
jo_in.put("canuse_qty", NumberUtil.sub(jo_in.getDoubleValue("canuse_qty"),change_qty));
|
jo_in.put("canuse_qty", NumberUtil.sub(jo_in.getDoubleValue("canuse_qty"), change_qty));
|
||||||
|
|
||||||
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
||||||
if (ivt_num_now != ivt_qty) {
|
if (ivt_num_now != ivt_qty) {
|
||||||
@@ -343,7 +343,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
break;
|
break;
|
||||||
case "32": //32减待入:入库分配取消、移库移入取消
|
case "32": //32减待入:入库分配取消、移库移入取消
|
||||||
if (jo_in != null) {
|
if (jo_in != null) {
|
||||||
jo_in.put("warehousing_qty", NumberUtil.sub(jo_in.getDoubleValue("warehousing_qty"),change_qty));
|
jo_in.put("warehousing_qty", NumberUtil.sub(jo_in.getDoubleValue("warehousing_qty"), change_qty));
|
||||||
if (jo_in.getDoubleValue("warehousing_qty") < 0) {
|
if (jo_in.getDoubleValue("warehousing_qty") < 0) {
|
||||||
throw new BadRequestException("待入数不允许为负数!");
|
throw new BadRequestException("待入数不允许为负数!");
|
||||||
}
|
}
|
||||||
@@ -357,7 +357,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
jo_in.put("ivt_qty", jo_in.getDoubleValue("ivt_qty") + change_qty);
|
jo_in.put("ivt_qty", jo_in.getDoubleValue("ivt_qty") + change_qty);
|
||||||
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
||||||
jo_in.put("canuse_qty", jo_in.getDoubleValue("canuse_qty") + change_qty);
|
jo_in.put("canuse_qty", jo_in.getDoubleValue("canuse_qty") + change_qty);
|
||||||
jo_in.put("warehousing_qty", NumberUtil.sub(jo_in.getDoubleValue("warehousing_qty"),change_qty));
|
jo_in.put("warehousing_qty", NumberUtil.sub(jo_in.getDoubleValue("warehousing_qty"), change_qty));
|
||||||
|
|
||||||
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
||||||
if (ivt_num_now != ivt_qty) {
|
if (ivt_num_now != ivt_qty) {
|
||||||
@@ -373,9 +373,9 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
break;
|
break;
|
||||||
case "34": //34加待入、减库存、减可用:入库确认取消、移库移入确认取消
|
case "34": //34加待入、减库存、减可用:入库确认取消、移库移入确认取消
|
||||||
if (jo_in != null) {
|
if (jo_in != null) {
|
||||||
jo_in.put("ivt_qty", NumberUtil.sub(jo_in.getDoubleValue("ivt_qty"),change_qty));
|
jo_in.put("ivt_qty", NumberUtil.sub(jo_in.getDoubleValue("ivt_qty"), change_qty));
|
||||||
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
double ivt_qty = jo_in.getDoubleValue("ivt_qty");
|
||||||
jo_in.put("canuse_qty", NumberUtil.sub(jo_in.getDoubleValue("canuse_qty"),change_qty));
|
jo_in.put("canuse_qty", NumberUtil.sub(jo_in.getDoubleValue("canuse_qty"), change_qty));
|
||||||
jo_in.put("warehousing_qty", jo_in.getDoubleValue("warehousing_qty") + change_qty);
|
jo_in.put("warehousing_qty", jo_in.getDoubleValue("warehousing_qty") + change_qty);
|
||||||
|
|
||||||
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
double ivt_num_now = jo_in.getDoubleValue("canuse_qty") + jo_in.getDoubleValue("frozen_qty");
|
||||||
@@ -396,7 +396,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
default:
|
default:
|
||||||
throw new BadRequestException("变动类型不存在:" + change_type_scode);
|
throw new BadRequestException("变动类型不存在:" + change_type_scode);
|
||||||
}
|
}
|
||||||
if(jo_in!=null) {
|
if (jo_in != null) {
|
||||||
if (jo_in.getDoubleValue("ivt_qty") == 0 && jo_in.getDoubleValue("canuse_qty") == 0 && jo_in.getDoubleValue("warehousing_qty") == 0) {
|
if (jo_in.getDoubleValue("ivt_qty") == 0 && jo_in.getDoubleValue("canuse_qty") == 0 && jo_in.getDoubleValue("warehousing_qty") == 0) {
|
||||||
wql.delete(sql_where.toString());
|
wql.delete(sql_where.toString());
|
||||||
}
|
}
|
||||||
@@ -420,8 +420,8 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
jo_in.put("stor_id", jo.getString("stor_id"));
|
jo_in.put("stor_id", jo.getString("stor_id"));
|
||||||
jo_in.put("stor_name", jo.getString("stor_name"));
|
jo_in.put("stor_name", jo.getString("stor_name"));
|
||||||
this.createStructIvtFlow(jo_in);
|
this.createStructIvtFlow(jo_in);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateStructAndPoint(JSONObject from) {
|
public void updateStructAndPoint(JSONObject from) {
|
||||||
@@ -448,42 +448,43 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
.addParam("id", struct_id)
|
.addParam("id", struct_id)
|
||||||
.addParam("point_code", point_code)
|
.addParam("point_code", point_code)
|
||||||
.process().uniqueResult(0);
|
.process().uniqueResult(0);
|
||||||
if(jo==null){
|
if (jo == null) {
|
||||||
throw new BadRequestException("点位仓位更新未查询到符合条件的点位仓位!");
|
throw new BadRequestException("点位仓位更新未查询到符合条件的点位仓位!");
|
||||||
}
|
}
|
||||||
HashMap<String,String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
if(lock_type.equals("1")){//解锁
|
if (lock_type.equals("1")) {//解锁
|
||||||
map.put("lock_type",lock_type);
|
map.put("lock_type", lock_type);
|
||||||
map.put("task_code","");
|
map.put("task_code", "");
|
||||||
map.put("inv_type","");
|
map.put("inv_type", "");
|
||||||
map.put("inv_id","");
|
map.put("inv_id", "");
|
||||||
map.put("inv_code","");
|
map.put("inv_code", "");
|
||||||
map.put("point_status","1");
|
map.put("point_status", "1");
|
||||||
if (!from.getString("is_free").equals("1") && StrUtil.isNotEmpty(storagevehicle_code)){
|
map.put("storagevehicle_code", "");
|
||||||
map.put("storagevehicle_code",storagevehicle_code);
|
if (from.containsKey("is_free") && !from.getString("is_free").equals("1") && StrUtil.isNotEmpty(storagevehicle_code)) {
|
||||||
map.put("storagevehicle_qty","1");
|
map.put("storagevehicle_code", storagevehicle_code);
|
||||||
map.put("vehicle_code",storagevehicle_code);
|
map.put("storagevehicle_qty", "1");
|
||||||
map.put("point_status","01");
|
map.put("vehicle_code", storagevehicle_code);
|
||||||
|
map.put("point_status", "01");
|
||||||
}
|
}
|
||||||
wo_Struct.update(map,"struct_id = '"+jo.getString("struct_id")+"'");
|
wo_Struct.update(map, "struct_id = '" + jo.getString("struct_id") + "'");
|
||||||
wo_Point.update(map,"point_id = '"+jo.getString("point_id")+"'");
|
wo_Point.update(map, "point_id = '" + jo.getString("point_id") + "'");
|
||||||
}else{//锁定
|
} else {//锁定
|
||||||
map.put("lock_type",lock_type);
|
map.put("lock_type", lock_type);
|
||||||
map.put("taskdtl_type",from.getString("task_type"));
|
map.put("taskdtl_type", from.getString("task_type"));
|
||||||
map.put("taskdtl_id",from.getString("task_id"));
|
map.put("taskdtl_id", from.getString("task_id"));
|
||||||
map.put("task_code",from.getString("task_code"));
|
map.put("task_code", from.getString("task_code"));
|
||||||
map.put("inv_type",from.getString("inv_type"));
|
map.put("inv_type", from.getString("inv_type"));
|
||||||
map.put("inv_id",from.getString("inv_id"));
|
map.put("inv_id", from.getString("inv_id"));
|
||||||
map.put("inv_code",from.getString("inv_code"));
|
map.put("inv_code", from.getString("inv_code"));
|
||||||
if (StrUtil.isNotEmpty(storagevehicle_code)) {
|
if (StrUtil.isNotEmpty(storagevehicle_code)) {
|
||||||
map.put("storagevehicle_code",storagevehicle_code);
|
map.put("storagevehicle_code", storagevehicle_code);
|
||||||
map.put("storagevehicle_qty","1");
|
map.put("storagevehicle_qty", "1");
|
||||||
map.put("vehicle_code",storagevehicle_code);
|
map.put("vehicle_code", storagevehicle_code);
|
||||||
map.put("point_status","01");
|
map.put("point_status", "01");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wo_Struct.update(map,"struct_id = '"+jo.getString("struct_id")+"'");
|
wo_Struct.update(map, "struct_id = '" + jo.getString("struct_id") + "'");
|
||||||
wo_Point.update(map,"point_id = '"+jo.getString("point_id")+"'");
|
wo_Point.update(map, "point_id = '" + jo.getString("point_id") + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -511,36 +512,36 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
.addParam("id", struct_id)
|
.addParam("id", struct_id)
|
||||||
.addParam("point_code", point_code)
|
.addParam("point_code", point_code)
|
||||||
.process().uniqueResult(0);
|
.process().uniqueResult(0);
|
||||||
if(jo==null){
|
if (jo == null) {
|
||||||
throw new BadRequestException("点位仓位更新未查询到符合条件的点位仓位!");
|
throw new BadRequestException("点位仓位更新未查询到符合条件的点位仓位!");
|
||||||
}
|
}
|
||||||
HashMap<String,String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
if(lock_type.equals("1")){//解锁
|
if (lock_type.equals("1")) {//解锁
|
||||||
map.put("lock_type",lock_type);
|
map.put("lock_type", lock_type);
|
||||||
map.put("task_code","");
|
map.put("task_code", "");
|
||||||
map.put("inv_type","");
|
map.put("inv_type", "");
|
||||||
map.put("inv_id","");
|
map.put("inv_id", "");
|
||||||
map.put("inv_code","");
|
map.put("inv_code", "");
|
||||||
map.put("point_status","1");
|
map.put("point_status", "1");
|
||||||
wo_Struct.update(map,"struct_id = '"+jo.getString("struct_id")+"'");
|
wo_Struct.update(map, "struct_id = '" + jo.getString("struct_id") + "'");
|
||||||
wo_Point.update(map,"point_id = '"+jo.getString("point_id")+"'");
|
wo_Point.update(map, "point_id = '" + jo.getString("point_id") + "'");
|
||||||
}else{//锁定
|
} else {//锁定
|
||||||
map.put("lock_type",lock_type);
|
map.put("lock_type", lock_type);
|
||||||
map.put("taskdtl_type",from.getString("task_type"));
|
map.put("taskdtl_type", from.getString("task_type"));
|
||||||
map.put("taskdtl_id",from.getString("task_id"));
|
map.put("taskdtl_id", from.getString("task_id"));
|
||||||
map.put("task_code",from.getString("task_code"));
|
map.put("task_code", from.getString("task_code"));
|
||||||
map.put("inv_type",from.getString("inv_type"));
|
map.put("inv_type", from.getString("inv_type"));
|
||||||
map.put("inv_id",from.getString("inv_id"));
|
map.put("inv_id", from.getString("inv_id"));
|
||||||
map.put("inv_code",from.getString("inv_code"));
|
map.put("inv_code", from.getString("inv_code"));
|
||||||
if (StrUtil.isNotEmpty(storagevehicle_code)) {
|
if (StrUtil.isNotEmpty(storagevehicle_code)) {
|
||||||
map.put("storagevehicle_code",storagevehicle_code);
|
map.put("storagevehicle_code", storagevehicle_code);
|
||||||
map.put("storagevehicle_qty","1");
|
map.put("storagevehicle_qty", "1");
|
||||||
map.put("vehicle_code",storagevehicle_code);
|
map.put("vehicle_code", storagevehicle_code);
|
||||||
map.put("point_status","01");
|
map.put("point_status", "01");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wo_Struct.update(map,"struct_id = '"+jo.getString("struct_id")+"'");
|
wo_Struct.update(map, "struct_id = '" + jo.getString("struct_id") + "'");
|
||||||
wo_Point.update(map,"point_id = '"+jo.getString("point_id")+"'");
|
wo_Point.update(map, "point_id = '" + jo.getString("point_id") + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -759,7 +759,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
JSONObject json = boxArr.getJSONObject(j);
|
JSONObject json = boxArr.getJSONObject(j);
|
||||||
JSONObject jsonBox = new JSONObject();
|
JSONObject jsonBox = new JSONObject();
|
||||||
|
|
||||||
jsonBox.put("iPackageBoxSN", json.getString("box_no"));
|
jsonBox.put("PackageBoxSN", json.getString("box_no"));
|
||||||
paramArr.add(jsonBox);
|
paramArr.add(jsonBox);
|
||||||
}
|
}
|
||||||
paramMesMst.put("item", paramArr);
|
paramMesMst.put("item", paramArr);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||||
|
<charset>${log.charset}</charset>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||||
|
<charset>${log.charset}</charset>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||||
|
<charset>${log.charset}</charset>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||||
|
<charset>${log.charset}</charset>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user