From 11b3ac7e9f6bc9144ddd7a5261cf69796f38d7b3 Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期六, 07 九月 2024 13:51:31 +0800 Subject: [PATCH] # --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java | 601 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 595 insertions(+), 6 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java index 8e65e8a..295462d 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java @@ -1,23 +1,24 @@ package com.zy.asrs.wms.asrs.manage; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.zy.asrs.framework.exception.CoolException; -import com.zy.asrs.wms.asrs.entity.dto.OutDetlDto; -import com.zy.asrs.wms.asrs.entity.dto.OutLocDto; +import com.zy.asrs.wms.asrs.entity.dto.*; import com.zy.asrs.wms.asrs.entity.enums.LocStsType; -import com.zy.asrs.wms.asrs.entity.param.OutParam; +import com.zy.asrs.wms.asrs.entity.enums.OrderSettleType; +import com.zy.asrs.wms.asrs.entity.param.*; import com.zy.asrs.wms.asrs.entity.*; import com.zy.asrs.wms.asrs.service.*; +import com.zy.asrs.wms.utils.OrderUtils; import com.zy.asrs.wms.utils.OutUtils; +import com.zy.asrs.wms.utils.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Date; -import java.util.HashMap; -import java.util.List; +import java.util.*; /** * 鍑哄簱绠$悊 @@ -47,6 +48,10 @@ private OrderDetlService orderDetlService; @Autowired private OutUtils outUtils; + @Autowired + private OperationPortService operationPortService; + @Autowired + private OrderUtils orderUtils; /** @@ -126,4 +131,588 @@ } } } + + public List<OrderOutBatchPreviewDto> orderOutBatchPreview(OrderOutBatchPreviewParam param) { + List<Long> orderDetlIds = param.getOrderDetlIds(); + if (orderDetlIds.isEmpty()) { + throw new CoolException("璁㈠崟鏄庣粏涓嶈兘涓虹┖"); + } + + List<OrderDetl> orderDetls = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>().in(OrderDetl::getId, orderDetlIds).orderByAsc(OrderDetl::getOrderNo, OrderDetl::getCreateTime)); + if (orderDetls.isEmpty()) { + throw new CoolException("璁㈠崟鏄庣粏涓嶅瓨鍦�"); + } + orderDetls = orderDetlService.parseDetl(orderDetls); + + HashMap<Long, List<LocDetl>> orderDetlLocMap = new HashMap<>(); + List<OutDetlDto> detlDtos = new ArrayList<>(); + + for (OrderDetl orderDetl : orderDetls) { + double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty()).orElse(0.0D); + if (issued <= 0.0D) { continue; } + List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMat$().getMatnr(), orderDetl.getBatch(), orderDetl.getUniqueField()); + orderDetlLocMap.put(orderDetl.getId(), locDetls); + for (LocDetl locDetl : locDetls) { + if (issued > 0) { + OutDetlDto outDetlDto = new OutDetlDto(); + outDetlDto.setDetlId(locDetl.getId()); + outDetlDto.setAnfme(issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); + outDetlDto.setStock(locDetl.getAnfme()); + outDetlDto.setOrderDetlId(orderDetl.getId()); + detlDtos.add(outDetlDto); + issued = issued - outDetlDto.getAnfme(); + }else { + break; + } + } + } + + HashMap<Long, List<OutDetlDto>> map = new HashMap<>(); + for (OutDetlDto detlDto : detlDtos) { + LocDetl locDetl = locDetlService.getById(detlDto.getDetlId()); + List<OutDetlDto> dtos = map.get(locDetl.getLocId()); + if (dtos == null) { + dtos = new ArrayList<>(); + dtos.add(detlDto); + }else { + dtos.add(detlDto); + } + map.put(locDetl.getLocId(), dtos); + } + + List<Long> orderDetlIdsTmp = param.getOrderDetlIds(); + List<OrderOutBatchPreviewDto> previewDtos = new ArrayList<>(); + for (Map.Entry<Long, List<OutDetlDto>> entry : map.entrySet()) { + Long locId = entry.getKey(); + Loc loc = locService.getById(locId); + + List<OutDetlDto> outDetlDtos = entry.getValue(); + for (OutDetlDto outDetlDto : outDetlDtos) { + orderDetlIdsTmp.remove(outDetlDto.getOrderDetlId()); + } + Boolean all = outUtils.isAllForOut(locId, outDetlDtos); + + for (OutDetlDto outDetlDto : outDetlDtos) { + OrderOutBatchPreviewDto previewDto = new OrderOutBatchPreviewDto(); + previewDto.setLocId(locId); + previewDto.setLocNo(loc.getLocNo()); + previewDto.setLocDetlId(outDetlDto.getDetlId()); + previewDto.setAll(all); + previewDto.setAnfme(outDetlDto.getAnfme()); + previewDto.setStock(outDetlDto.getStock()); + previewDto.setOrderDetlId(outDetlDto.getOrderDetlId()); + previewDtos.add(previewDto); + + + List<BatchPreviewOtherLocDto> otherLocs = new ArrayList<>(); + previewDto.setOtherLoc(otherLocs); + + List<LocDetl> locDetls = orderDetlLocMap.get(outDetlDto.getOrderDetlId()); + for (LocDetl locDetl : locDetls) { + BatchPreviewOtherLocDto otherLocDto = new BatchPreviewOtherLocDto(); + otherLocDto.setLocId(locDetl.getLocId()); + otherLocDto.setLocNo(locDetl.getLocNo()); + otherLocDto.setStock(locDetl.getAnfme()); + otherLocDto.setLocDetlId(locDetl.getId()); + + if (locDetl.getLocId().equals(locId)) { + otherLocs.add(0, otherLocDto); + continue; + } + + if (otherLocs.isEmpty()) { + otherLocs.add(otherLocDto); + } + + for (int i = 0; i < otherLocs.size(); i++) { + BatchPreviewOtherLocDto locDto = otherLocs.get(i); + if (locDto.getLocId().equals(locDetl.getLocId())) { + break; + } + otherLocs.add(otherLocDto); + } + } + } + + } + + for (Long id : orderDetlIdsTmp) { + OrderDetl orderDetl = orderDetlService.getById(id); + double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty()).orElse(0.0D); + + OrderOutBatchPreviewDto previewDto = new OrderOutBatchPreviewDto(); + previewDto.setLocId(null); + previewDto.setLocNo(null); + previewDto.setLocDetlId(null); + previewDto.setAll(null); + previewDto.setAnfme(issued); + previewDto.setStock(0D); + previewDto.setOrderDetlId(orderDetl.getId()); + + previewDtos.add(previewDto); + } + + return previewDtos; + } + + @Transactional + public void orderOutBatch(List<OrderOutBatchPreviewDto> param) { + if (param == null) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖"); + } + + if (param.isEmpty()) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖"); + } + + boolean noStock = true; + for (OrderOutBatchPreviewDto dto : param) { + if (dto.getStock() > 0) { + noStock = false; + break; + } + } + if (noStock) { + throw new CoolException("搴撳瓨涓嶈冻"); + } + + + HashMap<Long, List<OrderOutBatchPreviewDto>> detlMap = new HashMap<>(); + for (OrderOutBatchPreviewDto previewDto : param) { + if (previewDto.getLocId() == null) { + continue; + } + + if(detlMap.containsKey(previewDto.getLocDetlId())) { + List<OrderOutBatchPreviewDto> previewDtos = detlMap.get(previewDto.getLocDetlId()); + previewDtos.add(previewDto); + detlMap.put(previewDto.getLocDetlId(), previewDtos); + }else { + List<OrderOutBatchPreviewDto> previewDtos = new ArrayList<>(); + previewDtos.add(previewDto); + detlMap.put(previewDto.getLocDetlId(), previewDtos); + } + } + + List<OrderOutBatchPreviewDto> dtos = new ArrayList<>(); + for (Map.Entry<Long, List<OrderOutBatchPreviewDto>> entry : detlMap.entrySet()) { + Long locDetlId = entry.getKey(); + LocDetl locDetl = locDetlService.getById(locDetlId); + if (locDetl == null) { + continue; + } + + Double stock = locDetl.getAnfme(); + for (OrderOutBatchPreviewDto dto : entry.getValue()) { + stock = stock - dto.getAnfme(); + if (stock >= 0) { + dtos.add(dto); + } + } + } + + + HashMap<Long, List<OrderOutBatchPreviewDto>> map = new HashMap<>(); + + for (OrderOutBatchPreviewDto previewDto : dtos) { + if(map.containsKey(previewDto.getLocId())) { + List<OrderOutBatchPreviewDto> previewDtos = map.get(previewDto.getLocId()); + previewDtos.add(previewDto); + map.put(previewDto.getLocId(), previewDtos); + }else { + List<OrderOutBatchPreviewDto> previewDtos = new ArrayList<>(); + previewDtos.add(previewDto); + map.put(previewDto.getLocId(), previewDtos); + } + } + + for (Map.Entry<Long, List<OrderOutBatchPreviewDto>> entry : map.entrySet()) { + Long locId = entry.getKey(); + List<OrderOutBatchPreviewDto> previewDtos = entry.getValue(); + Boolean all = outUtils.isAllForPreview(locId, previewDtos); + + Loc loc = locService.getById(locId); + if (loc == null) { + continue; + } + + if (!loc.getLocStsId().equals(LocStsType.F.val())) { + continue; + } + + + long taskType = all ? 101L : 103L; + + Task task = new Task(); + task.setTaskNo(workService.generateTaskNo(taskType)); + task.setTaskSts(101L); + task.setTaskType(taskType); + task.setIoPri(workService.generateIoPri(taskType)); + task.setOriginLoc(loc.getLocNo()); + task.setTargetSite("A"); + task.setBarcode(loc.getBarcode()); + boolean res = taskService.save(task); + if (!res) { + throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�"); + } + + for (OrderOutBatchPreviewDto dto : previewDtos) { + LocDetl locDetl = locDetlService.getById(dto.getLocDetlId()); + if(locDetl == null) { + throw new CoolException("鏄庣粏涓嶅瓨鍦�"); + } + + OrderDetl orderDetl = orderDetlService.getById(dto.getOrderDetlId()); + if(orderDetl == null) { + throw new CoolException("璁㈠崟鏄庣粏涓嶅瓨鍦�"); + } + orderUtils.updateWorkQty(dto.getOrderDetlId(), dto.getAnfme()); + + TaskDetl taskDetl = new TaskDetl(); + taskDetl.sync(locDetl); + taskDetl.setTaskId(task.getId()); + taskDetl.setAnfme(dto.getAnfme()); + taskDetl.setStock(locDetl.getAnfme()); + taskDetl.setOrderId(orderDetl.getOrderId()); + taskDetl.setOrderNo(orderDetl.getOrderNo()); + taskDetl.setDetlId(orderDetl.getId()); + if (!taskDetlService.save(taskDetl)) { + throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�"); + } + + List<LocDetlField> locDetlFields = locDetlFieldService.list(new LambdaQueryWrapper<LocDetlField>().eq(LocDetlField::getDetlId, locDetl.getId())); + for (LocDetlField locDetlField : locDetlFields) { + TaskDetlField taskDetlField = new TaskDetlField(); + taskDetlField.sync(locDetlField); + taskDetlField.setDetlId(taskDetl.getId()); + boolean taskDetlFieldSave = taskDetlFieldService.save(taskDetlField); + if(!taskDetlFieldSave){ + throw new CoolException("鏄庣粏鎵╁睍鐢熸垚澶辫触"); + } + } + } + + //搴撲綅F => R + loc.setLocStsId(LocStsType.R.val()); + loc.setUpdateTime(new Date()); + boolean locUpdate = locService.updateById(loc); + if(!locUpdate){ + throw new CoolException("搴撲綅鐘舵�佹洿鏂板け璐�"); + } + + } + + } + + @Transactional + public List<MergePreviewDto> orderOutMergePreview(OrderOutMergePreviewParam param) { + if (param == null) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖"); + } + + List<Long> orderIds = param.getOrderIds(); + if (orderIds.isEmpty()) { + throw new CoolException("璁㈠崟涓嶈兘涓虹┖"); + } + + List<Order> orders = orderService.list(new LambdaQueryWrapper<Order>().in(Order::getId, orderIds)); + if (orders.isEmpty()) { + throw new CoolException("璁㈠崟涓嶅瓨鍦�"); + } + + List<OrderDetl> orderDetls = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>().in(OrderDetl::getOrderId, orderIds)); + if(orderDetls.isEmpty()){ + throw new CoolException("璁㈠崟鏄庣粏涓嶅瓨鍦�"); + } + orderDetls = orderDetlService.parseDetl(orderDetls); + + HashMap<String, Double> locDetlStockMap = new HashMap<>(); + for (OrderDetl orderDetl : orderDetls) { + String matUniqueKey = Utils.getMatUniqueKey(orderDetl.getMat$().getMatnr(), orderDetl.getBatch(), orderDetl.getUniqueField()); + double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty()).orElse(0.0D); + if (locDetlStockMap.containsKey(matUniqueKey)) { + Double anfme = locDetlStockMap.get(matUniqueKey); + anfme += issued; + locDetlStockMap.put(matUniqueKey, anfme); + }else { + locDetlStockMap.put(matUniqueKey, issued); + } + } + + List<MergePreviewDto> mergePreviewDtos = new ArrayList<>(); + for (Map.Entry<String, Double> entry : locDetlStockMap.entrySet()) { + String matUniqueKey = entry.getKey(); + Double anfme = entry.getValue(); + + MatUniqueObjDto matUniqueObj = Utils.getMatUniqueObj(matUniqueKey); + HashMap<String, Object> dynamicFields = new HashMap<>(); + for (FieldParam fieldParam : matUniqueObj.getParams()) { + dynamicFields.put(fieldParam.getName(), fieldParam.getValue()); + } + + MergePreviewDto dto = new MergePreviewDto(); + dto.setMatnr(matUniqueObj.getMatnr()); + dto.setBatch(matUniqueObj.getBatch()); + dto.setAnfme(anfme); + dto.setOrderIds(orderIds); + dto.setFieldParamsEncode(JSON.toJSONString(matUniqueObj.getParams())); + dto.setDynamicFields(dynamicFields); + mergePreviewDtos.add(dto); + } + + + return mergePreviewDtos; + } + + @Transactional + public List<MergePreviewResultDto> orderOutMergeLocPreview(List<MergePreviewDto> param) { + if (param == null) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖"); + } + + if (param.isEmpty()) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖"); + } + + for (MergePreviewDto dto : param) { + List<FieldParam> fieldParams = JSON.parseArray(dto.getFieldParamsEncode(), FieldParam.class); + dto.setFieldParams(fieldParams); + } + + FieldSortParam sortParam = new FieldSortParam("anfme","desc"); + List<FieldSortParam> sortParams = new ArrayList<>(); + sortParams.add(sortParam); + + List<MergePreviewResultDto> resultDtos = new ArrayList<>(); + for (MergePreviewDto dto : param) { + List<LocDetl> locDetls = locDetlService.queryStock(dto.getMatnr(), dto.getBatch(), dto.getFieldParams(), sortParams); + if(locDetls.isEmpty()){ + continue; + } + + List<MergePreviewResultLocDto> locDtos = new ArrayList<>(); + + MergePreviewResultDto resultDto = new MergePreviewResultDto(); + resultDto.sync(dto); + resultDto.setLocs(locDtos); + resultDto.setOrderIds(dto.getOrderIds()); + + Double anfme = dto.getAnfme(); + for (LocDetl locDetl : locDetls) { + MergePreviewResultLocDto locDto = new MergePreviewResultLocDto(); + locDto.setLocId(locDetl.getLocId()); + locDto.setLocNo(locDetl.getLocNo()); + locDto.setLocDetlId(locDetl.getId()); + + locDtos.add(locDto); + if (anfme - locDetl.getAnfme() < 0) { + locDto.setAnfme(anfme); + break; + } + locDto.setAnfme(locDetl.getAnfme()); + anfme -= locDetl.getAnfme(); + } + resultDto.setAnfme(anfme < 0 ? 0 : anfme); + + resultDtos.add(resultDto); + } + + return resultDtos; + } + + @Transactional + public void orderOutMerge(List<OrderOutMergeParam> params) { + if(params == null){ + throw new CoolException("鍙傛暟涓嶈兘涓虹┖"); + } + + if (params.isEmpty()) { + throw new CoolException("鍙傛暟涓嶈兘涓虹┖"); + } + + List<Long> orderIds = null; + + List<OrderOutMergeParam> filterParam = new ArrayList<>(); + HashMap<String, OrderOutMergeParam> paramMap = new HashMap<>(); + for (OrderOutMergeParam param : params) { + if (param.getLocId() == null) { + continue; + } + + filterParam.add(param); + + String matUniqueKey = Utils.getMatUniqueKey(param.getMatnr(), param.getBatch(), param.getFieldParams()); + paramMap.put(matUniqueKey, param); + + if (orderIds == null) { + orderIds = param.getOrderIds(); + } + } + + if (orderIds == null) { + throw new CoolException("璁㈠崟涓嶅瓨鍦�"); + } + + List<Order> orderList = orderService.listByIds(orderIds); + if (orderList.isEmpty()) { + throw new CoolException("璁㈠崟涓嶅瓨鍦�"); + } + + List<OrderDetl> orderDetls = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>().in(OrderDetl::getOrderId, orderIds)); + if (orderDetls.isEmpty()) { + throw new CoolException("璁㈠崟鏄庣粏涓嶅瓨鍦�"); + } + + HashMap<String, List<OrderDetl>> detlMap = new HashMap<>(); + for (OrderDetl orderDetl : orderDetls) { + String matUniqueKey = Utils.getMatUniqueKey(orderDetl.getMat$().getMatnr(), orderDetl.getBatch(), orderDetl.getUniqueField()); + if (detlMap.containsKey(matUniqueKey)) { + List<OrderDetl> detls = detlMap.get(matUniqueKey); + detls.add(orderDetl); + detlMap.put(matUniqueKey, detls); + }else { + List<OrderDetl> detls = new ArrayList<>(); + detls.add(orderDetl); + detlMap.put(matUniqueKey, detls); + } + } + + List<OrderOutMergeDto> orderOutMergeDtos = new ArrayList<>(); + for (OrderOutMergeParam param : filterParam) { + String matUniqueKey = Utils.getMatUniqueKey(param.getMatnr(), param.getBatch(), param.getFieldParams()); + if (!detlMap.containsKey(matUniqueKey)) { + continue; + } + + Double requireAnfme = param.getAnfme(); + + List<OrderDetl> orderDetlList = detlMap.get(matUniqueKey); + for (OrderDetl orderDetl : orderDetlList) { + double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty()).orElse(0.0D); + if (issued <= 0D) { + continue; + } + + OrderOutMergeDto orderOutMergeDto = new OrderOutMergeDto(); + orderOutMergeDto.sync(param); + orderOutMergeDto.setOrderDetlId(orderDetl.getId()); + + Double anfme = orderDetl.getAnfme(); + Double updateWorkQty = null; + + double diffAnfme = requireAnfme - anfme; + if (diffAnfme >= 0) { + orderOutMergeDto.setAnfme(anfme); + updateWorkQty = anfme; + requireAnfme -= anfme; + }else { + orderOutMergeDto.setAnfme(requireAnfme); + updateWorkQty = requireAnfme; + requireAnfme -= requireAnfme; + } + orderOutMergeDtos.add(orderOutMergeDto); + + orderUtils.updateWorkQty(orderDetl.getId(), updateWorkQty); + if (requireAnfme <= 0) { + break; + } + } + } + + HashMap<Long, List<OrderOutMergeDto>> map = new HashMap<>(); + for (OrderOutMergeDto orderOutMergeDto : orderOutMergeDtos) { + List<OrderOutMergeDto> list = null; + if (map.containsKey(orderOutMergeDto.getLocId())) { + list = map.get(orderOutMergeDto.getLocId()); + }else { + list = new ArrayList<>(); + } + list.add(orderOutMergeDto); + map.put(orderOutMergeDto.getLocId(), list); + } + + for (Map.Entry<Long, List<OrderOutMergeDto>> entry : map.entrySet()) { + Long locId = entry.getKey(); + List<OrderOutMergeDto> list = entry.getValue(); + Boolean all = outUtils.isAllForMerge(locId, list); + OrderOutMergeDto param = list.get(0); + Long operationPortId = param.getOperationPort(); + + Loc loc = locService.getById(locId); + if (loc == null) { + throw new CoolException("搴撲綅涓嶅瓨鍦�"); + } + + if (!loc.getLocStsId().equals(LocStsType.F.val())) { + throw new CoolException(loc.getLocNo() + "搴撲綅鐘舵�佸紓甯�"); + } + + OperationPort operationPort = operationPortService.getById(operationPortId); + if (operationPort == null) { + throw new CoolException("浣滀笟鍙d笉瀛樺湪"); + } + + long taskType = all ? 101L : 103L; + + Task task = new Task(); + task.setTaskNo(workService.generateTaskNo(taskType)); + task.setTaskSts(101L); + task.setTaskType(taskType); + task.setIoPri(workService.generateIoPri(taskType)); + task.setOriginLoc(loc.getLocNo()); + task.setTargetSite(operationPort.getFlag()); + task.setBarcode(loc.getBarcode()); + boolean res = taskService.save(task); + if (!res) { + throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�"); + } + + for (OrderOutMergeDto merge : list) { + LocDetl locDetl = locDetlService.getById(merge.getLocDetlId()); + if(locDetl == null) { + throw new CoolException("鏄庣粏涓嶅瓨鍦�"); + } + + OrderDetl orderDetl = orderDetlService.getById(merge.getOrderDetlId()); + if(orderDetl == null) { + throw new CoolException("璁㈠崟鏄庣粏涓嶅瓨鍦�"); + } + + TaskDetl taskDetl = new TaskDetl(); + taskDetl.sync(locDetl); + taskDetl.setTaskId(task.getId()); + taskDetl.setAnfme(merge.getAnfme()); + taskDetl.setStock(locDetl.getAnfme()); + taskDetl.setOrderId(orderDetl.getOrderId()); + taskDetl.setOrderNo(orderDetl.getOrderNo()); + taskDetl.setDetlId(orderDetl.getId()); + if (!taskDetlService.save(taskDetl)) { + throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�"); + } + + List<LocDetlField> locDetlFields = locDetlFieldService.list(new LambdaQueryWrapper<LocDetlField>().eq(LocDetlField::getDetlId, locDetl.getId())); + for (LocDetlField locDetlField : locDetlFields) { + TaskDetlField taskDetlField = new TaskDetlField(); + taskDetlField.sync(locDetlField); + taskDetlField.setDetlId(taskDetl.getId()); + boolean taskDetlFieldSave = taskDetlFieldService.save(taskDetlField); + if(!taskDetlFieldSave){ + throw new CoolException("鏄庣粏鎵╁睍鐢熸垚澶辫触"); + } + } + } + + //搴撲綅F => R + loc.setLocStsId(LocStsType.R.val()); + loc.setUpdateTime(new Date()); + boolean locUpdate = locService.updateById(loc); + if(!locUpdate){ + throw new CoolException("搴撲綅鐘舵�佹洿鏂板け璐�"); + } + + } + + + } + } -- Gitblit v1.9.1