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 + + + +