|
|
|
@ -3,7 +3,6 @@ package com.dsic.gj_erp.service.jcsj.impl;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
|
@ -190,9 +189,6 @@ public class BomUploadServiceImpl {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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)
|
|
|
|
// );
|
|
|
|
// );
|
|
|
|
@ -351,7 +347,7 @@ public class BomUploadServiceImpl {
|
|
|
|
|
|
|
|
|
|
|
|
// 修正数据
|
|
|
|
// 修正数据
|
|
|
|
dmYdjhMapper.xzylbs(czbh, pl);
|
|
|
|
dmYdjhMapper.xzylbs(czbh, pl);
|
|
|
|
dmYdjhMapper.updatezyq(czbh,pl);
|
|
|
|
//dmYdjhMapper.updatezyq(czbh, pl);
|
|
|
|
for (MultipartFile f : file) {
|
|
|
|
for (MultipartFile f : file) {
|
|
|
|
String fname = f.getOriginalFilename();
|
|
|
|
String fname = f.getOriginalFilename();
|
|
|
|
fname = fname.substring(fname.lastIndexOf('/') + 1);
|
|
|
|
fname = fname.substring(fname.lastIndexOf('/') + 1);
|
|
|
|
@ -563,6 +559,7 @@ public class BomUploadServiceImpl {
|
|
|
|
|
|
|
|
|
|
|
|
return map;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public Map xclqbUpload(List<String> lines, String fileName, HttpServletRequest req, String zt, int xcdel, MultipartFile file, String path) throws CustomException {
|
|
|
|
public Map xclqbUpload(List<String> lines, String fileName, HttpServletRequest req, String zt, int xcdel, MultipartFile file, String path) throws CustomException {
|
|
|
|
// 判断是否重复导入
|
|
|
|
// 判断是否重复导入
|
|
|
|
@ -1005,6 +1002,7 @@ public class BomUploadServiceImpl {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public Map bctltUpload(List<String> lines, String fileName, HttpServletRequest req, String zt, int tld, MultipartFile file, String path) throws CustomException, ScriptException {
|
|
|
|
public Map bctltUpload(List<String> lines, String fileName, HttpServletRequest req, String zt, int tld, MultipartFile file, String path) throws CustomException, ScriptException {
|
|
|
|
Map map = new HashMap();
|
|
|
|
Map map = new HashMap();
|
|
|
|
@ -1245,6 +1243,7 @@ public class BomUploadServiceImpl {
|
|
|
|
map.put("yd", "yd");
|
|
|
|
map.put("yd", "yd");
|
|
|
|
return map;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public Map ljptbUpload(List<String> lines, String fileName, HttpServletRequest req, String zt, int ldpt, MultipartFile file, String path) throws CustomException {
|
|
|
|
public Map ljptbUpload(List<String> lines, String fileName, HttpServletRequest req, String zt, int ldpt, MultipartFile file, String path) throws CustomException {
|
|
|
|
List<DmWlqd> adds = new ArrayList<>();
|
|
|
|
List<DmWlqd> adds = new ArrayList<>();
|
|
|
|
@ -1373,6 +1372,7 @@ public class BomUploadServiceImpl {
|
|
|
|
// 根据文件名字得到第二个- 进行拆分
|
|
|
|
// 根据文件名字得到第二个- 进行拆分
|
|
|
|
return map;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public void insertWpjbbByLjptb(List<DmWlqd> list) {
|
|
|
|
public void insertWpjbbByLjptb(List<DmWlqd> list) {
|
|
|
|
int wph = dmWpjbpServicel.count(new QueryWrapper<DmWpjbp>().eq("wph", list.get(0).getDcCh() + list.get(0).getDcFd()));
|
|
|
|
int wph = dmWpjbpServicel.count(new QueryWrapper<DmWpjbp>().eq("wph", list.get(0).getDcCh() + list.get(0).getDcFd()));
|
|
|
|
@ -1422,6 +1422,7 @@ public class BomUploadServiceImpl {
|
|
|
|
dmWpjbpServicel.saveBatch(adds);
|
|
|
|
dmWpjbpServicel.saveBatch(adds);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public void insertwpjbbByxcLq(String wpmc, String wpxh, String wpgg, String ch, String username) {
|
|
|
|
public void insertwpjbbByxcLq(String wpmc, String wpxh, String wpgg, String ch, String username) {
|
|
|
|
String wpid = syService.f_getpjh("SS", "SYSTEM", "WPH");
|
|
|
|
String wpid = syService.f_getpjh("SS", "SYSTEM", "WPH");
|
|
|
|
@ -1700,7 +1701,8 @@ public class BomUploadServiceImpl {
|
|
|
|
dmBom.setBh(new BigDecimal(e.getWpgg().split("\\*")[0]));
|
|
|
|
dmBom.setBh(new BigDecimal(e.getWpgg().split("\\*")[0]));
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
dmBom.setBc(new BigDecimal(e.getWpgg().split("\\*")[2]));
|
|
|
|
dmBom.setBc(new BigDecimal(e.getWpgg().split("\\*")[2]));
|
|
|
|
}catch (Exception e0){}
|
|
|
|
} catch (Exception e0) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String tzbh = e.getTzbh();
|
|
|
|
String tzbh = e.getTzbh();
|
|
|
|
String hxlx = "";
|
|
|
|
String hxlx = "";
|
|
|
|
@ -2040,6 +2042,7 @@ public class BomUploadServiceImpl {
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
|
|
|
|
|
|
|
|
dmYdjh.setKw(zzcj);
|
|
|
|
dmYdjh.setKw(zzcj);
|
|
|
|
|
|
|
|
dmYdjh.updateZyq();
|
|
|
|
if (null != bchxylp) {
|
|
|
|
if (null != bchxylp) {
|
|
|
|
dmYdjh.setYlbs(null == bchxylp.getSfyl() ? "" : bchxylp.getSfyl());
|
|
|
|
dmYdjh.setYlbs(null == bchxylp.getSfyl() ? "" : bchxylp.getSfyl());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -2134,6 +2137,7 @@ public class BomUploadServiceImpl {
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
|
|
|
|
|
|
|
|
dmYdjh.setKw(zzcj);
|
|
|
|
dmYdjh.setKw(zzcj);
|
|
|
|
|
|
|
|
dmYdjh.updateZyq();
|
|
|
|
// dmYdjh.setDcFd(dmBchxjbp.getDcFd());
|
|
|
|
// dmYdjh.setDcFd(dmBchxjbp.getDcFd());
|
|
|
|
|
|
|
|
|
|
|
|
if (tzbh.substring(4, 5).equals("X")) {
|
|
|
|
if (tzbh.substring(4, 5).equals("X")) {
|
|
|
|
@ -2213,6 +2217,7 @@ public class BomUploadServiceImpl {
|
|
|
|
String s = (String) kwxxMap.get(tzbh.substring(4, 7));
|
|
|
|
String s = (String) kwxxMap.get(tzbh.substring(4, 7));
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
dmYdjhadd.setKw(zzcj);
|
|
|
|
dmYdjhadd.setKw(zzcj);
|
|
|
|
|
|
|
|
dmYdjhadd.updateZyq();
|
|
|
|
if (null != bchxmxp) {
|
|
|
|
if (null != bchxmxp) {
|
|
|
|
dmYdjhadd.setDcFd(StringUtils.isBlank(bchxmxp.getWph()) ? "" : bchxmxp.getWph().substring(0, 4));
|
|
|
|
dmYdjhadd.setDcFd(StringUtils.isBlank(bchxmxp.getWph()) ? "" : bchxmxp.getWph().substring(0, 4));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -2259,23 +2264,17 @@ public class BomUploadServiceImpl {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rMap.put("adds", adds);
|
|
|
|
rMap.put("adds", adds);
|
|
|
|
rMap.put("ups", ups);
|
|
|
|
rMap.put("ups", ups);
|
|
|
|
rMap.put("ydjhs", ydjhs);
|
|
|
|
rMap.put("ydjhs", ydjhs);
|
|
|
|
return rMap;
|
|
|
|
return rMap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void bomxzjhByDm_bchxylp(String dcch, String dcpl, HttpServletRequest req) {
|
|
|
|
public void bomxzjhByDm_bchxylp(String dcch, String dcpl, HttpServletRequest req) {
|
|
|
|
List<Dm_zhbmp> zllbs = dm_zhbmpRepository.findByBMLB("ZLLB");
|
|
|
|
List<Dm_zhbmp> zllbs = dm_zhbmpRepository.findByBMLB("ZLLB");
|
|
|
|
List<Dm_zhbmp> kwxxs = dm_zhbmpRepository.findByBMLB("KWXX");
|
|
|
|
List<Dm_zhbmp> kwxxs = dm_zhbmpRepository.findByBMLB("KWXX");
|
|
|
|
@ -2373,6 +2372,7 @@ public class BomUploadServiceImpl {
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
|
|
|
|
|
|
|
|
dmYdjh.setKw(zzcj);
|
|
|
|
dmYdjh.setKw(zzcj);
|
|
|
|
|
|
|
|
dmYdjh.updateZyq();
|
|
|
|
// if(null!=bchxylp){
|
|
|
|
// if(null!=bchxylp){
|
|
|
|
dmYdjh.setYlbs(null == dmBchxylp1.getSfyl() ? "" : dmBchxylp1.getSfyl());
|
|
|
|
dmYdjh.setYlbs(null == dmBchxylp1.getSfyl() ? "" : dmBchxylp1.getSfyl());
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
@ -2461,6 +2461,7 @@ public class BomUploadServiceImpl {
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
|
|
|
|
|
|
|
|
dmYdjh.setKw(zzcj);
|
|
|
|
dmYdjh.setKw(zzcj);
|
|
|
|
|
|
|
|
dmYdjh.updateZyq();
|
|
|
|
// dmYdjh.setDcFd(dmBchxjbp.getDcFd());
|
|
|
|
// dmYdjh.setDcFd(dmBchxjbp.getDcFd());
|
|
|
|
|
|
|
|
|
|
|
|
if (tzbh.substring(4, 5).equals("X")) {
|
|
|
|
if (tzbh.substring(4, 5).equals("X")) {
|
|
|
|
@ -2538,6 +2539,7 @@ public class BomUploadServiceImpl {
|
|
|
|
String s = (String) kwxxMap.get(tzbh.substring(4, 7));
|
|
|
|
String s = (String) kwxxMap.get(tzbh.substring(4, 7));
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
String zzcj = (String) qgKwMap.get(s); //xhj
|
|
|
|
dmYdjhadd.setKw(zzcj);
|
|
|
|
dmYdjhadd.setKw(zzcj);
|
|
|
|
|
|
|
|
dmYdjhadd.updateZyq();
|
|
|
|
// dmYdjhadd.setDcFd(StringUtils.isBlank(bchxmxp.getWph()) ? "" : bchxmxp.getWph().substring(0, 4));
|
|
|
|
// dmYdjhadd.setDcFd(StringUtils.isBlank(bchxmxp.getWph()) ? "" : bchxmxp.getWph().substring(0, 4));
|
|
|
|
dmYdjhadd.setZt("2");
|
|
|
|
dmYdjhadd.setZt("2");
|
|
|
|
|
|
|
|
|
|
|
|
@ -2581,8 +2583,6 @@ public class BomUploadServiceImpl {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// rMap.put("adds",adds);
|
|
|
|
// rMap.put("adds",adds);
|
|
|
|
|