派工单创建

master
xhj 1 year ago
parent 9ffd3f1717
commit 18ae8b1596

@ -74,7 +74,7 @@ public class DmBom implements Serializable {
private BigDecimal bc; private BigDecimal bc;
@ApiModelProperty(value = "油漆用量") @ApiModelProperty(value = "油漆用量")
private Double yqyl; private BigDecimal yqyl;
@ApiModelProperty(value = "切割长度") @ApiModelProperty(value = "切割长度")
private BigDecimal qgcd; private BigDecimal qgcd;
@ -97,13 +97,13 @@ public class DmBom implements Serializable {
private String pkbs; private String pkbs;
@ApiModelProperty(value = "坡口标识") @ApiModelProperty(value = "坡口标识")
private Double pkcd; private BigDecimal pkcd;
@ApiModelProperty(value = "打磨标识") @ApiModelProperty(value = "打磨标识")
private String dmbs; private String dmbs;
@ApiModelProperty(value = "打磨长度") @ApiModelProperty(value = "打磨长度")
private Double dmcd; private BigDecimal dmcd;
@ApiModelProperty(value = "装配顺序") @ApiModelProperty(value = "装配顺序")
private Integer zpsx; private Integer zpsx;
@ -118,64 +118,64 @@ public class DmBom implements Serializable {
private String ljsx; private String ljsx;
@ApiModelProperty(value = "单件面积") @ApiModelProperty(value = "单件面积")
private Double djmj; private BigDecimal djmj;
@ApiModelProperty(value = "零件单重") @ApiModelProperty(value = "零件单重")
private Double ljdz; private BigDecimal ljdz;
@ApiModelProperty(value = "备料") @ApiModelProperty(value = "备料")
private Double blgs; private BigDecimal blgs;
@ApiModelProperty(value = "抛丸") @ApiModelProperty(value = "抛丸")
private Double pwgs; private BigDecimal pwgs;
@ApiModelProperty(value = "理料") @ApiModelProperty(value = "理料")
private Double llgs; private BigDecimal llgs;
@ApiModelProperty(value = "划线") @ApiModelProperty(value = "划线")
private Double hxgs; private BigDecimal hxgs;
@ApiModelProperty(value = "切割") @ApiModelProperty(value = "切割")
private Double qggs; private BigDecimal qggs;
@ApiModelProperty(value = "坡口") @ApiModelProperty(value = "坡口")
private Double pkgs; private BigDecimal pkgs;
@ApiModelProperty(value = "曲") @ApiModelProperty(value = "曲")
private Double qgs; private BigDecimal qgs;
@ApiModelProperty(value = "打磨") @ApiModelProperty(value = "打磨")
private Double dmgs; private BigDecimal dmgs;
@ApiModelProperty(value = "装配") @ApiModelProperty(value = "装配")
private Double zpgs; private BigDecimal zpgs;
@ApiModelProperty(value = "反馈备料") @ApiModelProperty(value = "反馈备料")
private Double fkblgs; private BigDecimal fkblgs;
@ApiModelProperty(value = "抛丸") @ApiModelProperty(value = "抛丸")
private Double fkpwgs; private BigDecimal fkpwgs;
@ApiModelProperty(value = "理料") @ApiModelProperty(value = "理料")
private Double fkllgs; private BigDecimal fkllgs;
@ApiModelProperty(value = "划线") @ApiModelProperty(value = "划线")
private Double fkhxgs; private BigDecimal fkhxgs;
@ApiModelProperty(value = "切割") @ApiModelProperty(value = "切割")
private Double fkqggs; private BigDecimal fkqggs;
@ApiModelProperty(value = "坡口") @ApiModelProperty(value = "坡口")
private Double fkpkgs; private BigDecimal fkpkgs;
@ApiModelProperty(value = "曲") @ApiModelProperty(value = "曲")
private Double fkqgs; private BigDecimal fkqgs;
@ApiModelProperty(value = "打磨") @ApiModelProperty(value = "打磨")
private Double fkdmgs; private BigDecimal fkdmgs;
@ApiModelProperty(value = "装配") @ApiModelProperty(value = "装配")
private Double fkzpgs; private BigDecimal fkzpgs;
private Integer pid; private Integer pid;
@ -214,6 +214,10 @@ public class DmBom implements Serializable {
private String ylbhgg; private String ylbhgg;
// 反馈工时
private String fkgs;
} }

@ -3,14 +3,17 @@ package com.dsic.gj_erp.controller.pgd;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsic.gj_erp.annotation.AuthFunction;
import com.dsic.gj_erp.bean.ResultBean; import com.dsic.gj_erp.bean.ResultBean;
import com.dsic.gj_erp.bean.pgd.PgdTzjh; import com.dsic.gj_erp.bean.pgd.PgdDh;
import com.dsic.gj_erp.bean.pgd.PgdDh;
import com.dsic.gj_erp.exception.CustomException; import com.dsic.gj_erp.exception.CustomException;
import com.dsic.gj_erp.service.pgd.PgdDhService; import com.dsic.gj_erp.service.pgd.PgdDhService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -31,17 +34,43 @@ public class PgdDhController {
@PostMapping("/getDhPgd") @PostMapping("/getDhPgd")
@ResponseBody @ResponseBody
public ResultBean getDhPgd(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException { public ResultBean getDhPgd(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
QueryWrapper<PgdTzjh> qw =new QueryWrapper<>(); QueryWrapper <PgdDh> qw =new QueryWrapper<>();
qw.eq(StrUtil.isNotEmpty((String)map.get("czbh")),"czbh",(String)map.get("dcch")); qw.eq(StrUtil.isNotEmpty((String)map.get("dcch")),"czbh",(String)map.get("dcch"));
qw.eq(StrUtil.isNotEmpty((String)map.get("pl")),"pl",(String)map.get("pl")); qw.eq(StrUtil.isNotEmpty((String)map.get("pl")),"pl",(String)map.get("pl"));
qw.eq(StrUtil.isNotEmpty((String)map.get("fd")),"fd",(String)map.get("fd")); qw.eq(StrUtil.isNotEmpty((String)map.get("fd")),"fd",(String)map.get("fd"));
qw.eq(StrUtil.isNotEmpty((String)map.get("zt")),"zt",(String)map.get("zt")); qw.eq(StrUtil.isNotEmpty((String)map.get("zt")),"zt",(String)map.get("zt"));
qw.orderBy(true,true,"czbh","pl","fd"); qw.orderBy(true,true,"czbh","pl","fd");
return new ResultBean(dhService.list()); return new ResultBean(dhService.list(qw));
} }
@PostMapping("/saveDhPgdXd")
@ResponseBody
@AuthFunction
public ResultBean saveDhPgdXd(HttpServletRequest req, @RequestBody List<PgdDh> list) throws Exception, CustomException {
dhService.saveDhPgdXd(list,req);
return new ResultBean();
}
@PostMapping("/saveDhPgdXdBack")
@ResponseBody
@AuthFunction
public ResultBean saveDhPgdXdBack(HttpServletRequest req, @RequestBody List<PgdDh>list) throws Exception, CustomException {
dhService.saveDhPgdXdBack(list,req);
return new ResultBean();
}
@PostMapping("/saveDhPgdFk")
@ResponseBody
@AuthFunction
public ResultBean saveDhPgdFk(HttpServletRequest req, @RequestBody List<PgdDh>list) throws Exception, CustomException {
dhService.saveDhPgdFk(list,req);
return new ResultBean();
}
} }

@ -1,9 +1,20 @@
package com.dsic.gj_erp.controller.pgd; package com.dsic.gj_erp.controller.pgd;
import org.springframework.web.bind.annotation.RequestMapping; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsic.gj_erp.annotation.AuthFunction;
import com.dsic.gj_erp.bean.ResultBean;
import com.dsic.gj_erp.bean.pgd.PgdPwjh;
import com.dsic.gj_erp.bean.pgd.PgdPwjh;
import com.dsic.gj_erp.exception.CustomException;
import com.dsic.gj_erp.service.pgd.PgdPwjhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@ -16,6 +27,50 @@ import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@RequestMapping("/pgdPwjh") @RequestMapping("/pgdPwjh")
public class PgdPwjhController { public class PgdPwjhController {
@Autowired
PgdPwjhService pgdPwjhService;
@PostMapping("/getPwPgd")
@ResponseBody
public ResultBean getPwPgd(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
QueryWrapper<PgdPwjh> qw =new QueryWrapper<>();
qw.eq(StrUtil.isNotEmpty((String)map.get("dcch")),"czbh",(String)map.get("dcch"));
qw.eq(StrUtil.isNotEmpty((String)map.get("pl")),"pl",(String)map.get("pl"));
qw.eq(StrUtil.isNotEmpty((String)map.get("fd")),"fd",(String)map.get("fd"));
qw.eq(StrUtil.isNotEmpty((String)map.get("zt")),"zt",(String)map.get("zt"));
qw.orderBy(true,true,"czbh","pl","fd");
return new ResultBean(pgdPwjhService.list(qw));
}
@PostMapping("/savePwPgdXd")
@ResponseBody
@AuthFunction
public ResultBean savePwPgdXd(HttpServletRequest req, @RequestBody List<PgdPwjh> list) throws Exception, CustomException {
pgdPwjhService.savePwPgdXd(list,req);
return new ResultBean();
}
@PostMapping("/savePwPgdXdBack")
@ResponseBody
@AuthFunction
public ResultBean savePwPgdXdBack(HttpServletRequest req, @RequestBody List<PgdPwjh>list) throws Exception, CustomException {
pgdPwjhService.savePwPgdXdBack(list,req);
return new ResultBean();
}
@PostMapping("/savePwPgdFk")
@ResponseBody
@AuthFunction
public ResultBean savePwPgdFk(HttpServletRequest req, @RequestBody List<PgdPwjh>list) throws Exception, CustomException {
pgdPwjhService.savePwPgdFk(list,req);
return new ResultBean();
}
} }

@ -1,9 +1,20 @@
package com.dsic.gj_erp.controller.pgd; package com.dsic.gj_erp.controller.pgd;
import org.springframework.web.bind.annotation.RequestMapping; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsic.gj_erp.annotation.AuthFunction;
import com.dsic.gj_erp.bean.ResultBean;
import com.dsic.gj_erp.bean.pgd.PgdQgjh;
import com.dsic.gj_erp.bean.pgd.PgdQgjh;
import com.dsic.gj_erp.exception.CustomException;
import com.dsic.gj_erp.service.pgd.PgdQgjhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@ -16,6 +27,52 @@ import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@RequestMapping("/pgdQgjh") @RequestMapping("/pgdQgjh")
public class PgdQgjhController { public class PgdQgjhController {
@Autowired
PgdQgjhService pgdQgjhService;
@PostMapping("/getQgPgd")
@ResponseBody
public ResultBean getQgPgd(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
QueryWrapper<PgdQgjh> qw =new QueryWrapper<>();
qw.eq(StrUtil.isNotEmpty((String)map.get("dcch")),"czbh",(String)map.get("dcch"));
qw.eq(StrUtil.isNotEmpty((String)map.get("pl")),"pl",(String)map.get("pl"));
qw.eq(StrUtil.isNotEmpty((String)map.get("fd")),"fd",(String)map.get("fd"));
qw.eq(StrUtil.isNotEmpty((String)map.get("zt")),"zt",(String)map.get("zt"));
qw.orderBy(true,true,"czbh","pl","fd");
return new ResultBean(pgdQgjhService.list(qw));
}
@PostMapping("/saveQgPgdXd")
@ResponseBody
@AuthFunction
public ResultBean saveQgPgdXd(HttpServletRequest req, @RequestBody List<PgdQgjh> list) throws Exception, CustomException {
pgdQgjhService.saveQgPgdXd(list,req);
return new ResultBean();
}
@PostMapping("/saveQgPgdXdBack")
@ResponseBody
@AuthFunction
public ResultBean saveQgPgdXdBack(HttpServletRequest req, @RequestBody List<PgdQgjh>list) throws Exception, CustomException {
pgdQgjhService.saveQgPgdXdBack(list,req);
return new ResultBean();
}
@PostMapping("/saveQgPgdFk")
@ResponseBody
@AuthFunction
public ResultBean saveQgPgdFk(HttpServletRequest req, @RequestBody List<PgdQgjh>list) throws Exception, CustomException {
pgdQgjhService.saveQgPgdFk(list,req);
return new ResultBean();
}
} }

@ -1,9 +1,20 @@
package com.dsic.gj_erp.controller.pgd; package com.dsic.gj_erp.controller.pgd;
import org.springframework.web.bind.annotation.RequestMapping; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsic.gj_erp.annotation.AuthFunction;
import com.dsic.gj_erp.bean.ResultBean;
import com.dsic.gj_erp.bean.pgd.PgdSljh;
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
import com.dsic.gj_erp.exception.CustomException;
import com.dsic.gj_erp.service.pgd.PgdSljhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@ -16,6 +27,52 @@ import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@RequestMapping("/pgdSljh") @RequestMapping("/pgdSljh")
public class PgdSljhController { public class PgdSljhController {
@Autowired
PgdSljhService pgdSljhService;
@PostMapping("/getSljhPgd")
@ResponseBody
public ResultBean getSljhPgd(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
QueryWrapper<PgdSljh> qw =new QueryWrapper<>();
qw.eq(StrUtil.isNotEmpty((String)map.get("dcch")),"czbh",(String)map.get("dcch"));
qw.eq(StrUtil.isNotEmpty((String)map.get("pl")),"pl",(String)map.get("pl"));
qw.eq(StrUtil.isNotEmpty((String)map.get("fd")),"fd",(String)map.get("fd"));
qw.eq(StrUtil.isNotEmpty((String)map.get("zt")),"zt",(String)map.get("zt"));
qw.orderBy(true,true,"czbh","pl","fd");
return new ResultBean(pgdSljhService.list(qw));
}
@PostMapping("/saveSljhPgdXd")
@ResponseBody
@AuthFunction
public ResultBean saveSljhPgdXd(HttpServletRequest req, @RequestBody List<PgdSljh> list) throws Exception, CustomException {
pgdSljhService.saveSljhPgdXd(list,req);
return new ResultBean();
}
@PostMapping("/saveSljhPgdXdBack")
@ResponseBody
@AuthFunction
public ResultBean saveSljhPgdXdBack(HttpServletRequest req, @RequestBody List<PgdSljh>list) throws Exception, CustomException {
pgdSljhService.saveSljhPgdXdBack(list,req);
return new ResultBean();
}
@PostMapping("/saveSljhPgdFk")
@ResponseBody
@AuthFunction
public ResultBean saveSljhPgdFk(HttpServletRequest req, @RequestBody List<PgdSljh>list) throws Exception, CustomException {
pgdSljhService.saveSljhPgdFk(list,req);
return new ResultBean();
}
} }

@ -48,7 +48,7 @@ public class PgdTzjhController {
qw.eq(StrUtil.isNotEmpty((String)map.get("fd")),"fd",(String)map.get("fd")); qw.eq(StrUtil.isNotEmpty((String)map.get("fd")),"fd",(String)map.get("fd"));
qw.eq(StrUtil.isNotEmpty((String)map.get("zt")),"zt",(String)map.get("zt")); qw.eq(StrUtil.isNotEmpty((String)map.get("zt")),"zt",(String)map.get("zt"));
qw.orderBy(true,true,"czbh","pl","fd"); qw.orderBy(true,true,"czbh","pl","fd");
return new ResultBean(pgdTzjhService.list()); return new ResultBean(pgdTzjhService.list(qw));
} }

@ -85,6 +85,28 @@ public class BomUploadServiceImpl {
int ldpt = 1; int ldpt = 1;
String czbh1 = ""; String czbh1 = "";
String pl1 = ""; String pl1 = "";
List<DmBom> oloList = dmBomService.list(new QueryWrapper<DmBom>().eq("dcch", czbh)
.eq("pl", pl)
);
Boolean delfag=false;
for(DmBom e:oloList){
if("Y".equals(e.getFkgs())){
delfag=true;
break;
}
}
if (delfag) {
throw new CustomException(10106,"不能重新导入请联系管理员");
}
// List<DmBom> list = dmBomService.list(new QueryWrapper<DmBom>().eq("sjch", czbh) // List<DmBom> list = dmBomService.list(new QueryWrapper<DmBom>().eq("sjch", czbh)
// .eq(StrUtil.isNotEmpty((String) pl), "pl",pl) // .eq(StrUtil.isNotEmpty((String) pl), "pl",pl)
// ); // );
@ -1385,8 +1407,19 @@ public class BomUploadServiceImpl {
List<DmBom> oloList = dmBomService.list(new QueryWrapper<DmBom>().eq("dcch", czbh) List<DmBom> oloList = dmBomService.list(new QueryWrapper<DmBom>().eq("dcch", czbh)
.eq("pl", pl) .eq("pl", pl)
); );
if (oloList.size() > 0) { Boolean delfag=true;
for(DmBom e:oloList){
if("Y".equals(e.getFkgs())){
delfag=false;
break;
}
}
if (oloList.size() > 0 && delfag ) {
dmBomService.remove(new QueryWrapper<DmBom>().eq("dcch", czbh).eq("pl", pl)); dmBomService.remove(new QueryWrapper<DmBom>().eq("dcch", czbh).eq("pl", pl));
} else if (!delfag) {
throw new CustomException(10106,"不能重新导入请联系管理员");
} }
} }
// Map querMap= new HashMap(); // Map querMap= new HashMap();
@ -1579,11 +1612,54 @@ public class BomUploadServiceImpl {
}); });
}
// 根据 adds 去找工时定 导入bom时候 根据目标船只的定额数据 给上值
// 切割之前的定额 船号,批量,组立,跨位,规格,领取类别
// 切割之后 零件,规格
DmCbxxp cbbm = dmCbxxpService.getOne(new QueryWrapper<DmCbxxp>().eq("cbbm", czbh));
if(StringUtils.isNotBlank(cbbm.getSCzbh())){
List<DmBom> oldList = dmBomService.list(new QueryWrapper<DmBom>().eq("dcch", cbbm.getSCzbh())
.eq("pl", pl).eq("fkgs","Y")
);
for(DmBom dmBom :adds){
DmBom dmBom1 = oldList.stream().filter(fst -> fst.getDcch().equals(dmBom.getDcch()) && fst.getPl().equals(dmBom.getPl()) &&
fst.getZl().equals(dmBom.getZl()) && fst.getKw().equals(dmBom.getKw()) &&
fst.getWpgg().equals(dmBom.getWpgg()) && fst.getWpcz().equals(dmBom.getWpcz()) &&
fst.getLqlb().equals(dmBom.getLqlb())
).findFirst().orElse(null);
if(null!=dmBom1){
dmBom.setFkblgs(dmBom1.getFkblgs());
dmBom.setFkpwgs(dmBom1.getFkpwgs());
dmBom.setFkllgs(dmBom1.getFkllgs());
dmBom.setFkhxgs(dmBom1.getFkhxgs());
dmBom.setFkqggs(dmBom1.getFkqggs());
dmBom.setFkzpgs(dmBom1.getFkzpgs());
}
DmBom dmBom2 = oldList.stream().filter(fst -> fst.getDcch().equals(dmBom.getDcch()) && fst.getPl().equals(dmBom.getPl()) &&
fst.getZl().equals(dmBom.getZl()) && fst.getKw().equals(dmBom.getKw()) &&
fst.getWpgg().equals(dmBom.getWpgg()) && fst.getWpcz().equals(dmBom.getWpcz()) &&
fst.getLqlb().equals(dmBom.getLqlb()) &&fst.getTzbh().equals(dmBom.getTzbh())&&
fst.getLjbh().equals(dmBom.getLjbh())
).findFirst().orElse(null);
if(null!=dmBom2){
dmBom.setFkpkgs(dmBom2.getFkpkgs());
dmBom.setFkqgs(dmBom2.getFkqgs());
dmBom.setFkdmgs(dmBom2.getFkdmgs());
}
}
} }
dmBomService.insertBoms(adds); dmBomService.insertBoms(adds);
return adds; return adds;
} }
// 根据套料图号得到组立信息。 // 根据套料图号得到组立信息。
public String getZL(String tzbh) { public String getZL(String tzbh) {
String bh = tzbh.substring(6, 8); String bh = tzbh.substring(6, 8);

@ -60,7 +60,7 @@ public class DmCzplpNewServiceImpl extends ServiceImpl<DmCzplpNewMapper, DmCzplp
public Map uploadPl(List<PlExcel> list, String project, String isupload, HttpServletRequest req) { public Map uploadPl(List<PlExcel> list, String project, String isupload, HttpServletRequest req) {
Map returnMap = new HashMap(); Map returnMap = new HashMap();
List<String> pls = list.stream().filter(f -> StringUtils.isNotBlank(f.getDcPL())).map(PlExcel::getDcPL).collect(Collectors.toList()); List<String> pls = list.stream().filter(f -> StringUtils.isNotBlank(f.getDcPL())).map(PlExcel::getDcPL).collect(Collectors.toList());
List<DmCzplpNew> fdList = this.list(new QueryWrapper<DmCzplpNew>().in("dc_pl", pls)); List<DmCzplpNew> fdList = this.list(new QueryWrapper<DmCzplpNew>().in("dc_pl", pls).eq("dc_ch",list.get(0).getDcCh()));
// if(fdList.size()>0){ // if(fdList.size()>0){
// // 是否覆盖之前导入的数据 // // 是否覆盖之前导入的数据
// if(!isupload.equals("01")){ // if(!isupload.equals("01")){
@ -77,9 +77,10 @@ public class DmCzplpNewServiceImpl extends ServiceImpl<DmCzplpNewMapper, DmCzplp
String fds = (String) map.get("fds"); String fds = (String) map.get("fds");
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(plExcel); Map<String, Object> stringObjectMap = BeanUtil.beanToMap(plExcel);
DmCzplpNew dmCzplpNewOld = fdList.stream().filter(fst -> plExcel.getDcPL().equals(fst.getDcPl())).findFirst().orElse(null); DmCzplpNew dmCzplpNewOld = fdList.stream().filter(fst -> plExcel.getDcPL().equals(fst.getDcPl())).findFirst().orElse(null);
// 把批量补0
plExcel.setDcPL(String.format("%03d",Integer.parseInt(plExcel.getDcPL())));
if (null != dmCzplpNewOld) { if (null != dmCzplpNewOld) {
this.remove(new QueryWrapper<DmCzplpNew>().eq("dc_pl", plExcel.getDcPL())); this.remove(new QueryWrapper<DmCzplpNew>().eq("dc_pl", plExcel.getDcPL()).eq("dc_ch",plExcel.getDcCh()));
for (int i = 1; i <plCount; i++) { for (int i = 1; i <plCount; i++) {
DmCzplpNew dmCzplpNew = plexcltoDmczplNewUp(plExcel, stringObjectMap, req, i, dmCzplpNewOld); DmCzplpNew dmCzplpNew = plexcltoDmczplNewUp(plExcel, stringObjectMap, req, i, dmCzplpNewOld);
dmCzplpNews.add(dmCzplpNew); dmCzplpNews.add(dmCzplpNew);
@ -401,6 +402,17 @@ public class DmCzplpNewServiceImpl extends ServiceImpl<DmCzplpNewMapper, DmCzplp
qw.eq(StrUtil.isNotEmpty((String) map.get("dcch")), "dc_ch", (String) map.get("dcch")); qw.eq(StrUtil.isNotEmpty((String) map.get("dcch")), "dc_ch", (String) map.get("dcch"));
qw.eq(StrUtil.isNotEmpty((String) map.get("dcpl")), "dc_pl", (String) map.get("dcpl")); qw.eq(StrUtil.isNotEmpty((String) map.get("dcpl")), "dc_pl", (String) map.get("dcpl"));
qw.orderBy(true, true, "len(dc_pl)","dc_pl"); qw.orderBy(true, true, "len(dc_pl)","dc_pl");
if((Boolean) map.get("flag")){
List<DmCbxxp> list= dmCbxxpService.list(new QueryWrapper<DmCbxxp>()
.select("cbbm","cbmc")
.eq("wgbs","N")
);
List<String> pls = list.stream().filter(f -> StringUtils.isNotBlank(f.getCbbm())).map(DmCbxxp::getCbbm).collect(Collectors.toList());
qw.in("dc_ch",pls);
}
List<DmCzplpNew> list = this.list(qw); List<DmCzplpNew> list = this.list(qw);
return list; return list;
} }

@ -248,7 +248,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
//切割人员 //切割人员
//切割日期 //切割日期
mx.setPklx(b.getPklx()); mx.setPklx(b.getPklx());
mx.setPkcd(b.getPkcd()); // mx.setPkcd(b.getPkcd());
//坡口设备 //坡口设备
//坡口人员 //坡口人员
//坡口日期 //坡口日期
@ -256,7 +256,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
//曲加工设备 //曲加工设备
//曲加工人员 //曲加工人员
//曲加工日期 //曲加工日期
mx.setDmcd(b.getDmcd()); // mx.setDmcd(b.getDmcd());
//打磨设备 //打磨设备
//打磨人员 //打磨人员
//打磨日期 //打磨日期

@ -2,6 +2,10 @@ package com.dsic.gj_erp.service.pgd;
import com.dsic.gj_erp.bean.pgd.PgdDh; import com.dsic.gj_erp.bean.pgd.PgdDh;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
@ -13,4 +17,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface PgdDhService extends IService<PgdDh> { public interface PgdDhService extends IService<PgdDh> {
void saveDhPgdXd(List<PgdDh> pgdDhs, HttpServletRequest request);
void saveDhPgdFk(List<PgdDh> pgdDhs, HttpServletRequest request);
void saveDhPgdXdBack(List<PgdDh> pgdDhs, HttpServletRequest request);
} }

@ -2,6 +2,10 @@ package com.dsic.gj_erp.service.pgd;
import com.dsic.gj_erp.bean.pgd.PgdDmjh; import com.dsic.gj_erp.bean.pgd.PgdDmjh;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.dsic.gj_erp.bean.pgd.PgdPkjh;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
@ -13,4 +17,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface PgdDmjhService extends IService<PgdDmjh> { public interface PgdDmjhService extends IService<PgdDmjh> {
void saveDmPgdXd(List<PgdDmjh> dmjhs, HttpServletRequest request);
void saveDmPgdFk(List<PgdDmjh> dmjhs, HttpServletRequest request);
void saveDmPgdXdBack(List<PgdDmjh> dmjhs, HttpServletRequest request);
} }

@ -2,6 +2,10 @@ package com.dsic.gj_erp.service.pgd;
import com.dsic.gj_erp.bean.pgd.PgdPkjh; import com.dsic.gj_erp.bean.pgd.PgdPkjh;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.dsic.gj_erp.bean.pgd.PgdQmjh;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
@ -12,5 +16,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @since 2023-11-13 * @since 2023-11-13
*/ */
public interface PgdPkjhService extends IService<PgdPkjh> { public interface PgdPkjhService extends IService<PgdPkjh> {
void savePkPgdXd(List<PgdPkjh> pkjhs, HttpServletRequest request);
void savePkPgdFk(List<PgdPkjh> pkjhs, HttpServletRequest request);
void savePkPgdXdBack(List<PgdPkjh> pkjhs, HttpServletRequest request);
} }

@ -1,8 +1,12 @@
package com.dsic.gj_erp.service.pgd; package com.dsic.gj_erp.service.pgd;
import com.dsic.gj_erp.bean.pgd.PgdDh;
import com.dsic.gj_erp.bean.pgd.PgdPwjh; import com.dsic.gj_erp.bean.pgd.PgdPwjh;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
* *
@ -13,4 +17,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface PgdPwjhService extends IService<PgdPwjh> { public interface PgdPwjhService extends IService<PgdPwjh> {
void savePwPgdXd(List<PgdPwjh> pwjhs, HttpServletRequest request);
void savePwPgdFk(List<PgdPwjh> pwjhs, HttpServletRequest request);
void savePwPgdXdBack(List<PgdPwjh> pwjhs, HttpServletRequest request);
} }

@ -1,8 +1,12 @@
package com.dsic.gj_erp.service.pgd; package com.dsic.gj_erp.service.pgd;
import com.dsic.gj_erp.bean.pgd.PgdPwjh;
import com.dsic.gj_erp.bean.pgd.PgdQgjh; import com.dsic.gj_erp.bean.pgd.PgdQgjh;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
* *
@ -13,4 +17,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface PgdQgjhService extends IService<PgdQgjh> { public interface PgdQgjhService extends IService<PgdQgjh> {
void saveQgPgdXd(List<PgdQgjh> qgjhs, HttpServletRequest request);
void saveQgPgdFk(List<PgdQgjh> qgjhs, HttpServletRequest request);
void saveQgPgdXdBack(List<PgdQgjh> qgjhs, HttpServletRequest request);
void qgToQm(List<PgdQgjh> qgjhs, HttpServletRequest request);
void qgToPk(List<PgdQgjh> qgjhs, HttpServletRequest request);
void qgToDm(List<PgdQgjh> qgjhs, HttpServletRequest request);
} }

@ -1,8 +1,12 @@
package com.dsic.gj_erp.service.pgd; package com.dsic.gj_erp.service.pgd;
import com.dsic.gj_erp.bean.pgd.PgdPwjh;
import com.dsic.gj_erp.bean.pgd.PgdQmjh; import com.dsic.gj_erp.bean.pgd.PgdQmjh;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
* *
@ -13,4 +17,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface PgdQmjhService extends IService<PgdQmjh> { public interface PgdQmjhService extends IService<PgdQmjh> {
void saveQmPgdXd(List<PgdQmjh> qmjhs, HttpServletRequest request);
void savQmPgdFk(List<PgdQmjh> qmjhs, HttpServletRequest request);
void saveQmPgdXdBack(List<PgdQmjh> qmjhs, HttpServletRequest request);
} }

@ -2,6 +2,10 @@ package com.dsic.gj_erp.service.pgd;
import com.dsic.gj_erp.bean.pgd.PgdSljh; import com.dsic.gj_erp.bean.pgd.PgdSljh;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
@ -13,4 +17,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface PgdSljhService extends IService<PgdSljh> { public interface PgdSljhService extends IService<PgdSljh> {
void saveSljhPgdXd(List<PgdSljh> sljhs, HttpServletRequest request);
void saveSljhPgdFk(List<PgdSljh> sljhs, HttpServletRequest request);
void saveSljhPgdXdBack(List<PgdSljh> sljhs, HttpServletRequest request);
} }

@ -1,10 +1,18 @@
package com.dsic.gj_erp.service.pgd.impl; package com.dsic.gj_erp.service.pgd.impl;
import cn.hutool.core.date.DateUtil;
import com.dsic.gj_erp.bean.pgd.PgdDh; import com.dsic.gj_erp.bean.pgd.PgdDh;
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
import com.dsic.gj_erp.mapper.pgd.PgdDhMapper; import com.dsic.gj_erp.mapper.pgd.PgdDhMapper;
import com.dsic.gj_erp.service.pgd.PgdDhService; import com.dsic.gj_erp.service.pgd.PgdDhService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/** /**
* <p> * <p>
@ -16,5 +24,49 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class PgdDhServiceImpl extends ServiceImpl<PgdDhMapper, PgdDh> implements PgdDhService { public class PgdDhServiceImpl extends ServiceImpl<PgdDhMapper, PgdDh> implements PgdDhService {
@Transactional(rollbackFor = Exception.class)
@Override
public void saveDhPgdXd(List<PgdDh> pgdDhs, HttpServletRequest request) {
List<PgdDh>ups= new ArrayList<>();
pgdDhs.forEach(f->{
PgdDh e= new PgdDh();
e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("02");
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
@Transactional(rollbackFor = Exception.class)
@Override
public void saveDhPgdFk(List<PgdDh> pgdDhs, HttpServletRequest request) {
List<PgdDh>ups= new ArrayList<>();
pgdDhs.forEach(f->{
PgdDh e= new PgdDh();
e.setFkry((String) request.getAttribute("yhms"));
e.setFkrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("09");
e.setFkyy(f.getFkyy());
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
@Transactional(rollbackFor = Exception.class)
@Override
public void saveDhPgdXdBack(List<PgdDh> pgdDhs, HttpServletRequest request) {
List<PgdDh>ups= new ArrayList<>();
pgdDhs.forEach(f->{
PgdDh e= new PgdDh();
e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
if(f.getZt().equals("02")){
e.setZt("01");
}
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
} }

@ -6,6 +6,9 @@ import com.dsic.gj_erp.service.pgd.PgdDmjhService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
* *
@ -16,5 +19,15 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class PgdDmjhServiceImpl extends ServiceImpl<PgdDmjhMapper, PgdDmjh> implements PgdDmjhService { public class PgdDmjhServiceImpl extends ServiceImpl<PgdDmjhMapper, PgdDmjh> implements PgdDmjhService {
@Override
public void saveDmPgdXd(List<PgdDmjh> dmjhs, HttpServletRequest request) {
}
@Override
public void saveDmPgdFk(List<PgdDmjh> dmjhs, HttpServletRequest request) {
}
@Override
public void saveDmPgdXdBack(List<PgdDmjh> dmjhs, HttpServletRequest request) {
}
} }

@ -6,6 +6,9 @@ import com.dsic.gj_erp.service.pgd.PgdPkjhService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
* *
@ -16,5 +19,15 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class PgdPkjhServiceImpl extends ServiceImpl<PgdPkjhMapper, PgdPkjh> implements PgdPkjhService { public class PgdPkjhServiceImpl extends ServiceImpl<PgdPkjhMapper, PgdPkjh> implements PgdPkjhService {
@Override
public void savePkPgdXd(List<PgdPkjh> pkjhs, HttpServletRequest request) {
}
@Override
public void savePkPgdFk(List<PgdPkjh> pkjhs, HttpServletRequest request) {
}
@Override
public void savePkPgdXdBack(List<PgdPkjh> pkjhs, HttpServletRequest request) {
}
} }

@ -1,10 +1,17 @@
package com.dsic.gj_erp.service.pgd.impl; package com.dsic.gj_erp.service.pgd.impl;
import cn.hutool.core.date.DateUtil;
import com.dsic.gj_erp.bean.pgd.PgdPwjh; import com.dsic.gj_erp.bean.pgd.PgdPwjh;
import com.dsic.gj_erp.bean.pgd.PgdSljh;
import com.dsic.gj_erp.mapper.pgd.PgdPwjhMapper; import com.dsic.gj_erp.mapper.pgd.PgdPwjhMapper;
import com.dsic.gj_erp.service.pgd.PgdPwjhService; import com.dsic.gj_erp.service.pgd.PgdPwjhService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
/** /**
* <p> * <p>
@ -16,5 +23,51 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class PgdPwjhServiceImpl extends ServiceImpl<PgdPwjhMapper, PgdPwjh> implements PgdPwjhService { public class PgdPwjhServiceImpl extends ServiceImpl<PgdPwjhMapper, PgdPwjh> implements PgdPwjhService {
@Override
@Transactional(rollbackFor = Exception.class)
public void savePwPgdXd(List<PgdPwjh> pwjhs, HttpServletRequest request) {
List<PgdPwjh>ups= new ArrayList<>();
pwjhs.forEach(f->{
PgdPwjh e= new PgdPwjh();
e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("02");
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void savePwPgdFk(List<PgdPwjh> pwjhs, HttpServletRequest request) {
List<PgdPwjh>ups= new ArrayList<>();
pwjhs.forEach(f->{
PgdPwjh e= new PgdPwjh();
e.setFkry((String) request.getAttribute("yhms"));
e.setFkrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("09");
e.setFkyy(f.getFkyy());
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void savePwPgdXdBack(List<PgdPwjh> pwjhs, HttpServletRequest request) {
List<PgdPwjh>ups= new ArrayList<>();
pwjhs.forEach(f->{
PgdPwjh e= new PgdPwjh();
e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
if(f.getZt().equals("02")){
e.setZt("01");
}
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
} }

@ -1,10 +1,18 @@
package com.dsic.gj_erp.service.pgd.impl; package com.dsic.gj_erp.service.pgd.impl;
import cn.hutool.core.date.DateUtil;
import com.dsic.gj_erp.bean.pgd.PgdPwjh;
import com.dsic.gj_erp.bean.pgd.PgdQgjh; import com.dsic.gj_erp.bean.pgd.PgdQgjh;
import com.dsic.gj_erp.bean.pgd.PgdSljh;
import com.dsic.gj_erp.mapper.pgd.PgdQgjhMapper; import com.dsic.gj_erp.mapper.pgd.PgdQgjhMapper;
import com.dsic.gj_erp.service.pgd.PgdQgjhService; import com.dsic.gj_erp.service.pgd.PgdQgjhService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
/** /**
* <p> * <p>
@ -16,5 +24,72 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class PgdQgjhServiceImpl extends ServiceImpl<PgdQgjhMapper, PgdQgjh> implements PgdQgjhService { public class PgdQgjhServiceImpl extends ServiceImpl<PgdQgjhMapper, PgdQgjh> implements PgdQgjhService {
@Override
@Transactional(rollbackFor = Exception.class)
public void saveQgPgdXd(List<PgdQgjh> qgjhs, HttpServletRequest request) {
List<PgdQgjh>ups= new ArrayList<>();
qgjhs.forEach(f->{
PgdQgjh e= new PgdQgjh();
e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("02");
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void saveQgPgdFk(List<PgdQgjh> qgjhs, HttpServletRequest request) {
List<PgdQgjh>ups= new ArrayList<>();
qgjhs.forEach(f->{
PgdQgjh e= new PgdQgjh();
e.setFkry((String) request.getAttribute("yhms"));
e.setFkrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("09");
e.setFkyy(f.getFkyy());
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void saveQgPgdXdBack(List<PgdQgjh> qgjhs, HttpServletRequest request) {
List<PgdQgjh>ups= new ArrayList<>();
qgjhs.forEach(f->{
PgdQgjh e= new PgdQgjh();
e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
if(f.getZt().equals("02")){
e.setZt("01");
}
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
/**
* //todo
* @param qgjhs
* @param request
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void qgToQm(List<PgdQgjh> qgjhs, HttpServletRequest request) {
}
@Override
@Transactional(rollbackFor = Exception.class)
public void qgToPk(List<PgdQgjh> qgjhs, HttpServletRequest request) {
}
@Override
@Transactional(rollbackFor = Exception.class)
public void qgToDm(List<PgdQgjh> qgjhs, HttpServletRequest request) {
}
} }

@ -5,6 +5,10 @@ import com.dsic.gj_erp.mapper.pgd.PgdQmjhMapper;
import com.dsic.gj_erp.service.pgd.PgdQmjhService; import com.dsic.gj_erp.service.pgd.PgdQmjhService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
@ -16,5 +20,20 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class PgdQmjhServiceImpl extends ServiceImpl<PgdQmjhMapper, PgdQmjh> implements PgdQmjhService { public class PgdQmjhServiceImpl extends ServiceImpl<PgdQmjhMapper, PgdQmjh> implements PgdQmjhService {
@Override
@Transactional(rollbackFor = Exception.class)
public void saveQmPgdXd(List<PgdQmjh> qmjhs, HttpServletRequest request) {
}
@Override
@Transactional(rollbackFor = Exception.class)
public void savQmPgdFk(List<PgdQmjh> qmjhs, HttpServletRequest request) {
}
@Override
@Transactional(rollbackFor = Exception.class)
public void saveQmPgdXdBack(List<PgdQmjh> qmjhs, HttpServletRequest request) {
}
} }

@ -1,10 +1,18 @@
package com.dsic.gj_erp.service.pgd.impl; package com.dsic.gj_erp.service.pgd.impl;
import cn.hutool.core.date.DateUtil;
import com.dsic.gj_erp.bean.pgd.PgdDh;
import com.dsic.gj_erp.bean.pgd.PgdSljh; import com.dsic.gj_erp.bean.pgd.PgdSljh;
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
import com.dsic.gj_erp.mapper.pgd.PgdSljhMapper; import com.dsic.gj_erp.mapper.pgd.PgdSljhMapper;
import com.dsic.gj_erp.service.pgd.PgdSljhService; import com.dsic.gj_erp.service.pgd.PgdSljhService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
/** /**
* <p> * <p>
@ -16,5 +24,54 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class PgdSljhServiceImpl extends ServiceImpl<PgdSljhMapper, PgdSljh> implements PgdSljhService { public class PgdSljhServiceImpl extends ServiceImpl<PgdSljhMapper, PgdSljh> implements PgdSljhService {
@Transactional(rollbackFor = Exception.class)
@Override
public void saveSljhPgdXd(List<PgdSljh> sljhs, HttpServletRequest request) {
List<PgdSljh>ups= new ArrayList<>();
sljhs.forEach(f->{
PgdSljh e= new PgdSljh();
e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("02");
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void saveSljhPgdFk(List<PgdSljh> sljhs, HttpServletRequest request) {
List<PgdSljh>ups= new ArrayList<>();
sljhs.forEach(f->{
PgdSljh e= new PgdSljh();
e.setFkry((String) request.getAttribute("yhms"));
e.setFkrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("09");
e.setFkyy(f.getFkyy());
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void saveSljhPgdXdBack(List<PgdSljh> sljhs, HttpServletRequest request) {
List<PgdSljh>ups= new ArrayList<>();
sljhs.forEach(f->{
PgdSljh e= new PgdSljh();
e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
if(f.getZt().equals("02")){
e.setZt("01");
}
e.setId(f.getId());
ups.add(e);
});
this.updateBatchById(ups);
}
} }

@ -32,7 +32,7 @@ public class PgdTzjhServiceImpl extends ServiceImpl<PgdTzjhMapper, PgdTzjh> impl
tzjhs.forEach(f->{ tzjhs.forEach(f->{
PgdTzjh e= new PgdTzjh(); PgdTzjh e= new PgdTzjh();
e.setXfry((String) request.getAttribute("yhms")); e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("02"); e.setZt("02");
e.setId(f.getId()); e.setId(f.getId());
ups.add(e); ups.add(e);
@ -47,22 +47,22 @@ public class PgdTzjhServiceImpl extends ServiceImpl<PgdTzjhMapper, PgdTzjh> impl
tzjhs.forEach(f->{ tzjhs.forEach(f->{
PgdTzjh e= new PgdTzjh(); PgdTzjh e= new PgdTzjh();
e.setFkry((String) request.getAttribute("yhms")); e.setFkry((String) request.getAttribute("yhms"));
e.setFkrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); e.setFkrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
e.setZt("99"); e.setZt("09");
e.setFkyy(f.getFkyy()); e.setFkyy(f.getFkyy());
e.setId(f.getId()); e.setId(f.getId());
ups.add(e); ups.add(e);
}); });
this.updateBatchById(ups); this.updateBatchById(ups);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void saveTzjhPgdXdBack(List<PgdTzjh> tzjhs, HttpServletRequest request) { public void saveTzjhPgdXdBack(List<PgdTzjh> tzjhs, HttpServletRequest request) {
List<PgdTzjh>ups= new ArrayList<>(); List<PgdTzjh>ups= new ArrayList<>();
tzjhs.forEach(f->{ tzjhs.forEach(f->{
PgdTzjh e= new PgdTzjh(); PgdTzjh e= new PgdTzjh();
e.setXfry((String) request.getAttribute("yhms")); e.setXfry((String) request.getAttribute("yhms"));
e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); e.setXfrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
if(f.getZt().equals("02")){ if(f.getZt().equals("02")){
e.setZt("01"); e.setZt("01");
} }

Loading…
Cancel
Save