Browse Source

2023-12-6 处理生产专业代码不同补问题

develop
zhousq 1 year ago
parent
commit
32569a3894
  1. 6
      lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java
  2. 21
      lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java
  3. 25
      lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java
  4. 8
      lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java
  5. 24
      lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml

6
lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java

@ -8,7 +8,7 @@ import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.core.domain.TreeSelect;
import com.lzbi.common.core.domain.entity.SysDept;
import com.lzbi.special.domain.DcBaseWorkSpecialDao;
import com.lzbi.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.service.DcBaseWorkSpecialService;
import com.lzbi.system.service.impl.SysDeptServiceImpl;
import io.swagger.annotations.ApiModel;
@ -74,8 +74,8 @@ public class SelectOptionsControl extends BaseController {
@GetMapping("/special/list")
public AjaxResult getSepcialSelectList()
{
DcBaseWorkSpecialDao dcBaseWorkSpecialDao=new DcBaseWorkSpecialDao();
return AjaxResult.success( dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoDictList(dcBaseWorkSpecialDao));
DcBaseWorkSpecial dcBaseWorkSpecialDao=new DcBaseWorkSpecial();
return AjaxResult.success( dcBaseWorkSpecialService.selectDcBaseWorkSpecialDictList(dcBaseWorkSpecialDao));
}
//根据条件获取统计单元列表
@PostMapping("/assetInfo/list")

21
lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java

@ -41,6 +41,12 @@ public class BaseModuleEntity implements Serializable,Cloneable{
private Integer pageNum ;
@ApiModelProperty("分页大小")
private Integer pageSize ;
/** 部门id */
@ApiModelProperty(name = "部门id",notes = "")
private Long deptId ;
/** 用户id */
@ApiModelProperty(name = "用户id",notes = "")
private Long userId ;
public String getTenantId() {
return tenantId;
}
@ -120,4 +126,19 @@ public class BaseModuleEntity implements Serializable,Cloneable{
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
}

25
lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java

@ -3,7 +3,7 @@ package com.lzbi.special.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzbi.special.domain.DcBaseWorkSpecialDao;
import com.lzbi.special.domain.DcBaseWorkSpecial;
/**
@ -13,7 +13,7 @@ import com.lzbi.special.domain.DcBaseWorkSpecialDao;
* @date 2023-11-28
*/
public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao>
public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecial>
{
/**
* 查询生产专业管理
@ -21,32 +21,31 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao
* @param id 生产专业管理主键
* @return 生产专业管理
*/
public DcBaseWorkSpecialDao selectDcBaseWorkSpecialDaoById(Long id);
public DcBaseWorkSpecial selectDcBaseWorkSpecialById(Long id);
/**
* 查询生产专业管理列表
*
* @param dcBaseWorkSpecialDao 生产专业管理
* @param dcBaseWorkSpecial 生产专业管理
* @return 生产专业管理集合
*/
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao);
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoDictList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao);
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialList(DcBaseWorkSpecial dcBaseWorkSpecial);
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialDictList(DcBaseWorkSpecial dcBaseWorkSpecial);
/**
* 新增生产专业管理
*
* @param dcBaseWorkSpecialDao 生产专业管理
* @param dcBaseWorkSpecial 生产专业管理
* @return 结果
*/
public int insertDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao);
public int insertDcBaseWorkSpecial(DcBaseWorkSpecial dcBaseWorkSpecial);
/**
* 修改生产专业管理
*
* @param dcBaseWorkSpecialDao 生产专业管理
* @param dcBaseWorkSpecial 生产专业管理
* @return 结果
*/
public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao);
public int updateDcBaseWorkSpecial(DcBaseWorkSpecial dcBaseWorkSpecial);
/**
* 删除生产专业管理
@ -54,7 +53,7 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao
* @param id 生产专业管理主键
* @return 结果
*/
public int deleteDcBaseWorkSpecialDaoById(Long id);
public int deleteDcBaseWorkSpecialById(Long id);
/**
* 批量删除生产专业管理
@ -62,5 +61,5 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBaseWorkSpecialDaoByIds(Long[] ids);
public int deleteDcBaseWorkSpecialByIds(Long[] ids);
}

8
lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java

@ -38,13 +38,13 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 生产专业管理
*/
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecial dcBaseWorkSpecial)
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialList(DcBaseWorkSpecial dcBaseWorkSpecial)
{
return baseMapper.selectDcBaseWorkSpecialList(dcBaseWorkSpecial);
}
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoDictList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialDictList(DcBaseWorkSpecial dcBaseWorkSpecial)
{
return baseMapper.selectDcBaseWorkSpecialDaoDictList(dcBaseWorkSpecialDao);
return baseMapper.selectDcBaseWorkSpecialDictList(dcBaseWorkSpecial);
}
/**
* 新增生产专业管理
@ -66,7 +66,7 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 结果
*/
public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecial dcBaseWorkSpecial)
public int updateDcBaseWorkSpecial(DcBaseWorkSpecial dcBaseWorkSpecial)
{
dcBaseWorkSpecial.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBaseWorkSpecial(dcBaseWorkSpecial);

24
lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.special.mapper.DcBaseWorkSpecialMapper">
<resultMap type="com.lzbi.special.domain.DcBaseWorkSpecialDao" id="DcBaseWorkSpecialResult">
<resultMap type="com.lzbi.special.domain.DcBaseWorkSpecial" id="DcBaseWorkSpecialResult">
<result property="tenantId" column="TENANT_ID" />
<result property="REVISION" column="REVISION" />
<result property="createdBy" column="CREATED_BY" />
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, special_code, special_name from dc_base_work_special
</sql>
<select id="selectDcBaseWorkSpecialDaoList" parameterType="DcBaseWorkSpecialDao" resultMap="DcBaseWorkSpecialResult">
<select id="selectDcBaseWorkSpecialList" parameterType="DcBaseWorkSpecial" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/>
<where>
<if test="tenantId != null">and TENANT_ID = #{tenantId},</if>
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if>
</where>
</select>
<select id="selectDcBaseWorkSpecialDaoDictList" parameterType="DcBaseWorkSpecialDao" resultMap="DcBaseWorkSpecialResult">
<select id="selectDcBaseWorkSpecialDictList" parameterType="DcBaseWorkSpecial" resultMap="DcBaseWorkSpecialResult">
select special_code, special_name from dc_base_work_special
<where>
<if test="tenantId != null">and TENANT_ID = #{tenantId},</if>
@ -38,12 +38,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if>
</where>
</select>
<select id="selectDcBaseWorkSpecialDaoById" parameterType="Long" resultMap="DcBaseWorkSpecialResult">
<select id="selectDcBaseWorkSpecialDictList" parameterType="DcBaseWorkSpecial" resultMap="DcBaseWorkSpecialResult">
select special_code, special_name from dc_base_work_special
<where>
<if test="tenantId != null">and TENANT_ID = #{tenantId},</if>
<if test="specialCode != null and specialCode != ''"> and special_code = #{specialCode}</if>
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if>
</where>
</select>
<select id="selectDcBaseWorkSpecialById" parameterType="Long" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/>
where id = #{id}
</select>
<insert id="insertDcBaseWorkSpecialDao" parameterType="DcBaseWorkSpecialDao" useGeneratedKeys="true" keyProperty="id">
<insert id="insertDcBaseWorkSpecial" parameterType="DcBaseWorkSpecial" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_work_special
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID,</if>
@ -71,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateDcBaseWorkSpecialDao" parameterType="DcBaseWorkSpecialDao">
<update id="updateDcBaseWorkSpecial" parameterType="DcBaseWorkSpecial">
update dc_base_work_special
<trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID = #{tenantId},</if>
@ -88,11 +96,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<delete id="deleteDcBaseWorkSpecialDaoById" parameterType="Long">
<delete id="deleteDcBaseWorkSpecialById" parameterType="Long">
delete from dc_base_work_special where id = #{id}
</delete>
<delete id="deleteDcBaseWorkSpecialDaoByIds" parameterType="String">
<delete id="deleteDcBaseWorkSpecialByIds" parameterType="String">
delete from dc_base_work_special where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}

Loading…
Cancel
Save