Commit 49fd917c authored by chew's avatar chew

调整码查询客户信息 增加status状态

parent 6b8229d2
...@@ -12,6 +12,7 @@ import com.ekingwin.tms_app.module.cargo.outbound.vo.OrderDetailListVo; ...@@ -12,6 +12,7 @@ import com.ekingwin.tms_app.module.cargo.outbound.vo.OrderDetailListVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
...@@ -144,6 +145,11 @@ public class OutboundController { ...@@ -144,6 +145,11 @@ public class OutboundController {
return Result.success(outboundOrderService.getOrderWithPending(req)); return Result.success(outboundOrderService.getOrderWithPending(req));
} }
/**
* 用码分别查看是箱码还是追溯码查询客户
* @param req
* @return
*/
@PostMapping("/queryCode/queryCustomer") @PostMapping("/queryCode/queryCustomer")
public Result<List<CustomerVo>> queryCustomer( public Result<List<CustomerVo>> queryCustomer(
@RequestBody @Valid InfoQueryReq req, @RequestBody @Valid InfoQueryReq req,
...@@ -165,7 +171,9 @@ public class OutboundController { ...@@ -165,7 +171,9 @@ public class OutboundController {
} }
} }
if (CollectionUtils.isEmpty( list)){
return Result.error("码不存在");
}
return Result.success(outboundOrderService.queryCustomer(list)); return Result.success(outboundOrderService.queryCustomer(list));
} }
@PostMapping("/tracecode/detail") @PostMapping("/tracecode/detail")
......
...@@ -46,10 +46,17 @@ public class ScanController { ...@@ -46,10 +46,17 @@ public class ScanController {
try { try {
ManualTallyUpdateResp serviceResp = scanService.manualTallyUpdate(req); ManualTallyUpdateResp serviceResp = scanService.manualTallyUpdate(req);
// 如果 service 返回了结果,直接使用 // 如果 service 返回了结果,直接使用
if ( StringUtils.isNotBlank(serviceResp.getResult())) { if ( StringUtils.isNotBlank(serviceResp.getResult()) ) {
if (serviceResp.getResult().equals("500")){
resp.setMassage(serviceResp.getMassage());
resp.setSuccess("500");
}
if (serviceResp.getResult().equals("000")){
resp.setSuccess("200");
}
resp.setOrderNo(serviceResp.getOrderNo()); resp.setOrderNo(serviceResp.getOrderNo());
resp.setResult(serviceResp.getResult());
resp.setSuccess("500");
} }
} catch (Exception e) { } catch (Exception e) {
log.error("人工理货更新失败, orderNo: {}", req.getOrderNo(), e); log.error("人工理货更新失败, orderNo: {}", req.getOrderNo(), e);
......
...@@ -7,4 +7,5 @@ public class ManualTallyUpdateResp { ...@@ -7,4 +7,5 @@ public class ManualTallyUpdateResp {
private String result; // 存储过程返回的 p_out_result 信息 private String result; // 存储过程返回的 p_out_result 信息
private String orderNo; // private String orderNo; //
private String success; // private String success; //
private String massage; //
} }
\ No newline at end of file
...@@ -52,11 +52,13 @@ public class ScanServiceImpl implements ScanService { ...@@ -52,11 +52,13 @@ public class ScanServiceImpl implements ScanService {
params.put("p_status_flag", req.getStatusFlag()); params.put("p_status_flag", req.getStatusFlag());
// 输出参数占位 // 输出参数占位
params.put("p_out_result", null); params.put("p_out_result", null);
params.put("p_out_message", null);
scanMapper.callManualTallyUpdate(params); scanMapper.callManualTallyUpdate(params);
ManualTallyUpdateResp resp = new ManualTallyUpdateResp(); ManualTallyUpdateResp resp = new ManualTallyUpdateResp();
resp.setResult((String) params.get("p_out_result")); resp.setResult((String) params.get("p_out_result"));
resp.setMassage((String) params.get("p_out_message"));
return resp; return resp;
} }
} }
\ No newline at end of file
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
ROUND(h.tally_lines / NULLIF(h.total_lines, 0) * 100, 1) AS progressPct, ROUND(h.tally_lines / NULLIF(h.total_lines, 0) * 100, 1) AS progressPct,
h.status, h.status,
DECODE(h.status, 'PENDING','待理货','TALLYING','理货中','DONE','已完成', h.status) AS statusCn, DECODE(h.status, 'PENDING','待理货','TALLYING','理货中','DONE','已完成', h.status) AS statusCn,
h.status ,
-- 未理货明细 -- 未理货明细
(SELECT LISTAGG(ol.item_name || '(' || (ol.order_qty - ol.tally_qty) || ')', '; ') (SELECT LISTAGG(ol.item_name || '(' || (ol.order_qty - ol.tally_qty) || ')', '; ')
WITHIN GROUP (ORDER BY ol.line_no) WITHIN GROUP (ORDER BY ol.line_no)
......
...@@ -41,12 +41,13 @@ ...@@ -41,12 +41,13 @@
</select> </select>
<!-- 调用存储过程 --> <!-- 调用存储过程 -->
<select id="callManualTallyUpdate" statementType="CALLABLE" parameterType="map"> <select id="callManualTallyUpdate" statementType="CALLABLE" parameterType="map">
{call pkg_wms_tally.sp_tally_manual_update( {call PAK_OUTBOUND_SCAN.SP_TALLY_MANUAL_UPDATE(
#{v_order_no, mode=IN, jdbcType=NUMERIC}, #{v_order_no, mode=IN, jdbcType=NUMERIC},
#{p_detail_ids, mode=IN, jdbcType=VARCHAR}, #{p_detail_ids, mode=IN, jdbcType=VARCHAR},
#{p_tally_qty, mode=IN, jdbcType=VARCHAR}, #{p_tally_qty, mode=IN, jdbcType=VARCHAR},
#{p_status_flag, mode=IN, jdbcType=VARCHAR}, #{p_status_flag, mode=IN, jdbcType=VARCHAR},
#{p_out_result, mode=OUT, jdbcType=VARCHAR} #{p_out_result, mode=OUT, jdbcType=VARCHAR},
#{p_out_message, mode=OUT, jdbcType=VARCHAR}
)} )}
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment