From 2731903d4699b65493c1ca8a550afc29160e2c0a Mon Sep 17 00:00:00 2001 From: shih <510524130@qq.com> Date: Tue, 24 Mar 2026 16:24:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=BA=BA=E5=91=98=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=A1=86=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E5=85=BB=E7=AE=A1=E7=90=86-=E4=BF=9D=E5=85=BB?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E5=88=97=E8=A1=A8=E5=90=AF=E7=94=A8=E5=81=9C?= =?UTF-8?q?=E7=94=A8=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/controller/ByglController.java | 39 +++++++++++++++++++ .../core/framework/mapper/ByglByfaMapper.java | 13 +++++++ .../framework/service/IByglByfaService.java | 10 +++++ .../service/impl/ByglByfaServiceImpl.java | 24 ++++++++++++ .../resources/mapper/bygl/ByglByfaMapper.xml | 8 ++++ .../mapper/framework/AdapterMapper.xml | 12 ++++-- 6 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/controller/ByglController.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByglByfaMapper.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/service/IByglByfaService.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/service/impl/ByglByfaServiceImpl.java create mode 100644 lidee-core/src/main/resources/mapper/bygl/ByglByfaMapper.xml diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/controller/ByglController.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/controller/ByglController.java new file mode 100644 index 0000000..daca7c1 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/controller/ByglController.java @@ -0,0 +1,39 @@ + +package com.lideeyunji.core.framework.controller; + +import com.lideeyunji.core.framework.service.IByglByfaService; +import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant; +import com.lideeyunji.tool.framework.constants.FrameErrorCodeConstants; +import com.lideeyunji.tool.framework.yunji.model.global.BaseWebResult; +import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.AllArgsConstructor; +import org.apache.commons.lang3.StringUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Map; + +@Tag(name = "保养管理-保养方案") +@RestController +@AllArgsConstructor +@RequestMapping(lideeYunJiBaseConstant.REQUEST_URL_START + "/bygl") +public class ByglController extends BaseController { + + private final IByglByfaService byglByfaService; + + @PostMapping("/changeFaState") + public BaseWebResult save(@RequestBody Map model) { + String state = lideeYunJiUtils.getMap2Str(model, "state"); + String id = lideeYunJiUtils.getMap2Str(model, "id"); + if(StringUtils.isBlank(id)){ + return BaseWebResult.error(FrameErrorCodeConstants.FRAME_OP_ERROR); + } + byglByfaService.changeFaState(id, state); + return BaseWebResult.success("成功"); + } + + +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByglByfaMapper.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByglByfaMapper.java new file mode 100644 index 0000000..6f19a2e --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByglByfaMapper.java @@ -0,0 +1,13 @@ + +package com.lideeyunji.core.framework.mapper; + +import com.baomidou.dynamic.datasource.annotation.Master; + +/** + *保养管理-保养方案 + */ +@Master +public interface ByglByfaMapper { + + int changeFaState(String id, String state); +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/service/IByglByfaService.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/service/IByglByfaService.java new file mode 100644 index 0000000..d96685d --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/service/IByglByfaService.java @@ -0,0 +1,10 @@ + +package com.lideeyunji.core.framework.service; + +/** + * 保养管理-保养方案 + */ +public interface IByglByfaService { + + int changeFaState(String id, String state); +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/service/impl/ByglByfaServiceImpl.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/service/impl/ByglByfaServiceImpl.java new file mode 100644 index 0000000..e1b84e4 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/service/impl/ByglByfaServiceImpl.java @@ -0,0 +1,24 @@ + +package com.lideeyunji.core.framework.service.impl; + + +import com.lideeyunji.core.framework.mapper.ByglByfaMapper; +import com.lideeyunji.core.framework.service.IByglByfaService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + *保养管理-保养方案 + */ +@Service +public class ByglByfaServiceImpl implements IByglByfaService { + + @Autowired + private ByglByfaMapper byglByfaMapper; + + @Override + public int changeFaState(String id, String state) { + int result = byglByfaMapper.changeFaState(id, state); + return result; + } +} diff --git a/lidee-core/src/main/resources/mapper/bygl/ByglByfaMapper.xml b/lidee-core/src/main/resources/mapper/bygl/ByglByfaMapper.xml new file mode 100644 index 0000000..3fb5dd8 --- /dev/null +++ b/lidee-core/src/main/resources/mapper/bygl/ByglByfaMapper.xml @@ -0,0 +1,8 @@ + + + + + + update by_management_fa set state = #{state} where id = #{id} + + diff --git a/lidee-core/src/main/resources/mapper/framework/AdapterMapper.xml b/lidee-core/src/main/resources/mapper/framework/AdapterMapper.xml index 538fb31..6d4c819 100644 --- a/lidee-core/src/main/resources/mapper/framework/AdapterMapper.xml +++ b/lidee-core/src/main/resources/mapper/framework/AdapterMapper.xml @@ -77,7 +77,9 @@ FROM system_users s_user where s_user.is_deleted =0 - and s_user.tenant_id =#{tenantId} + + and s_user.tenant_id =#{tenantId} + and s_user.nickname like #{params.nickName} @@ -105,7 +107,9 @@ system_users s_user INNER JOIN (select user_id from system_user_role where is_deleted = 0 AND role_id = #{roleId} group by user_id) sur ON s_user.id = sur.user_id where s_user.is_deleted =0 - and s_user.tenant_id =#{tenantId} + + and s_user.tenant_id =#{tenantId} + and s_user.nickname like #{params.nickName} @@ -155,7 +159,9 @@ system_user_dept sud INNER JOIN system_dept sd on sud.dept_id =sd.id where sud.is_deleted=0 and sd.is_deleted=0 - and sd.tenant_id =#{tenantId} + + and sd.tenant_id =#{tenantId} + and sud.dept_id in