",""));
+ entity.setInitResult( entity.getInitResult().replaceAll("",""));
+ }
R r=new R();
//加锁
Boolean lock = redisTemplate.opsForValue().setIfAbsent("SysUserLock" + entity.getCreateDept(), entity.getCreateDept(), 30, TimeUnit.SECONDS);
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/DangerSourceClient.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/DangerSourceClient.java
index 35e26dd..80d0831 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/DangerSourceClient.java
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/DangerSourceClient.java
@@ -31,7 +31,7 @@ public class DangerSourceClient implements IDangerSourceClient {
@Override
@GetMapping(DETAILS)
- public List details(@RequestParam String[] ids) {
+ public List details(@RequestParam("ids") String[] ids) {
List resp = service.listByIds(Arrays.asList(ids));
//未查到数据返回空集合
if (CollectionUtils.isEmpty(resp)) {
From 51b563a0eccabc0d5c482ec0588ba74a9d7ab277 Mon Sep 17 00:00:00 2001
From: liwen
Date: Mon, 5 Aug 2024 10:36:17 +0800
Subject: [PATCH 09/10] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E7=89=A9?=
=?UTF-8?q?=E8=B5=84=E5=BA=93=E5=AD=98=E5=8F=B0=E8=B4=A6=E7=9A=84=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../hzims/spare/service/impl/WtSpBasicServiceImpl.java | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java
index f97b662..9469cb3 100644
--- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java
+++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/WtSpBasicServiceImpl.java
@@ -1,6 +1,5 @@
package com.hnac.hzims.spare.service.impl;
-
import cn.afterturn.easypoi.excel.entity.ImportParams;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
@@ -33,7 +32,6 @@ import com.hnac.hzims.spare.utils.SheetWriteStyleHandler;
import com.hnac.hzims.spare.vo.SparePartVO;
import com.hnac.hzims.spare.vo.WtSpBasicVO;
import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient;
-import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
@@ -171,7 +169,6 @@ public class WtSpBasicServiceImpl extends ServiceImpl voList = new ArrayList<>();
IPage voPages = new Page<>();
if (Func.isNotEmpty(spBasicEntity.getName()) && "工具".equals(spBasicEntity.getName())) {
-// if(Func.isNotEmpty(spBasicEntity.getName())){
List list = managementService.list(Wrappers.query().lambda().
eq(WtSpManagementEntity::getName, spBasicEntity.getName()));
if (list.size() == 0) {
@@ -218,13 +215,6 @@ public class WtSpBasicServiceImpl extends ServiceImpl ticketVOS = ticketInfoAllClient.getTicketStatistic("2022-02");
-
-// R deptR = sysClient.getDept(basicEntity.getWaterPlantId());
-// if(Func.isNotEmpty(deptR.getData())){
-// basicVO.setWaterPlantName(deptR.getData().getDeptName());
-// }
voList.add(basicVO);
} else {
WtSpBasicVO basicVO = new WtSpBasicVO();
@@ -240,16 +230,11 @@ public class WtSpBasicServiceImpl extends ServiceImpl totalList = totalService.list(Wrappers.query().lambda().eq(WtSpTotalEntity::getSpBasicId, basicEntity.getId()));
if (totalList.size() > 0) {
-// basicVO.setStock(totalList.get(0).getStock());
basicVO.setStock(totalEntity.getStock());
} else {
basicVO.setStock(0L);
}
BeanUtils.copyProperties(basicEntity, basicVO);
-// R deptR = sysClient.getDept(basicEntity.getWaterPlantId());
-// if(Func.isNotEmpty(deptR.getData())){
-// basicVO.setWaterPlantName(deptR.getData().getDeptName());
-// }
voList.add(basicVO);
}
List totalEntities = totalMapper.selectByWarehouseId(warehouseId);
From 809aad8d3e2fbdc7a3ed56fdd9bd7a93c728dec6 Mon Sep 17 00:00:00 2001
From: liwen
Date: Mon, 5 Aug 2024 13:56:20 +0800
Subject: [PATCH 10/10] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=AE=89?=
=?UTF-8?q?=E5=85=A8=E5=B7=A5=E5=99=A8=E5=85=B7=E6=89=AB=E6=8F=8F=E5=AF=BC?=
=?UTF-8?q?=E5=87=BA=E7=9A=84=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=8A=A5=E9=94=99?=
=?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../safeproduct/controller/SafetyToolController.java | 11 ++++-------
.../hzims/safeproduct/service/ISafetyToolService.java | 7 +++++++
.../safeproduct/service/impl/SafetyToolServiceImpl.java | 15 +++++++++++++++
3 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolController.java
index f8750e9..1e6bb6e 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolController.java
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolController.java
@@ -1,5 +1,6 @@
package com.hnac.hzims.safeproduct.controller;
+import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
@@ -26,6 +27,7 @@ import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.api.ResultCode;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.SpringUtil;
import org.springframework.web.bind.annotation.*;
@@ -84,18 +86,13 @@ public class SafetyToolController extends BladeController {
return safetyToolService.doUpdate(safetyTool);
}
- /**
- * 详情
- */
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入safetyTool")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R detail(@RequestParam("id") Long id) {
- SafetyToolEntity detail = safetyToolService.getOne(Condition.getQueryWrapper(new SafetyToolEntity() {{
- setId(id);
- }}));
- return R.data(SafetyToolWrapper.build().entityVO(detail));
+ SafetyToolVO safetyToolVO = safetyToolService.detail(id);
+ return R.data(safetyToolVO);
}
/**
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ISafetyToolService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ISafetyToolService.java
index 7731e49..862232c 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ISafetyToolService.java
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ISafetyToolService.java
@@ -45,4 +45,11 @@ public interface ISafetyToolService extends IService {
* @return
*/
R remove(List idList);
+
+ /**
+ * 详情
+ * @param id 安全工器具id
+ * @return 安全工器具VO类
+ */
+ SafetyToolVO detail(Long id);
}
diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SafetyToolServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SafetyToolServiceImpl.java
index 6ad2f15..702c252 100644
--- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SafetyToolServiceImpl.java
+++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SafetyToolServiceImpl.java
@@ -38,6 +38,7 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.api.ResultCode;
import org.springblade.core.tool.utils.*;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.entity.User;
@@ -275,6 +276,20 @@ public class SafetyToolServiceImpl extends ServiceImpl