Compare commits

..

No commits in common. "971be0601c29d0546acfe31f9eb6e174ca955493" and "fca2c75f9d980a89ae531c193b772091ba2fb3c5" have entirely different histories.

5 changed files with 3 additions and 49 deletions

View File

@ -57,8 +57,5 @@ public class MaWhole {
/** 创建人 */
@ApiModelProperty(value = "创建人")
private Integer createBy;
/** 是否是成套设备1 */
@ApiModelProperty(value = "是否是成套设备1")
private Integer isWholeSet;
}

View File

@ -54,7 +54,6 @@ public interface MaWholeSetMapper {
* @return
*/
List<Integer> selectTypeId(@Param("id") Integer id);
List<MaWhole> selectAllTypeId();
/**
* 先根据id去查询物质类型树
@ -80,8 +79,4 @@ public interface MaWholeSetMapper {
int selectByWholeTypeName(MaWholeSetDto wholeTypeName);
List<LeaseApplyDetails> selectListByWholeTypeName(MaWholeSetDto wholeTypeName);
void updateMaType(MaWhole maWhole);
void updateMaType1();
}

View File

@ -18,7 +18,6 @@ import java.util.List;
/**
* 整套抱杆操作实现层
*
* @Author ma_sh
* @create 2024/4/15 17:17
*/
@ -31,7 +30,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
/**
* 新增整套抱杆管理
*
* @param dto
* @return
*/
@ -59,10 +57,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
int res = 0;
try {
res = insertMaWholeSet(dto.getDeviceInfo());
// 将机具类型标记为成套设备无法领料
//先查出所有的typeId
List<MaWhole> typeIdList = mapper.selectAllTypeId();
updateMaType(typeIdList);
if (res == 0) {
log.error("insertMaWholeSet方法插入异常");
throw new RuntimeException("insertMaWholeSet方法插入异常");
@ -77,14 +71,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
}
}
private void updateMaType(List<MaWhole> deviceInfo) {
// 先全部置为null
mapper.updateMaType1();
for (MaWhole maWhole : deviceInfo) {
mapper.updateMaType(maWhole);
}
}
private int selectByWholeTypeName(MaWholeSetDto wholeTypeName) {
return mapper.selectByWholeTypeName(wholeTypeName);
}
@ -102,7 +88,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
/**
* 查询整套抱杆明细
*
* @param dto
* @return
*/
@ -113,7 +98,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
/**
* 根据id删除
*
* @param dto
* @return
*/
@ -126,10 +110,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
int res = 0;
try {
res = deleteMaWhole(dto);
// 将机具类型标记为成套设备无法领料
//先查出所有的typeId
List<MaWhole> typeIdList = mapper.selectAllTypeId();
updateMaType(typeIdList);
if (res == 0) {
throw new RuntimeException("删除失败");
}
@ -142,7 +122,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
/**
* 根据id删除整套配件信息
*
* @param
* @return
*/
@ -152,7 +131,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
/**
* 修改整套抱杆管理
*
* @param dto
* @return
*/
@ -172,10 +150,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
try {
deleteMaWhole(dto);
res = insertMaWholeSet(dto.getDeviceInfo());
// 将机具类型标记为成套设备无法领料
//先查出所有的typeId
List<MaWhole> typeIdList = mapper.selectAllTypeId();
updateMaType(typeIdList);
if (res == 0) {
log.error("insertMaWholeSet方法插入异常");
throw new RuntimeException("insertMaWholeSet方法插入异常");
@ -195,7 +169,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
/**
* 修改时查询整套抱杆明细
*
* @param id
* @return
*/
@ -232,7 +205,6 @@ public class MaWholeSetServiceImpl implements MaWholeSetService {
/**
* 根据parentId查询去重
*
* @param parentId
* @return
*/

View File

@ -45,15 +45,6 @@
values(#{item.typeId},#{item.parentId},#{item.totalNum},#{item.wholeTypeName},#{item.createBy},#{item.ascriptionType}, now(),1)
</foreach>
</insert>
<update id="updateMaType">
update ma_type
set is_whole_set = 1
where type_id = #{typeId}
</update>
<update id="updateMaType1">
update ma_type
set is_whole_set = null
</update>
<delete id="deleteById">
delete from ma_whole_set
where parent_id = #{id}
@ -189,12 +180,11 @@
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
LEFT JOIN ma_whole_set mws2 ON mws2.type_id = mt.type_id
AND mws2.whole_type_name = #{wholeTypeName}
AND mws2.company_id = #{companyId}
WHERE
mt.type_id IN ( SELECT mws.type_id FROM ma_whole_set mws WHERE mws.whole_type_name = #{wholeTypeName})
AND mt.`status` = '0'
AND mt.del_flag = '0'
</select>
<select id="selectAllTypeId" resultType="com.bonus.sgzb.material.domain.MaWhole">
select type_id from ma_whole_set
</select>
</mapper>

View File

@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
WHERE mm.ma_code is not null and mm.ma_status in (15)
GROUP BY mt.type_id) AS subquery0 ON subquery0.type_id = mt.type_id
WHERE mt.del_flag = '0' and mt.is_whole_set IS NULL
WHERE mt.del_flag = '0'
<if test="level!=null and level!=''">
<if test="level == 2">
AND mt.level IN ('1','2')