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;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
......@@ -144,6 +145,11 @@ public class OutboundController {
return Result.success(outboundOrderService.getOrderWithPending(req));
}
/**
* 用码分别查看是箱码还是追溯码查询客户
* @param req
* @return
*/
@PostMapping("/queryCode/queryCustomer")
public Result<List<CustomerVo>> queryCustomer(
@RequestBody @Valid InfoQueryReq req,
......@@ -165,7 +171,9 @@ public class OutboundController {
}
}
if (CollectionUtils.isEmpty( list)){
return Result.error("码不存在");
}
return Result.success(outboundOrderService.queryCustomer(list));
}
@PostMapping("/tracecode/detail")
......
......@@ -46,11 +46,18 @@ public class ScanController {
try {
ManualTallyUpdateResp serviceResp = scanService.manualTallyUpdate(req);
// 如果 service 返回了结果,直接使用
if ( StringUtils.isNotBlank(serviceResp.getResult())) {
resp.setOrderNo(serviceResp.getOrderNo());
resp.setResult(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());
}
} catch (Exception e) {
log.error("人工理货更新失败, orderNo: {}", req.getOrderNo(), e);
resp.setResult("系统异常: " + e.getMessage());
......
......@@ -7,4 +7,5 @@ public class ManualTallyUpdateResp {
private String result; // 存储过程返回的 p_out_result 信息
private String orderNo; //
private String success; //
private String massage; //
}
\ No newline at end of file
......@@ -52,11 +52,13 @@ public class ScanServiceImpl implements ScanService {
params.put("p_status_flag", req.getStatusFlag());
// 输出参数占位
params.put("p_out_result", null);
params.put("p_out_message", null);
scanMapper.callManualTallyUpdate(params);
ManualTallyUpdateResp resp = new ManualTallyUpdateResp();
resp.setResult((String) params.get("p_out_result"));
resp.setMassage((String) params.get("p_out_message"));
return resp;
}
}
\ No newline at end of file
......@@ -111,6 +111,7 @@
ROUND(h.tally_lines / NULLIF(h.total_lines, 0) * 100, 1) AS progressPct,
h.status,
DECODE(h.status, 'PENDING','待理货','TALLYING','理货中','DONE','已完成', h.status) AS statusCn,
h.status ,
-- 未理货明细
(SELECT LISTAGG(ol.item_name || '(' || (ol.order_qty - ol.tally_qty) || ')', '; ')
WITHIN GROUP (ORDER BY ol.line_no)
......
......@@ -41,12 +41,13 @@
</select>
<!-- 调用存储过程 -->
<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},
#{p_detail_ids, mode=IN, jdbcType=VARCHAR},
#{p_tally_qty, 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>
......
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