diff --git a/src/main/java/com/dsic/gj_erp/Test.java b/src/main/java/com/dsic/gj_erp/Test.java index 99cadc4..818685e 100644 --- a/src/main/java/com/dsic/gj_erp/Test.java +++ b/src/main/java/com/dsic/gj_erp/Test.java @@ -1,5 +1,6 @@ package com.dsic.gj_erp; +import cn.hutool.core.util.StrUtil; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.text.PDFTextStripper; import org.springframework.boot.SpringApplication; @@ -16,22 +17,24 @@ import java.util.regex.Pattern; public class Test { public static void main(String[] args) throws IOException { + + System.out.println(StrUtil.padPre("1",3,"0")); //String aaa="gagagag"; //System.out.println(aaa.split("@")[0]); //System.out.println("aaa = " + String.format("%03d",1)); - String pdfFilePath = "E:/B046HC103HN第046批量数控套料图2023-05-11.pdf"; // PDF文件路径 - PDDocument document = PDDocument.load(new File(pdfFilePath)); - PDFTextStripper stripper = new PDFTextStripper(); - String text = stripper.getText(document); - document.close(); - - // 输出提取的文本到控制台 - System.out.println(text); - - // 可以选择将文本写入文件 - String outputPath = "E:/B046HC103HN第046批量数控套料图2023-05-11.txt"; // 输出文本文件路径 - Files.write(Paths.get(outputPath), text.getBytes()); +// String pdfFilePath = "E:/B046HC103HN第046批量数控套料图2023-05-11.pdf"; // PDF文件路径 +// PDDocument document = PDDocument.load(new File(pdfFilePath)); +// PDFTextStripper stripper = new PDFTextStripper(); +// String text = stripper.getText(document); +// document.close(); +// +// // 输出提取的文本到控制台 +// System.out.println(text); +// +// // 可以选择将文本写入文件 +// String outputPath = "E:/B046HC103HN第046批量数控套料图2023-05-11.txt"; // 输出文本文件路径 +// Files.write(Paths.get(outputPath), text.getBytes()); } } diff --git a/src/main/java/com/dsic/gj_erp/bean/jcsj/DmCzplp.java b/src/main/java/com/dsic/gj_erp/bean/jcsj/DmCzplp.java index 1e49a44..95c38ae 100644 --- a/src/main/java/com/dsic/gj_erp/bean/jcsj/DmCzplp.java +++ b/src/main/java/com/dsic/gj_erp/bean/jcsj/DmCzplp.java @@ -1,9 +1,12 @@ package com.dsic.gj_erp.bean.jcsj; +import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.dsic.gj_erp.bean.jhgk.excel.ZrcAndPlb; +import com.dsic.gj_erp.exception.ServiceException; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -97,4 +100,20 @@ public class DmCzplp implements Serializable { private BigDecimal zl; + public static DmCzplp createByExcel(String dcCh,ZrcAndPlb item,String yhms){ + DmCzplp dmCzplp = new DmCzplp(); + dmCzplp.setDcCh(dcCh); + dmCzplp.setDcFd(item.getMfd()); + try { + dmCzplp.setZl(new BigDecimal(item.getTon())); + }catch (Exception e){ + throw new ServiceException(10001,"吨位不是数字"); + } + + dmCzplp.setDcPl(item.getDcPl()); + dmCzplp.setLrr(yhms); + dmCzplp.setLrrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); + return dmCzplp; + } + } diff --git a/src/main/java/com/dsic/gj_erp/bean/jcsj/DmCzplpNew.java b/src/main/java/com/dsic/gj_erp/bean/jcsj/DmCzplpNew.java index 5c33927..dbf2b5d 100644 --- a/src/main/java/com/dsic/gj_erp/bean/jcsj/DmCzplpNew.java +++ b/src/main/java/com/dsic/gj_erp/bean/jcsj/DmCzplpNew.java @@ -1,8 +1,12 @@ package com.dsic.gj_erp.bean.jcsj; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; +import com.dsic.gj_erp.bean.jhgk.DmZrcjh; +import com.dsic.gj_erp.bean.jhgk.excel.ZrcAndPlb; +import com.dsic.gj_erp.exception.ServiceException; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -170,5 +174,25 @@ public class DmCzplpNew implements Serializable { private String xfqLqb1; - + public static DmCzplpNew createByExcel(String dcCh, String fd, ZrcAndPlb item){ + DmCzplpNew plp = new DmCzplpNew(); + plp.setDcCh(dcCh); + plp.setDcPl(item.getDcPl()); + plp.setDcFd(fd); + try { + plp.setZl(new BigDecimal(item.getTon())); + }catch (Exception e){ + throw new ServiceException(10001,"吨位不是数字"); + } + plp.setGjks(item.getGjks()); + plp.setGjksZrc(item.getGjks()); + plp.setDzjsq(item.getGjjs()); + plp.setDzjsqZrc(item.getGjjs()); + plp.setXfqTlt(item.getTlt()); + plp.setXfqLqb(item.getBclqb()); + plp.setXfqDhqd(item.getDhqd()); + plp.setBcdq(item.getGldq()); + plp.setZt("0"); + return plp; + } } diff --git a/src/main/java/com/dsic/gj_erp/bean/jhgk/DmZrcjh.java b/src/main/java/com/dsic/gj_erp/bean/jhgk/DmZrcjh.java index dc58f84..4bf117d 100644 --- a/src/main/java/com/dsic/gj_erp/bean/jhgk/DmZrcjh.java +++ b/src/main/java/com/dsic/gj_erp/bean/jhgk/DmZrcjh.java @@ -1,9 +1,12 @@ package com.dsic.gj_erp.bean.jhgk; +import cn.hutool.core.util.StrUtil; import com.alibaba.excel.annotation.ExcelIgnore; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; +import com.dsic.gj_erp.bean.jhgk.excel.ZrcAndPlb; +import com.dsic.gj_erp.exception.ServiceException; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -137,4 +140,25 @@ public class DmZrcjh implements Serializable { @ApiModelProperty(value = "编制日期 yyyy/MM/dd") private String bzrq; + + public static DmZrcjh createByExcel(String dcCh, String fd, ZrcAndPlb item){ + DmZrcjh dmZrcjh = new DmZrcjh(); + dmZrcjh.setDcCh(dcCh); + dmZrcjh.setDcPl(item.getDcPl()); + dmZrcjh.setDcFd(fd); + try { + dmZrcjh.setZl(Double.valueOf(item.getTon())); + }catch (Exception e){ + throw new ServiceException(10001,"吨位不是数字"); + } + dmZrcjh.setGjks(item.getGjks()); + dmZrcjh.setGjjsDz(item.getGjjs()); + dmZrcjh.setGjjsXz(item.getGjjs()); + dmZrcjh.setXfqTlt(item.getTlt()); + dmZrcjh.setXfqLqb(item.getBclqb()); + dmZrcjh.setXfqDhqd(item.getDhqd()); + dmZrcjh.setBcdq(item.getGldq()); + dmZrcjh.setZt("0"); + return dmZrcjh; + } } diff --git a/src/main/java/com/dsic/gj_erp/bean/jhgk/excel/ZrcAndPlb.java b/src/main/java/com/dsic/gj_erp/bean/jhgk/excel/ZrcAndPlb.java new file mode 100644 index 0000000..4024734 --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/bean/jhgk/excel/ZrcAndPlb.java @@ -0,0 +1,40 @@ +package com.dsic.gj_erp.bean.jhgk.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class ZrcAndPlb { + + @ExcelProperty(value = "批量号") + public String dcPl; + + @ExcelProperty(value = "包含分段") + public String mfd; + + @ExcelProperty(value = "吨位") + public String ton; + + @ExcelProperty(value = "钢加结束") + public String gjjs; + + @ExcelProperty(value = "钢加开始") + public String gjks; + + @ExcelProperty(value = "套料图") + public String tlt; + + @ExcelProperty(value = "板材领取表") + public String bclqb; + + @ExcelProperty(value = "订货清单发放") + public String dhqd; + + @ExcelProperty(value = "钢料到齐时间") + public String gldq; + + @ExcelProperty(value = "备注") + public String bz; +} diff --git a/src/main/java/com/dsic/gj_erp/controller/jhgk/DmQfxqController.java b/src/main/java/com/dsic/gj_erp/controller/jhgk/DmQfxqController.java index 92eac54..0ee9e49 100644 --- a/src/main/java/com/dsic/gj_erp/controller/jhgk/DmQfxqController.java +++ b/src/main/java/com/dsic/gj_erp/controller/jhgk/DmQfxqController.java @@ -53,6 +53,7 @@ public class DmQfxqController { @AuthFunction public ResultBean getList(@RequestBody DmQfxq qfxq) { List list = service.list(new QueryWrapper() + .eq(StrUtil.isNotEmpty(qfxq.getDcCh()), "dc_ch", qfxq.getDcCh()) .eq(StrUtil.isNotEmpty(qfxq.getXzglxq()), "substring(Xzglxq,0,8) ", qfxq.getXzglxq()) .eq(StrUtil.isNotEmpty(qfxq.getZt()), "zt", qfxq.getZt()) .orderByAsc("DC_CH,cast(dc_pl as int),DC_FD")); diff --git a/src/main/java/com/dsic/gj_erp/controller/jhgk/中日程批量表合并导入控制器.java b/src/main/java/com/dsic/gj_erp/controller/jhgk/中日程批量表合并导入控制器.java new file mode 100644 index 0000000..0737792 --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/controller/jhgk/中日程批量表合并导入控制器.java @@ -0,0 +1,263 @@ +package com.dsic.gj_erp.controller.jhgk; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.dsic.gj_erp.bean.ResultBean; +import com.dsic.gj_erp.bean.jcsj.DmCzplp; +import com.dsic.gj_erp.bean.jcsj.DmCzplpNew; +import com.dsic.gj_erp.bean.jhgk.DmTzjh; +import com.dsic.gj_erp.bean.jhgk.DmZrcjh; +import com.dsic.gj_erp.bean.jhgk.DmZrcjhOld; +import com.dsic.gj_erp.bean.jhgk.excel.ZrcAndPlb; +import com.dsic.gj_erp.listeners.ExcelZrcAndPlb; +import com.dsic.gj_erp.service.jcsj.DmCzplpNewService; +import com.dsic.gj_erp.service.jcsj.DmCzplpService; +import com.dsic.gj_erp.service.jhgk.DmTzjhService; +import com.dsic.gj_erp.service.jhgk.DmZrcjhOldService; +import com.dsic.gj_erp.service.jhgk.DmZrcjhService; +import com.dsic.gj_erp.service.sy.SYService; +import lombok.AllArgsConstructor; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +@RestController +@RequestMapping("zrcAndPlb") +@AllArgsConstructor +public class 中日程批量表合并导入控制器 { + + private final DmZrcjhService zrcjhService; + private final DmCzplpNewService czplpNewService; + private final DmTzjhService dmTzjhService; + private final DmCzplpService dmCzplpService; + private final SYService syService; + private final DmZrcjhOldService oldService; + + @PostMapping("upload") + @Transactional(rollbackFor = Exception.class) + public ResultBean upload(@RequestParam("file") MultipartFile file,String dcCh, HttpServletRequest req) throws IOException { + ExcelZrcAndPlb excelZrcAndPlb = new ExcelZrcAndPlb(); + EasyExcel.read(file.getInputStream(), ZrcAndPlb.class, excelZrcAndPlb).sheet(0).headRowNumber(1).doRead(); + List objList = excelZrcAndPlb.getList(); + + List zrcjhList=new ArrayList<>(); + List plList=new ArrayList<>(); + List dmCzplpList=new ArrayList<>(); + + String bzr = (String) req.getAttribute("yhms"); + String day=DateUtil.date().toString("yyyy/MM/dd"); + for(ZrcAndPlb item:objList){ + String[] fds = item.getMfd().split("/"); + List fdList = czplpNewService.list(new QueryWrapper().eq("dc_pl", item.getDcPl()).eq("dc_ch", dcCh)); + boolean remove = czplpNewService.remove(new QueryWrapper().eq("dc_pl", item.getDcPl()).eq("dc_ch", dcCh)); + + for (String fd:fds){ + if (StrUtil.isNotEmpty(fd)){ + //中日程 + DmZrcjh dmZrcjh = DmZrcjh.createByExcel(dcCh, fd, item); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("DC_CH", dmZrcjh.getDcCh()); + queryWrapper.eq("DC_PL", dmZrcjh.getDcPl()); + queryWrapper.eq("DC_FD", dmZrcjh.getDcFd()); + DmZrcjh dmZrcjhOne = zrcjhService.getOne(queryWrapper); + if (ObjectUtil.isNotEmpty(dmZrcjhOne)) { + //存进备份表 + DmZrcjhOld old= BeanUtil.copyProperties(dmZrcjhOne, DmZrcjhOld.class); + oldService.save(old); + String dmZrcjhOneBzr = dmZrcjhOne.getBzr(); + String dmZrcjhOneBzrq = dmZrcjhOne.getBzrq(); + if (!dmZrcjhOneBzr.contains(bzr)) { + dmZrcjh.setBzr(StrUtil.format("{}@{}",dmZrcjhOneBzr , bzr)); + dmZrcjh.setBzrq(StrUtil.format("{}@{}",dmZrcjhOneBzrq , day)); + dmZrcjh.setXh(dmZrcjhOne.getXh()); + } + zrcjhService.updateById(dmZrcjh); + } else { + dmZrcjh.setBzr(bzr); + dmZrcjh.setBzrq(day); + zrcjhList.add(dmZrcjh); + } + + //批量表 + DmCzplpNew plb = DmCzplpNew.createByExcel(dcCh, fd, item); + String id = syService.f_getpjh("DM", "DM", "CZPL"); + plb.setId(id); + if (remove){ + try { + fdList.stream().filter(fst -> plb.getDcPl().equals(fst.getDcPl())) + .findFirst().ifPresent(it->updateCzPlp(plb,it)); + }catch (Exception ignored){} + } + plList.add(plb); + + //旧表数据,仅当首次导入时写入即可 + if (!remove){ + DmCzplp plp = DmCzplp.createByExcel(dcCh, item, (String) req.getAttribute("yhms")); + plp.setId(id); + dmCzplpList.add(plp); + } + } + } + } + zrcjhService.saveBatch(zrcjhList,500); + + if (!plList.isEmpty()) { + czplpNewService.saveBatch(plList,500); + + //生成图纸计划并保存到数据库中 + Listtzjhs=new ArrayList<>(); + plList.forEach(e->{ + List list1 = dmTzjhService.list(new QueryWrapper().eq("dc_ch", e.getDcCh()).eq("dc_pl", e.getDcPl()).eq("dc_fd",e.getDcFd())); + if(list1.isEmpty()){ + DmTzjh tzjh=new DmTzjh(); + tzjh.setDcPl(e.getDcPl()); + tzjh.setDcFd(e.getDcFd()); + tzjh.setDcCh(e.getDcCh()); + tzjh.setXfqTlt(e.getXfqTlt()); + tzjh.setXfqLqb(e.getXfqLqb()); + tzjh.setXfqPtb(e.getXfqPtb()); + tzjhs.add(tzjh); + } + + }); + dmTzjhService.saveBatch(tzjhs); + } + + if (!dmCzplpList.isEmpty()) { + dmCzplpService.saveBatch(dmCzplpList); + } + + return new ResultBean<>(); + } + + private void updateCzPlp(DmCzplpNew czplpNew,DmCzplpNew czplp){ + String rq =""; + String rqsm = ""; + int xfqLqb = DateUtil.compare(DateUtil.parse(czplpNew.getXfqLqb()), DateUtil.parse(czplp.getXfqLqb()), "MM"); + if (xfqLqb == 0) { + xfqLqb = DateUtil.compare(DateUtil.parse(czplpNew.getXfqLqb()), DateUtil.parse(czplp.getXfqLqb())); + if (xfqLqb != 0) { + rqsm = "变更"; + rq = czplp.getXfqLqb() + " " + czplpNew.getXfqLqb(); + }else{ + rqsm = czplp.getXfqLqb1sm(); + rq = czplp.getXfqLqb1() ; + } + } else if (xfqLqb < 0) { + rqsm = "托期"; + rq = czplp.getXfqLqb() + " " + czplpNew.getXfqLqb(); + } else if (xfqLqb > 0) { + rqsm = "延期"; + rq = czplp.getXfqLqb() + " " + czplpNew.getXfqLqb(); + } + czplpNew.setXfqLqb1sm(rqsm); + czplpNew.setXfqLqb1(rq); + int xzjsq = DateUtil.compare(DateUtil.parse(czplpNew.getXzjsq()), DateUtil.parse(czplp.getXzjsq()), "MM"); + if (xzjsq == 0) { + xzjsq = DateUtil.compare(DateUtil.parse(czplpNew.getXzjsq()), DateUtil.parse(czplp.getXzjsq())); + if (xzjsq != 0) { + rqsm = "变更"; + rq = czplp.getXzjsq() + " " + czplpNew.getXzjsq(); + }else{ + rqsm = czplp.getXzjsqsm(); + rq = czplp.getXzjsq1() ; + } + } else if (xzjsq < 0) { + rqsm = "托期"; + rq = czplp.getXzjsq() + " " + czplpNew.getXzjsq(); + } else if (xzjsq > 0) { + rqsm = "延期"; + rq = czplp.getXzjsq() + " " + czplpNew.getXzjsq(); + } + czplpNew.setXzjsq1(rq); + czplpNew.setXzjsqsm(rqsm); + int xfqTlt = DateUtil.compare(DateUtil.parse(czplpNew.getXfqTlt()), DateUtil.parse(czplp.getXfqTlt()), "MM"); + if (xfqTlt == 0) { + xfqTlt = DateUtil.compare(DateUtil.parse(czplpNew.getXfqTlt()), DateUtil.parse(czplp.getXfqTlt())); + if (xfqTlt != 0) { + rqsm = "变更"; + rq = czplp.getXfqTlt() + " " + czplpNew.getXfqTlt(); + }else{ + rqsm = czplp.getXfqTltsm(); + rq = czplp.getXfqTlt1() ; + } + } else if (xfqTlt < 0) { + rqsm = "托期"; + rq = czplp.getXfqTlt() + " " + czplpNew.getXfqTlt(); + } else if (xfqTlt > 0) { + rqsm = "延期"; + rq = czplp.getXfqTlt() + " " + czplpNew.getXfqTlt(); + } + czplpNew.setXfqTltsm(rqsm); + czplpNew.setXfqTlt1(rq); + int dzjsq = DateUtil.compare(DateUtil.parse(czplpNew.getDzjsq()), DateUtil.parse(czplp.getDzjsq()), "MM"); + if (dzjsq == 0) { + dzjsq = DateUtil.compare(DateUtil.parse(czplpNew.getDzjsq()), DateUtil.parse(czplp.getDzjsq())); + if (dzjsq != 0) { + rqsm = "变更"; + rq = czplp.getDzjsq() + " " + czplpNew.getDzjsq(); + }else{ + rqsm = czplp.getDzjsqsm(); + rq = czplp.getDzjsq1() ; + } + } else if (dzjsq < 0) { + rqsm = "托期"; + rq = czplp.getDzjsq() + " " + czplpNew.getDzjsq(); + } else if (dzjsq > 0) { + rqsm = "延期"; + rq = czplp.getDzjsq() + " " + czplpNew.getDzjsq(); + } + czplpNew.setDzjsqsm(rqsm); + czplpNew.setDzjsq1(rq); + int gjks = DateUtil.compare(DateUtil.parse(czplpNew.getGjks()), DateUtil.parse(czplp.getGjks()), "MM"); + if (gjks == 0) { + gjks = DateUtil.compare(DateUtil.parse(czplpNew.getGjks()), DateUtil.parse(czplp.getGjks())); + if (gjks != 0) { + rqsm = "变更"; + rq = czplp.getGjks() + " " + czplpNew.getGjks(); + }else{ + rqsm = czplp.getGjkssm(); + rq = czplp.getGjks1() ; + } + } else if (gjks < 0) { + rqsm = "托期"; + rq = czplp.getGjks() + " " + czplpNew.getGjks(); + } else if (gjks > 0) { + rqsm = "延期"; + rq = czplp.getGjks() + " " + czplpNew.getGjks(); + } + czplpNew.setGjks1(rq); + czplpNew.setGjkssm(rqsm); + int xfqDhqd = DateUtil.compare(DateUtil.parse(czplpNew.getXfqDhqd()), DateUtil.parse(czplp.getXfqDhqd()), "MM"); + if (xfqDhqd == 0) { + xfqDhqd = DateUtil.compare(DateUtil.parse(czplpNew.getXfqDhqd()), DateUtil.parse(czplp.getXfqDhqd())); + if (xfqDhqd != 0) { + rqsm = "变更"; + rq = czplp.getXfqDhqd() + " " + czplpNew.getXfqDhqd(); + }else{ + rqsm = czplp.getXfqDhqd1sm(); + rq = czplp.getXfqDhqd1() ; + } + } else if (xfqDhqd < 0) { + rqsm = "托期"; + rq = czplp.getXfqDhqd() + " " + czplpNew.getXfqDhqd(); + } else if (xfqDhqd > 0) { + rqsm = "延期"; + rq = czplp.getXfqDhqd() + " " + czplpNew.getXfqDhqd(); + } + czplpNew.setXfqDhqd1(rq); + czplpNew.setXfqDhqd1sm(rqsm); + } +} diff --git a/src/main/java/com/dsic/gj_erp/listeners/ExcelZrcAndPlb.java b/src/main/java/com/dsic/gj_erp/listeners/ExcelZrcAndPlb.java new file mode 100644 index 0000000..cd09012 --- /dev/null +++ b/src/main/java/com/dsic/gj_erp/listeners/ExcelZrcAndPlb.java @@ -0,0 +1,31 @@ +package com.dsic.gj_erp.listeners; + +import cn.hutool.core.util.StrUtil; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.dsic.gj_erp.bean.jhgk.excel.ZrcAndPlb; +import lombok.Getter; + +import java.util.ArrayList; +import java.util.List; + +@Getter +public class ExcelZrcAndPlb extends AnalysisEventListener { + + private List list; + + @Override + public void invoke(ZrcAndPlb zrcAndPlb, AnalysisContext analysisContext) { + zrcAndPlb.setDcPl(StrUtil.padPre(zrcAndPlb.getDcPl(),3,"0")); + list.add(zrcAndPlb); + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + + } + + public ExcelZrcAndPlb(){ + this.list=new ArrayList<>(); + } +} diff --git a/src/main/java/com/dsic/gj_erp/pc/DataFactory.java b/src/main/java/com/dsic/gj_erp/pc/DataFactory.java index af52692..03aff28 100644 --- a/src/main/java/com/dsic/gj_erp/pc/DataFactory.java +++ b/src/main/java/com/dsic/gj_erp/pc/DataFactory.java @@ -77,6 +77,7 @@ public class DataFactory { try { 均衡预占(按批次合并); }catch (Exception e){ + e.printStackTrace(); throw new ServiceException(10001,"排产结果异常"); }finally { 清理冗余数据(list);