From 51ce31e185397534f5b24f069ea1ce8971e279cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A9=AC=E4=B8=89=E7=82=AE?= <15856818120@163.com>
Date: Sat, 16 Aug 2025 19:09:46 +0800
Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BB=84=E7=AE=A1=E7=90=86=EF=BC=8C?=
=?UTF-8?q?=E7=8F=AD=E7=BB=84=E5=87=BA=E5=85=A5=E5=9C=BA=EF=BC=8C=E8=80=83?=
=?UTF-8?q?=E5=8B=A4=E6=9C=BA=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../bmw/controller/PmAttDeviceController.java | 17 +++++++----------
.../com/bonus/bmw/domain/po/PmAttDevice.java | 10 ++++++++++
.../com/bonus/bmw/domain/vo/PmAttDeviceVo.java | 2 +-
.../service/impl/PmAttDeviceServiceImpl.java | 4 ++--
.../resources/mapper/bmw/PmAttDeviceMapper.xml | 10 ++++------
5 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/PmAttDeviceController.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/PmAttDeviceController.java
index 194dd79..022456d 100644
--- a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/PmAttDeviceController.java
+++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/controller/PmAttDeviceController.java
@@ -13,10 +13,7 @@ import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
@@ -56,9 +53,9 @@ public class PmAttDeviceController extends BaseController {
* 新增考勤机
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:contract:list"))
- @GetMapping("/addPmAttDevice")
+ @PostMapping("/addPmAttDevice")
@SysLog(title = "考勤机", businessType = OperaType.QUERY, logType = 0, module = "考勤机->新增考勤机")
- public AjaxResult addPmAttDevice(PmAttDevice pmAttDevice) {
+ public AjaxResult addPmAttDevice( @RequestBody PmAttDevice pmAttDevice) {
try {
int res = pmAttDeviceService.addPmAttDevice(pmAttDevice);
if (res>0){
@@ -77,9 +74,9 @@ public class PmAttDeviceController extends BaseController {
* 解绑
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:contract:list"))
- @GetMapping("/updatePmAttDevice")
+ @PostMapping("/updatePmAttDevice")
@SysLog(title = "考勤机", businessType = OperaType.QUERY, logType = 0, module = "考勤机->解绑")
- public AjaxResult updatePmAttDevice(PmAttDevice pmAttDevice) {
+ public AjaxResult updatePmAttDevice(@RequestBody PmAttDevice pmAttDevice) {
try {
int res = pmAttDeviceService.updatePmAttDevice(pmAttDevice);
if (res>0){
@@ -98,9 +95,9 @@ public class PmAttDeviceController extends BaseController {
* 删除考勤机
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("sub:contract:list"))
- @GetMapping("/delPmAttDevice")
+ @PostMapping("/delPmAttDevice")
@SysLog(title = "考勤机", businessType = OperaType.QUERY, logType = 0, module = "考勤机->删除考勤机")
- public AjaxResult delPmAttDevice(PmAttDevice pmAttDevice) {
+ public AjaxResult delPmAttDevice(@RequestBody PmAttDevice pmAttDevice) {
try {
int res = pmAttDeviceService.delPmAttDevice(pmAttDevice);
if (res>0){
diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/po/PmAttDevice.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/po/PmAttDevice.java
index 1af8638..debf616 100644
--- a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/po/PmAttDevice.java
+++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/po/PmAttDevice.java
@@ -27,6 +27,11 @@ public class PmAttDevice {
*/
private Integer proId;
+ /**
+ *
+ */
+ private String proName;
+
/**
*创建人
*/
@@ -37,6 +42,11 @@ public class PmAttDevice {
*/
private String updateUser;
+ /**
+ * 是否上海项目 1 是 0 不是
+ */
+ private Integer isShanghai;
+
/**
* 创建时间
*/
diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/PmAttDeviceVo.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/PmAttDeviceVo.java
index bbecb28..2de0a46 100644
--- a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/PmAttDeviceVo.java
+++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/domain/vo/PmAttDeviceVo.java
@@ -39,7 +39,7 @@ public class PmAttDeviceVo {
/**
* 是否上海项目 1 是 0 不是
*/
- @Excel(name = "是否上海项目",sort = 4)
+ @Excel(name = "是否上海项目",sort = 4,readConverterExp = "0=上海外,1=上海内")
private Integer isShanghai;
/**
diff --git a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/PmAttDeviceServiceImpl.java b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/PmAttDeviceServiceImpl.java
index 9967ed6..7c3d6a8 100644
--- a/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/PmAttDeviceServiceImpl.java
+++ b/bonus-modules/bonus-bmw/src/main/java/com/bonus/bmw/service/impl/PmAttDeviceServiceImpl.java
@@ -76,9 +76,9 @@ public class PmAttDeviceServiceImpl implements PmAttDeviceService {
pmAttDeviceOld.setCreateUser(SecurityUtils.getUsername());
pmAttDeviceOld.setCreateTime(new Date());
pmAttDeviceMapper.addPmAttDeviceHis(pmAttDeviceOld);
+ //考勤机解绑
+ // remoteUrkUtilsService.delDevByProId(pmAttDevice.getDeviceCode(),pmAttDeviceOld.getProId(),null);
}
- //考勤机解绑
- remoteUrkUtilsService.delDevByProId(pmAttDevice.getDeviceCode(),pmAttDevice.getProId(),null);
return pmAttDeviceMapper.updatePmAttDevice(pmAttDevice);
}
diff --git a/bonus-modules/bonus-bmw/src/main/resources/mapper/bmw/PmAttDeviceMapper.xml b/bonus-modules/bonus-bmw/src/main/resources/mapper/bmw/PmAttDeviceMapper.xml
index 28b3400..d29d0eb 100644
--- a/bonus-modules/bonus-bmw/src/main/resources/mapper/bmw/PmAttDeviceMapper.xml
+++ b/bonus-modules/bonus-bmw/src/main/resources/mapper/bmw/PmAttDeviceMapper.xml
@@ -8,14 +8,14 @@
#{createTime}, #{updateTime},#{devModel},#{onLine})
- insert into pm_att_device (device_code, device_name, pro_id,create_user, update_user,
+ insert into pm_att_device_his (device_code, device_name, pro_id,create_user, update_user,
create_time, update_time)
values (#{deviceCode}, #{deviceName},#{proId}, #{createUser}, #{updateUser},
#{createTime}, #{updateTime})
update pm_att_device set pro_id = #{proId},update_time = #{updateTime},update_user = #{updateUser}
- where is_active = '0' and device_code = #{deviceCode}
+ where is_active = '1' and device_code = #{deviceCode}
update pm_att_device set is_active = '0' where device_code = #{deviceCode}
@@ -48,11 +48,9 @@