|
|
|
@ -2,7 +2,10 @@ package com.dsic.gj_erp.service.jcsj.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.ListUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.vo.BomVO;
|
|
|
|
@ -63,8 +66,8 @@ public class DmBomServiceImpl extends ServiceImpl<DmBomMapper, DmBom> implements
|
|
|
|
|
List<DmBom> list = this.list(new QueryWrapper<DmBom>().eq("dcch", map.get("dcch"))
|
|
|
|
|
.eq(StrUtil.isNotEmpty((String) map.get("fd")), "fd", map.get("dcfd"))
|
|
|
|
|
.eq(StrUtil.isNotEmpty((String) map.get("dcpl")), "pl", map.get("dcpl"))
|
|
|
|
|
.eq(StrUtil.isNotEmpty((String) map.get("zt")), "zt", map.get("zt"))
|
|
|
|
|
.orderBy(true,true,"pl","fd","type")
|
|
|
|
|
.eq(StrUtil.isNotEmpty((String) map.get("type")), "type", map.get("type"))
|
|
|
|
|
.orderBy(true,true,"pl","fd","type","tzbh","ljbh")
|
|
|
|
|
);
|
|
|
|
|
return list;
|
|
|
|
|
// }
|
|
|
|
@ -101,13 +104,18 @@ public class DmBomServiceImpl extends ServiceImpl<DmBomMapper, DmBom> implements
|
|
|
|
|
public void copyListBom(HttpServletRequest req, Map map) {
|
|
|
|
|
String dcch=(String) map.get("dcch");
|
|
|
|
|
String mbch=(String) map.get("mbch");
|
|
|
|
|
List<DmBom> list= this.list(new QueryWrapper<DmBom>().eq("dcch",dcch));
|
|
|
|
|
List<DmBom> list=(List<DmBom>)map.get("list");
|
|
|
|
|
String str= JSON.toJSONString(list);
|
|
|
|
|
list= JSONObject.parseArray(str, DmBom.class);
|
|
|
|
|
// List<DmBom> list= this.list(new QueryWrapper<DmBom>().eq("dcch",dcch));
|
|
|
|
|
list.forEach(e->{
|
|
|
|
|
e.setMbch(e.getDcch());
|
|
|
|
|
e.setDcch(mbch);
|
|
|
|
|
e.setSjch("");
|
|
|
|
|
e.setId(null);
|
|
|
|
|
e.setYidd(e.getIdd());
|
|
|
|
|
e.setIdd(IdWorker.get32UUID());
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
this.saveBatch(list,1000);
|
|
|
|
|
//this.saveBatch()
|
|
|
|
|