forked from I3-YF/i3plus-mes-pcn-yfai
Merge branch 'dev_temp_xw_202503310000_45843' into dev
# Conflicts: # modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/schedulejob/MesReportWorkByPreDayJob.java # modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java # modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java # modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java # pom.xmldev
commit
5e486a0b5b
@ -0,0 +1,7 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.api.base;
|
||||
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPartPackageType;
|
||||
|
||||
public interface IMesPartPackageTypeService {
|
||||
MesPartPackageType getMesPartPackageType(String organizeCode, String packageTypeCode);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.api.report;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.seres.MesCimSeresJisQueue;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.seres.MesCimSeresSrmRunSheetJis;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IMesCimSeresReportService {
|
||||
|
||||
ListPager<MesCimSeresSrmRunSheetJis> querySrmSunSheetJisLogByPager(Integer status, String docNo, Pager pager);
|
||||
|
||||
void doSrmSunSheetJisNormal(List<Long> ids);
|
||||
|
||||
ListPager<MesCimSeresJisQueue> queryJisQueueLogByPager(Integer checkStatus, String vin, String materielCode, Pager pager);
|
||||
|
||||
void doJisQueueNormal(List<Long> ids);
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesTemplateService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.mes.pcn.api.iservice.base.IConfigService;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
||||
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api("获取系统配置的模版信息")
|
||||
@RestController
|
||||
@RequestMapping(MesCommonConstant.MES_YANFEN)
|
||||
public class MesLabelTemplateExtController {
|
||||
|
||||
@Autowired
|
||||
private IConfigService configService;
|
||||
|
||||
@Autowired
|
||||
private IMesTemplateService mesTemplateService;
|
||||
|
||||
@GetMapping("/label-template/by-module-or-template/get")
|
||||
@ApiOperation(value = "获取系统配置的模版信息")
|
||||
public ResultBean queryMesLabelTemplate(String organizeCode, String moduleCode, String templateCode) {
|
||||
try {
|
||||
ValidatorBean.checkNotNull(organizeCode, "工厂代码不能为空");
|
||||
if (StringUtils.isEmpty(moduleCode) && StringUtils.isEmpty(templateCode)) {
|
||||
ValidatorBean.checkNotNull(moduleCode, "模版配置代码不能为空");
|
||||
}
|
||||
if (!StringUtils.isEmpty(moduleCode)) {
|
||||
Map<String, String> configMap = configService.getConfigMapByCfgCode(moduleCode, organizeCode);
|
||||
String templateCustomHtml = configMap.get(MesPcnExtConstWords.TEMPLATE_CUSTOM_HTML);
|
||||
if (!StringUtils.isEmpty(templateCustomHtml)) return ResultBean.success("查询成功").setResultObject(templateCustomHtml);
|
||||
String templateCfg = configMap.get(moduleCode);
|
||||
if (!StringUtils.isEmpty(templateCfg)) templateCode = templateCfg;
|
||||
}
|
||||
ValidatorBean.checkNotNull(templateCode, "模版代码不能为空");
|
||||
return ResultBean.success("查询成功").setResultObject(mesTemplateService.getMesLabelTemplate(templateCode, organizeCode));
|
||||
|
||||
} catch (ImppBusiException imppException) {
|
||||
return ResultBean.fail(imppException);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.report;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.report.IMesCimSeresReportService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.seres.MesCimSeresJisQueue;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.seres.MesCimSeresSrmRunSheetJis;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
||||
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Api("赛力斯报表")
|
||||
@RestController
|
||||
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesCimSeresReport")
|
||||
public class MesCimSeresReportController {
|
||||
|
||||
@Autowired
|
||||
private IMesCimSeresReportService mesCimSeresReportService;
|
||||
|
||||
@ApiOperation(value = "赛力斯JIS单接收日志", notes = "赛力斯JIS单接收日志")
|
||||
@GetMapping("/query-srm-sun-sheet-jis-log")
|
||||
public ResultBean querySrmSunSheetJisLogByPager(Integer status, String docNo, Pager pager){
|
||||
try {
|
||||
ListPager<MesCimSeresSrmRunSheetJis> queryResultListPager = mesCimSeresReportService.querySrmSunSheetJisLogByPager(status, docNo, pager);
|
||||
return ResultBean.success("查询成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setListPager(queryResultListPager);
|
||||
} catch (ImppBusiException e) {
|
||||
return ResultBean.fail(e);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "赛力斯JIS单转正常", notes = "赛力斯JIS单转正常")
|
||||
@PostMapping("/srm-sun-sheet-jis-normal")
|
||||
public ResultBean doSrmSunSheetJisNormal(@RequestBody Long[] idArray) {
|
||||
try {
|
||||
List<Long> idList = Arrays.asList(idArray);
|
||||
mesCimSeresReportService.doSrmSunSheetJisNormal(idList);
|
||||
return ResultBean.success("执行成功");
|
||||
} catch (ImppBusiException e) {
|
||||
return ResultBean.fail(e);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "赛力斯JIS队列接收日志", notes = "赛力斯JIS队列接收日志")
|
||||
@GetMapping("/query-jis-queue-log")
|
||||
public ResultBean queryJisQueueLogByPager(Integer checkStatus, String vin, String materielCode, Pager pager){
|
||||
try {
|
||||
ListPager<MesCimSeresJisQueue> queryResultListPager = mesCimSeresReportService.queryJisQueueLogByPager(checkStatus, vin, materielCode, pager);
|
||||
return ResultBean.success("查询成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setListPager(queryResultListPager);
|
||||
} catch (ImppBusiException e) {
|
||||
return ResultBean.fail(e);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "赛力斯JIS队列转正常", notes = "赛力斯JIS队列转正常")
|
||||
@PostMapping("/jis-queue-normal")
|
||||
public ResultBean doJisQueueNormal(@RequestBody Long[] idArray) {
|
||||
try {
|
||||
List<Long> idList = Arrays.asList(idArray);
|
||||
mesCimSeresReportService.doJisQueueNormal(idList);
|
||||
return ResultBean.success("执行成功");
|
||||
} catch (ImppBusiException e) {
|
||||
return ResultBean.fail(e);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesPartPackageTypeService;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPartPackageType;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.IMesPartPackageTypeRepository;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author jason
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MesPartPackageTypeServiceImpl implements IMesPartPackageTypeService {
|
||||
@Autowired
|
||||
private IMesPartPackageTypeRepository partPackageTypeRDao;
|
||||
|
||||
@Override
|
||||
public MesPartPackageType getMesPartPackageType(String organizeCode, String packageTypeCode) {
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getStringEqualPack(packageTypeCode, "packageTypeCode", packBean);
|
||||
return partPackageTypeRDao.getByProperty(packBean);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.sortshipping;
|
||||
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagementDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description : 排序发运处理接口
|
||||
**/
|
||||
public interface ISortShippingDispatchStrategyService {
|
||||
|
||||
default List<MesShippingOrderManagement> getShippingOrderManagementList(MesShippingOrderManagement bean) {
|
||||
return null;
|
||||
}
|
||||
|
||||
default List<MesShippingOrderManagementDetail> getShippingOrderManagementDetailList(String organizeCode, List<Long> idList, Object[] obj, String[] str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
default void saveShippingOrderManagementList(List<MesShippingOrderManagement> pullingOrderInfos) {}
|
||||
|
||||
}
|
@ -0,0 +1,179 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.sortshipping.strategy;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesPartPackageTypeService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesPartShippingGroupService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.IPrintTemplateStrategyService;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPart;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPartPackageType;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPartShippingGroup;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.edi.cd.MesCimVolvoJisRackId;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.edi.cd.MesCimVolvoJisRackIdDetail;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagementDetail;
|
||||
import cn.estsh.i3plus.pojo.mes.model.ChengDuVolvoShippingPrintModel;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.MesPartRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.MesShippingOrderManagementDetailRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.edi.cd.MesCimVolvoJisRackIdDetailRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.edi.cd.MesCimVolvoJisRackIdRepository;
|
||||
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
||||
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description : 成都volvo发运单打印策略
|
||||
* @Reference :
|
||||
* @Author : jason.niu
|
||||
* @CreateDate : 2025/03/20 16:43
|
||||
* @Modify:
|
||||
**/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ChengDuVolvoShippingPrintStrategyService extends SortShippingDispatchStrategyService implements IPrintTemplateStrategyService {
|
||||
@Autowired
|
||||
private MesShippingOrderManagementDetailRepository shippingOrderDetailRDao;
|
||||
@Autowired
|
||||
private MesCimVolvoJisRackIdRepository rackIdRDao;
|
||||
@Autowired
|
||||
private MesCimVolvoJisRackIdDetailRepository rackIdDetailRDao;
|
||||
@Autowired
|
||||
private MesPartRepository partRDao;
|
||||
@Autowired
|
||||
private IMesPartShippingGroupService shippingGroupService;
|
||||
@Autowired
|
||||
private IMesPartPackageTypeService partPackageTypeService;
|
||||
|
||||
@Override
|
||||
public List<MesShippingOrderManagement> getShippingOrderManagementList(MesShippingOrderManagement bean) {
|
||||
return super.getShippingOrderManagementList(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MesShippingOrderManagementDetail> getShippingOrderManagementDetailList(String organizeCode, List<Long> idList, Object[] obj, String[] str) {
|
||||
return super.getShippingOrderManagementDetailList(organizeCode, idList, obj, str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveShippingOrderManagementList(List<MesShippingOrderManagement> shippingOrderManagementList) {
|
||||
super.saveShippingOrderManagementList(shippingOrderManagementList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean execute(MesShippingOrderManagement bean, List<MesShippingOrderManagement> shippingOrderManagementList) {
|
||||
List<ChengDuVolvoShippingPrintModel> modelList = new ArrayList<>();
|
||||
for (MesShippingOrderManagement loadingList : shippingOrderManagementList) {
|
||||
ChengDuVolvoShippingPrintModel model = getPrintData(loadingList);
|
||||
if (model != null) {
|
||||
modelList.add(model);
|
||||
}
|
||||
}
|
||||
return ResultBean.success("装车单打印成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(modelList);
|
||||
}
|
||||
|
||||
private ChengDuVolvoShippingPrintModel getPrintData(MesShippingOrderManagement shippingOrder) {
|
||||
final String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
|
||||
final String userName = AuthUtil.getSessionUser().getUserName();
|
||||
|
||||
ChengDuVolvoShippingPrintModel model = new ChengDuVolvoShippingPrintModel();
|
||||
DdlPackBean shippingDetailPackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getNumEqualPack(shippingOrder.getId(), "pid", shippingDetailPackBean);
|
||||
List<MesShippingOrderManagementDetail> shippingDetails = shippingOrderDetailRDao.findByHqlWhere(shippingDetailPackBean);
|
||||
if (CollectionUtils.isEmpty(shippingDetails)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<String> partNos = new ArrayList<>();
|
||||
List<Long> rackDetailIdList = new ArrayList<>();
|
||||
for (MesShippingOrderManagementDetail shippingDetail : shippingDetails) {
|
||||
if (shippingDetail.getSourceId() != null) {
|
||||
rackDetailIdList.add(shippingDetail.getSourceId());
|
||||
}
|
||||
if (!partNos.contains(shippingDetail.getPartNo())) {
|
||||
partNos.add(shippingDetail.getPartNo());
|
||||
}
|
||||
}
|
||||
DdlPackBean rackDetailPackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getInPackList(rackDetailIdList, "id", rackDetailPackBean);
|
||||
List<MesCimVolvoJisRackIdDetail> rackIdDetails = rackIdDetailRDao.findByHqlWhere(rackDetailPackBean);
|
||||
if (CollectionUtils.isEmpty(rackIdDetails)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Long> rackIdList = new ArrayList<>();
|
||||
for (MesCimVolvoJisRackIdDetail rackIdDetail : rackIdDetails) {
|
||||
if (rackIdDetail.getJisRackIdFid() != null && !rackIdList.contains(rackIdDetail.getJisRackIdFid())) {
|
||||
rackIdList.add(rackIdDetail.getJisRackIdFid());
|
||||
}
|
||||
}
|
||||
DdlPackBean rackPackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getInPackList(rackIdList, "id", rackPackBean);
|
||||
List<MesCimVolvoJisRackId> rackIds = rackIdRDao.findByHqlWhere(rackPackBean);
|
||||
if (CollectionUtils.isEmpty(rackIds)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 净重
|
||||
double totalNetWeight = 0.0;
|
||||
// 净重单位
|
||||
String netWom = "";
|
||||
// 包装重量
|
||||
double packageWeight = 0.0;
|
||||
// 包装重量单位
|
||||
String tmpGwUom = "";
|
||||
DdlPackBean partPackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getInPackList(partNos, "partNo", rackPackBean);
|
||||
List<MesPart> parts = partRDao.findByHqlWhere(partPackBean);
|
||||
if (!CollectionUtils.isEmpty(parts)) {
|
||||
for (MesPart mesPart : parts) {
|
||||
if (mesPart.getNetWeight() != null) {
|
||||
totalNetWeight += mesPart.getNetWeight();
|
||||
}
|
||||
netWom = mesPart.getWeightUom();
|
||||
}
|
||||
}
|
||||
MesPartShippingGroup shippingGroup = shippingGroupService.getMesPartShippingGroup(organizeCode, shippingOrder.getShippingGroupCode());
|
||||
if (shippingGroup != null && !StringUtils.isEmpty(shippingGroup.getPackageTypeCode()) && (shippingGroup.getPackageTypeCode().startsWith("P") || shippingGroup.getPackageTypeCode().startsWith("p"))) {
|
||||
MesPartPackageType partPackageType = partPackageTypeService.getMesPartPackageType(organizeCode, shippingGroup.getPackageTypeCode());
|
||||
if (partPackageType != null) {
|
||||
packageWeight = partPackageType.getNetWeight() != null ? partPackageType.getNetWeight() : 0;
|
||||
tmpGwUom = partPackageType.getWeightUom();
|
||||
}
|
||||
}
|
||||
|
||||
MesCimVolvoJisRackId rackId = rackIds.get(0);
|
||||
model.setRecelver(rackId.getShipToId());
|
||||
model.setDock(rackId.getIdForPlaceOfDischarge());
|
||||
model.setAdviceNoteNo(rackId.getAsnNo());
|
||||
model.setAdviceNoteBarCode(rackId.getAsnNo());
|
||||
model.setSupplierAddress(StringUtils.isEmpty(rackId.getShipFrom()) ? rackId.getShipFromId() : rackId.getShipFrom());
|
||||
model.setNetWeight(String.format("%.2f", totalNetWeight));
|
||||
model.setNWUom(netWom);
|
||||
model.setGrossWeight(String.format("%.2f", totalNetWeight + packageWeight));
|
||||
model.setGWUom(tmpGwUom);
|
||||
model.setRackId(rackId.getJisRackId());
|
||||
model.setRackBarCode(rackId.getJisRackId());
|
||||
model.setFirstPreNo(rackId.getFirstSequenceNumber());
|
||||
model.setFirstPreBarCode(rackId.getFirstSequenceNumber());
|
||||
model.setLastPreNo(rackId.getLastSequenceNumber());
|
||||
model.setLastPreBarCode(rackId.getLastSequenceNumber());
|
||||
model.setSupplierID(rackId.getSellerId());
|
||||
model.setSupplierBarCode(rackId.getSellerId());
|
||||
model.setCountryOfOrigin("CN");
|
||||
model.setNoofCars(rackDetailIdList.size());
|
||||
model.setDescription(rackId.getRackReference());
|
||||
model.setPackageId(rackId.getJisRackId());
|
||||
model.setPackageBarCode(rackId.getJisRackId());
|
||||
model.setProcess("LDJIS");
|
||||
|
||||
return model;
|
||||
}
|
||||
}
|
@ -0,0 +1,156 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.sortshipping.strategy;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.IPrintTemplateStrategyService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesSortShippingPrintForCqLxModel;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
||||
import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.base.util.StringUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.seres.MesCimSeresSrmRunSheetJis;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.seres.MesCimSeresSrmRunSheetJisDetail;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagementDetail;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.seres.IMesCimSeresSrmRunSheetJisDetailRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.seres.IMesCimSeresSrmRunSheetJisRepository;
|
||||
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description : 重庆龙兴发运单
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class CqLxSortShippingPrintStrategyService extends SortShippingDispatchStrategyService implements IPrintTemplateStrategyService {
|
||||
|
||||
@Autowired
|
||||
private IMesCimSeresSrmRunSheetJisRepository cimSeresSrmRunSheetJisRepository;
|
||||
|
||||
@Autowired
|
||||
private IMesCimSeresSrmRunSheetJisDetailRepository cimSeresSrmRunSheetJisDetailRepository;
|
||||
|
||||
@Override
|
||||
public List<MesShippingOrderManagement> getShippingOrderManagementList(MesShippingOrderManagement bean) {
|
||||
return super.getShippingOrderManagementList(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MesShippingOrderManagementDetail> getShippingOrderManagementDetailList(String organizeCode, List<Long> idList, Object[] obj, String[] str) {
|
||||
return super.getShippingOrderManagementDetailList(organizeCode, idList, obj, str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveShippingOrderManagementList(List<MesShippingOrderManagement> shippingOrderManagementList) {
|
||||
super.saveShippingOrderManagementList(shippingOrderManagementList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean execute(MesShippingOrderManagement bean, List<MesShippingOrderManagement> shippingOrderManagementList) {
|
||||
|
||||
List<MesSortShippingPrintForCqLxModel> resultList = new ArrayList<>();
|
||||
|
||||
List<String> shippingCodeList = shippingOrderManagementList.stream().map(MesShippingOrderManagement::getShippingCode).collect(Collectors.toList());
|
||||
List<MesCimSeresSrmRunSheetJis> cimSeresSrmRunSheetJisList = getCimSeresSrmRunSheetJisList(bean.getOrganizeCode(), shippingCodeList);
|
||||
Map<String, List<MesCimSeresSrmRunSheetJis>> jisByScMap = CollectionUtils.isEmpty(cimSeresSrmRunSheetJisList) ? null :
|
||||
cimSeresSrmRunSheetJisList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getDocNo()))).collect(Collectors.groupingBy(MesCimSeresSrmRunSheetJis::getDocNo));
|
||||
log.info("工厂{}排序发运打印 --- 查询JIS单信息:{}条 --- {}", bean.getOrganizeCode(),
|
||||
CollectionUtils.isEmpty(cimSeresSrmRunSheetJisList) ? MesPcnExtConstWords.ZERO : cimSeresSrmRunSheetJisList.size(), Thread.currentThread().getName());
|
||||
|
||||
List<Long> jisIdList = CollectionUtils.isEmpty(cimSeresSrmRunSheetJisList) ? null :
|
||||
cimSeresSrmRunSheetJisList.stream().map(MesCimSeresSrmRunSheetJis::getId).collect(Collectors.toList());
|
||||
List<MesCimSeresSrmRunSheetJisDetail> cimSeresSrmRunSheetJisDetailList = getCimSeresSrmRunSheetJisDetailList(bean.getOrganizeCode(), jisIdList);
|
||||
Map<Long, List<MesCimSeresSrmRunSheetJisDetail>> jisDetailByPidMap = CollectionUtils.isEmpty(cimSeresSrmRunSheetJisDetailList) ? null :
|
||||
cimSeresSrmRunSheetJisDetailList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getPid()))).collect(Collectors.groupingBy(MesCimSeresSrmRunSheetJisDetail::getPid));
|
||||
log.info("工厂{}排序发运打印 --- 查询JIS单详情信息:{}条 --- {}", bean.getOrganizeCode(),
|
||||
CollectionUtils.isEmpty(cimSeresSrmRunSheetJisDetailList) ? MesPcnExtConstWords.ZERO : cimSeresSrmRunSheetJisDetailList.size(), Thread.currentThread().getName());
|
||||
|
||||
//遍历处理每个发运单主表
|
||||
for (MesShippingOrderManagement shippingOrderManagement : shippingOrderManagementList) {
|
||||
if (null == shippingOrderManagement) continue;
|
||||
|
||||
List<MesCimSeresSrmRunSheetJis> sheetJis = CollectionUtils.isEmpty(jisByScMap) ? null : jisByScMap.get(shippingOrderManagement.getShippingCode());
|
||||
if (CollectionUtils.isEmpty(sheetJis)) continue;
|
||||
|
||||
MesSortShippingPrintForCqLxModel result = new MesSortShippingPrintForCqLxModel();
|
||||
BeanUtils.copyProperties(sheetJis.get(0), result);
|
||||
result.setShippingCode(shippingOrderManagement.getShippingCode());
|
||||
if (shippingOrderManagement.getShippingCode().length() >= 4) {
|
||||
result.setCarsNo(shippingOrderManagement.getShippingCode().substring(shippingOrderManagement.getShippingCode().length() - 4));
|
||||
result.setDocNoOther(shippingOrderManagement.getShippingCode().substring(0, shippingOrderManagement.getShippingCode().length() - 4));
|
||||
}
|
||||
List<MesCimSeresSrmRunSheetJisDetail> sheetJisDetailList = CollectionUtils.isEmpty(jisDetailByPidMap) ? new ArrayList<>() : jisDetailByPidMap.get(sheetJis.get(0).getId());
|
||||
if (!CollectionUtils.isEmpty(sheetJisDetailList)) sheetJisDetailList = sheetJisDetailList.stream().filter(o ->
|
||||
(null != o && !StringUtils.isEmpty(o.getSerialNumber()))).sorted(Comparator.comparing(MesCimSeresSrmRunSheetJisDetail::getSerialNumber)).collect(Collectors.toList());
|
||||
|
||||
Integer index = MesPcnExtConstWords.ONE;
|
||||
for (MesCimSeresSrmRunSheetJisDetail cimSeresSrmRunSheetJisDetail : sheetJisDetailList) {
|
||||
if (null == cimSeresSrmRunSheetJisDetail) continue;
|
||||
MesSortShippingPrintForCqLxModel jisDetail = new MesSortShippingPrintForCqLxModel();
|
||||
BeanUtils.copyProperties(cimSeresSrmRunSheetJisDetail, jisDetail);
|
||||
//跟cc确认过可以直接写死
|
||||
jisDetail.setFactoryCode("000003263");
|
||||
jisDetail.setXh(index);
|
||||
index ++;
|
||||
result.addJisDetail(jisDetail);
|
||||
}
|
||||
|
||||
Map<String, List<MesSortShippingPrintForCqLxModel>> sheetJisDetailMap = CollectionUtils.isEmpty(result.getJisDetailList()) ? new HashMap<>() :
|
||||
result.getJisDetailList().stream().filter(o -> null != o).collect(Collectors.groupingBy(MesSortShippingPrintForCqLxModel::getMaterielCode));
|
||||
|
||||
for (Map.Entry<String, List<MesSortShippingPrintForCqLxModel>> entry : sheetJisDetailMap.entrySet()) {
|
||||
if (null == entry) continue;
|
||||
|
||||
List<MesSortShippingPrintForCqLxModel> amountList = entry.getValue();
|
||||
if (CollectionUtils.isEmpty(amountList)) continue;
|
||||
|
||||
MesSortShippingPrintForCqLxModel amount = new MesSortShippingPrintForCqLxModel();
|
||||
amount.setPartNo(amountList.get(0).getMaterielCode());
|
||||
amount.setAmountQty(amountList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getUseQty()))).mapToDouble(MesSortShippingPrintForCqLxModel::getUseQty).sum());
|
||||
StringJoiner appendRows = new StringJoiner(MesPcnExtConstWords.COMMA);
|
||||
amountList.forEach(o -> appendRows.add(o.getXh().toString()));
|
||||
amount.setAppendRows(appendRows.toString());
|
||||
amount.setMaterielNames(amountList.get(0).getMaterielNames());
|
||||
result.addAmount(amount);
|
||||
}
|
||||
|
||||
resultList.add(result);
|
||||
|
||||
shippingOrderManagement.setPrintCount(StringUtil.isEmpty(shippingOrderManagement.getPrintCount()) ? MesPcnExtConstWords.ONE : shippingOrderManagement.getPrintCount() + MesPcnExtConstWords.ONE);
|
||||
shippingOrderManagement.setLastPrintTime(TimeTool.getNowTime(true));
|
||||
shippingOrderManagement.setLastPrintUser(bean.getUserInfo());
|
||||
ConvertBean.serviceModelUpdate(shippingOrderManagement, bean.getUserInfo());
|
||||
}
|
||||
|
||||
saveShippingOrderManagementList(shippingOrderManagementList);
|
||||
|
||||
return ResultBean.success("发运单打印成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(resultList);
|
||||
|
||||
}
|
||||
|
||||
private List<MesCimSeresSrmRunSheetJis> getCimSeresSrmRunSheetJisList(String organizeCode, List<String> shippingCodeList) {
|
||||
if (StringUtils.isEmpty(organizeCode) || CollectionUtils.isEmpty(shippingCodeList)) return null;
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
if (shippingCodeList.size() == 1) DdlPreparedPack.getStringEqualPack(shippingCodeList.get(0), "docNo", packBean);
|
||||
else DdlPreparedPack.getInPackList(shippingCodeList, "docNo", packBean);
|
||||
return cimSeresSrmRunSheetJisRepository.findByHqlWhere(packBean);
|
||||
}
|
||||
|
||||
private List<MesCimSeresSrmRunSheetJisDetail> getCimSeresSrmRunSheetJisDetailList(String organizeCode, List<Long> jisIdList) {
|
||||
if (StringUtils.isEmpty(organizeCode) || CollectionUtils.isEmpty(jisIdList)) return null;
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
if (jisIdList.size() == 1) DdlPreparedPack.getNumEqualPack(jisIdList.get(0), MesPcnExtConstWords.PID, packBean);
|
||||
else DdlPreparedPack.getInPackList(jisIdList, MesPcnExtConstWords.PID, packBean);
|
||||
return cimSeresSrmRunSheetJisDetailRepository.findByHqlWhere(packBean);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.sortshipping.strategy;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.sortshipping.ISortShippingDispatchStrategyService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.base.util.StringUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagementDetail;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.MesShippingOrderManagementDetailRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.MesShippingOrderManagementRepository;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description : 发运单查询
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
public abstract class SortShippingDispatchStrategyService implements ISortShippingDispatchStrategyService {
|
||||
|
||||
@Autowired
|
||||
public MesShippingOrderManagementRepository shippingOrderManagementRepository;
|
||||
|
||||
@Autowired
|
||||
public MesShippingOrderManagementDetailRepository shippingOrderManagementDetailRepository;
|
||||
|
||||
@Override
|
||||
public List<MesShippingOrderManagement> getShippingOrderManagementList(MesShippingOrderManagement bean) {
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
||||
List<String> shippingGroupCodeList = !StringUtil.isEmpty(bean.getShippingGroupCode()) ? Arrays.asList(bean.getShippingGroupCode().split(MesPcnExtConstWords.COMMA)) : null;
|
||||
if (!CollectionUtils.isEmpty(shippingGroupCodeList)) {
|
||||
if (shippingGroupCodeList.size() == 1) DdlPreparedPack.getStringEqualPack(shippingGroupCodeList.get(0), MesPcnExtConstWords.SHIPPING_GROUP_CODE, packBean);
|
||||
else DdlPreparedPack.getInPackList(shippingGroupCodeList, MesPcnExtConstWords.SHIPPING_GROUP_CODE, packBean);
|
||||
}
|
||||
DdlPreparedPack.getStringEqualPack(bean.getShippingCode(), MesPcnExtConstWords.SHIPPING_CODE, packBean);
|
||||
DdlPreparedPack.getIsNull(MesPcnExtConstWords.LAST_PRINT_TIME, packBean);
|
||||
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{MesPcnExtConstWords.CREATE_DATE_TIME}, packBean);
|
||||
return shippingOrderManagementRepository.findByHqlTopWhere(packBean,10);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MesShippingOrderManagementDetail> getShippingOrderManagementDetailList(String organizeCode, List<Long> idList, Object[] obj, String[] str) {
|
||||
if (StringUtils.isEmpty(organizeCode) || CollectionUtils.isEmpty(idList)) return null;
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
if (idList.size() == 1) DdlPreparedPack.getNumEqualPack(idList.get(0), MesPcnExtConstWords.PID, packBean);
|
||||
else DdlPreparedPack.getInPackList(idList, MesPcnExtConstWords.PID, packBean);
|
||||
if (null != obj && null != str) DdlPreparedPack.getOrderByPack(obj, str, packBean);
|
||||
return shippingOrderManagementDetailRepository.findByHqlWhere(packBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveShippingOrderManagementList(List<MesShippingOrderManagement> shippingOrderManagementList) {
|
||||
if (CollectionUtils.isEmpty(shippingOrderManagementList)) return;
|
||||
shippingOrderManagementRepository.saveAll(shippingOrderManagementList);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.sortshipping.strategy;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesConfigService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.IPrintTemplateStrategyService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
||||
import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.base.util.StringUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesConfig;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.edi.wuhu.MesCimCheryOrder;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagementDetail;
|
||||
import cn.estsh.i3plus.pojo.mes.model.MesShippingOrderManagementDetailModel;
|
||||
import cn.estsh.i3plus.pojo.mes.model.MesShippingOrderManagementModel;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.MesCimCheryOrderRepository;
|
||||
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @Description : 芜湖发运单
|
||||
**/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class WuhuSortShippingPrintStrategyService extends SortShippingDispatchStrategyService implements IPrintTemplateStrategyService {
|
||||
|
||||
@Autowired
|
||||
private IMesConfigService configService;
|
||||
|
||||
@Autowired
|
||||
private MesCimCheryOrderRepository cimCheryOrderRepository;
|
||||
|
||||
@Override
|
||||
public List<MesShippingOrderManagement> getShippingOrderManagementList(MesShippingOrderManagement bean) {
|
||||
return super.getShippingOrderManagementList(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MesShippingOrderManagementDetail> getShippingOrderManagementDetailList(String organizeCode, List<Long> idList, Object[] obj, String[] str) {
|
||||
return super.getShippingOrderManagementDetailList(organizeCode, idList, obj, str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveShippingOrderManagementList(List<MesShippingOrderManagement> shippingOrderManagementList) {
|
||||
super.saveShippingOrderManagementList(shippingOrderManagementList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean execute(MesShippingOrderManagement bean, List<MesShippingOrderManagement> shippingOrderManagementList) {
|
||||
|
||||
MesConfig config = configService.getMesConfigNoError(bean.getOrganizeCode(), "WU_HU_SUPPLIER");
|
||||
String supplierNo = (null == config || StringUtils.isEmpty(config.getCfgValue())) ? MesPcnExtConstWords.EMPTY : config.getCfgValue();
|
||||
|
||||
List<MesShippingOrderManagementModel> modelList = new ArrayList<>();
|
||||
//把查出来的发运单打印并修改打印状态为已打印-
|
||||
for (MesShippingOrderManagement shippingOrderManagement : shippingOrderManagementList) {
|
||||
MesShippingOrderManagementModel model = new MesShippingOrderManagementModel();
|
||||
String shippingCodePrefix = shippingOrderManagement.getShippingCode().substring(0, shippingOrderManagement.getShippingCode().length() - 3);
|
||||
String shippingCodeSuffix = shippingOrderManagement.getShippingCode().substring(shippingOrderManagement.getShippingCode().length() - 3);
|
||||
model.setShippingCode(shippingCodePrefix);
|
||||
model.setShippingCodeAfter3(shippingCodeSuffix);
|
||||
model.setShippingCodeWhole(shippingOrderManagement.getShippingCode());
|
||||
|
||||
//查询原始报文
|
||||
List<MesCimCheryOrder> cheryOrderList = getCheryOrder(shippingOrderManagement.getOrganizeCode(), shippingOrderManagement.getShippingCode());
|
||||
Map<String, List<MesCimCheryOrder>> cheryOrderMap = new HashMap<>();
|
||||
if (cheryOrderList != null && !cheryOrderList.isEmpty()) {
|
||||
MesCimCheryOrder cheryOrder = cheryOrderList.get(0);
|
||||
model.setPlantName(cheryOrder.getPlantName());
|
||||
model.setPartkitName(cheryOrder.getPartkitName());
|
||||
model.setDeliverySendSequence(cheryOrder.getDeliverySendSequence());
|
||||
model.setReceiveDockName(cheryOrder.getReceiveDockNo()+"--"+cheryOrder.getReceiveDockName());
|
||||
model.setLastRecRequireTime(cheryOrder.getLastRecRequireTime());
|
||||
//根据cheryOrder的workshopNo获取对应的车间名称
|
||||
String workshopName = getWorkshopName(cheryOrder.getOrganizeCode(), cheryOrder.getWorkshopNo());
|
||||
model.setWorkShop(workshopName);
|
||||
model.setCreateDateTime(cheryOrder.getCreateDatetime());
|
||||
model.setPrintDateTime(TimeTool.getNowTime(true));
|
||||
cheryOrderMap = cheryOrderList.stream().collect(Collectors.groupingBy(MesCimCheryOrder::getVin));
|
||||
}
|
||||
|
||||
//查询发运单明细
|
||||
List<MesShippingOrderManagementDetail> shipOrderPartInfos = getShippingOrderManagementDetailList(
|
||||
bean.getOrganizeCode(), Stream.of(shippingOrderManagement.getId()).collect(Collectors.toList()),
|
||||
new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{"boxNum"});
|
||||
if (!CollectionUtils.isEmpty(shipOrderPartInfos)) {
|
||||
List<MesShippingOrderManagementDetailModel> detailList = new ArrayList<>();
|
||||
shipOrderPartInfos = shipOrderPartInfos.stream().sorted(Comparator.comparing(MesShippingOrderManagementDetail::getCustInfoSeq)).collect(Collectors.toList());
|
||||
for (MesShippingOrderManagementDetail shipOrderPartInfo : shipOrderPartInfos) {
|
||||
MesShippingOrderManagementDetailModel detailModel = new MesShippingOrderManagementDetailModel();
|
||||
detailModel.setPartNo(shipOrderPartInfo.getPartNo());
|
||||
detailModel.setPartName(shipOrderPartInfo.getPartName());
|
||||
detailModel.setQty(shipOrderPartInfo.getPlanQty());
|
||||
detailModel.setBoxNo(shipOrderPartInfo.getCustInfoSeq());
|
||||
detailModel.setSupplierNo(supplierNo);
|
||||
detailModel.setVin(shipOrderPartInfo.getVin().substring(shipOrderPartInfo.getVin().length()-8));
|
||||
MesCimCheryOrder order = cheryOrderMap.get(shipOrderPartInfo.getVin()).get(0);
|
||||
if (order != null) {
|
||||
detailModel.setWholePartNo(order.getMaterialNo());
|
||||
}
|
||||
detailList.add(detailModel);
|
||||
}
|
||||
model.setShipOrderPartInfos(detailList);
|
||||
}
|
||||
|
||||
//查询原有报文 根据shippingCode;
|
||||
shippingOrderManagement.setPrintCount(StringUtil.isEmpty(shippingOrderManagement.getPrintCount())?1:shippingOrderManagement.getPrintCount()+1);
|
||||
shippingOrderManagement.setLastPrintTime(TimeTool.getNowTime(true));
|
||||
shippingOrderManagement.setLastPrintUser(bean.getUserInfo());
|
||||
ConvertBean.serviceModelUpdate(shippingOrderManagement, bean.getUserInfo());
|
||||
modelList.add(model);
|
||||
}
|
||||
|
||||
saveShippingOrderManagementList(shippingOrderManagementList);
|
||||
|
||||
return ResultBean.success("发运单打印成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(modelList);
|
||||
}
|
||||
|
||||
private List<MesCimCheryOrder> getCheryOrder(String organizeCode, String sheetNo) {
|
||||
if (StringUtils.isEmpty(organizeCode) || StringUtils.isEmpty(sheetNo)) return null;
|
||||
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getStringEqualPack(sheetNo, "sheetNo", ddlPackBean);
|
||||
return cimCheryOrderRepository.findByHqlWhere(ddlPackBean);
|
||||
}
|
||||
|
||||
private String getWorkshopName(String organizeCode, String workshopNo) {
|
||||
if (StringUtils.isEmpty(organizeCode) || StringUtils.isEmpty(workshopNo)) return null;
|
||||
MesConfig config = configService.getMesConfigNoError(organizeCode, workshopNo);
|
||||
return (null == config || StringUtils.isEmpty(config.getCfgValue())) ? MesPcnExtConstWords.EMPTY : config.getCfgValue();
|
||||
}
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.strategy;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesCustomerPartService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesPrintedSnLogService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProduceSnExtService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.IPrintTemplateStrategyService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.apiservice.util.MesPcnException;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesProduceSnPrintDataModel;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesProduceSnPrintModel;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.mes.pcn.util.DateUtil;
|
||||
import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesCustomerPart;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesNumberRule;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.edi.cd.MesCimVolvoJisRackId;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.edi.cd.MesCimVolvoJisRackIdDetail;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesCustSortInfo;
|
||||
import cn.estsh.i3plus.pojo.mes.model.GenSerialNoModel;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StepResult;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.MesCustSoftInfoRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.edi.cd.MesCimVolvoJisRackIdDetailRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.edi.cd.MesCimVolvoJisRackIdRepository;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description : 成都volvo零件标签打印
|
||||
* @Reference :
|
||||
* @Author : jason.niu
|
||||
* @CreateDate : 2025/03/20 16:43
|
||||
* @Modify:
|
||||
**/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ChengDuVolvoPartPrintStrategy implements IPrintTemplateStrategyService {
|
||||
@Autowired
|
||||
private IMesPrintedSnLogService mesPrintedSnLogService;
|
||||
|
||||
@Autowired
|
||||
private IMesCustomerPartService mesCustomerPartService;
|
||||
@Autowired
|
||||
private MesCustSoftInfoRepository custSoftInfoRDao;
|
||||
@Autowired
|
||||
private MesCimVolvoJisRackIdDetailRepository rackIdDetailRDao;
|
||||
@Autowired
|
||||
private MesCimVolvoJisRackIdRepository volvoJisRackIdRDao;
|
||||
@Autowired
|
||||
private IMesProduceSnExtService produceSnExtService;
|
||||
|
||||
@Override
|
||||
public MesProduceSnPrintModel execute(GenSerialNoModel genSerialNoModel, MesProduceSnPrintModel mesProduceSnPrintModel, MesNumberRule numberRule, StepResult stepResult, StationRequestBean reqBean, Boolean isStep) {
|
||||
String organizeCode = mesProduceSnPrintModel.getOrganizeCode();
|
||||
if (!isStep){
|
||||
MesPcnException.throwBusiException("成都volvo零件标签打印只支持工位端打印!");
|
||||
}
|
||||
//物料信息
|
||||
MesCustomerPart customerPart = (!Objects.isNull(genSerialNoModel) && !CollectionUtils.isEmpty(genSerialNoModel.getDataMap()) && genSerialNoModel.getDataMap().containsKey(MesCustomerPart.class.getSimpleName())) ? (MesCustomerPart) genSerialNoModel.getDataMap().get(MesCustomerPart.class.getSimpleName()) : mesCustomerPartService.getMesCustomerPart(organizeCode,mesProduceSnPrintModel.getPartNo());
|
||||
// 工单信息
|
||||
MesWorkOrder workOrder = (MesWorkOrder) mesProduceSnPrintModel.getSourceData();
|
||||
MesProduceSn mesProduceSn = produceSnExtService.getProduceSnByCustSn(organizeCode, workOrder.getCustSn());
|
||||
if (mesProduceSn == null) {
|
||||
MesPcnException.throwBusiException("客户条码[%s]不存在!", workOrder.getCustSn());
|
||||
}
|
||||
//封装打印信息
|
||||
MesProduceSnPrintDataModel printDataModel = getModel(mesProduceSn, customerPart);
|
||||
mesProduceSnPrintModel.getMesProduceSnPrintDataModelList().clear();
|
||||
Map<String, Object> printTemplateData = new HashMap<>(getPrintContextMap(mesProduceSn, workOrder));
|
||||
List<Map<String, Object>> printDataMapList = new ArrayList<>();
|
||||
printDataMapList.add(printTemplateData);
|
||||
mesProduceSnPrintModel.getPrintContextList().add(packResultMap(mesProduceSnPrintModel, printDataMapList));
|
||||
|
||||
//保存打印记录
|
||||
mesProduceSnPrintModel.getMesPrintedSnLogList().add(mesPrintedSnLogService.getMesCustomPrintedSnLog(mesProduceSnPrintModel.getUserName(), organizeCode, printDataModel, printTemplateData));
|
||||
return mesProduceSnPrintModel;
|
||||
}
|
||||
|
||||
private MesProduceSnPrintDataModel getModel(MesProduceSn produceSn, MesCustomerPart customerPart) {
|
||||
MesProduceSnPrintDataModel mesProduceSnPrintDataModel = new MesProduceSnPrintDataModel();
|
||||
mesProduceSnPrintDataModel.setPartNo(produceSn.getPartNo());
|
||||
mesProduceSnPrintDataModel.setPartName(produceSn.getPartName());
|
||||
if (!Objects.isNull(customerPart)) {
|
||||
mesProduceSnPrintDataModel.setCustPartNo(customerPart.getCustPartNo());
|
||||
}
|
||||
mesProduceSnPrintDataModel.setBarcode(produceSn.getCustSn());
|
||||
mesProduceSnPrintDataModel.setPrintDate(TimeTool.getNowTime(true));
|
||||
mesProduceSnPrintDataModel.setUserName(produceSn.getCreateUser());
|
||||
mesProduceSnPrintDataModel.setProductDate(TimeTool.parseStringFormat(produceSn.getLotNo(), DateUtil.SHORT_FORMAT, "yyyy/MM/dd"));
|
||||
return mesProduceSnPrintDataModel;
|
||||
}
|
||||
|
||||
private Map<String, Object> getPrintContextMap(MesProduceSn produceSn, MesWorkOrder workOrder) {
|
||||
if (workOrder == null || StringUtils.isEmpty(workOrder.getWorkOrderSource())) {
|
||||
MesPcnException.throwBusiException("客户条码[%s]对应的工单信息缺少来源!", workOrder.getCustSn());
|
||||
}
|
||||
|
||||
MesCustSortInfo custSoftInfo = custSoftInfoRDao.getById(Long.parseLong(workOrder.getWorkOrderSource()));
|
||||
if (custSoftInfo == null) {
|
||||
MesPcnException.throwBusiException("工单[%s]无法匹配客户排序信息!", workOrder.getWorkOrderNo());
|
||||
}
|
||||
MesCimVolvoJisRackIdDetail rackIdDetail = rackIdDetailRDao.getById(custSoftInfo.getSourceId());
|
||||
if (rackIdDetail == null) {
|
||||
MesPcnException.throwBusiException("工单[%s]客户排序信息无法匹配RackIdDetail!", workOrder.getWorkOrderNo());
|
||||
}
|
||||
MesCimVolvoJisRackId rackId = volvoJisRackIdRDao.getById(rackIdDetail.getJisRackIdFid());
|
||||
if (rackId == null) {
|
||||
MesPcnException.throwBusiException("工单[%s]客户排序信息无法匹配RackId!", workOrder.getWorkOrderNo());
|
||||
}
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put(MesPcnExtConstWords.VOLVO_CONSIGNMENT_REFERENCE, rackId.getConsignmentReference());
|
||||
result.put(MesPcnExtConstWords.PRODUCT_DATE, TimeTool.getNowTime("yyyyMMdd HH:mm"));
|
||||
result.put(MesPcnExtConstWords.VOLVO_FYON, rackIdDetail.getFyon());
|
||||
result.put(MesPcnExtConstWords.VOLVO_SEQUENCENUMBER, rackIdDetail.getSequenceNumber());
|
||||
result.put(MesPcnExtConstWords.VOLVO_RACKID, rackId.getJisRackId());
|
||||
result.put(MesPcnExtConstWords.VOLVO_POSITION, rackIdDetail.getPosition());
|
||||
result.put(MesPcnExtConstWords.CUST_PART_NO, custSoftInfo.getCustPartNo());
|
||||
result.put(MesPcnExtConstWords.PRINT_BAR_CODE, produceSn.getCustSn());
|
||||
result.put(MesPcnExtConstWords.PRINT_DATE, TimeTool.getNowTime(true));
|
||||
result.put(MesPcnExtConstWords.USER_NAME, produceSn.getCreateUser());
|
||||
return result;
|
||||
}
|
||||
|
||||
private Map<String, Object> packResultMap(MesProduceSnPrintModel printModel, List<Map<String, Object>> printTemplateDateList) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put(MesPcnExtConstWords.LABEL_TEMPLATE, printModel.getMesLabelTemplate());
|
||||
resultMap.put(MesPcnExtConstWords.TEMPLATE_DATA, printTemplateDateList);
|
||||
resultMap.put(MesPcnExtConstWords.TEMPLATE_CODE, printModel.getMesLabelTemplate().getTemplateCode());
|
||||
resultMap.put(MesPcnExtConstWords.PRINTER, printModel.getPrinter());
|
||||
return resultMap;
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.strategy;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.print.IPrintTemplateStrategyService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesProduceSnPrintModel;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesNumberRule;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder;
|
||||
import cn.estsh.i3plus.pojo.mes.model.GenSerialNoModel;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StepResult;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description : 客户标签打印
|
||||
* @Reference :
|
||||
* @Author : wangjie
|
||||
* @CreateDate : 2024/9/29 16:43
|
||||
* @Modify:
|
||||
**/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class CommonCustSnPrintStrategy implements IPrintTemplateStrategyService {
|
||||
|
||||
@Override
|
||||
public MesProduceSnPrintModel execute(GenSerialNoModel genSerialNoModel, MesProduceSnPrintModel model,
|
||||
MesNumberRule numberRule , StepResult stepResult, StationRequestBean reqBean,
|
||||
Boolean isStep) {
|
||||
|
||||
MesWorkOrder workOrder = (MesWorkOrder) model.getSourceData();
|
||||
|
||||
if (workOrder == null) {
|
||||
log.info("CommonCustSnPrintStrategy --- execute --- 工单信息为空");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 返回的结果集合
|
||||
List<Map<String, Object>> printDataMapList = new ArrayList<>();
|
||||
// 单个标签参数值
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// 物料名称
|
||||
resultMap.put(MesPcnExtConstWords.PART_NAME, workOrder.getPartName());
|
||||
// 物料名称
|
||||
resultMap.put(MesPcnExtConstWords.CUST_PART_NO, workOrder.getCustPartNo());
|
||||
// 客户条码
|
||||
resultMap.put(MesPcnExtConstWords.CUST_SN, workOrder.getCustSn());
|
||||
|
||||
printDataMapList.add(resultMap);
|
||||
|
||||
model.setPrintContextList(packResultMapList(model, printDataMapList));
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
private List<Map<String, Object>> packResultMapList(MesProduceSnPrintModel printModel, List<Map<String, Object>> printTemplateDateList) {
|
||||
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put(MesPcnExtConstWords.LABEL_TEMPLATE, printModel.getMesLabelTemplate());
|
||||
resultMap.put(MesPcnExtConstWords.TEMPLATE_DATA, printTemplateDateList);
|
||||
resultMap.put(MesPcnExtConstWords.TEMPLATE_CODE, printModel.getMesLabelTemplate().getTemplateCode());
|
||||
resultMap.put(MesPcnExtConstWords.PRINTER, printModel.getPrinter());
|
||||
resultMapList.add(resultMap);
|
||||
return resultMapList;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.report;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.report.IMesCimSeresReportService;
|
||||
import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.seres.MesCimSeresJisQueue;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.seres.MesCimSeresSrmRunSheetJis;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.seres.IMesCimSeresJisQueueRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.seres.IMesCimSeresSrmRunSheetJisRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
|
||||
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class MesCimSeresReportServiceImpl implements IMesCimSeresReportService {
|
||||
|
||||
@Autowired
|
||||
private IMesCimSeresSrmRunSheetJisRepository runSheetJisRDao;
|
||||
|
||||
@Autowired
|
||||
private IMesCimSeresJisQueueRepository queueJisRDao;
|
||||
|
||||
@Override
|
||||
public ListPager<MesCimSeresSrmRunSheetJis> querySrmSunSheetJisLogByPager(Integer status, String docNo, Pager pager) {
|
||||
final String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getStringLikerPack(docNo, "docNo", packBean);
|
||||
DdlPreparedPack.getNumEqualPack(status, "status", packBean);
|
||||
DdlPreparedPack.getOrderBy("id", CommonEnumUtil.ASC_OR_DESC.DESC.getValue(), packBean);
|
||||
|
||||
pager = PagerHelper.getPager(pager, runSheetJisRDao.findByHqlWhereCount(packBean));
|
||||
List<MesCimSeresSrmRunSheetJis> list = runSheetJisRDao.findByHqlWherePage(packBean, pager);
|
||||
return new ListPager<>(list, pager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doSrmSunSheetJisNormal(List<Long> ids) {
|
||||
final String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
|
||||
final String username = AuthUtil.getSessionUser().getUserName();
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getInPackList(ids, "id", packBean);
|
||||
|
||||
runSheetJisRDao.updateByProperties(new String[]{"status","modifyUser","modifyDatetime"},new Object[]{MesExtEnumUtil.CIM_SERES_JIS_STATUS.WAIT_CHECK.getValue(), username, TimeTool.getNowTime(true)}, packBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListPager<MesCimSeresJisQueue> queryJisQueueLogByPager(Integer checkStatus, String vin, String materielCode, Pager pager) {
|
||||
final String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getStringLikerPack(vin, "vin", packBean);
|
||||
DdlPreparedPack.getStringLikerPack(materielCode, "materielCode", packBean);
|
||||
DdlPreparedPack.getNumEqualPack(checkStatus, "checkStatus", packBean);
|
||||
DdlPreparedPack.getOrderBy("id", CommonEnumUtil.ASC_OR_DESC.DESC.getValue(), packBean);
|
||||
|
||||
pager = PagerHelper.getPager(pager, queueJisRDao.findByHqlWhereCount(packBean));
|
||||
List<MesCimSeresJisQueue> list = queueJisRDao.findByHqlWherePage(packBean, pager);
|
||||
return new ListPager<>(list, pager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doJisQueueNormal(List<Long> ids) {
|
||||
final String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
|
||||
final String username = AuthUtil.getSessionUser().getUserName();
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getInPackList(ids, "id", packBean);
|
||||
|
||||
queueJisRDao.updateByProperties(new String[]{"checkStatus","modifyUser","modifyDatetime"},new Object[]{MesExtEnumUtil.CIM_SERES_JIS_STATUS.WAIT_CHECK.getValue(), username, TimeTool.getNowTime(true)}, packBean);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -0,0 +1,84 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionCustomContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesEquipVariableCollectContext;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionProcessContext;
|
||||
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationResultBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StepResult;
|
||||
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description : 扫描可回用包装条码工步
|
||||
* @Reference :
|
||||
* @Author : wangjie
|
||||
* @CreateDate 2024/9/11 13:53
|
||||
* @Modify:
|
||||
**/
|
||||
@Slf4j
|
||||
@Service("mesRecyclablePackageScanStepService")
|
||||
public class MesRecyclablePackageScanStepService extends BaseStepService {
|
||||
|
||||
@Autowired
|
||||
private IMesProductionProcessContextStepService productionProcessContextStepService;
|
||||
|
||||
@Autowired
|
||||
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
|
||||
|
||||
@Autowired
|
||||
private IMesProductionCustomContextStepService productionCustomContextStepService;
|
||||
|
||||
@Override
|
||||
public StepResult execute(StationRequestBean reqBean) {
|
||||
|
||||
StationResultBean resultBean = new StationResultBean();
|
||||
|
||||
StepResult stepResult = StepResult.getSuccessComplete();
|
||||
|
||||
//获取上下文信息
|
||||
MesProductionProcessContext productionProcessContext = productionProcessContextStepService.dispatchCurCellEquipment(reqBean);
|
||||
|
||||
//当前工序已存在读取待验证的可回用包装条码信息
|
||||
if (productionDispatchContextStepService.checkScanRecyclablePackageIsExistContext(reqBean)) return stepResult;
|
||||
|
||||
//存储生产过程上下文对象
|
||||
productionProcessContextStepService.dispatchProductionProcessContext(reqBean, productionProcessContext);
|
||||
|
||||
if (StringUtils.isEmpty(reqBean.getScanInfo())) stepSendGuideAndThrowEx(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), "请扫描可回用包装条码!");
|
||||
|
||||
doHandleScanRecyclablePackageContext(reqBean, stepResult, reqBean.getScanInfo());
|
||||
|
||||
return stepSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.SCAN.getValue()).scanInfo(reqBean.getScanInfo()), stepResult, stepResult.getMsg());
|
||||
}
|
||||
|
||||
//封装可回用包装条码信息 (扫描)
|
||||
private List<MesEquipVariableCollectContext> doHandleScanRecyclablePackageContext(StationRequestBean reqBean, StepResult stepResult, String scanInfo) {
|
||||
|
||||
List<MesEquipVariableCollectContext> equipVariableCollectContextList = new ArrayList<>();
|
||||
|
||||
equipVariableCollectContextList.add(new MesEquipVariableCollectContext(reqBean.getOrganizeCode(), scanInfo, MesExtEnumUtil.CELL_MESSAGE_SOURCE.SCAN.getValue()));
|
||||
|
||||
//保存设备当前一轮工序的待验证的可回用包装条码信息
|
||||
productionDispatchContextStepService.dispatchScanRecyclablePackageContext(reqBean, equipVariableCollectContextList);
|
||||
|
||||
//发送工步内容
|
||||
productionCustomContextStepService.sendStepContextMessage(reqBean, scanInfo, MesExtEnumUtil.CELL_MESSAGE_SOURCE.SCAN);
|
||||
|
||||
stepResult.msg(String.format("当前扫描信息可回用包装条码[%s]!", scanInfo));
|
||||
|
||||
return equipVariableCollectContextList;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionCustomContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesQueueOrderPushService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionPartContext;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionProcessContext;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionPsInContext;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService;
|
||||
import cn.estsh.i3plus.mes.pcn.util.StringUtil;
|
||||
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesQueueOrder;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesQueueOrderPush;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationResultBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StepResult;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.MesQueueOrderRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description : 保存工位队列信息工步 推单工位
|
||||
* @Author : wangjie
|
||||
**/
|
||||
@Slf4j
|
||||
@Service("mesWorkOrderQueueSavePushStepService")
|
||||
public class MesWorkOrderQueueSavePushStepService extends BaseStepService {
|
||||
|
||||
@Autowired
|
||||
private IMesProductionProcessContextStepService productionProcessContextStepService;
|
||||
|
||||
@Autowired
|
||||
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
|
||||
|
||||
@Autowired
|
||||
private IMesProductionCustomContextStepService productionCustomContextStepService;
|
||||
|
||||
@Autowired
|
||||
private IMesQueueOrderPushService queueOrderPushService;
|
||||
|
||||
@Autowired
|
||||
private MesQueueOrderRepository queueOrderRepository;
|
||||
|
||||
@Override
|
||||
public StepResult execute(StationRequestBean reqBean) {
|
||||
|
||||
StationResultBean resultBean = new StationResultBean();
|
||||
|
||||
StepResult stepResult = StepResult.getSuccessComplete();
|
||||
|
||||
//获取上下文信息
|
||||
MesProductionProcessContext productionProcessContext = productionProcessContextStepService.dispatchCurCellEquipment(reqBean);
|
||||
|
||||
//配置错误 抛出异常
|
||||
if (!productionProcessContext.getSuccess()) stepExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), productionProcessContext.getMessage());
|
||||
|
||||
//存储生产过程上下文对象
|
||||
productionProcessContextStepService.dispatchProductionProcessContext(reqBean, productionProcessContext);
|
||||
|
||||
//获取上下文产出零件信息
|
||||
List<MesProductionPartContext> productionPartContextList = productionDispatchContextStepService.getProductionPartContext(reqBean);
|
||||
if (CollectionUtils.isEmpty(productionPartContextList)) stepExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), "当前不存在产出零件信息,请重置工序解决!");
|
||||
//获取上下文条码数据信息集合
|
||||
List<MesProductionPsInContext> productionPsInContextList = productionDispatchContextStepService.getProductionPsInContext(reqBean);
|
||||
if (CollectionUtils.isEmpty(productionPsInContextList)) stepExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), "当前不存在零件条码信息,请重置工序解决!");
|
||||
|
||||
//获取上下文推单队列信息
|
||||
List<MesQueueOrderPush> queueOrderPushList = productionDispatchContextStepService.getSortQueuePushContext(reqBean);
|
||||
if (!CollectionUtils.isEmpty(queueOrderPushList)) saveQueueOrderPush(reqBean, queueOrderPushList);
|
||||
|
||||
//写入队列信息,默认状态为已完成
|
||||
productionPsInContextList.stream().filter(o -> null != o).forEach(o -> insertQueueOrder(reqBean, o, productionPartContextList));
|
||||
|
||||
//验证是否存在LOCK数据, 存在的情况下赋值 stepAfterState, 当前工步集执行结束后会执行当前工步重写的executeStepAfterState方法
|
||||
Optional<MesQueueOrderPush> optional = CollectionUtils.isEmpty(queueOrderPushList) ? null : queueOrderPushList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getIsNeedLock()))).findFirst();
|
||||
if (null != optional && optional.isPresent()) stepResult.stepAfterState(StringUtil.toLowerCaseFirst(this.getClass().getSimpleName()));
|
||||
|
||||
return stepSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), stepResult, "保存工位队列成功!");
|
||||
|
||||
}
|
||||
|
||||
//修改推送队列信息状态为已完成
|
||||
private void saveQueueOrderPush(StationRequestBean reqBean, List<MesQueueOrderPush> queueOrderPushList) {
|
||||
List<Long> idList = queueOrderPushList.stream().filter(o -> null != o).map(MesQueueOrderPush::getId).collect(Collectors.toList());
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(reqBean.getOrganizeCode());
|
||||
if (idList.size() == 1) DdlPreparedPack.getNumEqualPack(idList.get(0), MesPcnExtConstWords.ID, packBean);
|
||||
else DdlPreparedPack.getInPackList(idList, MesPcnExtConstWords.ID, packBean);
|
||||
queueOrderPushService.saveQueueOrderPushStatusByDdlPackBean(packBean, reqBean.getUserInfo(), MesExtEnumUtil.QUEUE_ORDER_STATUS.FINISH.getValue(), reqBean.getWorkCellCode());
|
||||
}
|
||||
|
||||
//写入队列信息,默认状态为已完成
|
||||
private void insertQueueOrder(StationRequestBean reqBean, MesProductionPsInContext productionPsInContext, List<MesProductionPartContext> productionPartContextList) {
|
||||
Optional<MesProductionPartContext> optional = productionPartContextList.stream().filter(o -> (null != o && o.getWorkOrderNo().equals(productionPsInContext.getWorkOrderNo()))).findFirst();
|
||||
MesQueueOrder queueOrder = new MesQueueOrder();
|
||||
if (null != optional && optional.isPresent()) BeanUtils.copyProperties(optional.get(), queueOrder, MesPcnExtConstWords.BASE_BEAN_FIELDS);
|
||||
BeanUtils.copyProperties(productionPsInContext, queueOrder, MesPcnExtConstWords.BASE_BEAN_FIELDS);
|
||||
queueOrder.setWorkCellCode(reqBean.getWorkCellCode());
|
||||
queueOrder.setStatus(MesExtEnumUtil.QUEUE_ORDER_STATUS.FINISH.getValue());
|
||||
ConvertBean.serviceModelInitialize(queueOrder, reqBean.getUserInfo());
|
||||
queueOrderRepository.insert(queueOrder);
|
||||
}
|
||||
|
||||
//当前工步集完成之后执行当前方法
|
||||
@Override
|
||||
public void executeStepAfterState(StationRequestBean reqBean, StepResult stepResult) {
|
||||
if (!stepResult.isCompleted()) return;
|
||||
//获取排序线工单队列推送锁数据, 返回的值是工单队列ID集合
|
||||
List<String> queuePushIdList = productionCustomContextStepService.getSortQueuePushLockContext(reqBean);
|
||||
if (CollectionUtils.isEmpty(queuePushIdList)) return;
|
||||
//删除排序线工单队列推送锁数据
|
||||
queuePushIdList.stream().filter(o -> !StringUtils.isEmpty(o)).forEach(o -> productionCustomContextStepService.removeSortQueuePushLockContext(reqBean, o));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionProcessContext;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionPsInContext;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService;
|
||||
import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationResultBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StepResult;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.MesQueueOrderRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description : 保存工位队列信息工步 非推单工位
|
||||
* @Author : wangjie
|
||||
**/
|
||||
@Slf4j
|
||||
@Service("mesWorkOrderQueueSaveStatusStepService")
|
||||
public class MesWorkOrderQueueSaveStatusStepService extends BaseStepService {
|
||||
|
||||
@Autowired
|
||||
private IMesProductionProcessContextStepService productionProcessContextStepService;
|
||||
|
||||
@Autowired
|
||||
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
|
||||
|
||||
@Autowired
|
||||
private MesQueueOrderRepository queueOrderRepository;
|
||||
|
||||
@Override
|
||||
public StepResult execute(StationRequestBean reqBean) {
|
||||
|
||||
StationResultBean resultBean = new StationResultBean();
|
||||
|
||||
StepResult stepResult = StepResult.getSuccessComplete();
|
||||
|
||||
//获取上下文信息
|
||||
MesProductionProcessContext productionProcessContext = productionProcessContextStepService.dispatchCurCellEquipment(reqBean);
|
||||
|
||||
//配置错误 抛出异常
|
||||
if (!productionProcessContext.getSuccess()) stepExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), productionProcessContext.getMessage());
|
||||
|
||||
//存储生产过程上下文对象
|
||||
productionProcessContextStepService.dispatchProductionProcessContext(reqBean, productionProcessContext);
|
||||
|
||||
//获取上下文条码数据信息集合
|
||||
List<MesProductionPsInContext> productionPsInContextList = productionDispatchContextStepService.getProductionPsInContext(reqBean);
|
||||
if (CollectionUtils.isEmpty(productionPsInContextList)) stepExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), "当前不存在零件条码信息,请重置工序解决!");
|
||||
|
||||
productionPsInContextList.stream().filter(o -> null != o).forEach(o -> saveWorkOrderQueue(reqBean, o));
|
||||
|
||||
return stepSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), stepResult, "保存工位队列成功!");
|
||||
|
||||
}
|
||||
|
||||
private void saveWorkOrderQueue(StationRequestBean reqBean, MesProductionPsInContext productionPsInContext) {
|
||||
if (StringUtils.isEmpty(productionPsInContext.getRelateId())) return;
|
||||
queueOrderRepository.updateByPropertiesNoSync(
|
||||
new String[]{MesPcnExtConstWords.ID, MesPcnExtConstWords.ORGANIZE_CODE},
|
||||
new Object[]{productionPsInContext.getRelateId(), reqBean.getOrganizeCode()},
|
||||
new String[]{MesPcnExtConstWords.STATUS, MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS, MesPcnExtConstWords.SYSTEM_SYNC_DATE_TIME},
|
||||
new Object[]{MesExtEnumUtil.QUEUE_ORDER_STATUS.FINISH.getValue(), reqBean.getUserInfo(), TimeTool.getNowTime(true), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesPcnExtConstWords.EMPTY});
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.pojo.model;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description : 重庆龙兴发运单MODEL
|
||||
**/
|
||||
@Data
|
||||
public class MesSortShippingPrintForCqLxModel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4576439891171509409L;
|
||||
|
||||
@ApiParam("是否重打印")
|
||||
private String isRePrint = MesPcnExtConstWords.EMPTY;
|
||||
|
||||
@ApiParam("重打印操作人")
|
||||
private String rePrintUser = MesPcnExtConstWords.EMPTY;
|
||||
|
||||
@ApiParam("重打印时间")
|
||||
private String rePrintDatetime = MesPcnExtConstWords.EMPTY;
|
||||
|
||||
@ApiParam("发运单号")
|
||||
private String shippingCode;
|
||||
|
||||
@ApiParam("流水线")
|
||||
private String flowLine;
|
||||
|
||||
@ApiParam("二维码")
|
||||
private String docNo;
|
||||
|
||||
@ApiParam("拉动单号后四位")
|
||||
private String carsNo;
|
||||
|
||||
@ApiParam("拉动单号除后四位")
|
||||
private String docNoOther;
|
||||
|
||||
@ApiParam("零件类")
|
||||
private String partClassCode;
|
||||
|
||||
@ApiParam("零件类名称")
|
||||
private String partClassName;
|
||||
|
||||
@ApiParam("供应商代码")
|
||||
private String jisProviderCode;
|
||||
|
||||
@ApiParam("线边库位")
|
||||
private String lineLocation;
|
||||
|
||||
@ApiParam("DOCK")
|
||||
private String dock;
|
||||
|
||||
@ApiParam("开始车号")
|
||||
private String beginNumber;
|
||||
|
||||
@ApiParam("结束车号")
|
||||
private String endNumber;
|
||||
|
||||
@ApiParam("单据生成时间")
|
||||
private String jisCreationtime;
|
||||
|
||||
@ApiParam("挑选完成时间")
|
||||
private String pickingOverTime;
|
||||
|
||||
@ApiParam("预计出发时间")
|
||||
private String goOutTime;
|
||||
|
||||
@ApiParam("预计到达时间")
|
||||
private String goToTime;
|
||||
|
||||
@ApiParam("第一个表格")
|
||||
private List<MesSortShippingPrintForCqLxModel> jisDetailList;
|
||||
|
||||
@ApiParam("序号")
|
||||
private Integer xh;
|
||||
|
||||
@ApiParam("物料编码")
|
||||
private String materielCode;
|
||||
|
||||
@ApiParam("车型颜色")
|
||||
private String modelColor;
|
||||
|
||||
@ApiParam("用量")
|
||||
private Double useQty;
|
||||
|
||||
@ApiParam("流水号")
|
||||
private String serialNumber;
|
||||
|
||||
@ApiParam("VIN码")
|
||||
private String vin;
|
||||
|
||||
@ApiParam("厂家代码")
|
||||
private String factoryCode;
|
||||
|
||||
@ApiParam("第二个表格")
|
||||
private List<MesSortShippingPrintForCqLxModel> amountList;
|
||||
|
||||
@ApiParam("零件号")
|
||||
private String partNo;
|
||||
|
||||
@ApiParam("数量")
|
||||
private Double amountQty;
|
||||
|
||||
@ApiParam("单元格")
|
||||
private String appendRows;
|
||||
|
||||
@ApiParam("物料名称")
|
||||
private String materielNames;
|
||||
|
||||
public void addJisDetail(MesSortShippingPrintForCqLxModel jisDetail) {
|
||||
if (CollectionUtils.isEmpty(jisDetailList)) jisDetailList = new ArrayList<>();
|
||||
jisDetailList.add(jisDetail);
|
||||
}
|
||||
|
||||
public void addAmount(MesSortShippingPrintForCqLxModel amount) {
|
||||
if (CollectionUtils.isEmpty(amountList)) amountList = new ArrayList<>();
|
||||
amountList.add(amount);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue