组织人员机具管理
This commit is contained in:
parent
2a17bb2201
commit
89e293575d
|
|
@ -10,11 +10,11 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统模块
|
* 系统模块
|
||||||
*
|
*
|
||||||
* @author bonus
|
* @author bonus
|
||||||
*/
|
*/
|
||||||
@EnableCustomConfig
|
@EnableCustomConfig
|
||||||
@EnableCustomSwagger2
|
//@EnableCustomSwagger2
|
||||||
@EnableRyFeignClients
|
@EnableRyFeignClients
|
||||||
@SpringBootApplication(scanBasePackages = {"com.bonus.common.biz.*", "com.bonus.material.*"}, exclude = { DataSourceAutoConfiguration.class })
|
@SpringBootApplication(scanBasePackages = {"com.bonus.common.biz.*", "com.bonus.material.*"}, exclude = { DataSourceAutoConfiguration.class })
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||||
|
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -141,4 +142,43 @@ public class TypeRepairController extends BaseController
|
||||||
{
|
{
|
||||||
return toAjax(typeRepairService.deleteTypeRepairByUserIdAndTypeId(typeRepairs));
|
return toAjax(typeRepairService.deleteTypeRepairByUserIdAndTypeId(typeRepairs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增人员配置
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "新增人员配置")
|
||||||
|
@PreventRepeatSubmit
|
||||||
|
@RequiresPermissions("ma:manage:add")
|
||||||
|
@SysLog(title = "新增人员配置", businessType = OperaType.INSERT, module = "仓储管理->新增人员配置")
|
||||||
|
@PostMapping("/addTypeManage")
|
||||||
|
public AjaxResult addTypeManage(@RequestBody List<TypeRepair> typeRepairs)
|
||||||
|
{
|
||||||
|
return toAjax(typeRepairService.addTypeManage(typeRepairs));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询人员配置列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "查询人员配置列表")
|
||||||
|
@RequiresPermissions("ma:manage:list")
|
||||||
|
@GetMapping("/getTypeManageList")
|
||||||
|
public TableDataInfo getTypeManageList(MaTypeVo maTypeVo)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<MaTypeVo> list = typeRepairService.getTypeManageList(maTypeVo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除维修班机具配置
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "删除单个维修班机具配置")
|
||||||
|
@PreventRepeatSubmit
|
||||||
|
@RequiresPermissions("ma:manage:remove")
|
||||||
|
@SysLog(title = "维修班机具配置", businessType = OperaType.DELETE, module = "仓储管理->删除单个维修班机具配置")
|
||||||
|
@PostMapping("/unbindTypeManage")
|
||||||
|
public AjaxResult unbindTypeManage(@RequestBody List<TypeRepair> typeRepairs)
|
||||||
|
{
|
||||||
|
return toAjax(typeRepairService.deleteTypeManageByUserIdAndTypeId(typeRepairs));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,11 @@ public class TypeRepair extends BaseEntity {
|
||||||
/** 类型ID */
|
/** 类型ID */
|
||||||
private Long typeId;
|
private Long typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型名称
|
||||||
|
*/
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
/** 用户 */
|
/** 用户 */
|
||||||
@Excel(name = "用户")
|
@Excel(name = "用户")
|
||||||
@ApiModelProperty(value = "用户")
|
@ApiModelProperty(value = "用户")
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,19 @@ import java.util.List;
|
||||||
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.material.ma.domain.TypeRepair;
|
import com.bonus.material.ma.domain.TypeRepair;
|
||||||
|
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 维修班机具配置Mapper接口
|
* 维修班机具配置Mapper接口
|
||||||
*
|
*
|
||||||
* @author xsheng
|
* @author xsheng
|
||||||
* @date 2024-09-27
|
* @date 2024-09-27
|
||||||
*/
|
*/
|
||||||
public interface TypeRepairMapper {
|
public interface TypeRepairMapper {
|
||||||
/**
|
/**
|
||||||
* 查询维修班机具配置
|
* 查询维修班机具配置
|
||||||
*
|
*
|
||||||
* @param ID 维修班机具配置主键
|
* @param ID 维修班机具配置主键
|
||||||
* @return 维修班机具配置
|
* @return 维修班机具配置
|
||||||
*/
|
*/
|
||||||
|
|
@ -23,7 +24,7 @@ public interface TypeRepairMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询维修班机具配置列表
|
* 查询维修班机具配置列表
|
||||||
*
|
*
|
||||||
* @param typeRepair 维修班机具配置
|
* @param typeRepair 维修班机具配置
|
||||||
* @return 维修班机具配置集合
|
* @return 维修班机具配置集合
|
||||||
*/
|
*/
|
||||||
|
|
@ -36,7 +37,7 @@ public interface TypeRepairMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增维修班机具配置
|
* 新增维修班机具配置
|
||||||
*
|
*
|
||||||
* @param typeRepairs 维修班机具配置
|
* @param typeRepairs 维修班机具配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -44,7 +45,7 @@ public interface TypeRepairMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改维修班机具配置
|
* 修改维修班机具配置
|
||||||
*
|
*
|
||||||
* @param typeRepair 维修班机具配置
|
* @param typeRepair 维修班机具配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -52,7 +53,7 @@ public interface TypeRepairMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除维修班机具配置
|
* 删除维修班机具配置
|
||||||
*
|
*
|
||||||
* @param ID 维修班机具配置主键
|
* @param ID 维修班机具配置主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -60,7 +61,7 @@ public interface TypeRepairMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除维修班机具配置
|
* 批量删除维修班机具配置
|
||||||
*
|
*
|
||||||
* @param IDs 需要删除的数据主键集合
|
* @param IDs 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -79,4 +80,19 @@ public interface TypeRepairMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<TypeRepair> getRepairList(TypeRepair typeRepair);
|
List<TypeRepair> getRepairList(TypeRepair typeRepair);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*删除人员配置
|
||||||
|
*/
|
||||||
|
int deleteTypeManageByUserIdAndTypeId(List<TypeRepair> typeRepairs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增人员配置
|
||||||
|
*/
|
||||||
|
int insertTypeManage(List<TypeRepair> typeRepairs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询人员配置列表
|
||||||
|
*/
|
||||||
|
List<MaTypeVo> getTypeManageList(MaTypeVo maTypeVo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,18 @@ import java.util.List;
|
||||||
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.material.ma.domain.TypeRepair;
|
import com.bonus.material.ma.domain.TypeRepair;
|
||||||
|
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 维修班机具配置Service接口
|
* 维修班机具配置Service接口
|
||||||
*
|
*
|
||||||
* @author xsheng
|
* @author xsheng
|
||||||
* @date 2024-09-27
|
* @date 2024-09-27
|
||||||
*/
|
*/
|
||||||
public interface ITypeRepairService {
|
public interface ITypeRepairService {
|
||||||
/**
|
/**
|
||||||
* 查询维修班机具配置
|
* 查询维修班机具配置
|
||||||
*
|
*
|
||||||
* @param ID 维修班机具配置主键
|
* @param ID 维修班机具配置主键
|
||||||
* @return 维修班机具配置
|
* @return 维修班机具配置
|
||||||
*/
|
*/
|
||||||
|
|
@ -22,7 +23,7 @@ public interface ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询维修班机具配置列表
|
* 查询维修班机具配置列表
|
||||||
*
|
*
|
||||||
* @param typeRepair 维修班机具配置
|
* @param typeRepair 维修班机具配置
|
||||||
* @return 维修班机具配置集合
|
* @return 维修班机具配置集合
|
||||||
*/
|
*/
|
||||||
|
|
@ -35,7 +36,7 @@ public interface ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增维修班机具配置
|
* 新增维修班机具配置
|
||||||
*
|
*
|
||||||
* @param typeRepairs 维修班机具配置
|
* @param typeRepairs 维修班机具配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -43,7 +44,7 @@ public interface ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改维修班机具配置
|
* 修改维修班机具配置
|
||||||
*
|
*
|
||||||
* @param typeRepair 维修班机具配置
|
* @param typeRepair 维修班机具配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -51,7 +52,7 @@ public interface ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除维修班机具配置
|
* 批量删除维修班机具配置
|
||||||
*
|
*
|
||||||
* @param IDs 需要删除的维修班机具配置主键集合
|
* @param IDs 需要删除的维修班机具配置主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -59,7 +60,7 @@ public interface ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除维修班机具配置信息
|
* 删除维修班机具配置信息
|
||||||
*
|
*
|
||||||
* @param ID 维修班机具配置主键
|
* @param ID 维修班机具配置主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -76,4 +77,21 @@ public interface ITypeRepairService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult getRepairList(TypeRepair typeRepair);
|
AjaxResult getRepairList(TypeRepair typeRepair);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增人员配置
|
||||||
|
*/
|
||||||
|
int addTypeManage(List<TypeRepair> typeRepairs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询人员配置列表
|
||||||
|
*/
|
||||||
|
List<MaTypeVo> getTypeManageList(MaTypeVo maTypeVo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除维修班机具配置
|
||||||
|
* @param typeRepairs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteTypeManageByUserIdAndTypeId(List<TypeRepair> typeRepairs);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.ma.service.impl;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.common.core.utils.DateUtils;
|
import com.bonus.common.core.utils.DateUtils;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.bonus.material.ma.mapper.TypeRepairMapper;
|
import com.bonus.material.ma.mapper.TypeRepairMapper;
|
||||||
|
|
@ -12,7 +13,7 @@ import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 维修班机具配置Service业务层处理
|
* 维修班机具配置Service业务层处理
|
||||||
*
|
*
|
||||||
* @author xsheng
|
* @author xsheng
|
||||||
* @date 2024-09-27
|
* @date 2024-09-27
|
||||||
*/
|
*/
|
||||||
|
|
@ -24,7 +25,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询维修班机具配置
|
* 查询维修班机具配置
|
||||||
*
|
*
|
||||||
* @param ID 维修班机具配置主键
|
* @param ID 维修班机具配置主键
|
||||||
* @return 维修班机具配置
|
* @return 维修班机具配置
|
||||||
*/
|
*/
|
||||||
|
|
@ -36,7 +37,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询维修班机具配置列表
|
* 查询维修班机具配置列表
|
||||||
*
|
*
|
||||||
* @param typeRepair 维修班机具配置
|
* @param typeRepair 维修班机具配置
|
||||||
* @return 维修班机具配置
|
* @return 维修班机具配置
|
||||||
*/
|
*/
|
||||||
|
|
@ -58,7 +59,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增维修班机具配置
|
* 新增维修班机具配置
|
||||||
*
|
*
|
||||||
* @param typeRepairs 维修班机具配置
|
* @param typeRepairs 维修班机具配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -75,7 +76,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改维修班机具配置
|
* 修改维修班机具配置
|
||||||
*
|
*
|
||||||
* @param typeRepair 维修班机具配置
|
* @param typeRepair 维修班机具配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -88,7 +89,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除维修班机具配置
|
* 批量删除维修班机具配置
|
||||||
*
|
*
|
||||||
* @param IDs 需要删除的维修班机具配置主键
|
* @param IDs 需要删除的维修班机具配置主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -100,7 +101,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除维修班机具配置信息
|
* 删除维修班机具配置信息
|
||||||
*
|
*
|
||||||
* @param ID 维修班机具配置主键
|
* @param ID 维修班机具配置主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -129,4 +130,39 @@ public class TypeRepairServiceImpl implements ITypeRepairService {
|
||||||
public AjaxResult getRepairList(TypeRepair typeRepair) {
|
public AjaxResult getRepairList(TypeRepair typeRepair) {
|
||||||
return AjaxResult.success(typeRepairMapper.getRepairList(typeRepair));
|
return AjaxResult.success(typeRepairMapper.getRepairList(typeRepair));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增人员配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int addTypeManage(List<TypeRepair> typeRepairs) {
|
||||||
|
if (CollectionUtils.isEmpty(typeRepairs)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
typeRepairs.forEach(typeRepair -> typeRepair.setCreateTime(DateUtils.getNowDate()));
|
||||||
|
typeRepairMapper.deleteTypeManageByUserIdAndTypeId(typeRepairs);
|
||||||
|
return typeRepairMapper.insertTypeManage(typeRepairs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询人员配置列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MaTypeVo> getTypeManageList(MaTypeVo maTypeVo) {
|
||||||
|
|
||||||
|
return typeRepairMapper.getTypeManageList(maTypeVo);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除维修班机具配置
|
||||||
|
* @param typeRepairs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTypeManageByUserIdAndTypeId(List<TypeRepair> typeRepairs) {
|
||||||
|
return typeRepairMapper.deleteTypeManageByUserIdAndTypeId(typeRepairs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,17 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectTypeRepairList" parameterType="com.bonus.material.ma.domain.TypeRepair" resultMap="TypeRepairResult">
|
<select id="selectTypeRepairList" parameterType="com.bonus.material.ma.domain.TypeRepair" resultMap="TypeRepairResult">
|
||||||
<include refid="selectTypeRepairVo"/>
|
<include refid="selectTypeRepairVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="userId != null "> and user_id = #{userId}</if>
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTypeRepairByID" parameterType="Long" resultMap="TypeRepairResult">
|
<select id="selectTypeRepairByID" parameterType="Long" resultMap="TypeRepairResult">
|
||||||
<include refid="selectTypeRepairVo"/>
|
<include refid="selectTypeRepairVo"/>
|
||||||
where ID = #{ID}
|
where ID = #{ID}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertTypeRepair" parameterType="com.bonus.material.ma.domain.TypeRepair" useGeneratedKeys="true" keyProperty="ID">
|
<insert id="insertTypeRepair" parameterType="com.bonus.material.ma.domain.TypeRepair" useGeneratedKeys="true" keyProperty="ID">
|
||||||
insert into ma_type_repair (type_id,user_id,create_time,update_time,company_id)
|
insert into ma_type_repair (type_id,user_id,create_time,update_time,company_id)
|
||||||
values
|
values
|
||||||
|
|
@ -43,6 +43,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
<insert id="insertTypeManage">
|
||||||
|
insert into ma_type_manage (type_id,user_id,create_time,update_time,company_id)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(
|
||||||
|
#{item.typeId},
|
||||||
|
#{item.userId},
|
||||||
|
#{item.createTime},
|
||||||
|
#{item.updateTime},
|
||||||
|
#{item.companyId}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
<update id="updateTypeRepair" parameterType="com.bonus.material.ma.domain.TypeRepair">
|
<update id="updateTypeRepair" parameterType="com.bonus.material.ma.domain.TypeRepair">
|
||||||
update ma_type_repair
|
update ma_type_repair
|
||||||
|
|
@ -61,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteTypeRepairByIDs" parameterType="String">
|
<delete id="deleteTypeRepairByIDs" parameterType="String">
|
||||||
delete from ma_type_repair where ID in
|
delete from ma_type_repair where ID in
|
||||||
<foreach item="ID" collection="array" open="(" separator="," close=")">
|
<foreach item="ID" collection="array" open="(" separator="," close=")">
|
||||||
#{ID}
|
#{ID}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
@ -93,6 +106,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mtk.user_id,
|
mtk.user_id,
|
||||||
su.nick_name
|
su.nick_name
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getTypeManageList" resultType="com.bonus.material.ma.domain.vo.MaTypeVo">
|
||||||
|
SELECT DISTINCT
|
||||||
|
mt.type_id as typeId,
|
||||||
|
mt.type_name as typeName,
|
||||||
|
mtm.user_id as keeperUserId,
|
||||||
|
su.nick_name as keeperUserName
|
||||||
|
FROM
|
||||||
|
ma_type mt
|
||||||
|
LEFT JOIN wh_house_set mhs on mt.type_id = mhs.type_id
|
||||||
|
LEFT JOIN ma_type_manage mtm on mt.type_id = mtm.type_id
|
||||||
|
LEFT JOIN sys_user su on su.user_id = mtm.user_id
|
||||||
|
<where>
|
||||||
|
<if test="level == 1">
|
||||||
|
and mt.type_id = #{typeId}
|
||||||
|
</if>
|
||||||
|
and mt.type_id is not null
|
||||||
|
and mhs.house_id = #{houseId} and mhs.del_flag = 0
|
||||||
|
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
<delete id="deleteTypeRepairByUserIdAndTypeId">
|
<delete id="deleteTypeRepairByUserIdAndTypeId">
|
||||||
delete from ma_type_repair where
|
delete from ma_type_repair where
|
||||||
|
|
@ -106,4 +139,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{item.userId}
|
#{item.userId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
<delete id="deleteTypeManageByUserIdAndTypeId">
|
||||||
|
delete from ma_type_manage where
|
||||||
|
type_id in
|
||||||
|
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||||
|
#{item.typeId}
|
||||||
|
</foreach>
|
||||||
|
and
|
||||||
|
user_id in
|
||||||
|
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||||
|
#{item.userId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue