From 3c2af7f1db5d7f2d90b0f1e4fbbde90257db47fa Mon Sep 17 00:00:00 2001 From: psh Date: Tue, 14 May 2024 14:08:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=B0=E5=9C=BA=E9=9C=80=E6=B1=82=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../acs/service/impl/AcsToWmsServiceImpl.java | 22 +++- .../src/main/java/org/nl/wms/ext/wql/ext.xls | Bin 54272 -> 74752 bytes .../org/nl/wms/pad/rest/PadController.java | 4 +- .../org/nl/wms/pad/service/PadService.java | 2 +- .../wms/pad/service/impl/PadServiceImpl.java | 17 ++- .../sch/rest/ExtDeliveryNoteController.java | 69 +++++++++++ .../sch/service/ExtDeliveryNoteService.java | 66 ++++++++++ .../sch/service/dto/ExtDeliveryNoteDto.java | 53 ++++++++ .../impl/ExtDeliveryNoteServiceImpl.java | 115 ++++++++++++++++++ 9 files changed, 339 insertions(+), 9 deletions(-) create mode 100644 lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/rest/ExtDeliveryNoteController.java create mode 100644 lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/ExtDeliveryNoteService.java create mode 100644 lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/dto/ExtDeliveryNoteDto.java create mode 100644 lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/ExtDeliveryNoteServiceImpl.java diff --git a/lms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 6291f9c..dd28b01 100644 --- a/lms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.exception.BadRequestException; +import org.nl.modules.system.service.DictService; import org.nl.modules.system.util.CodeUtil; import org.nl.utils.SecurityUtils; import org.nl.utils.SpringContextHolder; @@ -21,6 +22,7 @@ import org.nl.wms.sch.service.TaskService; import org.nl.wms.sch.service.dto.TaskDto; import org.nl.wms.sch.tasks.*; import org.nl.wql.core.bean.WQLObject; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -34,6 +36,8 @@ import java.util.Map; @Slf4j public class AcsToWmsServiceImpl implements AcsToWmsService { private final TaskService taskService; + @Autowired + private DictService dictService; /** * task_uuid:任务标识 @@ -427,10 +431,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { String deliveryNo = json.getString("deliveryno"); String deliveryLineNo = json.getString("deliverylineno"); String sku = json.getString("sku"); - String lkCode = json.getString("lkCode"); - String pickDetailKey = json.getString("pickdetailkey"); + String lk_code = json.getString("lk_code"); + String pickdetailkey = json.getString("pickdetailkey"); String qty = json.getString("qty"); String outboundTime = json.getString("outboundtime"); + String skudesc = json.getString("skudesc"); WQLObject noteTab = WQLObject.getWQLObject("ext_delivery_note");//上游系统出库单表 JSONObject orderJson = new JSONObject(); JSONObject res = new JSONObject(); @@ -442,12 +447,21 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { orderJson.put("deliveryno", deliveryNo); orderJson.put("deliverylineno", deliveryLineNo); orderJson.put("sku", sku); - orderJson.put("lkCode", lkCode); - orderJson.put("pickdetailkey", pickDetailKey); + orderJson.put("skudesc",skudesc); + orderJson.put("lk_code", lk_code); + orderJson.put("pickdetailkey", pickdetailkey); orderJson.put("qty", qty); orderJson.put("outboundtime", outboundTime); orderJson.put("request_param", json); orderJson.put("create_time", DateUtil.now()); + orderJson.put("status", "0"); + JSONArray jsonArray=dictService.queryDetailByName("sku"); + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject jo = (JSONObject) jsonArray.get(i); + if(sku.equals(jo.getString("value"))){ + orderJson.put("status", "1"); + } + } res.put("statusCode", HttpStatus.OK.value()); res.put("isSuccess", true); res.put("errCode", 0); diff --git a/lms/hd/nladmin-system/src/main/java/org/nl/wms/ext/wql/ext.xls b/lms/hd/nladmin-system/src/main/java/org/nl/wms/ext/wql/ext.xls index 2f53446d1fcba3c8a0eb197c1214a40a4f0616df..11a6ebd78b9b816476165b1f56e89114e3db19e1 100644 GIT binary patch delta 21023 zcmeHv3tUxIzW>_$9N>T+I0y&`=m8WFd7L)~AMrW|@ePAU4@?k_Nun5FnWg7oR+d)c zvau$o+dHeN$*87xYBoLWWp!(sTd6fu*<{(hmeWJ|e}8N54d)!Osj2S$-}{+$`0lm# zZ~fM9t@T^)$0o2%7kEy;F+W#kj7fknCdTMp2ORI~>r;q~1>o3T`#WiqY|x(zckfVn zt>kZoYawtpun0H@=mHi4ZNL&>DbNlq13G|ipc7aQtOCvh&IeWi7XT}P3xSJ()xZ^i zA6NtY3X<9pgPD0Dw~NQ==fy6Yb>0Uz-S%gRQd~BhuhbuxJp6))*@hGlkb^$nqaV$W zL~P|7w9&Rr_1O?*oD}L>Z(^oh(Bnjxt3VqKs3fzArDcwD}4M9hPY`1RAL+8>Zczc6+&m>?^^1PZ;HtsqGyr^ zT5iLS*TziYjWHwnwJ}*auS3QYi2YG1jSXee98{-PXtf^2-2v?{5Cy-OKN2%GYQfA; zGu$kq_oJA3GCvZV&JD3C{61iRY$Ep4CXYynQ)#1u{6&aVvljCktOibK zafe8eA}^CKNmAt{q-vb~X&=e`Nf}7bJxE^`e<>+BHCyB9&&O~fZ8Sdy-{G2Xzl0G% zai#J@!;@3TXgqJQMmR@k>B->*$p0I|hw<~0Q$~$f!fCwy^3p=&T{)c6J{fu$&Yuu& z=n(Do$e+*2PX4Ok^tV?Ta@i`X3H>IXA8@7dmE%lND0mjhqWSi*2|PV_A-~XKl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/pad/rest/PadController.java index 1171705..ab8e248 100644 --- a/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/rest/PadController.java +++ b/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/rest/PadController.java @@ -323,7 +323,7 @@ public class PadController { @PostMapping("/getOrderList") @Log("查询出库单") @ApiOperation("查询出库单") - public ResponseEntity getOrderList() { - return new ResponseEntity<>(padService.getOrderList(), HttpStatus.OK); + public ResponseEntity getOrderList(@RequestBody JSONObject param) { + return new ResponseEntity<>(padService.getOrderList(param), HttpStatus.OK); } } diff --git a/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/service/PadService.java b/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/service/PadService.java index 048d61a..9b4b1e9 100644 --- a/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/service/PadService.java +++ b/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/service/PadService.java @@ -101,6 +101,6 @@ public interface PadService { */ JSONObject p2p(String startPointCode, String nextPointCode); - JSONObject getOrderList(); + JSONObject getOrderList(JSONObject param); } diff --git a/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/service/impl/PadServiceImpl.java b/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/service/impl/PadServiceImpl.java index 1c4b63b..f701e56 100644 --- a/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/service/impl/PadServiceImpl.java +++ b/lms/hd/nladmin-system/src/main/java/org/nl/wms/pad/service/impl/PadServiceImpl.java @@ -460,10 +460,23 @@ public class PadServiceImpl implements PadService { } @Override - public JSONObject getOrderList() { + public JSONObject getOrderList(JSONObject param) { JSONObject res = new JSONObject(); + String where = "status=1"; + String sku=param.getString("sku"); + String startTime=param.getString("startTime"); + String endTime=param.getString("endTime"); + if(ObjectUtil.isNotEmpty(sku)){ + where += " AND sku like ('%" + sku + "%')"; + } + if(ObjectUtil.isNotEmpty(startTime)){ + where += " AND DATE_FORMAT(outboundtime, '%Y/%m/%d %H:%i:%s')>=DATE_FORMAT('" + startTime+"', '%Y/%m/%d %H:%i:%s')"; + } + if(ObjectUtil.isNotEmpty(endTime)){ + where += " AND DATE_FORMAT(outboundtime, '%Y/%m/%d %H:%i:%s')<=DATE_FORMAT('" + endTime+"', '%Y/%m/%d %H:%i:%s')"; + } JSONArray arrayList = WQLObject.getWQLObject("ext_delivery_note") - .query("", "create_time desc") + .query(where, "create_time desc") .getResultJSONArray(0); res.put("code", "1"); res.put("desc", "查询成功"); diff --git a/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/rest/ExtDeliveryNoteController.java b/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/rest/ExtDeliveryNoteController.java new file mode 100644 index 0000000..202b5bd --- /dev/null +++ b/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/rest/ExtDeliveryNoteController.java @@ -0,0 +1,69 @@ + +package org.nl.wms.sch.rest; + + +import org.nl.wms.sch.service.ExtDeliveryNoteService; +import org.nl.wms.sch.service.dto.ExtDeliveryNoteDto; +import org.springframework.data.domain.Pageable; +import lombok.RequiredArgsConstructor; +import org.nl.annotation.Log; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import io.swagger.annotations.*; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.Map; +import lombok.extern.slf4j.Slf4j; + +/** + * @author psh + * @date 2024-05-13 + **/ +@RestController +@RequiredArgsConstructor +@Api(tags = "delivery管理") +@RequestMapping("/api/extDeliveryNote") +@Slf4j +public class ExtDeliveryNoteController { + + private final ExtDeliveryNoteService extDeliveryNoteService; + + @GetMapping + @Log("查询delivery") + @ApiOperation("查询delivery") + //@PreAuthorize("@el.check('extDeliveryNote:list')") + public ResponseEntity query(@RequestParam Map whereJson, Pageable page){ + return new ResponseEntity<>(extDeliveryNoteService.queryAll(whereJson,page),HttpStatus.OK); + } + + @PostMapping + @Log("新增delivery") + @ApiOperation("新增delivery") + //@PreAuthorize("@el.check('extDeliveryNote:add')") + public ResponseEntity create(@Validated @RequestBody ExtDeliveryNoteDto dto){ + extDeliveryNoteService.create(dto); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @PutMapping + @Log("修改delivery") + @ApiOperation("修改delivery") + //@PreAuthorize("@el.check('extDeliveryNote:edit')") + public ResponseEntity update(@Validated @RequestBody ExtDeliveryNoteDto dto){ + extDeliveryNoteService.update(dto); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除delivery") + @ApiOperation("删除delivery") + //@PreAuthorize("@el.check('extDeliveryNote:del')") + @DeleteMapping + public ResponseEntity delete(@RequestBody String[] ids) { + extDeliveryNoteService.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } + +} diff --git a/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/ExtDeliveryNoteService.java b/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/ExtDeliveryNoteService.java new file mode 100644 index 0000000..6ac7457 --- /dev/null +++ b/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/ExtDeliveryNoteService.java @@ -0,0 +1,66 @@ + +package org.nl.wms.sch.service; + +import org.nl.wms.sch.service.dto.ExtDeliveryNoteDto; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** + * @description 服务接口 + * @author psh + * @date 2024-05-13 + **/ +public interface ExtDeliveryNoteService { + + /** + * 查询数据分页 + * @param whereJson 条件 + * @param page 分页参数 + * @return Map + */ + Map queryAll(Map whereJson, Pageable page); + + /** + * 查询所有数据不分页 + * @param whereJson 条件参数 + * @return List + */ + List queryAll(Map whereJson); + + /** + * 根据ID查询 + * @param note_id ID + * @return ExtDeliveryNote + */ + ExtDeliveryNoteDto findById(String note_id); + + /** + * 根据编码查询 + * @param code code + * @return ExtDeliveryNote + */ + ExtDeliveryNoteDto findByCode(String code); + + + /** + * 创建 + * @param dto / + */ + void create(ExtDeliveryNoteDto dto); + + /** + * 编辑 + * @param dto / + */ + void update(ExtDeliveryNoteDto dto); + + /** + * 多选删除 + * @param ids / + */ + void deleteAll(String[] ids); + +} diff --git a/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/dto/ExtDeliveryNoteDto.java b/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/dto/ExtDeliveryNoteDto.java new file mode 100644 index 0000000..28af705 --- /dev/null +++ b/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/dto/ExtDeliveryNoteDto.java @@ -0,0 +1,53 @@ +package org.nl.wms.sch.service.dto; + +import lombok.Data; +import java.io.Serializable; + +/** + * @description / + * @author psh + * @date 2024-05-13 + **/ +@Data +public class ExtDeliveryNoteDto implements Serializable { + + /** 主键ID */ + private String note_id; + + /** 任务号 */ + private String req_code; + + /** 出库单号 */ + private String deliveryno; + + /** 出库单行号 */ + private String deliverylineno; + + /** 物料 */ + private String sku; + + /** 立库代码 */ + private String lk_code; + + /** 拣货单号 */ + private String pickdetailkey; + + /** 出库数量 */ + private String qty; + + /** 出库时间 */ + private String outboundtime; + + /** 请求参数 */ + private String request_param; + + /** 响应结果 */ + private String response_param; + + /** 创建时间 */ + private String create_time; + + private String skudesc; + + private Integer status; +} diff --git a/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/ExtDeliveryNoteServiceImpl.java b/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/ExtDeliveryNoteServiceImpl.java new file mode 100644 index 0000000..378b2ef --- /dev/null +++ b/lms/hd/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/ExtDeliveryNoteServiceImpl.java @@ -0,0 +1,115 @@ + +package org.nl.wms.sch.service.impl; + + +import cn.hutool.core.util.StrUtil; +import lombok.RequiredArgsConstructor; +import org.nl.exception.BadRequestException; +import org.nl.wms.sch.service.ExtDeliveryNoteService; +import org.nl.wms.sch.service.dto.ExtDeliveryNoteDto; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import org.springframework.data.domain.Pageable; +import java.util.List; +import java.util.Map; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.IdUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.JSON; +import org.nl.utils.SecurityUtils; +import org.nl.wql.core.bean.ResultBean; +import org.nl.wql.core.bean.WQLObject; +import org.nl.wql.util.WqlUtil; +import lombok.extern.slf4j.Slf4j; +import cn.hutool.core.util.ObjectUtil; + +/** + * @description 服务实现 + * @author psh + * @date 2024-05-13 + **/ +@Service +@RequiredArgsConstructor +@Slf4j +public class ExtDeliveryNoteServiceImpl implements ExtDeliveryNoteService { + + @Override + public Map queryAll(Map form, Pageable page){ + WQLObject wo = WQLObject.getWQLObject("ext_delivery_note"); + String where="1=1"; + JSONObject whereJson = JSONObject.parseObject(JSON.toJSONString(form)); + if (StrUtil.isNotEmpty(whereJson.getString("sku"))) { + where += " AND sku like ('%" + whereJson.get("sku") + "%')"; + } + if (StrUtil.isNotEmpty(whereJson.getString("status"))) { + where += " AND status = '" + whereJson.getString("status") + "'"; + } + ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page),where, "create_time desc"); + final JSONObject json = rb.pageResult(); + return json; + } + + @Override + public List queryAll(Map whereJson){ + WQLObject wo = WQLObject.getWQLObject("ext_delivery_note"); + JSONArray arr = wo.query().getResultJSONArray(0); + if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(ExtDeliveryNoteDto.class); + return null; + } + + @Override + public ExtDeliveryNoteDto findById(String note_id) { + WQLObject wo = WQLObject.getWQLObject("ext_delivery_note"); + JSONObject json = wo.query("note_id = '" + note_id + "'").uniqueResult(0); + if (ObjectUtil.isNotEmpty(json)){ + return json.toJavaObject( ExtDeliveryNoteDto.class); + } + return null; + } + + @Override + public ExtDeliveryNoteDto findByCode(String code) { + WQLObject wo = WQLObject.getWQLObject("ext_delivery_note"); + JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0); + if (ObjectUtil.isNotEmpty(json)){ + return json.toJavaObject( ExtDeliveryNoteDto.class); + } + return null; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(ExtDeliveryNoteDto dto) { + + WQLObject wo = WQLObject.getWQLObject("ext_delivery_note"); + JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); + wo.insert(json); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ExtDeliveryNoteDto dto) { + ExtDeliveryNoteDto entity = this.findById(dto.getNote_id()); + if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!"); + + WQLObject wo = WQLObject.getWQLObject("ext_delivery_note"); + JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); + wo.update(json); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteAll(String[] ids) { + WQLObject wo = WQLObject.getWQLObject("ext_delivery_note"); + for (String note_id: ids) { + JSONObject param = new JSONObject(); + param.put("note_id", String.valueOf(note_id)); + param.put("status", "0"); + wo.update(param); + } + } + +}