From 23939a5d8d742995816638bcb924a364c4d3dbe8 Mon Sep 17 00:00:00 2001
From: "DESKTOP-369JRHT\\12997" <9>
Date: Wed, 24 Jul 2024 15:16:20 +0800
Subject: [PATCH] no message
---
fuintAdmin_zt/src/api/duty/duty.js | 7 +
.../src/views/system/notify/page/mode.vue | 97 ++++++++----
.../src/views/system/notify/page/record.vue | 7 +-
.../deptPay/entity/DeptPriceInfo.java | 2 +-
.../deptPay/mapper/DeptPriceInfoMapper.java | 1 +
.../mapper/xml/DeptPriceInfoMapper.xml | 7 +
.../member/controller/LjDutyController.java | 7 +
.../member/service/ILJDutyService.java | 1 +
.../service/impl/LJDutyServiceImpl.java | 8 +
.../sys/entity/SysNotificationlog.java | 1 +
.../fuint/business/sys/entity/SysNotify.java | 2 +
.../sys/mapper/SysNotificationlogMapper.java | 6 +-
.../business/sys/mapper/SysNotifyMapper.java | 4 +-
.../mapper/xml/SysNotificationlogMapper.xml | 2 +-
.../sys/mapper/xml/SysNotifyMapper.xml | 8 +-
.../service/SysNotificationlogService.java | 4 +-
.../sys/service/SysNotifyService.java | 3 +-
.../impl/SysNotificationlogServiceImpl.java | 3 +-
.../service/impl/SysNotifyServiceImpl.java | 144 +++++++++++++++++-
.../repository/mapper/TAccountMapper.java | 6 +
.../com/fuint/repository/model/TAccount.java | 2 +
.../main/resources/mapper/TAccountMapper.xml | 36 +++++
22 files changed, 310 insertions(+), 48 deletions(-)
diff --git a/fuintAdmin_zt/src/api/duty/duty.js b/fuintAdmin_zt/src/api/duty/duty.js
index a3ddc78e6..259cd5aa4 100644
--- a/fuintAdmin_zt/src/api/duty/duty.js
+++ b/fuintAdmin_zt/src/api/duty/duty.js
@@ -16,6 +16,13 @@ export function dutyLists(query) {
params: query
})
}
+export function selectyDutyIdsApi(query) {
+ return request({
+ url: '/business/member/duty/selectyDutyIds',
+ method: 'get',
+ params: query
+ })
+}
// 根据id删除角色信息
export function dutyDelete(id) {
diff --git a/fuintAdmin_zt/src/views/system/notify/page/mode.vue b/fuintAdmin_zt/src/views/system/notify/page/mode.vue
index 5cf52e89e..83074152c 100644
--- a/fuintAdmin_zt/src/views/system/notify/page/mode.vue
+++ b/fuintAdmin_zt/src/views/system/notify/page/mode.vue
@@ -5,38 +5,34 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
@@ -56,9 +52,15 @@
-
-
-
+
+
+
+
+
+
+
+
+
@@ -110,7 +112,7 @@
-
+
@@ -157,7 +159,7 @@
import {deleteAppApi, getAppListApi, saveAppApi, updateAppApi} from "@/api/sys/app";
-import {dutyList} from "@/api/duty/duty";
+import {dutyList, selectyDutyIdsApi} from "@/api/duty/duty";
import {getSysNotifyList, saveSysNotifyApi, updateSysNotifyApi} from "@/api/sys/sysNotify";
export default {
@@ -166,6 +168,8 @@ export default {
data() {
return {
tableData: [],
+ dutyList1: [],
+
form: {
id: null,
notificationName: '',
@@ -186,6 +190,7 @@ export default {
recipientRoles: '', // 接收角色,字符长度最多255,不能为空
templateStatus: true //模板状态
},
+ dutyNames: {}, // 用于存储每行的 dutyNames
// 是否显示弹出层
open: false,
title:"",
@@ -226,6 +231,8 @@ export default {
// },
handleSubmit() {
+ this.open = false
+
// 在这里调用接口提交设备信息数据
console.log('提交设备信息数据:', this.form);
this.form.conditions = JSON.stringify(this.form.conditions)
@@ -236,7 +243,6 @@ export default {
this.getList()
this.open = false
}
-
})
}else {
saveSysNotifyApi(this.form).then(res=>{
@@ -277,6 +283,9 @@ export default {
this.form = e
this.form.conditions = JSON.parse(this.form.conditions)
+ if (!this.form.conditions) {
+ this.form.conditions = []
+ }
this.form.recipientRoles = JSON.parse(this.form.recipientRoles)
console.log('提交设备信息数据:', this.deviceInfo);
@@ -318,11 +327,35 @@ export default {
pageSize: 10000
}
dutyList(queryParams1).then(res => {
- this.dutyList = res.data.records;
+ this.dutyList1 = res.data.records;
// this.total1 = res.data.total;
// this.loading = false;
})
},
+ xunhuanbanduan() {
+ this.dutyList.forEach(item => {
+ this.form.recipientRoles.forEach(res=>{
+ if(item.id === this.form.dutyId) {
+ this.form.dutyName = item.dutyName
+ }
+ })
+
+ })
+ },
+
+
+ clickSwitch(data){
+ updateSysNotifyApi(data).then(res=>{
+ if(res.code === 200) {
+ this.$message({
+ type: 'info',
+ message: '修改成功'
+ });
+ this.getList()
+ this.open = false
+ }
+ })
+ },
clean() {
this.deviceInfo= {
id: null, // 自增id
@@ -330,7 +363,7 @@ export default {
notificationType: '',
templateContent: '',
recipientRoles: [],
- dutyList: [],
+ dutyList1: [],
templateStatus: true,
conditions: [
{ field: '', operator: '', value: '' }
diff --git a/fuintAdmin_zt/src/views/system/notify/page/record.vue b/fuintAdmin_zt/src/views/system/notify/page/record.vue
index 6ce676507..d46b1ec6a 100644
--- a/fuintAdmin_zt/src/views/system/notify/page/record.vue
+++ b/fuintAdmin_zt/src/views/system/notify/page/record.vue
@@ -65,8 +65,8 @@
-
-
+
+
@@ -181,6 +181,7 @@ import {deleteAppApi, getAppListApi, saveAppApi, updateAppApi} from "@/api/sys/a
import {listUser} from "@/api/system/Site/site";
import {dutyList} from "@/api/duty/duty";
import {getNotificationlogList, saveSysNotificationApi, updateSysNotificationApi} from "@/api/sys/sysNotificationlog";
+import {getSysNotifyList} from "@/api/sys/sysNotify";
export default {
name: "notify-record",
@@ -234,7 +235,7 @@ export default {
},
methods: {
getList(){
- getNotificationlogList(this.queryParams).then(res=>{
+ getSysNotifyList(this.queryParams).then(res=>{
this.tableData = res.data.records;
this.total = res.data.total
})
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/entity/DeptPriceInfo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/entity/DeptPriceInfo.java
index 3b7803044..2b523bbd0 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/entity/DeptPriceInfo.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/entity/DeptPriceInfo.java
@@ -38,7 +38,7 @@ public class DeptPriceInfo extends BaseEntity {
/**
* 状态,布尔类型,不能为空
*/
- private Boolean status;
+ private Integer status; //0未开始1进行中2已完成
private Integer deptId;
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/mapper/DeptPriceInfoMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/mapper/DeptPriceInfoMapper.java
index c256170c9..9f2cca23b 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/mapper/DeptPriceInfoMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/mapper/DeptPriceInfoMapper.java
@@ -22,6 +22,7 @@ public interface DeptPriceInfoMapper {
* @return 实例对象
*/
DeptPriceInfo queryById(Integer id);
+ DeptPriceInfo queryByDeptId(Integer id);
/**
* 查询指定行数据
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/mapper/xml/DeptPriceInfoMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/mapper/xml/DeptPriceInfoMapper.xml
index bb438c74d..ed7592e4e 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/mapper/xml/DeptPriceInfoMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/deptPay/mapper/xml/DeptPriceInfoMapper.xml
@@ -67,6 +67,13 @@ create_time,create_by
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/controller/LjDutyController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/controller/LjDutyController.java
index abfbb7f2f..e02dc2a4e 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/controller/LjDutyController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/controller/LjDutyController.java
@@ -57,6 +57,13 @@ public class LjDutyController extends BaseController {
return getSuccessResult(dutyService.selectDutyPage(page,duty));
}
+
+ // 角色查询
+ @GetMapping("/selectyDutyIds")
+ public ResponseObject selectyDutyIds(String dutyId){
+ return getSuccessResult(dutyService.selectyDutyIds(dutyId));
+ }
+
@DeleteMapping("/{dutyId}")
public ResponseObject delete(@PathVariable Integer dutyId){
return getSuccessResult(dutyService.deleteDuty(dutyId));
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJDutyService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJDutyService.java
index 8eb222767..3b6ef1b91 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJDutyService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJDutyService.java
@@ -42,6 +42,7 @@ public interface ILJDutyService extends IService {
* @param id
*/
int deleteDuty(Integer id);
+ List selectyDutyIds(String id);
int updateDuty(TDuty duty);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJDutyServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJDutyServiceImpl.java
index 2d4fdd509..05cb6c216 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJDutyServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJDutyServiceImpl.java
@@ -15,6 +15,8 @@ import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
@Service
@@ -87,6 +89,12 @@ public class LJDutyServiceImpl extends ServiceImpl implemen
public int deleteDuty(Integer id) {
return baseMapper.deleteById(id);
}
+ @Override
+ public List selectyDutyIds(String id) {
+ String[] array = id.split("[\\[\\], ]");
+ List tDuties = baseMapper.selectBatchIds(new ArrayList<>(Arrays.asList(array)));
+ return tDuties;
+ }
@Override
public int updateDuty(TDuty duty) {
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysNotificationlog.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysNotificationlog.java
index f06ba1b0d..810b2e6db 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysNotificationlog.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysNotificationlog.java
@@ -21,6 +21,7 @@ public class SysNotificationlog extends BaseEntity {
* 通知ID,关联Notification表的主键
*/
private Integer notifyId;
+ private Long deptId;
/**
* 接收者,字符长度最多255,不能为空
*/
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysNotify.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysNotify.java
index 53cf2852e..40195d3d6 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysNotify.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysNotify.java
@@ -35,6 +35,8 @@ public class SysNotify extends BaseEntity {
private String recipientRoles;
@TableField(exist = false)
private String recipientRolesName;
+
+
private String conditions;
private String createName;
/**
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysNotificationlogMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysNotificationlogMapper.java
index a4783c3ec..46131cfdc 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysNotificationlogMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysNotificationlogMapper.java
@@ -1,8 +1,10 @@
package com.fuint.business.sys.mapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.sys.entity.SysNotificationlog;
+import com.fuint.business.sys.entity.SysNotify;
import com.fuint.business.sys.vo.SysNotificationlogVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
@@ -14,7 +16,7 @@ import java.util.List;
* @author wangh
* @since 2024-07-22 10:56:33
*/
-public interface SysNotificationlogMapper {
+public interface SysNotificationlogMapper extends BaseMapper {
/**
* 通过ID查询单条数据
@@ -47,7 +49,7 @@ public interface SysNotificationlogMapper {
* @param sysNotificationlog 实例对象
* @return 影响行数
*/
- int insert(SysNotificationlog sysNotificationlog);
+ int insert1(SysNotificationlog sysNotificationlog);
/**
* 批量新增数据(MyBatis原生foreach方法)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysNotifyMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysNotifyMapper.java
index 71aa16629..556f8dd70 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysNotifyMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysNotifyMapper.java
@@ -1,7 +1,9 @@
package com.fuint.business.sys.mapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fuint.business.setting.entity.HardwareStore;
import com.fuint.business.sys.entity.SysNotify;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
@@ -13,7 +15,7 @@ import java.util.List;
* @author wangh
* @since 2024-07-22 10:56:13
*/
-public interface SysNotifyMapper {
+public interface SysNotifyMapper extends BaseMapper {
/**
* 通过ID查询单条数据
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysNotificationlogMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysNotificationlogMapper.xml
index 672620705..da0b94078 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysNotificationlogMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysNotificationlogMapper.xml
@@ -74,7 +74,7 @@ id,notify_id,sent_to,sent_at,status,error_message
-
+
insert into sys_notificationlog(notify_id,sent_to,sent_at,status,error_message)
values (#{notifyId}#{sentTo}#{sentAt}#{status}#{errorMessage})
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysNotifyMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysNotifyMapper.xml
index 5f6f0bddd..30c60460c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysNotifyMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysNotifyMapper.xml
@@ -23,7 +23,8 @@ id,notification_name,notification_type,template_content,recipient_roles,template
+
+
+