From faf593f6161f40279b81e3c2fd961d695821a1aa Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期一, 09 二月 2026 16:27:49 +0800
Subject: [PATCH] 修复
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java | 257 +++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 226 insertions(+), 31 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
index de53eb0..34bf4c5 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -583,6 +583,86 @@
}
/**
+ * 鍏ㄧ増鍑哄簱瀹岀粨锛氭墸闄ゅ簱浣嶆暟閲忥紝灏嗗簱浣嶇姸鎬佽涓虹┖
+ *
+ * @param id 浠诲姟ID
+ * @param loginUserId 鐧诲綍鐢ㄦ埛ID
+ * @return 浠诲姟瀵硅薄
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Task completeFullOutStock(Long id, Long loginUserId) {
+ // 鏌ヨ浠诲姟
+ Task task = taskService.getOne(new LambdaQueryWrapper<Task>()
+ .eq(Task::getId, id));
+
+ if (Objects.isNull(task)) {
+ throw new CoolException("浠诲姟涓嶅瓨鍦紒锛�");
+ }
+
+ // 妫�鏌ヤ换鍔$被鍨嬫槸鍚︿负鍏ㄧ増鍑哄簱
+ if (!task.getTaskType().equals(TaskType.TASK_TYPE_OUT.type)) {
+ throw new CoolException("褰撳墠浠诲姟涓嶆槸鍏ㄧ増鍑哄簱浠诲姟锛屾棤娉曟墽琛屾鎿嶄綔锛侊紒");
+ }
+
+ // 妫�鏌ヤ换鍔$姸鎬侊細蹇呴』鏄�199锛圵AVE_SEED锛夌姸鎬佹墠鑳芥墜鍔ㄥ畬缁�
+ if (!task.getTaskStatus().equals(TaskStsType.WAVE_SEED.id)) {
+ throw new CoolException("浠诲姟鐘舵�佷笉鏄瓑寰呯‘璁ょ姸鎬侊紙199锛夛紝鏃犳硶鎵ц姝ゆ搷浣滐紒锛佸綋鍓嶇姸鎬侊細" + task.getTaskStatus());
+ }
+
+ // 鏌ヨ搴撲綅
+ Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, task.getOrgLoc()));
+ if (Objects.isNull(loc)) {
+ throw new CoolException("搴撲綅涓嶅瓨鍦紒锛�");
+ }
+
+ // 鍒犻櫎搴撲綅鏄庣粏锛堟墸闄ゆ暟閲忥級
+ try {
+ subtractLocItem(loc);
+ } catch (Exception e) {
+ logger.error("鍒犻櫎搴撲綅鏄庣粏澶辫触", e);
+ throw new CoolException("鍒犻櫎搴撲綅鏄庣粏澶辫触锛�" + e.getMessage());
+ }
+
+ // 鍒犻櫎浣滀笟涓簱瀛樿褰曪紙LocItemWorking锛�
+ locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>()
+ .eq(LocItemWorking::getTaskId, task.getId()));
+
+ // 灏嗗簱浣嶇姸鎬佽涓虹┖锛圤鐘舵�侊級
+ if (!locService.update(new LambdaUpdateWrapper<Loc>()
+ .set(Loc::getBarcode, null)
+ .set(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
+ .set(Loc::getUpdateBy, loginUserId)
+ .set(Loc::getUpdateTime, new Date())
+ .eq(Loc::getCode, task.getOrgLoc()))) {
+ throw new CoolException("搴撲綅鐘舵�佷慨鏀瑰け璐ワ紒锛�");
+ }
+
+ // 鏇存柊鍑哄簱绔欑偣鐘舵�侊紙濡傛灉鏈夌洰鏍囩珯鐐癸級
+ if (StringUtils.isNotBlank(task.getTargSite())) {
+ BasStation station = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
+ .eq(BasStation::getStationName, task.getTargSite()));
+ if (Objects.nonNull(station) && station.getType().equals(StationTypeEnum.STATION_TYPE_NORMAL.type)) {
+ station.setUseStatus(LocStsType.LOC_STS_TYPE_F.type);
+ if (!basStationService.updateById(station)) {
+ throw new CoolException("鍑哄簱绔欑偣鐘舵�佷慨鏀瑰け璐ワ紒锛�");
+ }
+ }
+ }
+
+ // 鏇存柊浠诲姟鐘舵�佷负搴撳瓨鏇存柊瀹屾垚锛�200锛�
+ task.setTaskStatus(TaskStsType.UPDATED_OUT.id)
+ .setUpdateBy(loginUserId)
+ .setUpdateTime(new Date());
+
+ if (!this.updateById(task)) {
+ throw new CoolException("浠诲姟鐘舵�佹洿鏂板け璐ワ紒锛�");
+ }
+
+ return task;
+ }
+
+ /**
* 淇敼浠诲姟浼樺厛绾�
*
* @param task
@@ -880,11 +960,19 @@
// 濡傛灉鏈変换鍔″凡涓嬪彂鍒癛CS锛屽厛璋冪敤RCS鍙栨秷鎺ュ彛
boolean rcsCancelSuccess = false;
if (!rcsTaskCodes.isEmpty()) {
- try {
- log.info("========== 寮�濮嬪彇娑圧CS浠诲姟 ==========");
- log.info("闇�瑕佸彇娑堢殑RCS浠诲姟缂栧彿锛歿}", rcsTaskCodes);
- String rcsUrl = rcsApi.getHost() + ":" + rcsApi.getPort() + RcsConstant.cancelTask;
- log.info("RCS鍙栨秷浠诲姟璇锋眰鍦板潃锛歿}", rcsUrl);
+ // 妫�鏌� RCS API 閰嶇疆鏄惁鏈夋晥
+ if (rcsApi == null || StringUtils.isBlank(rcsApi.getHost()) || StringUtils.isBlank(rcsApi.getPort())) {
+ log.error("========== RCS浠诲姟鍙栨秷澶辫触 ==========");
+ log.error("RCS API 閰嶇疆鏃犳晥锛乭ost: {}, port: {}",
+ rcsApi != null ? rcsApi.getHost() : "null",
+ rcsApi != null ? rcsApi.getPort() : "null");
+ // 鍗充娇閰嶇疆鏃犳晥锛屼篃缁х画鎵ц浠诲姟鍒犻櫎鎿嶄綔
+ } else {
+ try {
+ log.info("========== 寮�濮嬪彇娑圧CS浠诲姟 ==========");
+ log.info("闇�瑕佸彇娑堢殑RCS浠诲姟缂栧彿锛歿}", rcsTaskCodes);
+ String rcsUrl = rcsApi.getHost() + ":" + rcsApi.getPort() + RcsConstant.cancelTask;
+ log.info("RCS鍙栨秷浠诲姟璇锋眰鍦板潃锛歿}", rcsUrl);
// 濡傛灉娌℃湁鎵规缂栧彿锛屼娇鐢ㄧ涓�涓换鍔$紪鍙蜂綔涓烘壒娆$紪鍙�
if (StringUtils.isBlank(batchNo) && !rcsTaskCodes.isEmpty()) {
@@ -930,12 +1018,13 @@
log.error("RCS鍙栨秷浠诲姟澶辫触锛歿}", result.getMsg());
throw new CoolException("RCS鍙栨秷浠诲姟澶辫触锛�" + result.getMsg());
}
- } catch (JsonProcessingException e) {
- log.error("RCS鍙栨秷浠诲姟鍝嶅簲瑙f瀽澶辫触锛歿}", e.getMessage(), e);
- throw new CoolException("RCS鍙栨秷浠诲姟鍝嶅簲瑙f瀽澶辫触锛�" + e.getMessage());
- } catch (Exception e) {
- log.error("RCS鍙栨秷浠诲姟寮傚父锛歿}", e.getMessage(), e);
- throw new CoolException("RCS鍙栨秷浠诲姟寮傚父锛�" + e.getMessage());
+ } catch (JsonProcessingException e) {
+ log.error("RCS鍙栨秷浠诲姟鍝嶅簲瑙f瀽澶辫触锛歿}", e.getMessage(), e);
+ throw new CoolException("RCS鍙栨秷浠诲姟鍝嶅簲瑙f瀽澶辫触锛�" + e.getMessage());
+ } catch (Exception e) {
+ log.error("RCS鍙栨秷浠诲姟寮傚父锛歿}", e.getMessage(), e);
+ throw new CoolException("RCS鍙栨秷浠诲姟寮傚父锛�" + e.getMessage());
+ }
}
}
@@ -1220,14 +1309,24 @@
if (Objects.equals(taskItem.getFieldsIndex(), working.getFieldsIndex())) {
Double minQty = taskItem.getAnfme();
if (!task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type)) {
+ // 璁$畻鍓╀綑鏁伴噺锛氫粠LocItemWorking涓噺鍘籘askItem鐨勬嫞鏂欐暟閲�
minQty = Math.round((working.getAnfme() - taskItem.getQty()) * 1000000) / 1000000.0;
}
if (minQty.compareTo(0.0) >= 0) {
+ // 鏇存柊TaskItem鐨勫墿浣欐暟閲�
taskItem.setAnfme(minQty);
if (!taskItemService.updateById(taskItem)) {
throw new CoolException("浠诲姟鏄庣粏淇敼澶辫触锛侊紒");
}
+ // 鏇存柊LocItemWorking鐨勫墿浣欐暟閲忥紙闈炵洏鐐瑰叆搴撴椂闇�瑕佹洿鏂帮級
+ if (!task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type)) {
+ working.setAnfme(minQty);
+ if (!locItemWorkingService.updateById(working)) {
+ throw new CoolException("浣滀笟搴撳瓨鏁伴噺鏇存柊澶辫触锛侊紒");
+ }
+ }
} else {
+ // 鍓╀綑鏁伴噺灏忎簬0锛屽垹闄や换鍔℃槑缁�
if (!taskItemService.removeById(taskItem)) {
log.error("浠诲姟鏄庣粏淇敼澶辫触锛侊紒");
}
@@ -1309,16 +1408,36 @@
if (Objects.isNull(loc)) {
throw new CoolException("搴撲綅涓嶅瓨鍦紒锛�");
}
- if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_R.type)) {
- throw new CoolException("搴撲綅鐘舵�佷笉澶勭悊浜嶳.鍑哄簱棰勭害锛侊紒");
- }
-
+
List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId()));
if (taskItems.isEmpty()) {
throw new CoolException("浠诲姟鏄庣粏涓嶅瓨鍦紒锛�");
}
List<LocItem> locItems = locItemService.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId()));
+
+ // 濡傛灉搴撲綅鐘舵�佷笉鏄疪锛屾鏌ユ槸鍚﹀凡缁忓鐞嗚繃
+ if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_R.type)) {
+ // 濡傛灉搴撲綅鏄庣粏涓虹┖锛岃鏄庡凡缁忓鐞嗚繃浜嗭紝鐩存帴鏇存柊浠诲姟鐘舵�佷负199
+ if (locItems.isEmpty()) {
+ logger.warn("浠诲姟{}鐨勫簱浣峽}鐘舵�佷负{}锛屼絾搴撲綅鏄庣粏涓虹┖锛屽彲鑳藉凡缁忓鐞嗚繃锛岀洿鎺ユ洿鏂颁换鍔$姸鎬佷负199",
+ task.getId(), loc.getCode(), loc.getUseStatus());
+ if (!this.update(new LambdaUpdateWrapper<Task>()
+ .eq(Task::getId, task.getId())
+ .set(Task::getUpdateBy, loginUserId)
+ .set(Task::getUpdateTime, new Date())
+ .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
+ throw new CoolException("浠诲姟鐘舵�佹洿鏂板け璐ワ紒锛�");
+ }
+ return; // 璺宠繃鍚庣画澶勭悊
+ } else {
+ // 搴撲綅鏄庣粏涓嶄负绌轰絾鐘舵�佷笉鏄疪锛岃褰曢敊璇絾涓嶆姏鍑哄紓甯革紝璁╁畾鏃朵换鍔$户缁鐞嗗叾浠栦换鍔�
+ logger.error("浠诲姟{}鐨勫簱浣峽}鐘舵�佷负{}锛屼笉鏄疪.鍑哄簱棰勭害鐘舵�侊紝浣嗗簱浣嶆槑缁嗕笉涓虹┖锛岃烦杩囧鐞嗐�備换鍔$紪鐮侊細{}锛屽簱浣嶇紪鐮侊細{}",
+ task.getId(), loc.getCode(), loc.getUseStatus(), task.getTaskCode(), loc.getCode());
+ return; // 璺宠繃澶勭悊锛岄伩鍏嶅紓甯镐腑鏂畾鏃朵换鍔�
+ }
+ }
+
// 濡傛灉搴撲綅鏄庣粏涓虹┖锛屽彲鑳芥槸宸茬粡琚鐞嗚繃浜嗭紝鍏佽缁х画鎵ц
if (!locItems.isEmpty()) {
List<LocItemWorking> workings = new ArrayList<>();
@@ -1338,8 +1457,14 @@
}
try {
- //鏇存柊搴撲綅鏄庣粏
- subtractLocItem(loc);
+ // 鏍规嵁浠诲姟绫诲瀷鏇存柊搴撲綅鏄庣粏
+ if (task.getTaskType().equals(TaskType.TASK_TYPE_OUT.type)) {
+ // 鍏ㄧ増鍑哄簱锛氫笉鍒犻櫎搴撲綅鏄庣粏锛岀瓑寰匬DA蹇�熸嫞璐х‘璁ゆ椂鍐嶅垹闄�
+ // subtractLocItem(loc); // 宸茬Щ闄わ紝鏀逛负鍦╟ompleteFullOutStock涓垹闄�
+ } else {
+ // 閮ㄥ垎鍑哄簱锛堝鎷f枡鍑哄簱锛夛細鏍规嵁TaskItem鏁伴噺鎵e噺搴撲綅鏄庣粏
+ subtractLocItemByTaskItems(loc, taskItems, loginUserId);
+ }
} catch (Exception e) {
logger.error("<UNK>", e);
throw new CoolException(e.getMessage());
@@ -1397,6 +1522,8 @@
throw new CoolException(e.getMessage());
}
}
+
+ // 鏍规嵁浠诲姟绫诲瀷鏇存柊搴撲綅鐘舵��
if (task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) {
/**淇敼涓哄簱浣嶇姸鎬佷负S.棰勭害鍏ュ簱锛屼繚鐣欏師鏈夊簱浣�*/
if (!locService.update(new LambdaUpdateWrapper<Loc>()
@@ -1407,6 +1534,9 @@
.eq(Loc::getId, loc.getId()))) {
throw new CoolException("搴撲綅鐘舵�佷慨鏀瑰け璐ワ紒锛�");
}
+ } else if (task.getTaskType().equals(TaskType.TASK_TYPE_OUT.type)) {
+ // 鍏ㄧ増鍑哄簱锛氫笉鏇存柊搴撲綅鐘舵�佷负O锛岀瓑寰匬DA蹇�熸嫞璐х‘璁ゆ椂鍐嶆洿鏂�
+ // 搴撲綅鐘舵�佷繚鎸佸師鏍凤紙R.鍑哄簱棰勭害鐘舵�侊級
} else {
/**淇敼涓哄簱浣嶇姸鎬佷负O.绌哄簱*/
if (!locService.update(new LambdaUpdateWrapper<Loc>()
@@ -1571,6 +1701,15 @@
@Transactional(rollbackFor = Exception.class)
public void pubTaskToWcs(List<Task> tasks) {
/**浠诲姟涓嬪彂鎺ュ彛*/
+ // 妫�鏌� RCS API 閰嶇疆鏄惁鏈夋晥
+ if (rcsApi == null || StringUtils.isBlank(rcsApi.getHost()) || StringUtils.isBlank(rcsApi.getPort())) {
+ log.error("========== RCS浠诲姟涓嬪彂澶辫触 ==========");
+ log.error("RCS API 閰嶇疆鏃犳晥锛乭ost: {}, port: {}",
+ rcsApi != null ? rcsApi.getHost() : "null",
+ rcsApi != null ? rcsApi.getPort() : "null");
+ return;
+ }
+
String pubTakUrl = rcsApi.getHost() + ":" + rcsApi.getPort() + RcsConstant.pubTask;
for (Task task : tasks) {
@@ -1665,7 +1804,10 @@
// 涓烘瘡涓笉鍚岀殑搴撲綅鍒涘缓涓�涓猅askItemParam
for (String locCode : locCodes) {
TaskItemParam outItemParam = new TaskItemParam();
- outItemParam.setTaskNo(task.getTaskCode());
+ String taskNo = locCodes.size() > 1
+ ? task.getTaskCode() + "_" + locCode
+ : task.getTaskCode();
+ outItemParam.setTaskNo(taskNo);
outItemParam.setPriority(1);
outItemParam.setOriLoc(locCode);
outItemParam.setDestSta(task.getTargSite());
@@ -1894,13 +2036,50 @@
/**
* @author Ryan
* @date 2025/5/20
- * @description: 鎵e噺搴撳瓨鏄庣粏
+ * @description: 鎵e噺搴撳瓨鏄庣粏锛堝叏鐗堝嚭搴擄細鍒犻櫎鎵�鏈夊簱浣嶆槑缁嗭級
* @version 1.0
*/
@Transactional(rollbackFor = Exception.class)
public void subtractLocItem(Loc loc) throws Exception {
// 鍒犻櫎搴撲綅鏄庣粏锛屽鏋滄病鏈夎褰曞垯蹇界暐锛堝彲鑳藉凡缁忚鍒犻櫎杩囦簡锛�
locItemService.remove(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId()));
+ }
+
+ /**
+ * 鏍规嵁浠诲姟鏄庣粏鎵e噺搴撲綅鏄庣粏鏁伴噺锛堥儴鍒嗗嚭搴擄級
+ *
+ * @param loc 搴撲綅
+ * @param taskItems 浠诲姟鏄庣粏鍒楄〃
+ * @param loginUserId 鐧诲綍鐢ㄦ埛ID
+ */
+ @Transactional(rollbackFor = Exception.class)
+ public void subtractLocItemByTaskItems(Loc loc, List<TaskItem> taskItems, Long loginUserId) {
+ for (TaskItem taskItem : taskItems) {
+ // 鏌ヨ瀵瑰簲鐨勫簱浣嶆槑缁�
+ LocItem locItem = locItemService.getOne(new LambdaQueryWrapper<LocItem>()
+ .eq(LocItem::getLocId, loc.getId())
+ .eq(LocItem::getMatnrId, taskItem.getMatnrId())
+ .eq(StringUtils.isNotBlank(taskItem.getBatch()), LocItem::getBatch, taskItem.getBatch())
+ .eq(StringUtils.isNotBlank(taskItem.getFieldsIndex()), LocItem::getFieldsIndex, taskItem.getFieldsIndex()));
+
+ if (Objects.nonNull(locItem)) {
+ // 璁$畻鎵e噺鍚庣殑鏁伴噺
+ Double newAnfme = Math.round((locItem.getAnfme() - taskItem.getQty()) * 1000000) / 1000000.0;
+
+ if (newAnfme.compareTo(0.0) <= 0) {
+ // 鏁伴噺灏忎簬绛変簬0锛屽垹闄ゅ簱浣嶆槑缁�
+ locItemService.removeById(locItem.getId());
+ } else {
+ // 鏇存柊搴撲綅鏄庣粏鏁伴噺
+ locItem.setAnfme(newAnfme)
+ .setUpdateBy(loginUserId)
+ .setUpdateTime(new Date());
+ if (!locItemService.updateById(locItem)) {
+ throw new CoolException("搴撲綅鏄庣粏鏁伴噺鎵e噺澶辫触锛侊紒");
+ }
+ }
+ }
+ }
}
/**
@@ -2028,13 +2207,28 @@
throw new CoolException("搴撲綅涓嶅瓨鍦紒锛�");
}
LocItem item = new LocItem();
- LocItem locItem = locItemService.getOne(new LambdaQueryWrapper<LocItem>()
+ // 鏋勫缓鏌ヨ鏉′欢锛氶渶瑕佸悓鏃跺尮閰嶇墿鏂橧D銆佸簱浣岻D銆佹壒娆″拰绁ㄥ彿
+ LambdaQueryWrapper<LocItem> locItemWrapper = new LambdaQueryWrapper<LocItem>()
.eq(LocItem::getMatnrId, taskItem.getMatnrId())
- .eq(LocItem::getLocId, loc.getId())
- .eq(StringUtils.isNotBlank(taskItem.getBatch()), LocItem::getBatch, taskItem.getBatch())
- .eq(StringUtils.isNotBlank(taskItem.getFieldsIndex()), LocItem::getFieldsIndex, taskItem.getFieldsIndex())
- );
+ .eq(LocItem::getLocId, loc.getId());
+
+ // 鎵规鍖归厤锛氬鏋渢askItem鏈夋壒娆★紝鍒欏繀椤诲尮閰嶏紱濡傛灉taskItem娌℃湁鎵规锛屽垯鏌ヨ鎵规涓簄ull鎴栫┖瀛楃涓茬殑璁板綍
+ if (StringUtils.isNotBlank(taskItem.getBatch())) {
+ locItemWrapper.eq(LocItem::getBatch, taskItem.getBatch());
+ } else {
+ locItemWrapper.and(wrapper -> wrapper.isNull(LocItem::getBatch).or().eq(LocItem::getBatch, ""));
+ }
+
+ // 绁ㄥ彿鍖归厤锛氬鏋渢askItem鏈夌エ鍙凤紝鍒欏繀椤诲尮閰嶏紱濡傛灉taskItem娌℃湁绁ㄥ彿锛屽垯鏌ヨ绁ㄥ彿涓簄ull鎴栫┖瀛楃涓茬殑璁板綍
+ if (StringUtils.isNotBlank(taskItem.getFieldsIndex())) {
+ locItemWrapper.eq(LocItem::getFieldsIndex, taskItem.getFieldsIndex());
+ } else {
+ locItemWrapper.and(wrapper -> wrapper.isNull(LocItem::getFieldsIndex).or().eq(LocItem::getFieldsIndex, ""));
+ }
+
+ LocItem locItem = locItemService.getOne(locItemWrapper);
if (Objects.isNull(locItem)) {
+ // 搴撲綅鏄庣粏涓嶅瓨鍦紝鍒涘缓鏂扮殑搴撲綅鏄庣粏
BeanUtils.copyProperties(taskItem, item);
item.setLocCode(loc.getCode())
.setId(null)
@@ -2046,13 +2240,14 @@
throw new CoolException("搴撲綅鏄庣粏鏇存柊澶辫触锛侊紒");
}
} else {
-// logger.error("褰撳墠绁ㄥ彿:" + locItem.getFieldsIndex() + " 宸插湪搴撳唴锛岃妫�鏌ュ悗鍐嶆搷浣滐紒锛�");
-// throw new CoolException("褰撳墠绁ㄥ彿宸插湪搴撳唴锛岃妫�鏌ュ悗鍐嶆搷浣滐紒锛�");
-// locItem.setAnfme(Math.round((locItem.getAnfme() + taskItem.getAnfme()) * 1000000) / 1000000.0)
-// .setUpdateTime(new Date());
-// if (!locItemService.saveOrUpdate(locItem)) {
-// throw new CoolException("搴撲綅鏄庣粏鏇存柊澶辫触锛侊紒");
-// }
+ // 搴撲綅鏄庣粏宸插瓨鍦紝绱姞鏁伴噺
+ Double newAnfme = Math.round((locItem.getAnfme() + taskItem.getAnfme()) * 1000000) / 1000000.0;
+ locItem.setAnfme(newAnfme)
+ .setUpdateBy(loginUserId)
+ .setUpdateTime(new Date());
+ if (!locItemService.updateById(locItem)) {
+ throw new CoolException("搴撲綅鏄庣粏鏁伴噺鏇存柊澶辫触锛侊紒");
+ }
}
});
--
Gitblit v1.9.1