问题修改

This commit is contained in:
cwchen 2025-03-18 17:14:22 +08:00
parent 898ed313e6
commit d89c35ade1
4 changed files with 16 additions and 5 deletions

View File

@ -80,6 +80,13 @@ public interface StandardConfigManageMapper {
*/ */
int deleteConfigByConfigId(StandardConfigBean bean); int deleteConfigByConfigId(StandardConfigBean bean);
/**
* 根据配置id 删除配置详情
* @param bean
* @return
*/
int deleteConfigDetailByConfigId(StandardConfigBean bean);
/** /**
* 根据configId和typeId 查询是否存在数据 * 根据configId和typeId 查询是否存在数据
* @param bean * @param bean
@ -122,4 +129,5 @@ public interface StandardConfigManageMapper {
* @return * @return
*/ */
List<StandardConfigDetailsVo> getListsByConfigId(Long configId); List<StandardConfigDetailsVo> getListsByConfigId(Long configId);
} }

View File

@ -131,6 +131,7 @@ public class StandardConfigManageServiceImpl implements StandardConfigManageServ
bean.setUpdateTime(DateUtils.getNowDate()); bean.setUpdateTime(DateUtils.getNowDate());
bean.setUpdateBy(SecurityUtils.getUserId().toString()); bean.setUpdateBy(SecurityUtils.getUserId().toString());
int result = mapper.deleteConfigByConfigId(bean); int result = mapper.deleteConfigByConfigId(bean);
int result2 = mapper.deleteConfigDetailByConfigId(bean);
if (result > 0) { if (result > 0) {
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result); return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result);
} }

View File

@ -304,7 +304,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt1.type_name AS typeName, mt1.type_name AS typeName,
mt.type_name AS typeModelName, mt.type_name AS typeModelName,
mt.unit_name AS unit, mt.unit_name AS unit,
lod.out_num AS num, SUM(lod.out_num) AS num,
lod.ma_id AS maId, lod.ma_id AS maId,
mm.ma_code AS maCode, mm.ma_code AS maCode,
mt.rated_load AS ratedLoad, mt.rated_load AS ratedLoad,
@ -319,8 +319,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt ON lod.type_id = mt.type_id AND mt.del_flag = '0' LEFT JOIN ma_type mt ON lod.type_id = mt.type_id AND mt.del_flag = '0'
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id AND mt1.del_flag = '0' LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id AND mt1.del_flag = '0'
LEFT JOIN ma_machine mm ON lod.ma_id = mm.ma_id LEFT JOIN ma_machine mm ON lod.ma_id = mm.ma_id
LEFT JOIN lease_apply_details lad ON lod.type_id = lad.type_id LEFT JOIN lease_apply_details lad ON lod.type_id = lad.type_id AND lad.parent_id = #{id}
LEFT JOIN purchase_check_details pcd ON lod.type_id = pcd.type_id # LEFT JOIN purchase_check_details pcd ON lod.type_id = pcd.type_id
<if test="userId != null"> <if test="userId != null">
JOIN ma_type_keeper mtk ON mtk.type_id = lod.type_id AND mtk.user_id = #{userId} JOIN ma_type_keeper mtk ON mtk.type_id = lod.type_id AND mtk.user_id = #{userId}
</if> </if>

View File

@ -63,8 +63,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
set del_flag = 2, set del_flag = 2,
update_by = #{updateBy}, update_by = #{updateBy},
update_time = #{updateTime} update_time = #{updateTime}
where id = #{configId}; where id = #{configId}
</update>
<update id="deleteConfigDetailByConfigId">
update bm_standard_config_details update bm_standard_config_details
set del_flag = 2, set del_flag = 2,
update_by = #{updateBy}, update_by = #{updateBy},
@ -94,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{detailsId} where id = #{detailsId}
</update> </update>
<select id="selectStandardConfigTree" resultType="com.bonus.material.ma.domain.StandardConfigBean"> <select id="selectStandardConfigTree" resultType="com.bonus.material.ma.domain.StandardConfigBean">
SELECT SELECT
bsc1.id, bsc1.id,