From 7b4c613d2c514b3f5c077ac65aaa4c9b72e6d735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=93=B2=E5=A5=87?= <13840175730@139.com> Date: Fri, 16 Aug 2024 11:42:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AE=8C=E5=96=84=E4=B8=8A=E6=96=99=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E7=95=8C=E9=9D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dsic/gj_erp/bean/zyjh/Ycldw.java | 22 ++++++++++ .../com/dsic/gj_erp/bean/zyjh/YcldwInfo.java | 42 +++++++++++++++++++ .../controller/zyjh/ZyjhController.java | 40 ++++++++++++++++-- .../gj_erp/mapper/zyjh/YcldwInfoMapper.java | 7 ++++ .../dsic/gj_erp/mapper/zyjh/YcldwMapper.java | 12 ++++++ .../resources/mappers/zyjh/YcldwMapper.xml | 40 ++++++++++++++++++ 6 files changed, 159 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/dsic/gj_erp/bean/zyjh/Ycldw.java create mode 100644 src/main/java/com/dsic/gj_erp/bean/zyjh/YcldwInfo.java create mode 100644 src/main/java/com/dsic/gj_erp/mapper/zyjh/YcldwInfoMapper.java create mode 100644 src/main/java/com/dsic/gj_erp/mapper/zyjh/YcldwMapper.java create mode 100644 src/main/resources/mappers/zyjh/YcldwMapper.xml diff --git a/src/main/java/com/dsic/gj_erp/bean/zyjh/Ycldw.java b/src/main/java/com/dsic/gj_erp/bean/zyjh/Ycldw.java new file mode 100644 index 0000000..243da08 --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/bean/zyjh/Ycldw.java @@ -0,0 +1,22 @@ +package com.dsic.gj_erp.bean.zyjh; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +/** + * 预处理垛位 + */ +@Getter +@Setter +public class Ycldw { + + private Integer id; + private String name; + + @TableField(exist = false) + private List list; + +} diff --git a/src/main/java/com/dsic/gj_erp/bean/zyjh/YcldwInfo.java b/src/main/java/com/dsic/gj_erp/bean/zyjh/YcldwInfo.java new file mode 100644 index 0000000..ac39ec8 --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/bean/zyjh/YcldwInfo.java @@ -0,0 +1,42 @@ +package com.dsic.gj_erp.bean.zyjh; + +import lombok.Getter; +import lombok.Setter; + +/** + * 预处理垛位层数信息 + */ +@Getter +@Setter +public class YcldwInfo { + + private String id; + private Integer dwId; + private Integer ceng; + private String czbh; + private String pl; + private String fd; + private String kw; + private String zl; + private String tlth; + + private String wph; + private String wpgg; + private String sljhrq; + private String qgjhrq; + private String bfr;//摆放人 + private String bfrq;//摆放日期 + private ZtEnum zt; + + private void baifang(){ + this.zt=ZtEnum.BF; + } + + private void paowan(){ + this.zt=ZtEnum.PW; + } + + private enum ZtEnum{ + BF,PW + } +} diff --git a/src/main/java/com/dsic/gj_erp/controller/zyjh/ZyjhController.java b/src/main/java/com/dsic/gj_erp/controller/zyjh/ZyjhController.java index 4a24e2d..6522f4d 100644 --- a/src/main/java/com/dsic/gj_erp/controller/zyjh/ZyjhController.java +++ b/src/main/java/com/dsic/gj_erp/controller/zyjh/ZyjhController.java @@ -1,13 +1,19 @@ package com.dsic.gj_erp.controller.zyjh; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.dsic.gj_erp.bean.ResultBean; +import com.dsic.gj_erp.bean.jhgk.DmYdjh; +import com.dsic.gj_erp.bean.pgd.PgdSljh; import com.dsic.gj_erp.controller.zyjh.dto.ShangLiao; +import com.dsic.gj_erp.mapper.zyjh.YcldwMapper; import com.dsic.gj_erp.service.jhgk.DmYdjhService; +import com.dsic.gj_erp.service.pgd.PgdSljhService; import lombok.AllArgsConstructor; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; + +import java.util.List; @RestController @RequestMapping("zyjh") @@ -16,9 +22,35 @@ public class ZyjhController { private final DmYdjhService ydjhService; + private final PgdSljhService pgdSljhService; + + private final YcldwMapper ycldwMapper; + + /** + * 获取上料计划 + */ + @PostMapping("sljh") + public ResultBean sljh(){ + String date = DateUtil.date().toString("yyyy/MM/dd"); + List list = ydjhService.list(Wrappers.lambdaQuery() + .le(DmYdjh::getSlrq, date) + .eq(DmYdjh::getZt, "2") + ); + return new ResultBean<>(list); + } + + /** + * 获取预处理垛位信息 + */ + @PostMapping("ycldw") + public ResultBean ycldw(){ + return new ResultBean<>(ycldwMapper.ycldwList()); + } + @PostMapping("sl") public ResultBean sl(@RequestBody ShangLiao sl){ return new ResultBean<>(); } + } diff --git a/src/main/java/com/dsic/gj_erp/mapper/zyjh/YcldwInfoMapper.java b/src/main/java/com/dsic/gj_erp/mapper/zyjh/YcldwInfoMapper.java new file mode 100644 index 0000000..aba81ff --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/mapper/zyjh/YcldwInfoMapper.java @@ -0,0 +1,7 @@ +package com.dsic.gj_erp.mapper.zyjh; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dsic.gj_erp.bean.zyjh.YcldwInfo; + +public interface YcldwInfoMapper extends BaseMapper { +} diff --git a/src/main/java/com/dsic/gj_erp/mapper/zyjh/YcldwMapper.java b/src/main/java/com/dsic/gj_erp/mapper/zyjh/YcldwMapper.java new file mode 100644 index 0000000..d0d6d90 --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/mapper/zyjh/YcldwMapper.java @@ -0,0 +1,12 @@ +package com.dsic.gj_erp.mapper.zyjh; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dsic.gj_erp.bean.zyjh.Ycldw; + +import java.util.List; + +public interface YcldwMapper extends BaseMapper { + + List ycldwList(); + +} diff --git a/src/main/resources/mappers/zyjh/YcldwMapper.xml b/src/main/resources/mappers/zyjh/YcldwMapper.xml new file mode 100644 index 0000000..22641ce --- /dev/null +++ b/src/main/resources/mappers/zyjh/YcldwMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + b.id info_id,b.ceng info_ceng,b.czbh info_czbh,b.pl info_pl,b.fd info_fd,b.kw info_kw,b.zl info_zl,b.tlth info_tlth, + b.wpgg info_wpgg,b.wph info_wph,b.sljhrq info_sljhrq,b.qgjhrq info_qgjhrq,b.bfr info_bfr,b.bfrq info_bfrq,b.zt info_zt + + + +