|
|
@ -4,25 +4,31 @@ package com.dsic.gj_erp.service.jhgk.impl;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
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.Wrappers;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.EmGcrl;
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.EmSbcnp;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.DmQfxq;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.DmQfxq;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.DmSygdMx;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.DmSygdMx;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.DmYdjh;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.DmYdjh;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.bean.jiuzhou.Sljh;
|
|
|
|
import com.dsic.gj_erp.bean.pgd.*;
|
|
|
|
import com.dsic.gj_erp.bean.pgd.*;
|
|
|
|
import com.dsic.gj_erp.mapper.jhgk.DmYdjhMapper;
|
|
|
|
import com.dsic.gj_erp.mapper.jhgk.DmYdjhMapper;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmBomService;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.service.jcsj.EmGcrlService;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.service.jhgk.DmQfxqService;
|
|
|
|
import com.dsic.gj_erp.service.jhgk.DmQfxqService;
|
|
|
|
import com.dsic.gj_erp.service.jhgk.DmSygdMxService;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.service.jhgk.DmYdjhService;
|
|
|
|
import com.dsic.gj_erp.service.jhgk.DmYdjhService;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.service.jiuzhou.SljhService;
|
|
|
|
import com.dsic.gj_erp.service.pgd.*;
|
|
|
|
import com.dsic.gj_erp.service.pgd.*;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import java.util.*;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
@ -49,6 +55,8 @@ public class DmYdjhServiceImpl extends ServiceImpl<DmYdjhMapper, DmYdjh> impleme
|
|
|
|
private PgdPwjhService pwService;
|
|
|
|
private PgdPwjhService pwService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private PgdQgjhService qgService;
|
|
|
|
private PgdQgjhService qgService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private SljhService sljhService;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DmSygdMx> tjydjh() {
|
|
|
|
public List<DmSygdMx> tjydjh() {
|
|
|
@ -130,12 +138,16 @@ public class DmYdjhServiceImpl extends ServiceImpl<DmYdjhMapper, DmYdjh> impleme
|
|
|
|
return map;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private ApplicationEventPublisher publisher;
|
|
|
|
|
|
|
|
|
|
|
|
//下发 派工单状态改为编制 生成零件信息
|
|
|
|
//下发 派工单状态改为编制 生成零件信息
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void xf(List<DmYdjh> ydjhList) {
|
|
|
|
public void xf(List<DmYdjh> ydjhList) {
|
|
|
|
|
|
|
|
|
|
|
|
//修改状态
|
|
|
|
//修改状态
|
|
|
|
List<String> idList = ydjhList.stream().map(DmYdjh::getId).collect(Collectors.toList());
|
|
|
|
List<String> idList = ydjhList.stream().map(DmYdjh::getId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
if (idList.size() > 100) {
|
|
|
|
if (idList.size() > 100) {
|
|
|
|
List<String> list = idList.subList(idList.size() / 100 * 100, idList.size());
|
|
|
|
List<String> list = idList.subList(idList.size() / 100 * 100, idList.size());
|
|
|
|
AtomicInteger index = new AtomicInteger(idList.size() / 100 + 1);
|
|
|
|
AtomicInteger index = new AtomicInteger(idList.size() / 100 + 1);
|
|
|
@ -153,6 +165,7 @@ public class DmYdjhServiceImpl extends ServiceImpl<DmYdjhMapper, DmYdjh> impleme
|
|
|
|
baseMapper.xfbc(list1);
|
|
|
|
baseMapper.xfbc(list1);
|
|
|
|
baseMapper.tqlj(list1);
|
|
|
|
baseMapper.tqlj(list1);
|
|
|
|
}while (index.get()>1);
|
|
|
|
}while (index.get()>1);
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
this.update(new UpdateWrapper<DmYdjh>().set("zt", "2")
|
|
|
|
this.update(new UpdateWrapper<DmYdjh>().set("zt", "2")
|
|
|
|
.in("id", idList)
|
|
|
|
.in("id", idList)
|
|
|
@ -163,6 +176,7 @@ public class DmYdjhServiceImpl extends ServiceImpl<DmYdjhMapper, DmYdjh> impleme
|
|
|
|
baseMapper.tqlj(idList);
|
|
|
|
baseMapper.tqlj(idList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
publisher.publishEvent(ydjhList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|