diff --git a/src/main/java/com/dsic/gj_erp/bean/jhgk/DmYdjhLj.java b/src/main/java/com/dsic/gj_erp/bean/jhgk/DmYdjhLj.java index 982e872..b3bae79 100644 --- a/src/main/java/com/dsic/gj_erp/bean/jhgk/DmYdjhLj.java +++ b/src/main/java/com/dsic/gj_erp/bean/jhgk/DmYdjhLj.java @@ -320,6 +320,22 @@ public class DmYdjhLj implements Serializable { @TableField(exist = false) private String lljhrq; // 理料计划日期 + //=====预配盘相关============== + @TableField(exist = false) + private String yzDcCh; + @TableField(exist = false) + private String yzDcPl; + @TableField(exist = false) + private String yzDcFd; + @TableField(exist = false) + private String yzZl; + @TableField(exist = false) + private String yzTz; + @TableField(exist = false) + private String yzLx; + @TableField(exist = false) + private String yzXj; + public boolean checkZt(){ return !"03".equals(this.pkZt)||!"03".equals(this.qjgZt)||!"03".equals(this.dmZt); } diff --git a/src/main/java/com/dsic/gj_erp/bean/zyjh/DmYppyz.java b/src/main/java/com/dsic/gj_erp/bean/zyjh/DmYppyz.java new file mode 100644 index 0000000..76665ff --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/bean/zyjh/DmYppyz.java @@ -0,0 +1,30 @@ +package com.dsic.gj_erp.bean.zyjh; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class DmYppyz { + + @TableId(type = IdType.AUTO) + public Integer id; + + public String dcCh; + + private String dcPl; + + private String dcFd; + + private String kw; + + private String zl; + + private String tz; + + private String lx; + + private String xj; +} 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 index 56d112d..614072d 100644 --- a/src/main/java/com/dsic/gj_erp/bean/zyjh/YcldwInfo.java +++ b/src/main/java/com/dsic/gj_erp/bean/zyjh/YcldwInfo.java @@ -29,8 +29,9 @@ public class YcldwInfo { private String zl; private String tlth; - private String wph; - private String wlh; + private String wph;//对应材质 + private String wlh;//对应物品号 + private String lph;//对应物料号 private String wpgg; private String nbsbm;//内码 private String sljhrq; diff --git a/src/main/java/com/dsic/gj_erp/controller/zyjh/DmYppyzController.java b/src/main/java/com/dsic/gj_erp/controller/zyjh/DmYppyzController.java new file mode 100644 index 0000000..976dff4 --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/controller/zyjh/DmYppyzController.java @@ -0,0 +1,53 @@ +package com.dsic.gj_erp.controller.zyjh; + + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.dsic.gj_erp.bean.ResultBean; +import com.dsic.gj_erp.bean.zyjh.DmYppyz; +import com.dsic.gj_erp.service.zyjh.DmYppyzService; +import lombok.AllArgsConstructor; +import org.springframework.transaction.annotation.Transactional; +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 java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@RestController +@RequestMapping("yppyz") +@AllArgsConstructor +public class DmYppyzController { + + private final DmYppyzService service; + + @PostMapping("submit") + @Transactional(rollbackFor = Exception.class) + public ResultBean list(@RequestBody Map> map){ + if (map.get("add")!=null){ + map.get("add").forEach(service::save); + } + + if (map.get("edit")!=null){ + service.updateBatchById(map.get("edit")); + } + + if (map.get("remove")!=null){ + List remove = map.get("remove").stream().map(DmYppyz::getId).collect(Collectors.toList()); + service.removeByIds(remove); + } + + return new ResultBean<>(); + } + + @PostMapping("list") + public ResultBean list(@RequestBody DmYppyz entity){ + List list = service.list(Wrappers.lambdaQuery() + .eq(StrUtil.isNotEmpty(entity.getDcCh()), DmYppyz::getDcCh, entity.getDcCh()) + ); + return new ResultBean<>(list); + } +} diff --git a/src/main/java/com/dsic/gj_erp/mapper/zyjh/DmYppyzMapper.java b/src/main/java/com/dsic/gj_erp/mapper/zyjh/DmYppyzMapper.java new file mode 100644 index 0000000..1b2b738 --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/mapper/zyjh/DmYppyzMapper.java @@ -0,0 +1,9 @@ +package com.dsic.gj_erp.mapper.zyjh; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.dsic.gj_erp.bean.zyjh.DmYppyz; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DmYppyzMapper extends BaseMapper { +} diff --git a/src/main/java/com/dsic/gj_erp/service/zyjh/DmYppyzService.java b/src/main/java/com/dsic/gj_erp/service/zyjh/DmYppyzService.java new file mode 100644 index 0000000..7d4610d --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/service/zyjh/DmYppyzService.java @@ -0,0 +1,10 @@ +package com.dsic.gj_erp.service.zyjh; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.dsic.gj_erp.bean.zyjh.DmYppyz; +import com.dsic.gj_erp.mapper.zyjh.DmYppyzMapper; +import org.springframework.stereotype.Service; + +@Service +public class DmYppyzService extends ServiceImpl { +} diff --git a/src/main/resources/mappers/pgd/PgdQmjhMapper.xml b/src/main/resources/mappers/pgd/PgdQmjhMapper.xml index 2280bd9..3d5d753 100644 --- a/src/main/resources/mappers/pgd/PgdQmjhMapper.xml +++ b/src/main/resources/mappers/pgd/PgdQmjhMapper.xml @@ -374,18 +374,20 @@ dm_qfxq.xzglxq_old, dm_qfxq.xqzt, dm_qfxq.dzglxq, - dm_qfxq.dzglxq_old - - - - - + dm_qfxq.dzglxq_old, + yz.dc_ch yzDcCh, + yz.dc_pl yzDcPl, + yz.dc_fd yzDcFd, + yz.zl yzZl, + yz.tz yzTz, + yz.lx yzLx, + yz.xj yzXj FROM dm_ydjh_lj LEFT JOIN dm_ydjh on dm_ydjh.dc_ch=dm_ydjh_lj.czbh and dm_ydjh.dc_pl= dm_ydjh_lj.pl and dm_ydjh.tzbh =dm_ydjh_lj.tlth and dm_ydjh.dc_pl= dm_ydjh_lj.fd left join dm_qfxq on dm_qfxq.dc_ch = dm_ydjh_lj.czbh and dm_qfxq.dc_pl=dm_ydjh_lj.pl and dm_qfxq.dc_fd=dm_ydjh_lj.fd - + left join dm_yppyz yz on dm_ydjh_lj.czbh=yz.dc_ch and dm_ydjh_lj.pl=yz.dc_pl and dm_ydjh_lj.fd=yz.dc_fd and substring(dm_ydjh_lj.tlth,8,1)=yz.zl where 1=1 and dm_ydjh_lj.czbh=#{dcch} diff --git a/src/main/resources/mappers/zyjh/DmYppyzMapper.xml b/src/main/resources/mappers/zyjh/DmYppyzMapper.xml new file mode 100644 index 0000000..b918d7e --- /dev/null +++ b/src/main/resources/mappers/zyjh/DmYppyzMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/resources/mappers/zyjh/YcldwMapper.xml b/src/main/resources/mappers/zyjh/YcldwMapper.xml index fb6cddc..2ab1e5a 100644 --- a/src/main/resources/mappers/zyjh/YcldwMapper.xml +++ b/src/main/resources/mappers/zyjh/YcldwMapper.xml @@ -27,13 +27,14 @@ + b.id info_id,b.dw_id info_dw_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,b.ydid info_ydid,b.wlh info_wlh,b.nbsbm info_nbsbm + b.bfrq info_bfrq,b.zt info_zt,b.ydid info_ydid,b.wlh info_wlh,b.nbsbm info_nbsbm,b.lph info_lph