“linengliang”
2023-11-16 5437a89aca5c886290a4edb070211c0d3316abdd
故障报修
已添加1个文件
已修改3个文件
65 ■■■■ 文件已修改
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EquipmentReportRepairMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EquipmentReportRepairMapper.xml 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EquipmentReportRepairServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-start/src/main/resources/db/2023_11_16(lnl)/sys_dict_update.sql 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EquipmentReportRepairMapper.java
@@ -6,6 +6,7 @@
import org.jeecg.modules.eam.entity.ChangeCause;
import org.jeecg.modules.eam.entity.EquipmentReportRepair;
import java.util.List;
import java.util.Map;
/**
@@ -16,5 +17,5 @@
 */
public interface EquipmentReportRepairMapper extends BaseMapper<EquipmentReportRepair> {
    IPage<Map<String, Object>> getReportRepairList(IPage<Map> pageData, @Param("params") Map<String,Object> params);
    IPage<Map<String, Object>> getReportRepairList(IPage<Map> pageData, @Param("params") Map<String,Object> params,@Param("equipNums") List<String> equipNums);
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EquipmentReportRepairMapper.xml
@@ -5,6 +5,7 @@
        SELECT
            t1.id,
            t1.err_uda1 errUda1,
            t1.err_uda2 errUda2,
            t1.num num,
            t1.equipment_id equipmentId,
            t1.fault_reason faultReason,
@@ -49,18 +50,57 @@
        <if test="params.equipmentId != null and params.equipmentId != ''">
            and t1.equipment_id = #{params.equipmentId}
        </if>
        <if test="params.faultDescription != null and params.faultDescription != ''">
            and t1.fault_description like concat('%',#{params.faultDescription},'%')
        </if>
        <if test="params.faultStartTime != null and params.faultStartTime != ''">
            and t1.fault_time &gt;= #{params.faultStartTime}
        </if>
        <if test="params.faultEndTime != null and params.faultEndTime != ''">
            and t1.fault_time &lt;= #{params.faultEndTime}
        </if>
        <if test="params.isStop != null and params.isStop != ''">
            and t1.is_stop = #{params.isStop}
        </if>
        <if test="params.status != null and params.status != ''">
            and t1.status = #{params.status}
        </if>
        <if test="params.errUda2 != null and params.errUda2 != ''">
            and t1.err_uda2 like concat('%',#{params.errUda2},'%')
        </if>
        <if test="params.errUda1 != null and params.errUda1 != ''">
            and t1.err_uda1 = #{params.errUda1}
        </if>
        <if test="params.isStop != null and params.isStop != ''">
            and t1.is_stop  = #{params.isStop}
        </if>
        <if test="params.createBy!= null and params.createBy != ''">
            and t1.create_by like concat('%',#{params.createBy},'%')
        </if>
        <if test="params.equipmentNum != null and params.equipmentNum != ''">
            and t2.num like concat('%',#{params.equipmentNum},'%')
        </if>
        <if test="params.equipmentName != null and params.equipmentName != ''">
            and t2.name like concat('%',#{params.equipmentName},'%')
        </if>
        <if test="params.status != null and params.status != ''">
            and t1.status = #{params.status}
        <if test="params.model != null and params.model != ''">
            and t2.model like concat('%',#{params.model},'%')
        </if>
        <if test="params.specification != null and params.specification != ''">
            and t2.specification like concat('%',#{params.specification},'%')
        </if>
        <if test="params.useId != null and params.useId != ''">
            and t2.use_id  = #{params.useId}
        </if>
        <if test="params.teamId != null and params.teamId != ''">
            and t2.team_id = #{params.teamId}
        </if>
        <if test="equipNums.size!=0">
            and t2.num in
            <foreach collection="equipNums" open="(" separator="," close=")" item="num">
                #{num}
            </foreach>
        </if>
        ORDER BY t1.create_time desc
    </select>
</mapper>
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EquipmentReportRepairServiceImpl.java
@@ -22,10 +22,7 @@
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
 * @Description: equipment_report_repair
@@ -105,6 +102,10 @@
            SysUser sysUser = userMapper.selectById((String)params.get("userId"));
            params.put("teamId",sysUser.getTeamId());
        }
        return super.getBaseMapper().getReportRepairList(pageData, params) ;
        List<String> equipNums = new ArrayList<>();
        if(StringUtils.isNotBlank((String)params.get("nums"))){
            equipNums = Arrays.asList(((String) params.get("nums")).trim().split(","));
        }
        return super.getBaseMapper().getReportRepairList(pageData, params,equipNums) ;
    }
}
lxzn-module-system/lxzn-system-start/src/main/resources/db/2023_11_16(lnl)/sys_dict_update.sql
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
UPDATE [dbo].[sys_dict] SET [dict_name] = N'故障报修状态', [dict_code] = N'equipment_report_repair_status', [description] = '', [del_flag] = 0, [create_by] = N'admin', [create_time] = '2023-07-18 10:22:47.0000000', [update_by] = NULL, [update_time] = NULL, [type] = 0 WHERE CONVERT(NVARCHAR(MAX), [id]) = N'1681127343392382977';
UPDATE [dbo].[sys_dict_item] SET [dict_id] = N'1681127343392382977', [item_text] = N'报修', [item_value] = N'1', [description] = '', [sort_order] = 1, [status] = 1, [create_by] = N'admin', [create_time] = '2023-07-18 10:23:14.0000000', [update_by] = N'admin', [update_time] = '2023-11-16 11:21:33.8620000' WHERE CONVERT(NVARCHAR(MAX), [id]) = N'1681127454826651650';
UPDATE [dbo].[sys_dict_item] SET [dict_id] = N'1681127343392382977', [item_text] = N'ç»´ä¿®', [item_value] = N'2', [description] = '', [sort_order] = 2, [status] = 1, [create_by] = N'admin', [create_time] = '2023-07-18 10:23:27.0000000', [update_by] = N'admin', [update_time] = '2023-11-16 11:22:41.4540000' WHERE CONVERT(NVARCHAR(MAX), [id]) = N'1681127509327437825';
UPDATE [dbo].[sys_dict_item] SET [dict_id] = N'1681127343392382977', [item_text] = N'大修', [item_value] = N'3', [description] = '', [sort_order] = 3, [status] = 1, [create_by] = N'admin', [create_time] = '2023-07-18 10:23:36.0000000', [update_by] = N'admin', [update_time] = '2023-11-16 11:22:54.6430000' WHERE CONVERT(NVARCHAR(MAX), [id]) = N'1681127549194297346';
UPDATE [dbo].[sys_dict_item] SET [dict_id] = N'1681127343392382977', [item_text] = N'完成', [item_value] = N'4', [description] = '', [sort_order] = 4, [status] = 1, [create_by] = N'admin', [create_time] = '2023-07-18 10:23:48.0000000', [update_by] = N'admin', [update_time] = '2023-11-16 11:22:33.5730000' WHERE CONVERT(NVARCHAR(MAX), [id]) = N'1681127599911821314';
UPDATE [dbo].[sys_dict_item] SET [dict_id] = N'1681127343392382977', [item_text] = N'验收', [item_value] = N'5', [description] = '', [sort_order] = 5, [status] = 1, [create_by] = N'admin', [create_time] = '2023-10-24 18:56:56.0000000', [update_by] = N'admin', [update_time] = '2023-11-16 14:21:48.9800000' WHERE CONVERT(NVARCHAR(MAX), [id]) = N'1716770747655516161';