处理人员选择框查询问题,保养管理-保养方案列表启用停用实现

This commit is contained in:
shih
2026-03-24 16:24:07 +08:00
parent cadd79f47d
commit 2731903d46
6 changed files with 103 additions and 3 deletions

View File

@@ -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<String,Object> 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("成功");
}
}

View File

@@ -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);
}

View File

@@ -0,0 +1,10 @@
package com.lideeyunji.core.framework.service;
/**
* 保养管理-保养方案
*/
public interface IByglByfaService {
int changeFaState(String id, String state);
}

View File

@@ -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;
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lideeyunji.core.framework.mapper.ByglByfaMapper">
<update id="changeFaState">
update by_management_fa set state = #{state} where id = #{id}
</update>
</mapper>

View File

@@ -77,7 +77,9 @@
FROM
system_users s_user
where s_user.is_deleted =0
and s_user.tenant_id =#{tenantId}
<if test="tenantId!=null and tenantId!=''">
and s_user.tenant_id =#{tenantId}
</if>
<if test="params.nickName!=null and params.nickName!=''">
and s_user.nickname like #{params.nickName}
</if>
@@ -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}
<if test="tenantId!=null and tenantId!=''">
and s_user.tenant_id =#{tenantId}
</if>
<if test="params.nickName!=null and params.nickName!=''">
and s_user.nickname like #{params.nickName}
</if>
@@ -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}
<if test="tenantId!=null and tenantId!=''">
and sd.tenant_id =#{tenantId}
</if>
<if test="deptIdList!=null and deptIdList.size()>0">
and sud.dept_id in
<foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")">