|
|
@ -6,21 +6,19 @@ import cn.hutool.core.util.ObjUtil;
|
|
|
|
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.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.DmCbxxp;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.DmCbxxp;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.*;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.*;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.excel.JhxfExcel;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.excel.JhxfExcel;
|
|
|
|
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
|
|
|
|
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
|
|
|
|
import com.dsic.gj_erp.mapper.jhgk.DmSygdMxMapper;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.mapper.jhgk.DmSygdxqMapper;
|
|
|
|
import com.dsic.gj_erp.mapper.jhgk.DmSygdxqMapper;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmBomService;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmBomService;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmCbxxpService;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmCbxxpService;
|
|
|
|
import com.dsic.gj_erp.service.jhgk.DmSygdMxLjService;
|
|
|
|
import com.dsic.gj_erp.service.jhgk.DmSygdMxService;
|
|
|
|
import com.dsic.gj_erp.service.pgd.PgdTzjhService;
|
|
|
|
import com.dsic.gj_erp.service.pgd.PgdTzjhService;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.support.TransactionTemplate;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
@ -28,14 +26,22 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
@AllArgsConstructor
|
|
|
|
@AllArgsConstructor
|
|
|
|
public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
public class YdjhImportService {
|
|
|
|
|
|
|
|
|
|
|
|
private final DmSygdxqMapper sygdxqMapper;
|
|
|
|
private final DmSygdxqMapper sygdxqMapper;
|
|
|
|
private final IYdjhImportService importService;
|
|
|
|
private final IYdjhImportService importService;
|
|
|
|
private final DmBomService bomService;
|
|
|
|
private final DmBomService bomService;
|
|
|
|
private final DmSygdMxLjService ljService;
|
|
|
|
|
|
|
|
private final DmCbxxpService dmCbxxpService;
|
|
|
|
private final DmCbxxpService dmCbxxpService;
|
|
|
|
private final PgdTzjhService tzjhService;
|
|
|
|
private final PgdTzjhService tzjhService;
|
|
|
|
|
|
|
|
private final TransactionTemplate transactionTemplate;
|
|
|
|
|
|
|
|
private final DmSygdMxService sygdMxService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<YdjhImport> listByFileName(String fileName) {
|
|
|
|
|
|
|
|
return importService.list(Wrappers.<YdjhImport>lambdaQuery()
|
|
|
|
|
|
|
|
.eq(StrUtil.isNotEmpty(fileName),YdjhImport::getFileName, fileName)
|
|
|
|
|
|
|
|
.orderByAsc(YdjhImport::getId)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<YdjhImport> list(String begin, String end) {
|
|
|
|
public List<YdjhImport> list(String begin, String end) {
|
|
|
|
return importService.list(Wrappers.<YdjhImport>lambdaQuery()
|
|
|
|
return importService.list(Wrappers.<YdjhImport>lambdaQuery()
|
|
|
@ -44,122 +50,97 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public void handler(List<JhxfExcel> objList,String fileName, HttpServletRequest request) {
|
|
|
|
public void handler(List<JhxfExcel> objList, HttpServletRequest request) {
|
|
|
|
|
|
|
|
List<YdjhImport> ydjhImports = this.executeYdjhImport(objList);
|
|
|
|
List<YdjhImport> ydjhImports = this.executeYdjhImport(objList);
|
|
|
|
|
|
|
|
|
|
|
|
ydjhImports.forEach(item->{
|
|
|
|
|
|
|
|
String dcPl=item.getDcPl();
|
|
|
|
|
|
|
|
if (item.getDcPl().contains("Q")) {
|
|
|
|
|
|
|
|
dcPl=item.getDcPl().replace("Q", "");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
dcPl = String.format("%03d", Integer.parseInt(dcPl));
|
|
|
|
|
|
|
|
} catch (Exception ignored) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
baseMapper.delete(new QueryWrapper<DmSygdMx>()
|
|
|
|
|
|
|
|
.eq("dc_ch", item.getDcCh())
|
|
|
|
|
|
|
|
.eq("dc_pl", dcPl)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
// ljService.remove(new QueryWrapper<DmSygdMxLj>()
|
|
|
|
|
|
|
|
// .eq("dcch", item.getDcCh())
|
|
|
|
|
|
|
|
// .eq("pl", dcPl)
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
List<YdjhImport> qwb = ydjhImports.stream()
|
|
|
|
|
|
|
|
.filter(YdjhImport::isAvailable)
|
|
|
|
|
|
|
|
.filter(item -> !item.getDcPl().contains("-"))//去除T型材
|
|
|
|
|
|
|
|
.filter(item -> !item.getDcPl().contains("/"))//去除T型材
|
|
|
|
|
|
|
|
.filter(item -> StrUtil.isNotEmpty(item.getDcFd()))
|
|
|
|
|
|
|
|
.filter(item -> item.getDcPl().contains("Q")).collect(Collectors.toList());
|
|
|
|
|
|
|
|
this.execute(qwb);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<YdjhImport> list = ydjhImports.stream()
|
|
|
|
List<YdjhImport> list = ydjhImports.stream()
|
|
|
|
.filter(YdjhImport::isAvailable)
|
|
|
|
// .filter(YdjhImport::isAvailable)
|
|
|
|
.filter(item -> !item.getDcPl().contains("-"))//去除T型材
|
|
|
|
// .filter(item -> !item.getDcPl().contains("-"))//去除T型材
|
|
|
|
.filter(item -> !item.getDcPl().contains("/"))//去除T型材
|
|
|
|
// .filter(item -> !item.getDcPl().contains("/"))//去除T型材
|
|
|
|
.filter(item -> StrUtil.isNotEmpty(item.getDcFd()))
|
|
|
|
// .filter(item -> !item.getDcPl().contains("Q"))
|
|
|
|
.filter(item -> !item.getDcPl().contains("Q")).collect(Collectors.toList());
|
|
|
|
.filter(item -> StrUtil.isAllNotEmpty(item.getDcCh(),item.getDcPl()))
|
|
|
|
this.execute(list);
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<DmSygdMx> sygdMxList = this.execute(list);
|
|
|
|
ydjhImports.forEach(importService::saveOrUpdate);
|
|
|
|
|
|
|
|
|
|
|
|
transactionTemplate.execute((status)->{
|
|
|
|
//没有基础数据的计划生成图纸计划
|
|
|
|
ydjhImports.stream().filter(item -> StrUtil.isAllNotEmpty(item.getDcCh(),item.getDcPl()))
|
|
|
|
String yhms= (String) request.getAttribute("yhms");
|
|
|
|
|
|
|
|
String date= DateUtil.date().toString("yyyy/MM/dd");
|
|
|
|
|
|
|
|
List<PgdTzjh> tzjhList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HashMap<String, YdjhImport> map = new HashMap<>();
|
|
|
|
|
|
|
|
ydjhImports.stream()
|
|
|
|
|
|
|
|
.filter(item -> !StrUtil.equals(item.getExtData(), "1")||item.getExtData()!=null)
|
|
|
|
|
|
|
|
.forEach(item->{
|
|
|
|
.forEach(item->{
|
|
|
|
YdjhImport ydjhImport = map.get(item.getDcCh() + item.getDcPl());
|
|
|
|
item.setFileName(fileName);
|
|
|
|
if (ydjhImport==null){
|
|
|
|
String dcPl=item.getDcPl();
|
|
|
|
map.put(item.getDcCh() + item.getDcPl(),item);
|
|
|
|
if (item.getDcPl().contains("Q")) {
|
|
|
|
String dcPl=item.getDcPl();
|
|
|
|
dcPl=item.getDcPl().replace("Q", "");
|
|
|
|
if (item.getDcPl().contains("Q")) {
|
|
|
|
}
|
|
|
|
dcPl=item.getDcPl().replace("Q", "");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
dcPl = String.format("%03d", Integer.parseInt(dcPl));
|
|
|
|
dcPl = String.format("%03d", Integer.parseInt(dcPl));
|
|
|
|
} catch (Exception ignored) {
|
|
|
|
} catch (Exception ignored) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tzjhService.remove(Wrappers.<PgdTzjh>lambdaQuery()
|
|
|
|
importService.remove(new QueryWrapper<YdjhImport>()
|
|
|
|
.eq(PgdTzjh::getCzbh,item.getDcCh())
|
|
|
|
.eq("dc_ch", item.getDcCh())
|
|
|
|
.eq(PgdTzjh::getPl,dcPl)
|
|
|
|
.eq("dc_pl", item.getDcPl())
|
|
|
|
.and(it->it.isNull(PgdTzjh::getFkrq).or().eq(PgdTzjh::getFkrq,""))
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PgdTzjh dmTzjh = PgdTzjh.of(item,dcPl);
|
|
|
|
sygdMxService.remove(new QueryWrapper<DmSygdMx>()
|
|
|
|
dmTzjh.setBzry(yhms);
|
|
|
|
.eq("dc_ch", item.getDcCh())
|
|
|
|
dmTzjh.setBzrq(date);
|
|
|
|
.eq("dc_pl", dcPl)
|
|
|
|
dmTzjh.setXfry(yhms);
|
|
|
|
);
|
|
|
|
dmTzjh.setXfrq(date);
|
|
|
|
|
|
|
|
dmTzjh.setQfxqrqxz(item.getQfxqrqxz());
|
|
|
|
|
|
|
|
dmTzjh.setQfxqrqdz(item.getQfxqrqdz());
|
|
|
|
|
|
|
|
dmTzjh.setQgxqrq(item.getQgrq());
|
|
|
|
|
|
|
|
tzjhList.add(dmTzjh);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
tzjhService.saveBatch(tzjhList);
|
|
|
|
sygdMxService.saveBatch(sygdMxList);
|
|
|
|
|
|
|
|
ydjhImports.forEach(importService::save);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//没有基础数据的计划生成图纸计划
|
|
|
|
|
|
|
|
String yhms= (String) request.getAttribute("yhms");
|
|
|
|
|
|
|
|
String date= DateUtil.date().toString("yyyy/MM/dd");
|
|
|
|
|
|
|
|
List<PgdTzjh> tzjhList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HashMap<String, YdjhImport> map = new HashMap<>();
|
|
|
|
|
|
|
|
ydjhImports.stream()
|
|
|
|
|
|
|
|
.filter(item -> !StrUtil.equals(item.getExtData(), "1")||item.getExtData()!=null)
|
|
|
|
|
|
|
|
.filter(item -> StrUtil.isAllNotEmpty(item.getDcCh(),item.getDcPl()))
|
|
|
|
|
|
|
|
.forEach(item->{
|
|
|
|
|
|
|
|
YdjhImport ydjhImport = map.get(item.getDcCh() + item.getDcPl());
|
|
|
|
|
|
|
|
if (ydjhImport==null){
|
|
|
|
|
|
|
|
map.put(item.getDcCh() + item.getDcPl(),item);
|
|
|
|
|
|
|
|
String dcPl=item.getDcPl();
|
|
|
|
|
|
|
|
if (item.getDcPl().contains("Q")) {
|
|
|
|
|
|
|
|
dcPl=item.getDcPl().replace("Q", "");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
dcPl = String.format("%03d", Integer.parseInt(dcPl));
|
|
|
|
|
|
|
|
} catch (Exception ignored) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tzjhService.remove(Wrappers.<PgdTzjh>lambdaQuery()
|
|
|
|
|
|
|
|
.eq(PgdTzjh::getCzbh,item.getDcCh())
|
|
|
|
|
|
|
|
.eq(PgdTzjh::getPl,dcPl)
|
|
|
|
|
|
|
|
.and(it->it.isNull(PgdTzjh::getFkrq).or().eq(PgdTzjh::getFkrq,""))
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PgdTzjh dmTzjh = PgdTzjh.of(item,dcPl);
|
|
|
|
|
|
|
|
dmTzjh.setBzry(yhms);
|
|
|
|
|
|
|
|
dmTzjh.setBzrq(date);
|
|
|
|
|
|
|
|
dmTzjh.setXfry(yhms);
|
|
|
|
|
|
|
|
dmTzjh.setXfrq(date);
|
|
|
|
|
|
|
|
dmTzjh.setQfxqrqxz(item.getQfxqrqxz());
|
|
|
|
|
|
|
|
dmTzjh.setQfxqrqdz(item.getQfxqrqdz());
|
|
|
|
|
|
|
|
dmTzjh.setQgxqrq(item.getQgrq());
|
|
|
|
|
|
|
|
tzjhList.add(dmTzjh);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
tzjhService.saveBatch(tzjhList);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
|
|
|
public List<YdjhImport> executeYdjhImport(List<JhxfExcel> objList) {
|
|
|
|
public List<YdjhImport> executeYdjhImport(List<JhxfExcel> objList) {
|
|
|
|
Map<String, YdjhImport> map = new HashMap<>();
|
|
|
|
|
|
|
|
List<YdjhImport> list = new ArrayList<>();
|
|
|
|
List<YdjhImport> list = new ArrayList<>();
|
|
|
|
for (int i = 0; i < objList.size(); i++) {
|
|
|
|
for (JhxfExcel item : objList) {
|
|
|
|
JhxfExcel item = objList.get(i);
|
|
|
|
|
|
|
|
YdjhImport jh = new YdjhImport();
|
|
|
|
YdjhImport jh = new YdjhImport();
|
|
|
|
BeanUtil.copyProperties(item, jh);
|
|
|
|
BeanUtil.copyProperties(item, jh);
|
|
|
|
jh.setImportIndex(i);
|
|
|
|
|
|
|
|
YdjhImport _jh = map.get(jh.getDcCh() + jh.getDcPl());
|
|
|
|
|
|
|
|
if (_jh != null) {
|
|
|
|
|
|
|
|
if (_jh.getFdxq() != null && jh.getFdxq() == null) {
|
|
|
|
|
|
|
|
jh.setFdxq(_jh.getFdxq());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_jh.getFdxq() == null && jh.getFdxq() != null) {
|
|
|
|
|
|
|
|
_jh.setFdxq(jh.getFdxq());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_jh.getQwbjs() != null && jh.getQwbjs() == null) {
|
|
|
|
|
|
|
|
jh.setQwbjs(_jh.getQwbjs());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_jh.getQwbjs() == null && jh.getQwbjs() != null) {
|
|
|
|
|
|
|
|
_jh.setQwbjs(jh.getQwbjs());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
map.put(jh.getDcCh() + jh.getDcPl(), jh);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
importService.remove(new QueryWrapper<YdjhImport>()
|
|
|
|
|
|
|
|
.eq("dc_ch", jh.getDcCh())
|
|
|
|
|
|
|
|
.eq("dc_pl", jh.getDcPl())
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
jh.setZt("0");
|
|
|
|
jh.setZt("0");
|
|
|
|
list.add(jh);
|
|
|
|
list.add(jh);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -169,191 +150,246 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 月度计划导入,不使用月度计划只能排产功能前提下使用该功能导入月度计划
|
|
|
|
* 月度计划导入,不使用月度计划只能排产功能前提下使用该功能导入月度计划
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public List<DmSygdMx> execute(List<YdjhImport> objList) {
|
|
|
|
public void execute(List<YdjhImport> objList) {
|
|
|
|
|
|
|
|
HashMap<String, Object> _map = new HashMap<>();
|
|
|
|
HashMap<String, Object> _map = new HashMap<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
objList.forEach(item->{
|
|
|
|
objList.forEach(item->{
|
|
|
|
String dcPl=item.getDcPl();
|
|
|
|
String _dcPl=item.getDcPl();
|
|
|
|
if (item.getDcPl().contains("Q")) {
|
|
|
|
List<String> plList=new ArrayList<>();
|
|
|
|
dcPl=item.getDcPl().replace("Q", "");
|
|
|
|
if (_dcPl.contains("Q")) {
|
|
|
|
|
|
|
|
plList.add(item.getDcPl().replace("Q", ""));
|
|
|
|
item.setQwbBs(true);
|
|
|
|
item.setQwbBs(true);
|
|
|
|
|
|
|
|
}else if(_dcPl.contains("-")||_dcPl.contains("/")){
|
|
|
|
|
|
|
|
String[] split = _dcPl.split("/");
|
|
|
|
|
|
|
|
for (String s : split) {
|
|
|
|
|
|
|
|
String[] split1 = s.split("-");
|
|
|
|
|
|
|
|
if (split1.length == 1) {
|
|
|
|
|
|
|
|
plList.add(split1[0]);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
for (int j = Integer.parseInt(split1[0]); j <= Integer.parseInt(split1[1].replace("D","")); j++) {
|
|
|
|
|
|
|
|
plList.add(j + "");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
for (String dcPl : plList) {
|
|
|
|
dcPl = String.format("%03d", Integer.parseInt(dcPl));
|
|
|
|
try {
|
|
|
|
} catch (Exception ignored) {
|
|
|
|
dcPl = String.format("%03d", Integer.parseInt(dcPl));
|
|
|
|
}
|
|
|
|
} catch (Exception ignored) {
|
|
|
|
String[] dcfd=item.getDcFd().split("\\.");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String dcFd=dcfd[0];
|
|
|
|
Object o = _map.get(item.getDcCh() + item.getDcPl());
|
|
|
|
|
|
|
|
if(o==null){
|
|
|
|
Object o = _map.get(item.getDcCh() + item.getDcPl());
|
|
|
|
_map.put(item.getDcCh() + item.getDcPl(),item);
|
|
|
|
if(o==null){
|
|
|
|
}else{
|
|
|
|
_map.put(item.getDcCh() + item.getDcPl(),item);
|
|
|
|
item.setExtData(item.getExtData());
|
|
|
|
}else{
|
|
|
|
item.setQfxqrqxz(item.getQfxqrqxz());
|
|
|
|
item.setExtData(item.getExtData());
|
|
|
|
item.setQfxqrqdz(item.getQfxqrqdz());
|
|
|
|
item.setQfxqrqxz(item.getQfxqrqxz());
|
|
|
|
return;
|
|
|
|
item.setQfxqrqdz(item.getQfxqrqdz());
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DmBom> bomList = bomService.getBomWithYlbs(item.getDcCh(), dcPl);
|
|
|
|
List<DmBom> bomList = bomService.getBomWithYlbs(item.getDcCh(), dcPl);
|
|
|
|
|
|
|
|
|
|
|
|
String dcCh;
|
|
|
|
String dcCh;
|
|
|
|
//基础数据未导入,使用目标船只
|
|
|
|
//基础数据未导入,使用目标船只
|
|
|
|
if (ObjUtil.isEmpty(bomList)) {
|
|
|
|
if (ObjUtil.isEmpty(bomList)) {
|
|
|
|
DmCbxxp one = dmCbxxpService.getOne(Wrappers.<DmCbxxp>lambdaQuery()
|
|
|
|
DmCbxxp one = dmCbxxpService.getOne(Wrappers.<DmCbxxp>lambdaQuery()
|
|
|
|
.eq(DmCbxxp::getCbbm, item.getDcCh())
|
|
|
|
.eq(DmCbxxp::getCbbm, item.getDcCh())
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if (one != null) {
|
|
|
|
if (one != null) {
|
|
|
|
dcCh = one.getCbbm();
|
|
|
|
dcCh = one.getCbbm();
|
|
|
|
item.setExtData(dcCh);//使用目标船只基础数据
|
|
|
|
item.setExtData(dcCh);//使用目标船只基础数据
|
|
|
|
bomList = bomService.getBomWithYlbs(dcCh, dcPl);
|
|
|
|
bomList = bomService.getBomWithYlbs(dcCh, dcPl);
|
|
|
|
if (ObjUtil.isEmpty(bomList)) {
|
|
|
|
if (ObjUtil.isEmpty(bomList)) {
|
|
|
|
DmSygdMx dmSygdMx = this.initDefault(item,dcFd,dcPl);
|
|
|
|
DmSygdMx dmSygdMx = this.initDefault(item,dcPl);
|
|
|
|
dmSygdMx.setDcCh1(dcCh);
|
|
|
|
dmSygdMx.setDcCh1(dcCh);
|
|
|
|
this.save(dmSygdMx);
|
|
|
|
|
|
|
|
|
|
|
|
item.setExtData("0");//无基础数据
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
item.setExtData("0");//无基础数据
|
|
|
|
item.setExtData("0");//无基础数据
|
|
|
|
|
|
|
|
DmSygdMx dmSygdMx = this.initDefault(item,dcPl);
|
|
|
|
|
|
|
|
addList.add(dmSygdMx);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
item.setExtData("0");//无基础数据
|
|
|
|
item.setExtData("1");//有基础数据
|
|
|
|
DmSygdMx dmSygdMx = this.initDefault(item,dcFd,dcPl);
|
|
|
|
|
|
|
|
this.save(dmSygdMx);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
item.setExtData("1");//有基础数据
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DmSygdxq> dmSygdxqs = sygdxqMapper.selectList(Wrappers.<DmSygdxq>lambdaQuery()
|
|
|
|
List<DmSygdxq> dmSygdxqs = sygdxqMapper.selectList(Wrappers.<DmSygdxq>lambdaQuery()
|
|
|
|
.eq(DmSygdxq::getDcCh, item.getDcCh()).eq(DmSygdxq::getDcPl, dcPl));
|
|
|
|
.eq(DmSygdxq::getDcCh, item.getDcCh()).eq(DmSygdxq::getDcPl, dcPl));
|
|
|
|
|
|
|
|
|
|
|
|
if (ObjUtil.isNotEmpty(dmSygdxqs)){
|
|
|
|
if (ObjUtil.isNotEmpty(dmSygdxqs)){
|
|
|
|
DmSygdxq dmSygdxq = dmSygdxqs.get(0);
|
|
|
|
DmSygdxq dmSygdxq = dmSygdxqs.get(0);
|
|
|
|
item.setQfxqrqxz(dmSygdxq.getXzglxq());
|
|
|
|
item.setQfxqrqxz(dmSygdxq.getXzglxq());
|
|
|
|
item.setQfxqrqdz(dmSygdxq.getDzglxq());
|
|
|
|
item.setQfxqrqdz(dmSygdxq.getDzglxq());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HashMap<Object, DmSygdxq> map = new HashMap<>();
|
|
|
|
HashMap<Object, DmSygdxq> map = new HashMap<>();
|
|
|
|
for (DmSygdxq xq : dmSygdxqs) {
|
|
|
|
for (DmSygdxq xq : dmSygdxqs) {
|
|
|
|
String pl = xq.getDcPl();
|
|
|
|
String pl = xq.getDcPl();
|
|
|
|
String fd = xq.getDcFd();
|
|
|
|
String fd = xq.getDcFd();
|
|
|
|
map.put(item.getDcCh() + pl + fd, xq);
|
|
|
|
map.put(item.getDcCh() + pl + fd, xq);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<DmSygdMxLj> ljList = this.initLj(item.getDcCh(), map, bomList);
|
|
|
|
List<DmSygdMxLj> ljList = this.initLj(item.getDcCh(), map, bomList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DmSygdMx> sygdMxes=new ArrayList<>();
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(item.getSl())){
|
|
|
|
|
|
|
|
if (item.getQwbBs()) {
|
|
|
|
|
|
|
|
ljList=ljList.stream().filter(it -> "3".equals(it.getTzbh().substring(5, 6)))
|
|
|
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ljList=ljList.stream().filter(it -> !"3".equals(it.getTzbh().substring(5, 6)))
|
|
|
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sygdMxes = this.initBySl(item, ljList);
|
|
|
|
|
|
|
|
item.setBs1(sygdMxes.size()+"");
|
|
|
|
|
|
|
|
addList.addAll(sygdMxes);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<DmSygdMx> sygdMxes;
|
|
|
|
if (item.getPkqgjs() != null) {
|
|
|
|
if (item.getQwbBs()) {
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "7".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
ljList=ljList.stream().filter(it -> "3".equals(it.getTzbh().substring(5, 6)))
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
sygdMxes = this.initBySl(item, ljList,dcFd);
|
|
|
|
this.updateByYklm(item, sygdMx);
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
ljList=ljList.stream().filter(it -> !"3".equals(it.getTzbh().substring(5, 6)))
|
|
|
|
item.setYklm(_sygdMxes.size()+"");
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
} else {
|
|
|
|
sygdMxes = this.initBySl(item, ljList,dcFd);
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "7".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
}
|
|
|
|
if (!_ljlist.isEmpty()){
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initByYklm(item, _ljlist);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
item.setYklm(list.size()+"");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
addList.addAll(sygdMxes);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (item.getPkqgjs() != null) {
|
|
|
|
List<DmSygdMx> _sygdMxes1 = sygdMxes.stream().filter(it -> "8".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "7".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
if (!_sygdMxes1.isEmpty()) {
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
for (DmSygdMx dmSygdMx : _sygdMxes1) {
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
this.updateByYksk(item, dmSygdMx);
|
|
|
|
this.updateByYklm(item, sygdMx);
|
|
|
|
}
|
|
|
|
|
|
|
|
item.setYksk(_sygdMxes1.size()+"");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "8".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
if (!_ljlist.isEmpty()) {
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initByYksk(item, _ljlist);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
item.setYksk(list.size()+"");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "7".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initByYklm(item, _ljlist,dcFd,dcPl);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// List<DmSygdMx> _sygdMxes1 = sygdMxes.stream().filter(it -> "8".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
if (item.getLmqgks() != null) {
|
|
|
|
// if (!_sygdMxes1.isEmpty()) {
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "5".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
// for (DmSygdMx dmSygdMx : _sygdMxes1) {
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
// this.updateByYksk(item, dmSygdMx);
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
// }
|
|
|
|
this.updateByEklm(item, sygdMx);
|
|
|
|
// } else {
|
|
|
|
}
|
|
|
|
// List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "8".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
item.setEklmbs(_sygdMxes.size()+"");
|
|
|
|
// if (!_ljlist.isEmpty()) {
|
|
|
|
} else {
|
|
|
|
// List<DmSygdMx> list = this.initByYksk(item, _ljlist,dcFd,dcPl);
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "5".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
// addList.addAll(list);
|
|
|
|
if (!_ljlist.isEmpty()){
|
|
|
|
// }
|
|
|
|
List<DmSygdMx> list = this.initByEklmbs(item, _ljlist);
|
|
|
|
// }
|
|
|
|
addList.addAll(list);
|
|
|
|
}
|
|
|
|
item.setEklmbs(list.size()+"");
|
|
|
|
//
|
|
|
|
}
|
|
|
|
if (item.getLmqgks() != null) {
|
|
|
|
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "5".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
|
|
|
|
this.updateByEklm(item, sygdMx);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "5".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initByEklmbs(item, _ljlist,dcFd,dcPl);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (item.getEkskks() != null) {
|
|
|
|
if (item.getEkskks() != null) {
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "9".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "9".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
this.updateByEksk(item, sygdMx);
|
|
|
|
this.updateByEksk(item, sygdMx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
item.setEksk(_sygdMxes.size()+"");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "9".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
if (!_ljlist.isEmpty()) {
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initByEksk(item, _ljlist);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
item.setEksk(list.size()+"");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "9".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initByEksk(item, _ljlist,dcFd,dcPl);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (item.getSkskqgks() != null) {
|
|
|
|
if (item.getSkskqgks() != null) {
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "14".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "14".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
this.updateBySksk(item, sygdMx);
|
|
|
|
this.updateBySksk(item, sygdMx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
item.setSksk(_sygdMxes.size()+"");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "14".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
if (!_ljlist.isEmpty()) {
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initBySksk(item, _ljlist);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
item.setSksk(list.size()+"");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "14".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initBySksk(item, _ljlist,dcFd,dcPl);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (item.getPtks() != null) {
|
|
|
|
if (item.getPtks() != null) {
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "6".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "6".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
this.updateBySkpt(item, sygdMx);
|
|
|
|
this.updateBySkpt(item, sygdMx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
item.setSkpt(_sygdMxes.size()+"");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "6".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
if(!_ljlist.isEmpty()){
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initBySkpt(item, _ljlist);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
item.setSkpt(list.size()+"");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "6".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initBySkpt(item, _ljlist,dcFd,dcPl);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (item.getSkqgks() != null) {
|
|
|
|
if (item.getSkqgks() != null) {
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "15".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
List<DmSygdMx> _sygdMxes = sygdMxes.stream().filter(it -> "15".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
if (!_sygdMxes.isEmpty()) {
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
for (DmSygdMx sygdMx : _sygdMxes) {
|
|
|
|
this.updateBySkbs(item, sygdMx);
|
|
|
|
this.updateBySkbs(item, sygdMx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ("T型材".equals(item.getDcFd())&&"Z".equals(item.getZl())){
|
|
|
|
|
|
|
|
long count = _sygdMxes.stream().filter(it -> it.getZl().equals("1110")).count();
|
|
|
|
|
|
|
|
item.setSkbs(count+"");
|
|
|
|
|
|
|
|
}else if("机器人肘板".equals(item.getDcFd())&&"X".equals(item.getZl())){
|
|
|
|
|
|
|
|
long count = _sygdMxes.stream().filter(it -> it.getZl().equals("1010")).count();
|
|
|
|
|
|
|
|
item.setSkbs(count+"");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
item.setSkbs(_sygdMxes.size()+"");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "15".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
if (_ljlist.isEmpty()){
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initBySkbs(item, _ljlist);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
if ("T型材".equals(item.getDcFd())&&"Z".equals(item.getZl())){
|
|
|
|
|
|
|
|
long count = _ljlist.stream().filter(it -> it.getZl().equals("1110")).count();
|
|
|
|
|
|
|
|
item.setSkbs(count+"");
|
|
|
|
|
|
|
|
}else if("机器人肘板".equals(item.getDcFd())&&"X".equals(item.getZl())){
|
|
|
|
|
|
|
|
long count = _ljlist.stream().filter(it -> it.getZl().equals("1010")).count();
|
|
|
|
|
|
|
|
item.setSkbs(count+"");
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
item.setSkbs(_ljlist.size()+"");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<DmSygdMxLj> _ljlist = ljList.stream().filter(it -> "15".equals(it.getKw())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<DmSygdMx> list = this.initBySkbs(item, _ljlist,dcFd,dcPl);
|
|
|
|
|
|
|
|
addList.addAll(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ljService.saveBatch(ljList);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.saveBatch(addList);
|
|
|
|
// this.saveBatch(addList);
|
|
|
|
|
|
|
|
return addList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<DmSygdMx> initBySl(YdjhImport item, List<DmSygdMxLj> bomList,String dcFd) {
|
|
|
|
private List<DmSygdMx> initBySl(YdjhImport item, List<DmSygdMxLj> bomList) {
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
if (item.getSl() != null) {
|
|
|
|
if (item.getSl() != null) {
|
|
|
@ -373,7 +409,7 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
return addList;
|
|
|
|
return addList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<DmSygdMx> initByYklm(YdjhImport item, List<DmSygdMxLj> bomList,String dcFd,String dcPl) {
|
|
|
|
private List<DmSygdMx> initByYklm(YdjhImport item, List<DmSygdMxLj> bomList) {
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
@ -391,7 +427,7 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
return addList;
|
|
|
|
return addList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<DmSygdMx> initByYksk(YdjhImport item, List<DmSygdMxLj> bomList,String dcFd,String dcPl) {
|
|
|
|
private List<DmSygdMx> initByYksk(YdjhImport item, List<DmSygdMxLj> bomList) {
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
@ -409,7 +445,7 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
return addList;
|
|
|
|
return addList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<DmSygdMx> initByEklmbs(YdjhImport item, List<DmSygdMxLj> bomList,String dcFd,String dcPl) {
|
|
|
|
private List<DmSygdMx> initByEklmbs(YdjhImport item, List<DmSygdMxLj> bomList) {
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
@ -427,7 +463,7 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
return addList;
|
|
|
|
return addList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<DmSygdMx> initByEksk(YdjhImport item, List<DmSygdMxLj> bomList,String dcFd,String dcPl) {
|
|
|
|
private List<DmSygdMx> initByEksk(YdjhImport item, List<DmSygdMxLj> bomList) {
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
@ -445,7 +481,7 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
return addList;
|
|
|
|
return addList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<DmSygdMx> initBySksk(YdjhImport item, List<DmSygdMxLj> bomList,String dcFd,String dcPl) {
|
|
|
|
private List<DmSygdMx> initBySksk(YdjhImport item, List<DmSygdMxLj> bomList) {
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
@ -463,7 +499,7 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
return addList;
|
|
|
|
return addList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<DmSygdMx> initBySkpt(YdjhImport item, List<DmSygdMxLj> bomList,String dcFd,String dcPl) {
|
|
|
|
private List<DmSygdMx> initBySkpt(YdjhImport item, List<DmSygdMxLj> bomList) {
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
@ -481,7 +517,7 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
return addList;
|
|
|
|
return addList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<DmSygdMx> initBySkbs(YdjhImport item, List<DmSygdMxLj> bomList,String dcFd,String dcPl) {
|
|
|
|
private List<DmSygdMx> initBySkbs(YdjhImport item, List<DmSygdMxLj> bomList) {
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
List<DmSygdMx> addList = new ArrayList<>();
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
ArrayList<DmSygdMxLj> list = bomList.stream().collect(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
|
Collectors.collectingAndThen(
|
|
|
@ -542,14 +578,13 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
|
|
|
|
dmSygdMx.setQgrq(item.getSkqgks());
|
|
|
|
dmSygdMx.setQgrq(item.getSkqgks());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private DmSygdMx initDefault(YdjhImport item,String dcFd,String dcPl) {
|
|
|
|
private DmSygdMx initDefault(YdjhImport item,String dcPl) {
|
|
|
|
DmSygdMx dmSygdMx = new DmSygdMx();
|
|
|
|
DmSygdMx dmSygdMx = new DmSygdMx();
|
|
|
|
dmSygdMx.setDcCh(item.getDcCh());
|
|
|
|
dmSygdMx.setDcCh(item.getDcCh());
|
|
|
|
if(!"1".equals(item.getExtData())){
|
|
|
|
if(!"1".equals(item.getExtData())){
|
|
|
|
dmSygdMx.setDcCh1(item.getExtData());
|
|
|
|
dmSygdMx.setDcCh1(item.getExtData());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dmSygdMx.setDcPl(dcPl);
|
|
|
|
dmSygdMx.setDcPl(dcPl);
|
|
|
|
dmSygdMx.setDcFd(dcFd);
|
|
|
|
|
|
|
|
dmSygdMx.setJssj(item.getFdxq());
|
|
|
|
dmSygdMx.setJssj(item.getFdxq());
|
|
|
|
dmSygdMx.setSlrq(item.getSl());
|
|
|
|
dmSygdMx.setSlrq(item.getSl());
|
|
|
|
dmSygdMx.setXcpw(item.getXcpw());
|
|
|
|
dmSygdMx.setXcpw(item.getXcpw());
|
|
|
|