|
|
@ -51,12 +51,16 @@ import org.jeecg.modules.workorder.mapper.WorkOrderMapper; |
|
|
|
import org.jeecg.modules.workorder.service.IWorkOrderService; |
|
|
|
import org.jeecg.modules.workorder.service.IWorkOrderService; |
|
|
|
import org.jeecg.modules.workproduct.entity.ZyProduct; |
|
|
|
import org.jeecg.modules.workproduct.entity.ZyProduct; |
|
|
|
import org.jeecg.modules.workproduct.mapper.ZyProductMapper; |
|
|
|
import org.jeecg.modules.workproduct.mapper.ZyProductMapper; |
|
|
|
|
|
|
|
import org.jeecg.modules.zyProcessModular.entity.ZyProcessModular; |
|
|
|
|
|
|
|
import org.jeecg.modules.zyProcessModular.mapper.ZyProcessModularMapper; |
|
|
|
import org.jeecg.modules.zyclothsample.entity.ZyClothSample; |
|
|
|
import org.jeecg.modules.zyclothsample.entity.ZyClothSample; |
|
|
|
import org.jeecg.modules.zyclothsample.mapper.ZyClothSampleMapper; |
|
|
|
import org.jeecg.modules.zyclothsample.mapper.ZyClothSampleMapper; |
|
|
|
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle; |
|
|
|
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle; |
|
|
|
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper; |
|
|
|
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper; |
|
|
|
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel; |
|
|
|
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel; |
|
|
|
import org.jeecg.modules.zystylemodel.mapper.ZyStyleModelMapper; |
|
|
|
import org.jeecg.modules.zystylemodel.mapper.ZyStyleModelMapper; |
|
|
|
|
|
|
|
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule; |
|
|
|
|
|
|
|
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
@ -114,10 +118,21 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private ZyProcessMapper processMapper; |
|
|
|
private ZyProcessMapper processMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//款式模块
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private ZyStyleModuleMapper zyStyleModuleMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//款式模块工序
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private ZyProcessModularMapper zyProcessModularMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//产品工序
|
|
|
|
//产品工序
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private ZyProductProcessMapper productProcessMapper; |
|
|
|
private ZyProductProcessMapper productProcessMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//工序工具
|
|
|
|
//工序工具
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private ZyOperationtoolMapper zyOperationtoolMapper; |
|
|
|
private ZyOperationtoolMapper zyOperationtoolMapper; |
|
|
@ -276,13 +291,16 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder |
|
|
|
//产品模块、产品面料、产品辅料、产品工序、
|
|
|
|
//产品模块、产品面料、产品辅料、产品工序、
|
|
|
|
|
|
|
|
|
|
|
|
//#region 产品工序-添加(服装款式类型中读取)
|
|
|
|
//#region 产品工序-添加(服装款式类型中读取)
|
|
|
|
|
|
|
|
//工序有模块工序-和款式工序
|
|
|
|
//根据服务款式表id 得到服装工序,然后在得到基本工序
|
|
|
|
//根据服务款式表id 得到服装工序,然后在得到基本工序
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//款式工序
|
|
|
|
QueryWrapper<ZyStyleModular> styleModularLWrapper=new QueryWrapper<ZyStyleModular>(); |
|
|
|
QueryWrapper<ZyStyleModular> styleModularLWrapper=new QueryWrapper<ZyStyleModular>(); |
|
|
|
styleModularLWrapper.eq("style_id",ogModel.getStyleId()); |
|
|
|
styleModularLWrapper.eq("style_id",ogModel.getStyleId()); |
|
|
|
List<ZyStyleModular> zyStyleModularList=styleModularMapper.selectList(styleModularLWrapper); |
|
|
|
List<ZyStyleModular> zyStyleModularList=styleModularMapper.selectList(styleModularLWrapper); |
|
|
|
|
|
|
|
|
|
|
|
//将工序保存到产品工序中
|
|
|
|
List<ZyProductProcess> pplist=new ArrayList<>(); |
|
|
|
//List<ZyProductProcess> productProcessList=new ArrayList<>();
|
|
|
|
//将款式工序保存到变量pplist中
|
|
|
|
for(ZyStyleModular item:zyStyleModularList) |
|
|
|
for(ZyStyleModular item:zyStyleModularList) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ZyProductProcess zpp=new ZyProductProcess(); |
|
|
|
ZyProductProcess zpp=new ZyProductProcess(); |
|
|
@ -290,14 +308,45 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder |
|
|
|
zpp.setProcessId(item.getProcessId());//工序id
|
|
|
|
zpp.setProcessId(item.getProcessId());//工序id
|
|
|
|
zpp.setNumber(item.getSerialnumber());//序号
|
|
|
|
zpp.setNumber(item.getSerialnumber());//序号
|
|
|
|
productProcessMapper.insert(zpp);//保存
|
|
|
|
productProcessMapper.insert(zpp);//保存
|
|
|
|
|
|
|
|
pplist.add(zpp); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//模块工序
|
|
|
|
|
|
|
|
QueryWrapper<ZyStyleModule> qwStyleModule = new QueryWrapper<>(); |
|
|
|
|
|
|
|
qwStyleModule.eq("style_id",ogModel.getStyleId()); |
|
|
|
|
|
|
|
List<ZyStyleModule> smList=zyStyleModuleMapper.selectList(qwStyleModule); |
|
|
|
|
|
|
|
//将模块工序保存到变量pplist中
|
|
|
|
|
|
|
|
for(ZyStyleModule item:smList) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//读取模块工序
|
|
|
|
|
|
|
|
QueryWrapper<ZyProcessModular> qwProcessModular = new QueryWrapper<>(); |
|
|
|
|
|
|
|
qwProcessModular.eq("modular_id",item.getModularId()); |
|
|
|
|
|
|
|
List<ZyProcessModular> pmList=zyProcessModularMapper.selectList(qwProcessModular); |
|
|
|
|
|
|
|
for(ZyProcessModular pm:pmList) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ZyProductProcess zpp=new ZyProductProcess(); |
|
|
|
|
|
|
|
zpp.setProductId(productModel.getId());//产品id
|
|
|
|
|
|
|
|
zpp.setProcessId(pm.getProcessId());//工序id
|
|
|
|
|
|
|
|
zpp.setNumber(pm.getSerialnumber());//序号
|
|
|
|
|
|
|
|
productProcessMapper.insert(zpp);//保存
|
|
|
|
|
|
|
|
pplist.add(zpp); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//将工序保存到产品工序中
|
|
|
|
|
|
|
|
//List<ZyProductProcess> productProcessList=new ArrayList<>();
|
|
|
|
|
|
|
|
for(ZyProductProcess item:pplist) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
//首先查询到对应的产品工序id,由于产品和工序对应应该唯一
|
|
|
|
//首先查询到对应的产品工序id,由于产品和工序对应应该唯一
|
|
|
|
String productprocessId=productProcessMapper.findProductProcessId(zpp.getProductId(),zpp.getProcessId()); |
|
|
|
String productprocessId=productProcessMapper.findProductProcessId(item.getProductId(),item.getProcessId()); |
|
|
|
//然后根据对应的工序id去基本工序关联的辅料和面料表中找到对应的数据
|
|
|
|
//然后根据对应的工序id去基本工序关联的辅料和面料表中找到对应的数据
|
|
|
|
//面料
|
|
|
|
//面料
|
|
|
|
List<ZyProcessFabric> listFabric= productProcessMapper.findFabric(zpp.getProcessId()); |
|
|
|
List<ZyProcessFabric> listFabric= productProcessMapper.findFabric(item.getProcessId()); |
|
|
|
//辅料
|
|
|
|
//辅料
|
|
|
|
List<ZyProcessAccessories> listAccessories=productProcessMapper.findAccessories(zpp.getProcessId()); |
|
|
|
List<ZyProcessAccessories> listAccessories=productProcessMapper.findAccessories(item.getProcessId()); |
|
|
|
//然后将产品工序id和辅料面料绑定
|
|
|
|
//然后将产品工序id和辅料面料绑定
|
|
|
|
//产品工序面料
|
|
|
|
//产品工序面料
|
|
|
|
for (ZyProcessFabric zyProcessFabric : listFabric) { |
|
|
|
for (ZyProcessFabric zyProcessFabric : listFabric) { |
|
|
|