| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | *生产设备自主维护点检表 报表 |
| | | * 2024-3-27 qsw |
| | | */ |
| | | @GetMapping("findInspectionProjectList") |
| | | public Result<?> findInspectionProjectList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "1000") Integer pageSize, |
| | | @RequestParam Map<String, Object> params) { |
| | | IPage<Map<String, Object>> dayInspectionProjectList = inspectionOrderService.findDayInspectionProjectList(pageNo, 1000, params); |
| | | List<Map<String, Object>> records = dayInspectionProjectList.getRecords(); |
| | | |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | |
| | | for (Map<String, Object> record : records) { |
| | | |
| | | if(maps.size()>0){ |
| | | Boolean flag = false; |
| | | for (Map<String, Object> map : maps) { |
| | | if(map.containsValue(record.get("name")) && map.containsValue(record.get("detectionStandard"))){ |
| | | map.put(record.get("createTime").toString(),record.get("insResult")); |
| | | flag = true; |
| | | } |
| | | } |
| | | if(flag == false){ |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("name",record.get("name")); |
| | | hashMap.put("equipmentNum",record.get("equipmentNum")); |
| | | hashMap.put("equipmentName",record.get("equipmentName")); |
| | | hashMap.put("detectionStandard",record.get("detectionStandard")); |
| | | hashMap.put(record.get("createTime").toString(),record.get("insResult")); |
| | | maps.add(hashMap); |
| | | } |
| | | }else{ |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("name",record.get("name")); |
| | | hashMap.put("equipmentNum",record.get("equipmentNum")); |
| | | hashMap.put("equipmentName",record.get("equipmentName")); |
| | | hashMap.put("detectionStandard",record.get("detectionStandard")); |
| | | hashMap.put(record.get("createTime").toString(),record.get("insResult")); |
| | | maps.add(hashMap); |
| | | } |
| | | // hashMap.put("name",record.get("name")); |
| | | // hashMap.put("equipmentNum",record.get("equipmentNum")); |
| | | // hashMap.put("equipmentName",record.get("equipmentName")); |
| | | // hashMap.put("detectionStandard",record.get("detectionStandard")); |
| | | // hashMap.put(record.get("createTime").toString(),record.get("insResult")); |
| | | } |
| | | // maps.add(hashMap); |
| | | return Result.ok(maps); |
| | | } |
| | | |
| | | } |
| | |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
| | | String exceptionInfo = ""; |
| | | String msgInfo = ""; |
| | | int exceptionNum = 0; |
| | | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
| | | MultipartFile file = entity.getValue(); |
| | |
| | | maintenanceStandardService.save(maintenanceStandard); |
| | | } |
| | | else { |
| | | msgInfo += equipment.getNum()+ ","; |
| | | continue; |
| | | } |
| | | } |
| | | else { |
| | | |
| | | continue; |
| | | } |
| | | } |
| | |
| | | maintenanceStandardService.save(maintenanceStandard); |
| | | } |
| | | else { |
| | | msgInfo += equipment.getNum()+ ","; |
| | | continue; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | if(msgInfo == ""){ |
| | | return Result.OK("导入成功"); |
| | | } else { |
| | | return Result.OK("统一编码是:"+msgInfo+"的保养标准已存在,请先手动失效再重新导入!"); |
| | | } |
| | | } else { |
| | | System.out.println("无法解析该文件"); |
| | | } |
| | | |
| | |
| | | */ |
| | | IPage<Map<String, Object>> findUserList(IPage<Map> pageData, @Param("params") Map<String,Object> params); |
| | | |
| | | IPage<Map<String, Object>> findDayInspectionProjectList(IPage<Map> pageData, @Param("params") Map<String,Object> params); |
| | | |
| | | |
| | | } |
| | |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | |
| | | <select id="findDayInspectionProjectList" parameterType="Map" resultType="Map"> |
| | | SELECT |
| | | t4.num as equipmentNum, |
| | | t4.name as equipmentName, |
| | | t3.name, |
| | | t1.detection_standard as detectionStandard, |
| | | t1.inspection_project_result as insResult, |
| | | SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.create_time, 120 ), 9, 10 ) as createTime |
| | | FROM |
| | | mom_eam_inspection_order_detail t1 |
| | | LEFT JOIN mom_eam_inspection_order t2 ON t1.inspection_order_id = t2.id |
| | | LEFT JOIN mom_eam_inspection_project t3 ON t1.inspection_project_id = t3.id |
| | | LEFT JOIN mom_eam_equipment t4 ON t2.equipment_id = t4.id |
| | | LEFT JOIN mom_eam_inspection_cycle t5 ON t2.inspection_cycle_id = t5.id |
| | | left join (SELECT * FROM v_sys_dict WHERE dict_code = 'inspection_project_result') t6 on t1.inspection_project_result = t6.item_value |
| | | WHERE |
| | | t5.name = '1日' |
| | | AND t4.num = 'HQ1901124' |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), GETDATE( ), 120 ), 1, 7 ) |
| | | AND t1.inspection_standard_detail_id IN ( |
| | | SELECT |
| | | tt2.id |
| | | FROM |
| | | mom_eam_daily_inspection_standard tt1 |
| | | LEFT JOIN mom_eam_daily_inspection_standard_detail tt2 ON tt1.id= tt2.daily_inspection_standard_id |
| | | LEFT JOIN mom_eam_equipment tt3 ON tt1.equipment_id = tt3.id |
| | | LEFT JOIN mom_eam_inspection_cycle tt4 ON tt2.inspection_cycle_id = tt4.id |
| | | WHERE |
| | | tt4.name = '1日' |
| | | AND tt3.num = 'HQ1901124' |
| | | AND tt1.version_status = '2' |
| | | AND tt1.del_flag = '0' |
| | | ) |
| | | </select> |
| | | </mapper> |
| | |
| | | t8.name AS equipmentName, |
| | | t8.model AS equipmentModel, |
| | | t8.num AS equipmentNum, |
| | | t9.depart_name AS useUnitName |
| | | t9.depart_name AS useUnitName, |
| | | t10.depart_name AS manageName |
| | | FROM |
| | | mom_eam_precision_inspection t1 |
| | | LEFT JOIN sys_depart t2 ON t1.maintenance_unit = t2.id |
| | |
| | | LEFT JOIN sys_user t6 ON t1.use_unit_director_user = t6.id |
| | | LEFT JOIN sys_user t7 ON t1.equipment_inspector_sign_user = t7.id |
| | | LEFT JOIN mom_eam_equipment t8 ON t1.equipment_id = t8.id |
| | | LEFT JOIN sys_depart t9 ON t1.use_unit = t9.id |
| | | LEFT JOIN sys_depart t9 ON t8.use_id = t9.id |
| | | left join sys_depart t10 on t8.manage_id = t9.id |
| | | where t1.del_flag = '0' and t1.maintenance_order_id = #{maintenanceOrderId} |
| | | </select> |
| | | </mapper> |
| | |
| | | */ |
| | | IPage<Map<String, Object>> findUserList(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | |
| | | IPage<Map<String, Object>> findDayInspectionProjectList(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | |
| | | } |
| | |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | return super.getBaseMapper().findUserList(pageData,params); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Map<String, Object>> findDayInspectionProjectList(Integer pageNo, Integer pageSize, Map<String, Object> params) { |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | return this.baseMapper.findDayInspectionProjectList(pageData,params); |
| | | } |
| | | } |
| | |
| | | package org.jeecg.modules.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.CommonUtils; |
| | | import org.jeecg.common.util.MinioUtil; |
| | | import org.jeecg.common.util.StrUtils; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.oss.entity.OssFile; |
| | | import org.jeecg.modules.oss.service.IOssFileService; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | return Result.ok(pageList); |
| | | } |
| | | |
| | | @GetMapping(value = "/listByType") |
| | | public Result<?> listByType(SysUpload upload, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
| | | QueryWrapper<SysUpload> queryWrapper = QueryGenerator.initQueryWrapper(upload, req.getParameterMap()); |
| | | queryWrapper.in("type","inspection","threeMaintenance","twoMaintenance"); |
| | | Page<SysUpload> page = new Page<SysUpload>(pageNo, pageSize); |
| | | IPage<SysUpload> pageList = uploadService.page(page, queryWrapper); |
| | | return Result.ok(pageList); |
| | | } |
| | | |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
| | | uploadService.removeById(id); |
| | |
| | | uploadService.downloadFile(response, uploadService.getById(id)); |
| | | } |
| | | |
| | | @PostMapping(value = "/uploadFile") |
| | | public Result<?> uploadFile(MultipartHttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | String type = request.getParameter("type"); |
| | | String description = request.getParameter("description"); |
| | | List<MultipartFile> multipartFileList = request.getFiles("files[]"); |
| | | List<SysUpload> sysUploads = uploadService.batchUploadFile(type, multipartFileList, description); |
| | | return Result.ok("上传成功!"); |
| | | } |
| | | |
| | | } |