07f7f628 康伟

kangwei: 年度经营方案配置,与数据填报

          联调:备品备件的入库记录、出库记录,物料的库存信息
         bug修改,
1 个父辈 f0644138
正在显示 18 个修改的文件 包含 261 行增加123 行删除
...@@ -30,6 +30,9 @@ public class TreeNodeVO { ...@@ -30,6 +30,9 @@ public class TreeNodeVO {
30 @ApiModelProperty(value = "负责人") 30 @ApiModelProperty(value = "负责人")
31 private String responsibler; 31 private String responsibler;
32 32
33 @ApiModelProperty(value = "用户标准版化")
34 private String userStandard;
35
33 @ApiModelProperty(value = "子集合") 36 @ApiModelProperty(value = "子集合")
34 private List<TreeNodeVO> children = new ArrayList<>(); 37 private List<TreeNodeVO> children = new ArrayList<>();
35 38
......
...@@ -7,28 +7,17 @@ import com.skua.core.util.push.MessageEntity; ...@@ -7,28 +7,17 @@ import com.skua.core.util.push.MessageEntity;
7 import com.skua.core.util.push.PushMessageFactory; 7 import com.skua.core.util.push.PushMessageFactory;
8 import com.skua.modules.alarmtmp.entity.AlarmRecordHistory; 8 import com.skua.modules.alarmtmp.entity.AlarmRecordHistory;
9 import com.skua.modules.alarmtmp.entity.AlarmRuleLevelConfigTemplate; 9 import com.skua.modules.alarmtmp.entity.AlarmRuleLevelConfigTemplate;
10 import com.skua.modules.alarmtmp.enums.AlarmRecordStatusEnum;
11 import com.skua.modules.alarmtmp.service.AlarmRecordHistoryService; 10 import com.skua.modules.alarmtmp.service.AlarmRecordHistoryService;
12 import com.skua.modules.alarmtmp.service.AlarmRuleConfigService; 11 import com.skua.modules.alarmtmp.service.AlarmRuleConfigService;
13 import com.skua.modules.flow.business.service.FlowBusinessService; 12 import com.skua.modules.flow.business.service.FlowBusinessService;
14 import com.skua.modules.flow.business.service.IFlowService; 13 import com.skua.modules.flow.business.service.IFlowService;
15 import com.skua.modules.flow.core.constant.ProcessConstant;
16 import com.skua.modules.flow.core.entity.BladeFlow;
17 import com.skua.modules.flow.core.utils.FlowUtil;
18 import com.skua.modules.flow.support.Kv;
19 import com.skua.modules.flow.utils.Func;
20 import com.skua.modules.system.entity.SysUser; 14 import com.skua.modules.system.entity.SysUser;
21 import com.skua.modules.system.service.ISysDictService; 15 import com.skua.modules.system.service.ISysDictService;
22 import com.skua.modules.system.service.ISysPermissionService; 16 import com.skua.modules.system.service.ISysPermissionService;
23 import com.skua.modules.system.service.ISysUserService; 17 import com.skua.modules.system.service.ISysUserService;
24 import lombok.extern.slf4j.Slf4j; 18 import lombok.extern.slf4j.Slf4j;
25 import org.apache.commons.lang3.StringUtils; 19 import org.apache.commons.lang3.StringUtils;
26 import org.flowable.engine.ProcessEngine;
27 import org.flowable.engine.ProcessEngines;
28 import org.flowable.engine.TaskService; 20 import org.flowable.engine.TaskService;
29 import org.flowable.identitylink.api.IdentityLink;
30 import org.flowable.identitylink.api.IdentityLinkType;
31 import org.flowable.task.service.impl.persistence.entity.TaskEntity;
32 import org.springframework.beans.factory.annotation.Autowired; 21 import org.springframework.beans.factory.annotation.Autowired;
33 import org.springframework.stereotype.Service; 22 import org.springframework.stereotype.Service;
34 23
......
...@@ -21,7 +21,6 @@ import com.skua.modules.ajh.vo.AjhPlanScheduleConfigXls; ...@@ -21,7 +21,6 @@ import com.skua.modules.ajh.vo.AjhPlanScheduleConfigXls;
21 import com.skua.tool.util.TreeBuilder; 21 import com.skua.tool.util.TreeBuilder;
22 import lombok.extern.slf4j.Slf4j; 22 import lombok.extern.slf4j.Slf4j;
23 23
24 import org.apache.commons.lang3.StringUtils;
25 import org.jeecgframework.poi.excel.ExcelImportUtil; 24 import org.jeecgframework.poi.excel.ExcelImportUtil;
26 import org.jeecgframework.poi.excel.def.NormalExcelConstants; 25 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
27 import org.jeecgframework.poi.excel.entity.ExportParams; 26 import org.jeecgframework.poi.excel.entity.ExportParams;
...@@ -69,9 +68,9 @@ public class AjhPlanScheduleConfigController { ...@@ -69,9 +68,9 @@ public class AjhPlanScheduleConfigController {
69 @ApiOperation(value="经营方案计划表-分页列表查询", notes="经营方案计划表-分页列表查询") 68 @ApiOperation(value="经营方案计划表-分页列表查询", notes="经营方案计划表-分页列表查询")
70 @GetMapping(value = "/list") 69 @GetMapping(value = "/list")
71 public Result<IPage<AjhPlanScheduleConfig>> queryPageList(AjhPlanScheduleConfig ajhPlanScheduleConfig, 70 public Result<IPage<AjhPlanScheduleConfig>> queryPageList(AjhPlanScheduleConfig ajhPlanScheduleConfig,
72 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 71 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
73 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, 72 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
74 HttpServletRequest req) { 73 HttpServletRequest req) {
75 Result<IPage<AjhPlanScheduleConfig>> result = new Result<IPage<AjhPlanScheduleConfig>>(); 74 Result<IPage<AjhPlanScheduleConfig>> result = new Result<IPage<AjhPlanScheduleConfig>>();
76 QueryWrapper<AjhPlanScheduleConfig> queryWrapper = QueryGenerator.initQueryWrapper(ajhPlanScheduleConfig, req.getParameterMap()); 75 QueryWrapper<AjhPlanScheduleConfig> queryWrapper = QueryGenerator.initQueryWrapper(ajhPlanScheduleConfig, req.getParameterMap());
77 Page<AjhPlanScheduleConfig> page = new Page<AjhPlanScheduleConfig>(pageNo, pageSize); 76 Page<AjhPlanScheduleConfig> page = new Page<AjhPlanScheduleConfig>(pageNo, pageSize);
...@@ -87,19 +86,22 @@ public class AjhPlanScheduleConfigController { ...@@ -87,19 +86,22 @@ public class AjhPlanScheduleConfigController {
87 @ApiOperation(value="经营方案计划表-列表查询(树结构)", notes="经营方案计划表-列表查询(树结构)") 86 @ApiOperation(value="经营方案计划表-列表查询(树结构)", notes="经营方案计划表-列表查询(树结构)")
88 @GetMapping(value = "/treeList") 87 @GetMapping(value = "/treeList")
89 public Result<List<TreeNodeVO>> queryTreeList(AjhPlanScheduleConfig ajhPlanScheduleConfig, 88 public Result<List<TreeNodeVO>> queryTreeList(AjhPlanScheduleConfig ajhPlanScheduleConfig,
90 HttpServletRequest req) { 89 HttpServletRequest req) {
91 Result<List<TreeNodeVO>> result = new Result<List<TreeNodeVO>>(); 90 Result<List<TreeNodeVO>> result = new Result<List<TreeNodeVO>>();
92 QueryWrapper<AjhPlanScheduleConfig> queryWrapper = QueryGenerator.initQueryWrapper(ajhPlanScheduleConfig, req.getParameterMap()); 91 QueryWrapper<AjhPlanScheduleConfig> queryWrapper = QueryGenerator.initQueryWrapper(ajhPlanScheduleConfig, req.getParameterMap());
93 if(StringUtils.isEmpty(ajhPlanScheduleConfig.getFactoryId())){ 92 /*if(StringUtils.isEmpty(ajhPlanScheduleConfig.getDepartId())){
94 queryWrapper.eq("factory_id",BaseContextHandler.getRealDepartId()); 93 queryWrapper.eq("depart_id", BaseContextHandler.getRealDepartId());
95 } 94 }*/
96 queryWrapper.orderByAsc("sort_num"); 95 queryWrapper.orderByAsc("sort_num");
97 List<AjhPlanScheduleConfig> configList = ajhPlanScheduleConfigService.list( queryWrapper); 96 List<AjhPlanScheduleConfig> configList = ajhPlanScheduleConfigService.list( queryWrapper);
98 List<TreeNodeVO> treeList = new ArrayList<TreeNodeVO>(); 97 List<TreeNodeVO> treeList = new ArrayList<TreeNodeVO>();
98 TreeNodeVO treeNodeVO = null;
99 if(configList != null && !configList.isEmpty()){ 99 if(configList != null && !configList.isEmpty()){
100 for(AjhPlanScheduleConfig config : configList){ 100 for(AjhPlanScheduleConfig config : configList){
101 //String id, String parentId, String label, String completeTime, String responsibler 101 //String id, String parentId, String label, String completeTime, String responsibler
102 treeList.add( new TreeNodeVO(config.getId(),config.getParentId(),config.getConfigName(),config.getCompleteTime(),config.getResponsibler())); 102 treeNodeVO = new TreeNodeVO(config.getId(),config.getParentId(),config.getConfigName(),config.getCompleteTime(),config.getResponsibler());
103 treeNodeVO.setUserStandard(config.getUserStandard());
104 treeList.add(treeNodeVO);
103 } 105 }
104 treeList = TreeBuilder.buildTree(treeList); 106 treeList = TreeBuilder.buildTree(treeList);
105 } 107 }
...@@ -226,7 +228,7 @@ public class AjhPlanScheduleConfigController { ...@@ -226,7 +228,7 @@ public class AjhPlanScheduleConfigController {
226 return result; 228 return result;
227 } 229 }
228 230
229 /** 231 /**
230 * <pre> 232 * <pre>
231 * 导出excel 233 * 导出excel
232 * </pre> 234 * </pre>
...@@ -237,31 +239,31 @@ public class AjhPlanScheduleConfigController { ...@@ -237,31 +239,31 @@ public class AjhPlanScheduleConfigController {
237 * @Description: TODO(这里描述这个方法的需求变更情况) 239 * @Description: TODO(这里描述这个方法的需求变更情况)
238 */ 240 */
239 241
240 @RequestMapping(value = "/exportXls") 242 @RequestMapping(value = "/exportXls")
241 public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { 243 public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
242 // Step.1 组装查询条件 244 // Step.1 组装查询条件
243 QueryWrapper<AjhPlanScheduleConfig> queryWrapper = null; 245 QueryWrapper<AjhPlanScheduleConfig> queryWrapper = null;
244 try { 246 try {
245 String paramsStr = request.getParameter("paramsStr"); 247 String paramsStr = request.getParameter("paramsStr");
246 if (ConvertUtils.isNotEmpty(paramsStr)) { 248 if (ConvertUtils.isNotEmpty(paramsStr)) {
247 String deString = URLDecoder.decode(paramsStr, "UTF-8"); 249 String deString = URLDecoder.decode(paramsStr, "UTF-8");
248 AjhPlanScheduleConfig ajhPlanScheduleConfig = JSON.parseObject(deString, AjhPlanScheduleConfig.class); 250 AjhPlanScheduleConfig ajhPlanScheduleConfig = JSON.parseObject(deString, AjhPlanScheduleConfig.class);
249 queryWrapper = QueryGenerator.initQueryWrapper(ajhPlanScheduleConfig, request.getParameterMap()); 251 queryWrapper = QueryGenerator.initQueryWrapper(ajhPlanScheduleConfig, request.getParameterMap());
250 } 252 }
251 } catch (UnsupportedEncodingException e) { 253 } catch (UnsupportedEncodingException e) {
252 e.printStackTrace(); 254 e.printStackTrace();
253 } 255 }
254 256
255 //Step.2 AutoPoi 导出Excel 257 //Step.2 AutoPoi 导出Excel
256 ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); 258 ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
257 List<AjhPlanScheduleConfig> pageList = ajhPlanScheduleConfigService.list(queryWrapper); 259 List<AjhPlanScheduleConfig> pageList = ajhPlanScheduleConfigService.list(queryWrapper);
258 //导出文件名称 260 //导出文件名称
259 mv.addObject(NormalExcelConstants.FILE_NAME, "经营方案计划表列表"); 261 mv.addObject(NormalExcelConstants.FILE_NAME, "经营方案计划表列表");
260 mv.addObject(NormalExcelConstants.CLASS, AjhPlanScheduleConfig.class); 262 mv.addObject(NormalExcelConstants.CLASS, AjhPlanScheduleConfig.class);
261 mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("经营方案计划表列表数据", "导出人:Jeecg", "导出信息")); 263 mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("经营方案计划表列表数据", "导出人:Jeecg", "导出信息"));
262 mv.addObject(NormalExcelConstants.DATA_LIST, pageList); 264 mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
263 return mv; 265 return mv;
264 } 266 }
265 267
266 /** 268 /**
267 * 导出配置模版 269 * 导出配置模版
...@@ -282,7 +284,7 @@ public class AjhPlanScheduleConfigController { ...@@ -282,7 +284,7 @@ public class AjhPlanScheduleConfigController {
282 mv.addObject(NormalExcelConstants.DATA_LIST, pageList); 284 mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
283 return mv; 285 return mv;
284 } 286 }
285 /** 287 /**
286 * <pre> 288 * <pre>
287 * 通过excel导入数据 289 * 通过excel导入数据
288 * </pre> 290 * </pre>
...@@ -292,34 +294,33 @@ public class AjhPlanScheduleConfigController { ...@@ -292,34 +294,33 @@ public class AjhPlanScheduleConfigController {
292 * @author 开发者姓名, 开发时间 294 * @author 开发者姓名, 开发时间
293 * @Description: TODO(这里描述这个方法的需求变更情况) 295 * @Description: TODO(这里描述这个方法的需求变更情况)
294 */ 296 */
295 @RequestMapping(value = "/importExcel", method = RequestMethod.POST) 297 @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
296 public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { 298 public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
297 MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; 299 MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
298 Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); 300 Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
299 String factoryId = request.getParameter("departId"); 301 String factoryId = request.getParameter("departId");
300 String year = request.getParameter("year"); 302 String year = request.getParameter("year");
301 for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { 303 for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
302 MultipartFile file = entity.getValue();// 获取上传文件对象 304 MultipartFile file = entity.getValue();// 获取上传文件对象
303 ImportParams params = new ImportParams(); 305 ImportParams params = new ImportParams();
304 params.setTitleRows(2); 306 params.setTitleRows(2);
305 params.setHeadRows(1); 307 params.setHeadRows(1);
306 params.setNeedSave(true); 308 params.setNeedSave(true);
307 try { 309 try {
308 List<AjhPlanScheduleConfigXls> listAjhPlanScheduleConfigs = ExcelImportUtil.importExcel(file.getInputStream(), AjhPlanScheduleConfigXls.class, params); 310 List<AjhPlanScheduleConfigXls> listAjhPlanScheduleConfigs = ExcelImportUtil.importExcel(file.getInputStream(), AjhPlanScheduleConfigXls.class, params);
309 ajhPlanScheduleConfigService.importExcel(listAjhPlanScheduleConfigs,factoryId,year); 311 ajhPlanScheduleConfigService.importExcel(listAjhPlanScheduleConfigs,factoryId,year);
310 return Result.ok("文件导入成功!数据行数:" + listAjhPlanScheduleConfigs.size()); 312 return Result.ok("文件导入成功!数据行数:" + listAjhPlanScheduleConfigs.size());
311 } catch (Exception e) { 313 } catch (Exception e) {
312 log.error(e.getMessage(),e); 314 log.error(e.getMessage(),e);
313 return Result.error("文件导入失败:"+e.getMessage()); 315 return Result.error("文件导入失败:"+e.getMessage());
314 } finally { 316 } finally {
315 try { 317 try {
316 file.getInputStream().close(); 318 file.getInputStream().close();
317 } catch (IOException e) { 319 } catch (IOException e) {
318 e.printStackTrace(); 320 e.printStackTrace();
319 } 321 }
320 } 322 }
321 } 323 }
322 return Result.ok("文件导入失败!"); 324 return Result.ok("文件导入失败!");
323 } 325 }
324
325 } 326 }
......
...@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
20 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 20 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
21 import com.skua.modules.ajh.vo.AjhPlanScheduleDataVO; 21 import com.skua.modules.ajh.vo.AjhPlanScheduleDataVO;
22 import com.skua.modules.common.vo.TreeNodeVO; 22 import com.skua.modules.common.vo.TreeNodeVO;
23 import com.skua.tool.util.DateUtils;
23 import lombok.extern.slf4j.Slf4j; 24 import lombok.extern.slf4j.Slf4j;
24 25
25 import org.apache.commons.lang3.StringUtils; 26 import org.apache.commons.lang3.StringUtils;
...@@ -160,16 +161,17 @@ public class AjhPlanScheduleDataController { ...@@ -160,16 +161,17 @@ public class AjhPlanScheduleDataController {
160 @AutoLog(value = "经营方案数据表-通过id查询") 161 @AutoLog(value = "经营方案数据表-通过id查询")
161 @ApiOperation(value="经营方案数据表-通过id查询", notes="经营方案数据表-通过id查询") 162 @ApiOperation(value="经营方案数据表-通过id查询", notes="经营方案数据表-通过id查询")
162 @GetMapping(value = "/queryById") 163 @GetMapping(value = "/queryById")
163 public Result<List<AjhPlanScheduleDataVO>> queryById(@RequestParam(name="factoryId",required=true) String factoryId , @RequestParam(name="month",required=true) String month) { 164 public Result<List<AjhPlanScheduleDataVO>> queryById(@RequestParam(name="departId",required=true) String departId , @RequestParam(name="month",required=true) String month) {
164 Result<List<AjhPlanScheduleDataVO>> result = new Result<List<AjhPlanScheduleDataVO>>(); 165 Result<List<AjhPlanScheduleDataVO>> result = new Result<List<AjhPlanScheduleDataVO>>();
165 166
166 QueryWrapper<AjhPlanScheduleData> queryWrapper = new QueryWrapper<>(); 167 QueryWrapper<AjhPlanScheduleData> queryWrapper = new QueryWrapper<>();
167 queryWrapper.eq("sd.factory_id",factoryId); 168 queryWrapper.eq("sd.depart_id",departId);
168 queryWrapper.eq("sd.date_time",month); 169 queryWrapper.eq("sd.date_time",month);
169 List<AjhPlanScheduleDataVO> scheduleDataVOList = ajhPlanScheduleDataService.queryByList( queryWrapper); 170 List<AjhPlanScheduleDataVO> scheduleDataVOList = ajhPlanScheduleDataService.queryByList( queryWrapper);
170 AjhPlanScheduleDataVO dataVO = null; 171 AjhPlanScheduleDataVO dataVO = null;
171 List<AjhPlanScheduleDataVO> dataList = new ArrayList<>(); 172 List<AjhPlanScheduleDataVO> dataList = new ArrayList<>();
172 List<TreeNodeVO> treeNodeVOList = ajhPlanScheduleConfigService.queryTreeList(factoryId); 173 Integer year = DateUtils.getDateYear(month+"-01");
174 List<TreeNodeVO> treeNodeVOList = ajhPlanScheduleConfigService.queryTreeList(departId,year);
173 if(treeNodeVOList != null && !treeNodeVOList.isEmpty()){ 175 if(treeNodeVOList != null && !treeNodeVOList.isEmpty()){
174 for(TreeNodeVO treeNodeVO : treeNodeVOList){ 176 for(TreeNodeVO treeNodeVO : treeNodeVOList){
175 if(treeNodeVO.getChildren() != null && !treeNodeVO.getChildren().isEmpty()){ 177 if(treeNodeVO.getChildren() != null && !treeNodeVO.getChildren().isEmpty()){
...@@ -177,7 +179,7 @@ public class AjhPlanScheduleDataController { ...@@ -177,7 +179,7 @@ public class AjhPlanScheduleDataController {
177 //String factoryId,String workItermName, String workContent,String configLevel1, String completeTime1,String configLevel2, String responsibler1, String completeTime2, String responsibler2 179 //String factoryId,String workItermName, String workContent,String configLevel1, String completeTime1,String configLevel2, String responsibler1, String completeTime2, String responsibler2
178 dataVO = queryAjhPlanScheduleDataVO(scheduleDataVOList,childrenVO.getParentId(), childrenVO.getId()); 180 dataVO = queryAjhPlanScheduleDataVO(scheduleDataVOList,childrenVO.getParentId(), childrenVO.getId());
179 if(dataVO == null ){ 181 if(dataVO == null ){
180 dataVO = new AjhPlanScheduleDataVO(factoryId ,month,treeNodeVO.getLabel(),childrenVO.getLabel(),treeNodeVO.getId(),treeNodeVO.getCompleteTime(),treeNodeVO.getResponsibler(), 182 dataVO = new AjhPlanScheduleDataVO(departId ,month,treeNodeVO.getLabel(),childrenVO.getLabel(),treeNodeVO.getId(),treeNodeVO.getCompleteTime(),treeNodeVO.getResponsibler(),
181 childrenVO.getId(),childrenVO.getCompleteTime(),childrenVO.getResponsibler()); 183 childrenVO.getId(),childrenVO.getCompleteTime(),childrenVO.getResponsibler());
182 } 184 }
183 dataList.add(dataVO ); 185 dataList.add(dataVO );
...@@ -185,7 +187,7 @@ public class AjhPlanScheduleDataController { ...@@ -185,7 +187,7 @@ public class AjhPlanScheduleDataController {
185 }else{ 187 }else{
186 dataVO = queryAjhPlanScheduleDataVO(scheduleDataVOList, treeNodeVO.getId()); 188 dataVO = queryAjhPlanScheduleDataVO(scheduleDataVOList, treeNodeVO.getId());
187 if(dataVO == null ){ 189 if(dataVO == null ){
188 dataVO = new AjhPlanScheduleDataVO(factoryId ,month,treeNodeVO.getLabel(),treeNodeVO.getId(),treeNodeVO.getCompleteTime(),treeNodeVO.getResponsibler()); 190 dataVO = new AjhPlanScheduleDataVO(departId ,month,treeNodeVO.getLabel(),treeNodeVO.getId(),treeNodeVO.getCompleteTime(),treeNodeVO.getResponsibler());
189 } 191 }
190 //String factoryId,String workItermName,String configLevel1, String completeTime1, String responsibler1 192 //String factoryId,String workItermName,String configLevel1, String completeTime1, String responsibler1
191 dataList.add(dataVO ); 193 dataList.add(dataVO );
......
1 package com.skua.modules.ajh.entity; 1 package com.skua.modules.ajh.entity;
2 2
3 import java.io.Serializable;
4 import java.util.Date; 3 import java.util.Date;
5 import com.baomidou.mybatisplus.annotation.IdType; 4 import com.baomidou.mybatisplus.annotation.IdType;
6 import com.baomidou.mybatisplus.annotation.TableId; 5 import com.baomidou.mybatisplus.annotation.TableId;
7 import com.baomidou.mybatisplus.annotation.TableName; 6 import com.baomidou.mybatisplus.annotation.TableName;
8 import com.baomidou.mybatisplus.annotation.TableField;
9 import io.swagger.annotations.ApiModel; 7 import io.swagger.annotations.ApiModel;
10 import io.swagger.annotations.ApiModelProperty; 8 import io.swagger.annotations.ApiModelProperty;
11 import lombok.Data; 9 import lombok.Data;
...@@ -24,7 +22,6 @@ import org.jeecgframework.poi.excel.annotation.Excel; ...@@ -24,7 +22,6 @@ import org.jeecgframework.poi.excel.annotation.Excel;
24 @Accessors(chain = true) 22 @Accessors(chain = true)
25 @ApiModel(value="ajh_plan_schedule_config对象", description="经营方案计划表") 23 @ApiModel(value="ajh_plan_schedule_config对象", description="经营方案计划表")
26 public class AjhPlanScheduleConfig { 24 public class AjhPlanScheduleConfig {
27
28 /**id*/ 25 /**id*/
29 @TableId(type = IdType.ID_WORKER_STR) 26 @TableId(type = IdType.ID_WORKER_STR)
30 @ApiModelProperty(value = "id") 27 @ApiModelProperty(value = "id")
...@@ -32,7 +29,8 @@ public class AjhPlanScheduleConfig { ...@@ -32,7 +29,8 @@ public class AjhPlanScheduleConfig {
32 /**所属厂站*/ 29 /**所属厂站*/
33 @Excel(name = "所属厂站", width = 15) 30 @Excel(name = "所属厂站", width = 15)
34 @ApiModelProperty(value = "所属厂站") 31 @ApiModelProperty(value = "所属厂站")
35 private String factoryId; 32 private String departId;
33
36 @ApiModelProperty(value = "年份") 34 @ApiModelProperty(value = "年份")
37 private String years; 35 private String years;
38 36
...@@ -87,17 +85,16 @@ public class AjhPlanScheduleConfig { ...@@ -87,17 +85,16 @@ public class AjhPlanScheduleConfig {
87 private Date updateTime; 85 private Date updateTime;
88 86
89 public AjhPlanScheduleConfig(){ 87 public AjhPlanScheduleConfig(){
90
91 } 88 }
92 89
93 public AjhPlanScheduleConfig( String factoryId,String years, String configName) { 90 public AjhPlanScheduleConfig( String departId,String years, String configName) {
94 this.years = years; 91 this.years = years;
95 this.factoryId = factoryId; 92 this.departId = departId;
96 this.configName = configName; 93 this.configName = configName;
97 } 94 }
98 95
99 public AjhPlanScheduleConfig(String factoryId, String year, String parentId, String configName, String completeTime, String responsibler) { 96 public AjhPlanScheduleConfig(String departId, String year, String parentId, String configName, String completeTime, String responsibler) {
100 this.factoryId = factoryId; 97 this.departId = departId;
101 this.years = years; 98 this.years = years;
102 this.parentId = parentId; 99 this.parentId = parentId;
103 this.configName = configName; 100 this.configName = configName;
......
1 package com.skua.modules.ajh.entity; 1 package com.skua.modules.ajh.entity;
2 2
3 import java.io.Serializable;
4 import java.util.Date; 3 import java.util.Date;
5 import com.baomidou.mybatisplus.annotation.IdType; 4 import com.baomidou.mybatisplus.annotation.IdType;
6 import com.baomidou.mybatisplus.annotation.TableId; 5 import com.baomidou.mybatisplus.annotation.TableId;
7 import com.baomidou.mybatisplus.annotation.TableName; 6 import com.baomidou.mybatisplus.annotation.TableName;
8 import com.baomidou.mybatisplus.annotation.TableField;
9 import io.swagger.annotations.ApiModel; 7 import io.swagger.annotations.ApiModel;
10 import io.swagger.annotations.ApiModelProperty; 8 import io.swagger.annotations.ApiModelProperty;
11 import lombok.Data; 9 import lombok.Data;
...@@ -31,7 +29,7 @@ public class AjhPlanScheduleData { ...@@ -31,7 +29,7 @@ public class AjhPlanScheduleData {
31 private String id; 29 private String id;
32 @Excel(name = "所属厂站", width = 15) 30 @Excel(name = "所属厂站", width = 15)
33 @ApiModelProperty(value = "所属厂站") 31 @ApiModelProperty(value = "所属厂站")
34 private String factoryId; 32 private String departId;
35 @ApiModelProperty(value = "时间yyyy-MM") 33 @ApiModelProperty(value = "时间yyyy-MM")
36 private String dateTime; 34 private String dateTime;
37 @ApiModelProperty(value = "一级指标编号") 35 @ApiModelProperty(value = "一级指标编号")
......
...@@ -14,7 +14,6 @@ import lombok.EqualsAndHashCode; ...@@ -14,7 +14,6 @@ import lombok.EqualsAndHashCode;
14 import lombok.experimental.Accessors; 14 import lombok.experimental.Accessors;
15 import org.jeecgframework.poi.excel.annotation.Excel; 15 import org.jeecgframework.poi.excel.annotation.Excel;
16 import org.springframework.format.annotation.DateTimeFormat; 16 import org.springframework.format.annotation.DateTimeFormat;
17
18 import java.util.Date; 17 import java.util.Date;
19 18
20 /** 19 /**
......
...@@ -14,10 +14,10 @@ import java.util.List; ...@@ -14,10 +14,10 @@ import java.util.List;
14 public interface IAjhPlanScheduleConfigService extends IService<AjhPlanScheduleConfig> { 14 public interface IAjhPlanScheduleConfigService extends IService<AjhPlanScheduleConfig> {
15 /*** 15 /***
16 * 列表查询 16 * 列表查询
17 * @param factoryId 17 * @param departid
18 * @return 18 * @return
19 */ 19 */
20 List<TreeNodeVO> queryTreeList(String factoryId); 20 List<TreeNodeVO> queryTreeList(String departid,Integer years);
21 21
22 /** 22 /**
23 * 导入excel文件 23 * 导入excel文件
......
...@@ -7,6 +7,7 @@ import com.skua.modules.ajh.service.IAjhPlanScheduleConfigService; ...@@ -7,6 +7,7 @@ import com.skua.modules.ajh.service.IAjhPlanScheduleConfigService;
7 import com.skua.modules.common.vo.TreeNodeVO; 7 import com.skua.modules.common.vo.TreeNodeVO;
8 import com.skua.modules.ajh.vo.AjhPlanScheduleConfigXls; 8 import com.skua.modules.ajh.vo.AjhPlanScheduleConfigXls;
9 import com.skua.tool.util.TreeBuilder; 9 import com.skua.tool.util.TreeBuilder;
10 import org.apache.commons.lang3.StringUtils;
10 import org.springframework.stereotype.Service; 11 import org.springframework.stereotype.Service;
11 12
12 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 13 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...@@ -25,12 +26,18 @@ public class AjhPlanScheduleConfigServiceImpl extends ServiceImpl<AjhPlanSchedul ...@@ -25,12 +26,18 @@ public class AjhPlanScheduleConfigServiceImpl extends ServiceImpl<AjhPlanSchedul
25 26
26 /*** 27 /***
27 * 列表查询 28 * 列表查询
28 * @param factoryId 29 * @param departId
29 * @return 30 * @return
30 */ 31 */
31 public List<TreeNodeVO> queryTreeList(String factoryId){ 32 public List<TreeNodeVO> queryTreeList(String departId,Integer year){
32 QueryWrapper<AjhPlanScheduleConfig> queryConfigWrapper = new QueryWrapper(); 33 QueryWrapper<AjhPlanScheduleConfig> queryConfigWrapper = new QueryWrapper();
33 queryConfigWrapper.eq("factory_id", factoryId); 34 if (StringUtils.isNotEmpty(departId)) {
35 queryConfigWrapper.eq("depart_id", departId);
36 }
37 if(year != null){
38 queryConfigWrapper.eq("years", year);
39 }
40 //
34 List<AjhPlanScheduleConfig> configList = this.baseMapper.selectList( queryConfigWrapper); 41 List<AjhPlanScheduleConfig> configList = this.baseMapper.selectList( queryConfigWrapper);
35 List<TreeNodeVO> treeList = new ArrayList<TreeNodeVO>(); 42 List<TreeNodeVO> treeList = new ArrayList<TreeNodeVO>();
36 if(configList != null && !configList.isEmpty()){ 43 if(configList != null && !configList.isEmpty()){
......
...@@ -14,15 +14,13 @@ import org.jeecgframework.poi.excel.annotation.Excel; ...@@ -14,15 +14,13 @@ import org.jeecgframework.poi.excel.annotation.Excel;
14 @Data 14 @Data
15 @ApiModel(value="ajh_plan_schedule_data数据传输对象", description="经营方案数据表") 15 @ApiModel(value="ajh_plan_schedule_data数据传输对象", description="经营方案数据表")
16 public class AjhPlanScheduleDataVO { 16 public class AjhPlanScheduleDataVO {
17
18
19 /**id*/ 17 /**id*/
20 @TableId(type = IdType.ID_WORKER_STR) 18 @TableId(type = IdType.ID_WORKER_STR)
21 @ApiModelProperty(value = "id") 19 @ApiModelProperty(value = "id")
22 private String id; 20 private String id;
23 @Excel(name = "所属厂站", width = 15) 21 @Excel(name = "所属厂站", width = 15)
24 @ApiModelProperty(value = "所属厂站") 22 @ApiModelProperty(value = "所属厂站")
25 private String factoryId; 23 private String departId;
26 24
27 @ApiModelProperty(value = "所属厂站名称") 25 @ApiModelProperty(value = "所属厂站名称")
28 private String departName; 26 private String departName;
...@@ -91,8 +89,8 @@ public class AjhPlanScheduleDataVO { ...@@ -91,8 +89,8 @@ public class AjhPlanScheduleDataVO {
91 public AjhPlanScheduleDataVO() { 89 public AjhPlanScheduleDataVO() {
92 } 90 }
93 91
94 public AjhPlanScheduleDataVO(String factoryId,String dateTime,String workItermName, String workContent,String configLevel1, String completeTime1, String responsibler1, String configLevel2,String completeTime2, String responsibler2) { 92 public AjhPlanScheduleDataVO(String departId,String dateTime,String workItermName, String workContent,String configLevel1, String completeTime1, String responsibler1, String configLevel2,String completeTime2, String responsibler2) {
95 this.factoryId = factoryId; 93 this.departId = departId;
96 this.dateTime = dateTime; 94 this.dateTime = dateTime;
97 this.workItermName = workItermName; 95 this.workItermName = workItermName;
98 this.workContent = workContent; 96 this.workContent = workContent;
...@@ -106,8 +104,8 @@ public class AjhPlanScheduleDataVO { ...@@ -106,8 +104,8 @@ public class AjhPlanScheduleDataVO {
106 this.responsibler2 = responsibler2; 104 this.responsibler2 = responsibler2;
107 } 105 }
108 106
109 public AjhPlanScheduleDataVO(String factoryId,String dateTime,String workItermName,String configLevel1, String completeTime1, String responsibler1) { 107 public AjhPlanScheduleDataVO(String departId,String dateTime,String workItermName,String configLevel1, String completeTime1, String responsibler1) {
110 this.factoryId = factoryId; 108 this.departId = departId;
111 this.workItermName = workItermName; 109 this.workItermName = workItermName;
112 this.workContent = workContent; 110 this.workContent = workContent;
113 111
......
...@@ -155,6 +155,8 @@ public class WorkAnalysisController { ...@@ -155,6 +155,8 @@ public class WorkAnalysisController {
155 result.setSuccess(true); 155 result.setSuccess(true);
156 return result; 156 return result;
157 } 157 }
158
159
158 @ApiOperation(value = "安全管理进度统计-数量统计", notes = "安全管理进度-数量统计 timeType = 1 表示月份,timeType=2 表示年") 160 @ApiOperation(value = "安全管理进度统计-数量统计", notes = "安全管理进度-数量统计 timeType = 1 表示月份,timeType=2 表示年")
159 @GetMapping("/analysisTotalBySafeProgress") 161 @GetMapping("/analysisTotalBySafeProgress")
160 public Result<SafeProgressVO> analysisTotalBySafeProgress(@RequestParam(defaultValue = "1") Integer departType, String departId ,@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) { 162 public Result<SafeProgressVO> analysisTotalBySafeProgress(@RequestParam(defaultValue = "1") Integer departType, String departId ,@RequestParam(defaultValue = "1") Integer timeType, String startTime, String endTime) {
...@@ -186,6 +188,55 @@ public class WorkAnalysisController { ...@@ -186,6 +188,55 @@ public class WorkAnalysisController {
186 } 188 }
187 return result; 189 return result;
188 } 190 }
191
192 /***
193 * 工作流流程数量统计
194 * @param departIds
195 * @param startTime
196 * @param endTime
197 * @return
198 */
199 private String getProcessProgressSql( String departIds,String startTime, String endTime){
200 String sql = "";
201 //隐患记录:隐患排查
202 sql += " left join ( select t.depart_id , count(1) 'count' from ajh_rectification_info t where t.rec_ord_report_date >='2025-02-01' and t.rec_ord_report_date <='2025-02-28' group by t.depart_id) aa on aa.depart_id = d.id";
203 sql += " left join ( select t.depart_id , count(1) 'count' from ajh_rectification_info t where t.handle_result = '3' and t.rec_ord_end_date >='2025-02-01' and t.rec_ord_end_date <='2025-02-28' group by t.depart_id) aaaa on aaaa.depart_id = d.id";
204
205 //危险作业:
206 sql += " left join ( select t.depart_id , count(1) 'count' from dangerous_operation_manage t where t.report_date >='2025-02-01' and t.report_date <='2025-02-28' group by t.depart_id) aa on aa.depart_id = d.id";
207 sql += " left join ( select t.depart_id , count(1) 'count' from dangerous_operation_manage t where t.operation_status = '1' and t.operation_date >='2025-02-01' and t.operation_date <='2025-02-28' group by t.depart_id) aaaa on aaaa.depart_id = d.id";
208
209 //事故事件 没有完成结束时间
210 sql += " left join ( select t.depart_id , count(1) 'count' from emergency_risk_event t where t.report_date >='2025-02-01' and t.report_date <='2025-02-28' group by t.depart_id) aa on aa.depart_id = d.id";
211 sql += " left join ( select t.depart_id , count(1) 'count' from emergency_risk_event t where t.handle_result = '3' and t.report_date >='2025-02-01' and t.report_date <='2025-02-28' group by t.depart_id) aaaa on aaaa.depart_id = d.id";
212
213 //设备维修:
214 sql += " left join ( select t.depart_id , count(1) 'count' from equipment_repair t where t.repair_date >='2025-02-01' and t.repair_date <='2025-02-28' group by t.depart_id) aa on aa.depart_id = d.id";
215 sql += " left join ( select t.depart_id , count(1) 'count' from equipment_repair t where t.finish_flag in ('ywx','yys') and t.reality_maintenance_end_time >='2025-02-01' and t.reality_maintenance_end_time <='2025-02-28' group by t.depart_id) aaaa on aaaa.depart_id = d.id";
216
217 //考核评价
218 sql += " left join ( select t.depart_id , count(1) 'count' from data_assessment_socre_master t where t.assessment_date >='2025-02-01' and t.assessment_date <='2025-02-28' group by t.depart_id) aa on aa.depart_id = d.id";
219 sql += " left join ( select t.depart_id , '0' 'count' from data_assessment_socre_master t where t.assessment_date >='2025-02-01' and t.assessment_date <='2025-02-28' group by t.depart_id) aaaa on aaaa.depart_id = d.id";
220
221 //问题上报:问题记录
222 sql += " left join ( select t.depart_id , count(1) 'count' from problem_report_plan t where t.report_time >='2025-02-01' and t.report_time <='2025-02-28' group by t.depart_id) aa on aa.depart_id = d.id";
223 sql += " left join ( select t.depart_id , count(1) 'count' from problem_report_plan t where t.handle_status = '3' and t.handle_time >='2025-02-01' and t.handle_time <='2025-02-28' group by t.depart_id) aaaa on aaaa.depart_id = d.id";
224
225 //报警任务
226 sql += " left join ( select t.depart_id , count(1) 'count' from alarm_record_history t where t.record_time >='2025-02-01' and t.record_time <='2025-02-28' group by t.depart_id) aa on aa.depart_id = d.id";
227 sql += " left join ( select t.depart_id , count(1) 'count' from alarm_record_history t where t.handle_status = '1' and t.record_time >='2025-02-01' and t.record_time <='2025-02-28' group by t.depart_id) aaaa on aaaa.depart_id = d.id";
228
229 //维护任务:保养
230 sql += " left join ( select t.depart_id , count(1) 'count' from equipment_maintain_task t where t.real_start_time >='2025-02-01' and t.real_end_time <='2025-02-28' group by t.depart_id) aa on aa.depart_id = d.id";
231 sql += " left join ( select t.depart_id , count(1) 'count' from equipment_maintain_task t where t.results_enforcement = '2' and t.real_start_time >='2025-02-01' and t.real_end_time <='2025-02-28' group by t.depart_id) aaaa on aaaa.depart_id = d.id";
232
233 //巡检任务
234 sql += " left join ( select t.depart_id , count(1) 'count' from inspection_task t where t.task_start_time >='2025-02-01' and t.task_end_time <='2025-02-28' group by t.depart_id) aa on aa.depart_id = d.id";
235 sql += " left join ( select t.depart_id , count(1) 'count' from inspection_task t where t.task_state = 2 and t.task_start_time >='2025-02-01' and t.task_end_time <='2025-02-28' group by t.depart_id) aaaa on aaaa.depart_id = d.id";
236
237 return sql ;
238 }
239
189 private String getSafeProgressSql( String departIds,String startTime, String endTime){ 240 private String getSafeProgressSql( String departIds,String startTime, String endTime){
190 JdbcTemplate jdbcTemplate = (JdbcTemplate) SpringContextUtils.getBean("master"); 241 JdbcTemplate jdbcTemplate = (JdbcTemplate) SpringContextUtils.getBean("master");
191 String userIdsSql = "select GROUP_CONCAT( DISTINCT exam_user_ids) 'user_ids' from edu_paper where end_time >='"+startTime+"' and end_time <= '"+endTime+"'"; 242 String userIdsSql = "select GROUP_CONCAT( DISTINCT exam_user_ids) 'user_ids' from edu_paper where end_time >='"+startTime+"' and end_time <= '"+endTime+"'";
...@@ -250,10 +301,13 @@ public class WorkAnalysisController { ...@@ -250,10 +301,13 @@ public class WorkAnalysisController {
250 return sql; 301 return sql;
251 } 302 }
252 303
304
305
253 private String getSelfDepartIds(String departIds){ 306 private String getSelfDepartIds(String departIds){
254 String sql = "select GROUP_CONCAT(id) 'departIds' from sys_depart where depart_type =1 and parent_id <> '1818215543140909056' and id in ("+JSUtils.quoteEach(departIds,",")+")"; 307 String sql = "select GROUP_CONCAT(id) 'departIds' from sys_depart where depart_type =1 and parent_id <> '1818215543140909056' and id in ("+JSUtils.quoteEach(departIds,",")+")";
255 return getJdbcTemplate().queryForObject(sql,String.class); 308 return getJdbcTemplate().queryForObject(sql,String.class);
256 } 309 }
310
257 private String getEFDepartIds(String departIds){//获取恩菲水厂编号 311 private String getEFDepartIds(String departIds){//获取恩菲水厂编号
258 String sql = "select GROUP_CONCAT(id) 'departIds' from sys_depart where depart_type =1 and parent_id = '1818215543140909056' and id in ("+JSUtils.quoteEach(departIds,",")+")"; 312 String sql = "select GROUP_CONCAT(id) 'departIds' from sys_depart where depart_type =1 and parent_id = '1818215543140909056' and id in ("+JSUtils.quoteEach(departIds,",")+")";
259 return getJdbcTemplate().queryForObject(sql,String.class); 313 return getJdbcTemplate().queryForObject(sql,String.class);
......
1 package com.skua.modules.dataAnalysis.vo;
2
3 import io.swagger.annotations.ApiModel;
4 import io.swagger.annotations.ApiModelProperty;
5 import lombok.Data;
6
7 /**
8 * @auther kangwei
9 * @create 2025-02-28-16:26
10 */
11 @Data
12 @ApiModel(value = "流程进度统计对象", description = "流程进度统计对象")
13 public class ProcessProgressVO {
14 @ApiModelProperty(value = "所属厂站")
15 private String departId;
16 @ApiModelProperty(value = "所属厂站")
17 private String departName;
18
19 // 隐患记录:隐患排查ajh_rectification_info
20 @ApiModelProperty(value = "隐患记录总数")
21 private String yhjlTotal;
22 @ApiModelProperty(value = "隐患记录处理数量")
23 private String yhjlHandleNum;
24
25
26 //危险作业: dangerous_operation_manage
27 @ApiModelProperty(value = "隐患记录总数")
28 private String wxrwTotal;
29 @ApiModelProperty(value = "隐患记录处理数量")
30 private String wxrwHandleNum;
31
32 //事故事件 emergency_risk_event
33 @ApiModelProperty(value = "事故事件总数")
34 private String sgsjTotal;
35 @ApiModelProperty(value = "事故事件处理数量")
36 private String sgsjHandleNum;
37
38 ///设备维修: equipment_repair
39 @ApiModelProperty(value = "设备维修总数")
40 private String sbwxTotal;
41 @ApiModelProperty(value = "设备维修处理数量")
42 private String sbwxHandleNum;
43
44 //考核评价: data_assessment_socre_master
45 @ApiModelProperty(value = "考核评价总数")
46 private String khpjTotal;
47 @ApiModelProperty(value = "考核评价处理数量")
48 private String khpjHandleNum;
49
50 //问题上报:问题记录 problem_report_plan
51 @ApiModelProperty(value = "问题上报总数")
52 private String wtsbTotal;
53 @ApiModelProperty(value = "隐患记录处理数量")
54 private String wtsbHandleNum;
55
56 //报警任务:alarm_record_history
57 @ApiModelProperty(value = "报警任务总数")
58 private String bjrwTotal;
59 @ApiModelProperty(value = "报警任务处理数量")
60 private String bjrwHandleNum;
61
62 //维护任务:保养 equipment_maintain_task
63 @ApiModelProperty(value = "维护任务总数")
64 private String whrwTotal;
65 @ApiModelProperty(value = "维护任务处理数量")
66 private String whrwHandleNum;
67 @ApiModelProperty(value = "维护任务及时数量")
68 private String whrwJSNum;
69
70 //巡检任务: inspection_task
71 @ApiModelProperty(value = "巡检任务总数")
72 private String xjrwTotal;
73 @ApiModelProperty(value = "巡检任务处理数量")
74 private String xjrwHandleNum;
75 @ApiModelProperty(value = "巡检任务应急数量")
76 private String xjrwJSNum;
77 }
...@@ -213,12 +213,12 @@ public class EquipmentSparepartController { ...@@ -213,12 +213,12 @@ public class EquipmentSparepartController {
213 @AutoLog(value = "备品备件表-入库记录列表") 213 @AutoLog(value = "备品备件表-入库记录列表")
214 @ApiOperation(value = "备品备件表-入库记录列表", notes = "备品备件表-入库记录列表") 214 @ApiOperation(value = "备品备件表-入库记录列表", notes = "备品备件表-入库记录列表")
215 @GetMapping(value = "/queryEquipmentInList") 215 @GetMapping(value = "/queryEquipmentInList")
216 public Result<IPage<EquipmentInOutRecordVO>> queryEquipmentInList(String sparepartId, 216 public Result<IPage<EquipmentInOutRecordVO>> queryEquipmentInList(EquipmentSparepartSearchVO sparepartSearchVO,
217 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, 217 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
218 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception { 218 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception {
219 Result<IPage<EquipmentInOutRecordVO>> result = new Result<>(); 219 Result<IPage<EquipmentInOutRecordVO>> result = new Result<>();
220 Page<EquipmentInOutRecordVO> page = new Page<EquipmentInOutRecordVO>(pageNo, pageSize); 220 Page<EquipmentInOutRecordVO> page = new Page<EquipmentInOutRecordVO>(pageNo, pageSize);
221 IPage<EquipmentInOutRecordVO> pageList = equipmentSparepartService.queryEquipmentInList(page,sparepartId); 221 IPage<EquipmentInOutRecordVO> pageList = equipmentSparepartService.queryEquipmentInList(page,sparepartSearchVO);
222 222
223 result.setSuccess(true); 223 result.setSuccess(true);
224 result.setResult(pageList); 224 result.setResult(pageList);
...@@ -228,12 +228,12 @@ public class EquipmentSparepartController { ...@@ -228,12 +228,12 @@ public class EquipmentSparepartController {
228 @AutoLog(value = "备品备件表-出库记录列表") 228 @AutoLog(value = "备品备件表-出库记录列表")
229 @ApiOperation(value = "备品备件表-出库记录列表", notes = "备品备件表-出库记录列表") 229 @ApiOperation(value = "备品备件表-出库记录列表", notes = "备品备件表-出库记录列表")
230 @GetMapping(value = "/queryEquipmentOutList") 230 @GetMapping(value = "/queryEquipmentOutList")
231 public Result<IPage<EquipmentInOutRecordVO>> queryEquipmentOutList(String sparepartId, 231 public Result<IPage<EquipmentInOutRecordVO>> queryEquipmentOutList(EquipmentSparepartSearchVO sparepartSearchVO,
232 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, 232 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
233 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception { 233 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception {
234 Result<IPage<EquipmentInOutRecordVO>> result = new Result<>(); 234 Result<IPage<EquipmentInOutRecordVO>> result = new Result<>();
235 Page<EquipmentInOutRecordVO> page = new Page<EquipmentInOutRecordVO>(pageNo, pageSize); 235 Page<EquipmentInOutRecordVO> page = new Page<EquipmentInOutRecordVO>(pageNo, pageSize);
236 IPage<EquipmentInOutRecordVO> pageList = equipmentSparepartService.queryEquipmentOutList(page,sparepartId); 236 IPage<EquipmentInOutRecordVO> pageList = equipmentSparepartService.queryEquipmentOutList(page,sparepartSearchVO);
237 237
238 result.setSuccess(true); 238 result.setSuccess(true);
239 result.setResult(pageList); 239 result.setResult(pageList);
......
...@@ -36,7 +36,7 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> ...@@ -36,7 +36,7 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart>
36 * @param sparepartId 36 * @param sparepartId
37 * @return 37 * @return
38 */ 38 */
39 public IPage<EquipmentInOutRecordVO> queryEquipmentInList(Page<EquipmentInOutRecordVO> page, @Param("sparepartId") String sparepartId); 39 public IPage<EquipmentInOutRecordVO> queryEquipmentInList(Page<EquipmentInOutRecordVO> page, @Param("sparepartId") String sparepartId, @Param("departId")String departId, @Param("suppliesWarehouseId")String suppliesWarehouseId);
40 40
41 /*** 41 /***
42 * 备品备件表-出库记录列表 42 * 备品备件表-出库记录列表
...@@ -44,7 +44,7 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> ...@@ -44,7 +44,7 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart>
44 * @param sparepartId 44 * @param sparepartId
45 * @return 45 * @return
46 */ 46 */
47 public IPage<EquipmentInOutRecordVO> queryEquipmentOutList(Page<EquipmentInOutRecordVO> page, @Param("sparepartId") String sparepartId); 47 public IPage<EquipmentInOutRecordVO> queryEquipmentOutList(Page<EquipmentInOutRecordVO> page, @Param("sparepartId") String sparepartId, @Param("departId")String departId, @Param("suppliesWarehouseId")String suppliesWarehouseId);
48 /*** 48 /***
49 * 备品备件表-入库详情 49 * 备品备件表-入库详情
50 * @param page 50 * @param page
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
73 <select id="queryById" parameterType="java.lang.String" 73 <select id="queryById" parameterType="java.lang.String"
74 resultType="com.skua.modules.equipment.vo.EquipmentMaintainPlanVO"> 74 resultType="com.skua.modules.equipment.vo.EquipmentMaintainPlanVO">
75 SELECT emp.id AS id, 75 SELECT emp.id AS id,
76 emp.plan_cost,emp.maintenance_type,
76 emp.plan_name AS planName, 77 emp.plan_name AS planName,
77 sd1.id AS departId, 78 sd1.id AS departId,
78 sd1.depart_name AS departName, 79 sd1.depart_name AS departName,
......
...@@ -43,10 +43,16 @@ ...@@ -43,10 +43,16 @@
43 left join equipment_sparepart_supplies ss on ss.id = mic.sparepart_id 43 left join equipment_sparepart_supplies ss on ss.id = mic.sparepart_id
44 left join equipment_sparepart_type st on st.id = ss.sparepart_type 44 left join equipment_sparepart_type st on st.id = ss.sparepart_type
45 where mic.sparepart_id = #{sparepartId} 45 where mic.sparepart_id = #{sparepartId}
46 <if test="departId != null and departId!=''">
47 and ei.depart_id = #{departId}
48 </if>
49 <if test="suppliesWarehouseId != null and suppliesWarehouseId!=''">
50 and ei.supplies_warehouse_id = #{suppliesWarehouseId}
51 </if>
46 </select> 52 </select>
47 53
48 <select id="queryEquipmentOutList" resultType="com.skua.modules.equipment.vo.EquipmentInOutRecordVO"> 54 <select id="queryEquipmentOutList" resultType="com.skua.modules.equipment.vo.EquipmentInOutRecordVO">
49 select eo.depart_id,eo.out_order 'in_out_order' ,eo.out_date 'inOutDate' ,eo.use_by,eo.choose_time,eo.supplies_warehouse_id,sw.warehouse_name, 55 select eo.depart_id,eo.out_order 'in_out_order' ,eo.out_date 'inOutDate' ,eo.use_by,eo.choose_time,eo.supplies_warehouse_id,sw.warehouse_name,
50 moc.sparepart_id , moc.actual_num 'storageNum',moc.out_num 'inOutNum',moc.batch_num, 56 moc.sparepart_id , moc.actual_num 'storageNum',moc.out_num 'inOutNum',moc.batch_num,
51 ss.sparepart_code,ss.sparepart_name, ss.specification,ss.measuring_unit,st.item_text as 'sparepart_type_name' 57 ss.sparepart_code,ss.sparepart_name, ss.specification,ss.measuring_unit,st.item_text as 'sparepart_type_name'
52 from equipment_out_child moc 58 from equipment_out_child moc
...@@ -55,6 +61,12 @@ ...@@ -55,6 +61,12 @@
55 left join equipment_sparepart_supplies ss on ss.id = moc.sparepart_id 61 left join equipment_sparepart_supplies ss on ss.id = moc.sparepart_id
56 left join equipment_sparepart_type st on st.id = ss.sparepart_type 62 left join equipment_sparepart_type st on st.id = ss.sparepart_type
57 where moc.sparepart_id = #{sparepartId} 63 where moc.sparepart_id = #{sparepartId}
64 <if test="departId != null and departId!=''">
65 and eo.depart_id = #{departId}
66 </if>
67 <if test="suppliesWarehouseId != null and suppliesWarehouseId!=''">
68 and eo.supplies_warehouse_id = #{suppliesWarehouseId}
69 </if>
58 </select> 70 </select>
59 71
60 <!-- 分页查询:物料的入库详情 --> 72 <!-- 分页查询:物料的入库详情 -->
......
...@@ -32,18 +32,18 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart> ...@@ -32,18 +32,18 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart>
32 /*** 32 /***
33 * 备品备件表-入库记录列表 33 * 备品备件表-入库记录列表
34 * @param page 34 * @param page
35 * @param sparepartId 35 * @param
36 * @return 36 * @return
37 */ 37 */
38 public IPage<EquipmentInOutRecordVO> queryEquipmentInList(Page<EquipmentInOutRecordVO> page, String sparepartId); 38 public IPage<EquipmentInOutRecordVO> queryEquipmentInList(Page<EquipmentInOutRecordVO> page,EquipmentSparepartSearchVO sparepartSearchVO );
39 39
40 /*** 40 /***
41 * 备品备件表-出库记录列表 41 * 备品备件表-出库记录列表
42 * @param page 42 * @param page
43 * @param sparepartId 43 * @param
44 * @return 44 * @return
45 */ 45 */
46 public IPage<EquipmentInOutRecordVO> queryEquipmentOutList(Page<EquipmentInOutRecordVO> page, String sparepartId); 46 public IPage<EquipmentInOutRecordVO> queryEquipmentOutList(Page<EquipmentInOutRecordVO> page, EquipmentSparepartSearchVO sparepartSearchVO);
47 47
48 /*** 48 /***
49 * 备品备件表-入库详情 49 * 备品备件表-入库详情
......
...@@ -45,21 +45,21 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar ...@@ -45,21 +45,21 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar
45 /*** 45 /***
46 * 备品备件表-入库记录列表 46 * 备品备件表-入库记录列表
47 * @param page 47 * @param page
48 * @param sparepartId 48 * @param sparepartSearchVO
49 * @return 49 * @return
50 */ 50 */
51 public IPage<EquipmentInOutRecordVO> queryEquipmentInList(Page<EquipmentInOutRecordVO> page, String sparepartId){ 51 public IPage<EquipmentInOutRecordVO> queryEquipmentInList(Page<EquipmentInOutRecordVO> page, EquipmentSparepartSearchVO sparepartSearchVO){
52 return baseMapper.queryEquipmentInList(page,sparepartId); 52 return baseMapper.queryEquipmentInList(page,sparepartSearchVO.getSparepartId(),sparepartSearchVO.getDepartId(),sparepartSearchVO.getSuppliesWarehouseId());
53 } 53 }
54 54
55 /*** 55 /***
56 * 备品备件表-出库记录列表 56 * 备品备件表-出库记录列表
57 * @param page 57 * @param page
58 * @param sparepartId 58 * @param
59 * @return 59 * @return
60 */ 60 */
61 public IPage<EquipmentInOutRecordVO> queryEquipmentOutList(Page<EquipmentInOutRecordVO> page, String sparepartId){ 61 public IPage<EquipmentInOutRecordVO> queryEquipmentOutList(Page<EquipmentInOutRecordVO> page, EquipmentSparepartSearchVO sparepartSearchVO){
62 return baseMapper.queryEquipmentOutList(page,sparepartId); 62 return baseMapper.queryEquipmentOutList(page,sparepartSearchVO.getSparepartId(),sparepartSearchVO.getDepartId(),sparepartSearchVO.getSuppliesWarehouseId());
63 } 63 }
64 64
65 /*** 65 /***
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!