Commit 610dcaa1 authored by chenhao's avatar chenhao

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents 14387160 991186e2
...@@ -48,7 +48,7 @@ import java.util.Map; ...@@ -48,7 +48,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping(value = "/api/check") @RequestMapping(value = "/api/check")
@Api(tags = "巡检记录api") @Api(tags = "维保记录api")
public class CheckController extends AbstractBaseController { public class CheckController extends AbstractBaseController {
private final Logger log = LoggerFactory.getLogger(CheckController.class); private final Logger log = LoggerFactory.getLogger(CheckController.class);
@Autowired @Autowired
...@@ -196,7 +196,7 @@ public class CheckController extends AbstractBaseController { ...@@ -196,7 +196,7 @@ public class CheckController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存巡检记录-mobile", notes = "保存巡检记录-mobile") @ApiOperation(value = "保存维保记录-mobile", notes = "保存维保记录-mobile")
@RequestMapping(value = "/saveRecord", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/saveRecord", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse saveCheckRecord( public CommonResponse saveCheckRecord(
@ApiParam(value = "检查信息") @RequestBody CheckRecordParam requestParam) { @ApiParam(value = "检查信息") @RequestBody CheckRecordParam requestParam) {
...@@ -213,35 +213,35 @@ public class CheckController extends AbstractBaseController { ...@@ -213,35 +213,35 @@ public class CheckController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "删除巡检记录", notes = "删除巡检记录") @ApiOperation(value = "删除维保记录", notes = "删除维保记录")
@RequestMapping(value = "/testPush", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/testPush", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteCheckById(@ApiParam(value = "巡检计划ID", required = true) @RequestBody Long id) { public CommonResponse deleteCheckById(@ApiParam(value = "维保计划ID", required = true) @RequestBody Long id) {
try { try {
asyncTask.pushCheckMessage(id); asyncTask.pushCheckMessage(id);
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
return CommonResponseUtil.failure("删除巡检记录失败"); return CommonResponseUtil.failure("删除维保记录失败");
} }
} }
/** /**
* 巡检计划删除(支持批量) * 维保计划删除(支持批量)
* *
* @param * @param
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "删除巡检记录", notes = "删除巡检记录") @ApiOperation(value = "删除维保记录", notes = "删除维保记录")
@RequestMapping(value = "/deleteCheckById", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/deleteCheckById", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse deleteCheckById(@ApiParam(value = "巡检计划ID", required = true) @RequestBody List<Long> ids) { public CommonResponse deleteCheckById(@ApiParam(value = "维保计划ID", required = true) @RequestBody List<Long> ids) {
try { try {
checkService.delCheckById(ids); checkService.delCheckById(ids);
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
return CommonResponseUtil.failure("删除巡检记录失败"); return CommonResponseUtil.failure("删除维保记录失败");
} }
} }
...@@ -266,7 +266,7 @@ public class CheckController extends AbstractBaseController { ...@@ -266,7 +266,7 @@ public class CheckController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>", notes = "获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>") @ApiOperation(value = "获取维保计划维保点(已完成或漏检的维保点)详情信息<font color='blue'>手机app</font>", notes = "获取维保计划维保点(已完成或漏检的维保点)详情信息<font color='blue'>手机app</font>")
@RequestMapping(value = "/queryCheckPointDetail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryCheckPointDetail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryCheckPointDetail(@RequestParam long checkId) { public CommonResponse queryCheckPointDetail(@RequestParam long checkId) {
try { try {
...@@ -280,7 +280,7 @@ public class CheckController extends AbstractBaseController { ...@@ -280,7 +280,7 @@ public class CheckController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>", notes = "获取巡检计划巡检点(已完成或漏检的巡检点)详情信息<font color='blue'>手机app</font>") @ApiOperation(value = "获取维保计划维保点(已完成或漏检的维保点)详情信息<font color='blue'>手机app</font>", notes = "获取维保计划维保点(已完成或漏检的维保点)详情信息<font color='blue'>手机app</font>")
@RequestMapping(value = "/v2/queryCheckPointDetail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/v2/queryCheckPointDetail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryCheckPointDetailInVersion2(@RequestParam long checkId) { public CommonResponse queryCheckPointDetailInVersion2(@RequestParam long checkId) {
try { try {
...@@ -294,7 +294,7 @@ public class CheckController extends AbstractBaseController { ...@@ -294,7 +294,7 @@ public class CheckController extends AbstractBaseController {
} }
/** /**
* 获取巡检日历数据 * 获取维保日历数据
* *
* @param date * @param date
* @return * @return
...@@ -317,7 +317,7 @@ public class CheckController extends AbstractBaseController { ...@@ -317,7 +317,7 @@ public class CheckController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取巡检点巡检记录列表信息<font color='blue'>手机app</font>", notes = "获取巡检点巡检记录列表信息<font color='blue'>手机app</font>") @ApiOperation(value = "获取维保点维保记录列表信息<font color='blue'>手机app</font>", notes = "获取维保点维保记录列表信息<font color='blue'>手机app</font>")
@RequestMapping(value = "/queryCheckRecord", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/queryCheckRecord", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse queryRecordByPointId( public CommonResponse queryRecordByPointId(
@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests) { @ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests) {
...@@ -341,7 +341,7 @@ public class CheckController extends AbstractBaseController { ...@@ -341,7 +341,7 @@ public class CheckController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取巡检记录详情信息<font color='blue'>手机app</font>", notes = "获取巡检记录详情信息<font color='blue'>手机app</font>") @ApiOperation(value = "获取维保记录详情信息<font color='blue'>手机app</font>", notes = "获取维保记录详情信息<font color='blue'>手机app</font>")
@RequestMapping(value = "/queryCheckDetail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryCheckDetail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryRecordById(@RequestParam(required = true) int checkId) { public CommonResponse queryRecordById(@RequestParam(required = true) int checkId) {
Map<String, Object> map = checkService.queryRecordById(checkId); Map<String, Object> map = checkService.queryRecordById(checkId);
...@@ -349,15 +349,15 @@ public class CheckController extends AbstractBaseController { ...@@ -349,15 +349,15 @@ public class CheckController extends AbstractBaseController {
} }
/** /**
* 根据巡检记录ID获取巡检记录详情 * 根据维保记录ID获取维保记录详情
* *
* @param checkId * @param checkId
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "根据巡检记录ID获取巡检记录详情", notes = "根据巡检记录ID获取巡检记录详情") @ApiOperation(value = "根据维保记录ID获取维保记录详情", notes = "根据维保记录ID获取维保记录详情")
@RequestMapping(value = "/queryCheckInfo", produces = "application/json;charset=UTF-8", method = RequestMethod.GET) @RequestMapping(value = "/queryCheckInfo", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse printTaskDetail(@ApiParam(value = "巡检记录ID") @RequestParam(required = true) int checkId) { public CommonResponse printTaskDetail(@ApiParam(value = "维保记录ID") @RequestParam(required = true) int checkId) {
Map<String, Object> map = checkService.queryRecordById(checkId); Map<String, Object> map = checkService.queryRecordById(checkId);
String xml = ToolUtils.map2Xml(map, "CheckInfo"); String xml = ToolUtils.map2Xml(map, "CheckInfo");
if (ObjectUtils.isEmpty(xml)) { if (ObjectUtils.isEmpty(xml)) {
...@@ -400,13 +400,13 @@ public class CheckController extends AbstractBaseController { ...@@ -400,13 +400,13 @@ public class CheckController extends AbstractBaseController {
} }
/** /**
* 获取巡检点,巡检线路初始数据 * 获取维保点,维保线路初始数据
* *
* @return * @return
*/ */
//@Authorization(ingore=true) //@Authorization(ingore=true)
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取巡检点初始数据(<font color='blue'>release</font>)", notes = "获取巡检点初始数据") @ApiOperation(value = "获取维保点初始数据(<font color='blue'>release</font>)", notes = "获取维保点初始数据")
@RequestMapping(value = "/viewModule/initData", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @RequestMapping(value = "/viewModule/initData", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public CommonResponse getViewModuleInitData() { public CommonResponse getViewModuleInitData() {
try { try {
...@@ -420,7 +420,7 @@ public class CheckController extends AbstractBaseController { ...@@ -420,7 +420,7 @@ public class CheckController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "巡检情况统计分析", notes = "巡检情况统计分析") @ApiOperation(value = "维保情况统计分析", notes = "维保情况统计分析")
@RequestMapping(value = "/statisticalAnalysis", method = RequestMethod.POST, produces = "application/json;charset=UTF-8") @RequestMapping(value = "/statisticalAnalysis", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
public CommonResponse getCheckStatisticalAnalysis( public CommonResponse getCheckStatisticalAnalysis(
@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) CheckStatisticalParam queryRequests) { @ApiParam(value = "查询条件", required = false) @RequestBody(required = false) CheckStatisticalParam queryRequests) {
...@@ -432,7 +432,7 @@ public class CheckController extends AbstractBaseController { ...@@ -432,7 +432,7 @@ public class CheckController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "导出巡检情况统计分析", notes = "导出巡检情况统计分析") @ApiOperation(value = "导出维保情况统计分析", notes = "导出维保情况统计分析")
@RequestMapping(value = "/exportStatisticalAnalysis", method = RequestMethod.POST, produces = "application/vnd.ms-excel;charset=UTF-8") @RequestMapping(value = "/exportStatisticalAnalysis", method = RequestMethod.POST, produces = "application/vnd.ms-excel;charset=UTF-8")
public void exportStatisticalAnalysis( public void exportStatisticalAnalysis(
@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) CheckStatisticalParam queryRequests, @ApiParam(value = "查询条件", required = false) @RequestBody(required = false) CheckStatisticalParam queryRequests,
...@@ -442,13 +442,13 @@ public class CheckController extends AbstractBaseController { ...@@ -442,13 +442,13 @@ public class CheckController extends AbstractBaseController {
String loginOrgCode = getOrgCode(reginParams); String loginOrgCode = getOrgCode(reginParams);
queryRequests.setOrgCode(loginOrgCode); queryRequests.setOrgCode(loginOrgCode);
List<CheckAnalysisVo> list = checkService.getCheckStatisticalAnalysis(getToken(), getProduct(), getAppKey(), queryRequests); List<CheckAnalysisVo> list = checkService.getCheckStatisticalAnalysis(getToken(), getProduct(), getAppKey(), queryRequests);
String fileName = "巡检记录" + new Date().getTime(); String fileName = "维保记录" + new Date().getTime();
FileHelper.exportExcel(list, "巡检情况统计分析\"", "巡检情况统计分析\"", CheckAnalysisVo.class, fileName + ".xls", response); FileHelper.exportExcel(list, "维保情况统计分析\"", "维保情况统计分析\"", CheckAnalysisVo.class, fileName + ".xls", response);
} }
/** /**
* 根据检查项ID和检查输入项ID查询图片, 如果输入项ID位0时,查询巡检现场照片, 如果不为0查询检查项照片 * 根据检查项ID和检查输入项ID查询图片, 如果输入项ID位0时,查询维保现场照片, 如果不为0查询检查项照片
* *
* @param checkId * @param checkId
* @param checkInputId * @param checkInputId
...@@ -458,7 +458,7 @@ public class CheckController extends AbstractBaseController { ...@@ -458,7 +458,7 @@ public class CheckController extends AbstractBaseController {
@ApiOperation(value = "获取检查项照片URL(<font color='blue'>release</font>)", notes = "获取检查项照片URL") @ApiOperation(value = "获取检查项照片URL(<font color='blue'>release</font>)", notes = "获取检查项照片URL")
@RequestMapping(value = "/getCheckPic", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @RequestMapping(value = "/getCheckPic", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public CommonResponse getCheckPhotosByCheckAndInputId( public CommonResponse getCheckPhotosByCheckAndInputId(
@ApiParam(value = "巡检记录ID") @RequestParam(required = true) int checkId, @ApiParam(value = "维保记录ID") @RequestParam(required = true) int checkId,
@ApiParam(value = "检查输入项ID") @RequestParam(required = false) int checkInputId, @ApiParam(value = "检查输入项ID") @RequestParam(required = false) int checkInputId,
@ApiParam(value = "分类ID") @RequestParam(required = false) int classifyId) { @ApiParam(value = "分类ID") @RequestParam(required = false) int classifyId) {
try { try {
......
package com.yeejoin.amos.maintenance.business.feign; package com.yeejoin.amos.maintenance.business.feign;
import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
//装备 /**
@FeignClient(name = "${equip.fegin.name}") * @author DELL
public interface EquipFeign { */ //装备
@RequestMapping(value = "${equip.fegin.prefix}" + "/equipSpecific/getSourceNameByEquipSpeId", method = RequestMethod.GET, consumes = "application/json") @FeignClient(name = "${equip.feign.name}")
LinkedHashMap<String, Object> getEquipDetail(@RequestParam(value = "id", required = true) Long id); public interface EquipFeignClient {
String PREFIX = "${equip.feign.prefix}";
@RequestMapping(value = "${equip.fegin.prefix}" + "/equipSpecific/getSourceNameList", method = RequestMethod.POST, consumes = "application/json") @RequestMapping(value = PREFIX + "/equipSpecific/getSourceNameByEquipSpeId", method = RequestMethod.GET, consumes = "application/json")
LinkedHashMap<String, Object> getEquipDetail(@RequestParam(value = "id") Long id);
@RequestMapping(value = PREFIX + "/equipSpecific/getSourceNameList", method = RequestMethod.POST, consumes = "application/json")
LinkedHashMap<String, Object> getEquipList(@RequestBody Long id); LinkedHashMap<String, Object> getEquipList(@RequestBody Long id);
@RequestMapping(value = "${equip.fegin.prefix}" + "/warehouse-structure/listAll", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = PREFIX + "/warehouse-structure/listAll", method = RequestMethod.GET, consumes = "application/json")
String getStructureNameAll(); String getStructureNameAll();
/** /**
...@@ -24,10 +30,10 @@ public interface EquipFeign { ...@@ -24,10 +30,10 @@ public interface EquipFeign {
* *
* @return * @return
*/ */
@RequestMapping(value = "${equip.fegin.prefix}" + "/building/tree", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = PREFIX + "/building/tree", method = RequestMethod.GET, consumes = "application/json")
LinkedHashMap<String, Object> getBuildingTree(); LinkedHashMap<String, Object> getBuildingTree();
@RequestMapping(value = "${equip.fegin.prefix}" + "/building/getBuildingAbsolutePosition", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = PREFIX + "/building/getBuildingAbsolutePosition", method = RequestMethod.GET, consumes = "application/json")
LinkedHashMap<String, Object> getBuildingAbsolutePosition(); LinkedHashMap<String, Object> getBuildingAbsolutePosition();
/** /**
...@@ -35,7 +41,7 @@ public interface EquipFeign { ...@@ -35,7 +41,7 @@ public interface EquipFeign {
* *
* @return * @return
*/ */
@RequestMapping(value = "${equip.fegin.prefix}" + "/area/tree", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = PREFIX + "/area/tree", method = RequestMethod.GET, consumes = "application/json")
LinkedHashMap<String, Object> getRegionTress(); LinkedHashMap<String, Object> getRegionTress();
/** /**
...@@ -45,7 +51,7 @@ public interface EquipFeign { ...@@ -45,7 +51,7 @@ public interface EquipFeign {
* @param id * @param id
* @return * @return
*/ */
@GetMapping(value = "${equip.fegin.prefix}+/maintenanceResourceData/getFireFacilityList") @GetMapping(value = PREFIX+"/maintenanceResourceData/getFireFacilityList")
List<Map<String, Object>> overTimeMaintenanceFacility(@RequestParam String type, @RequestParam String id); ResponseModel<List<Map<String, Object>>> overTimeMaintenanceFacility(@RequestParam String type, @RequestParam String id);
} }
...@@ -21,7 +21,7 @@ import com.yeejoin.amos.maintenance.business.dto.CheckDto; ...@@ -21,7 +21,7 @@ import com.yeejoin.amos.maintenance.business.dto.CheckDto;
import com.yeejoin.amos.maintenance.business.dto.CheckRecordDto; import com.yeejoin.amos.maintenance.business.dto.CheckRecordDto;
import com.yeejoin.amos.maintenance.business.dto.CheckShotDto; import com.yeejoin.amos.maintenance.business.dto.CheckShotDto;
import com.yeejoin.amos.maintenance.business.entity.mybatis.*; import com.yeejoin.amos.maintenance.business.entity.mybatis.*;
import com.yeejoin.amos.maintenance.business.feign.EquipFeign; import com.yeejoin.amos.maintenance.business.feign.EquipFeignClient;
import com.yeejoin.amos.maintenance.business.param.*; import com.yeejoin.amos.maintenance.business.param.*;
import com.yeejoin.amos.maintenance.business.service.intfc.ICheckService; import com.yeejoin.amos.maintenance.business.service.intfc.ICheckService;
import com.yeejoin.amos.maintenance.business.service.intfc.IEquipmentHandlerService; import com.yeejoin.amos.maintenance.business.service.intfc.IEquipmentHandlerService;
...@@ -246,8 +246,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -246,8 +246,8 @@ public class CheckServiceImpl implements ICheckService {
//6.消息广播最近维保日期 //6.消息广播最近维保日期
if(StringUtil.isNotEmpty(point.getOriginalId())){ if(StringUtil.isNotEmpty(point.getOriginalId())){
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("facilityId",point.getOriginalId()); jsonObject.put("fireFacilityId",point.getOriginalId());
jsonObject.put("checkTime",check.getCheckTime()); jsonObject.put("maintenanceTime",check.getCheckTime());
mqttGateway.publish(CHECK_UPDATE_TOPIC,jsonObject.toJSONString()); mqttGateway.publish(CHECK_UPDATE_TOPIC,jsonObject.toJSONString());
} }
//7.返回不合格记录 //7.返回不合格记录
...@@ -950,7 +950,7 @@ public class CheckServiceImpl implements ICheckService { ...@@ -950,7 +950,7 @@ public class CheckServiceImpl implements ICheckService {
} }
@Autowired @Autowired
private EquipFeign equipment; private EquipFeignClient equipment;
@Override @Override
public List<HashMap<String, Object>> getEquipByCheckId(CheckDetailInputPageParam param) { public List<HashMap<String, Object>> getEquipByCheckId(CheckDetailInputPageParam param) {
......
...@@ -23,7 +23,7 @@ import com.yeejoin.amos.maintenance.business.dao.repository.IMsgDao; ...@@ -23,7 +23,7 @@ import com.yeejoin.amos.maintenance.business.dao.repository.IMsgDao;
import com.yeejoin.amos.maintenance.business.dao.repository.IPlanTaskDetailDao; import com.yeejoin.amos.maintenance.business.dao.repository.IPlanTaskDetailDao;
import com.yeejoin.amos.maintenance.business.dao.repository.IPointDao; import com.yeejoin.amos.maintenance.business.dao.repository.IPointDao;
import com.yeejoin.amos.maintenance.business.dao.repository.IRouteDao; import com.yeejoin.amos.maintenance.business.dao.repository.IRouteDao;
import com.yeejoin.amos.maintenance.business.feign.EquipFeign; import com.yeejoin.amos.maintenance.business.feign.EquipFeignClient;
import com.yeejoin.amos.maintenance.business.service.intfc.IMessageService; import com.yeejoin.amos.maintenance.business.service.intfc.IMessageService;
import com.yeejoin.amos.maintenance.business.util.StringUtil; import com.yeejoin.amos.maintenance.business.util.StringUtil;
import com.yeejoin.amos.maintenance.business.vo.MsgVo; import com.yeejoin.amos.maintenance.business.vo.MsgVo;
...@@ -106,7 +106,7 @@ public class MessageServiceImpl implements IMessageService { ...@@ -106,7 +106,7 @@ public class MessageServiceImpl implements IMessageService {
private RemoteSecurityService remoteSecurityService; private RemoteSecurityService remoteSecurityService;
@Autowired @Autowired
private EquipFeign equipFeign; private EquipFeignClient equipFeign;
@Override @Override
public void pushCheckMessage(String toke,String product,String appKey,Long checkId) { public void pushCheckMessage(String toke,String product,String appKey,Long checkId) {
try{ try{
......
...@@ -14,7 +14,7 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper; ...@@ -14,7 +14,7 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper;
import com.yeejoin.amos.maintenance.business.dao.repository.*; import com.yeejoin.amos.maintenance.business.dao.repository.*;
import com.yeejoin.amos.maintenance.business.entity.mybatis.CheckChkExListBo; import com.yeejoin.amos.maintenance.business.entity.mybatis.CheckChkExListBo;
import com.yeejoin.amos.maintenance.business.entity.mybatis.PointCheckDetailBo; import com.yeejoin.amos.maintenance.business.entity.mybatis.PointCheckDetailBo;
import com.yeejoin.amos.maintenance.business.feign.EquipFeign; import com.yeejoin.amos.maintenance.business.feign.EquipFeignClient;
import com.yeejoin.amos.maintenance.business.param.CheckPtListPageParam; import com.yeejoin.amos.maintenance.business.param.CheckPtListPageParam;
import com.yeejoin.amos.maintenance.business.param.PlanTaskPageParam; import com.yeejoin.amos.maintenance.business.param.PlanTaskPageParam;
import com.yeejoin.amos.maintenance.business.service.intfc.ICheckService; import com.yeejoin.amos.maintenance.business.service.intfc.ICheckService;
...@@ -81,7 +81,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -81,7 +81,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
private ICheckService checkService; private ICheckService checkService;
@Autowired @Autowired
private EquipFeign equipFeign; private EquipFeignClient equipFeign;
@Autowired @Autowired
IPointDao iPointDao; IPointDao iPointDao;
......
...@@ -3,7 +3,6 @@ package com.yeejoin.amos.maintenance.business.service.impl; ...@@ -3,7 +3,6 @@ package com.yeejoin.amos.maintenance.business.service.impl;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Sequence; import com.baomidou.mybatisplus.core.toolkit.Sequence;
import com.baomidou.mybatisplus.extension.api.R;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...@@ -14,7 +13,7 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.RouteMapper; ...@@ -14,7 +13,7 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.RouteMapper;
import com.yeejoin.amos.maintenance.business.dao.repository.*; import com.yeejoin.amos.maintenance.business.dao.repository.*;
import com.yeejoin.amos.maintenance.business.dto.PointDto; import com.yeejoin.amos.maintenance.business.dto.PointDto;
import com.yeejoin.amos.maintenance.business.entity.mybatis.CheckPtListBo; import com.yeejoin.amos.maintenance.business.entity.mybatis.CheckPtListBo;
import com.yeejoin.amos.maintenance.business.feign.EquipFeign; import com.yeejoin.amos.maintenance.business.feign.EquipFeignClient;
import com.yeejoin.amos.maintenance.business.param.*; import com.yeejoin.amos.maintenance.business.param.*;
import com.yeejoin.amos.maintenance.business.service.intfc.IPointService; import com.yeejoin.amos.maintenance.business.service.intfc.IPointService;
import com.yeejoin.amos.maintenance.business.util.DaoCriteria; import com.yeejoin.amos.maintenance.business.util.DaoCriteria;
...@@ -92,7 +91,7 @@ public class PointServiceImpl implements IPointService { ...@@ -92,7 +91,7 @@ public class PointServiceImpl implements IPointService {
@Autowired @Autowired
private RemoteSecurityService remoteSecurityService; private RemoteSecurityService remoteSecurityService;
@Autowired @Autowired
private EquipFeign equipFeign; private EquipFeignClient equipFeign;
@Autowired @Autowired
Sequence sequence; Sequence sequence;
......
...@@ -2,14 +2,14 @@ package com.yeejoin.amos.maintenance.business.service.impl; ...@@ -2,14 +2,14 @@ package com.yeejoin.amos.maintenance.business.service.impl;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper; import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper;
import com.yeejoin.amos.maintenance.business.feign.EquipFeign; import com.yeejoin.amos.maintenance.business.feign.EquipFeignClient;
import com.yeejoin.amos.maintenance.business.service.intfc.IStatisticsService; import com.yeejoin.amos.maintenance.business.service.intfc.IStatisticsService;
import com.yeejoin.amos.maintenance.common.enums.PlanTaskDetailIsFinishEnum; import com.yeejoin.amos.maintenance.common.enums.PlanTaskDetailIsFinishEnum;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -24,7 +24,7 @@ public class StatisticsServiceImpl implements IStatisticsService { ...@@ -24,7 +24,7 @@ public class StatisticsServiceImpl implements IStatisticsService {
@Autowired @Autowired
PlanTaskMapper planTaskMapper; PlanTaskMapper planTaskMapper;
@Autowired @Autowired
EquipFeign equipFeign; EquipFeignClient equipFeign;
@Override @Override
public Map<String, Object> taskStatusStatistics(ReginParams.PersonIdentity opIdentifyInfo, String orgCode) { public Map<String, Object> taskStatusStatistics(ReginParams.PersonIdentity opIdentifyInfo, String orgCode) {
...@@ -37,8 +37,8 @@ public class StatisticsServiceImpl implements IStatisticsService { ...@@ -37,8 +37,8 @@ public class StatisticsServiceImpl implements IStatisticsService {
resultMap.put("waitExecuteTask", statusNumberMap.get(PlanTaskDetailIsFinishEnum.UNFINISHED.getValue()) == null ? 0L : statusNumberMap.get(PlanTaskDetailIsFinishEnum.UNFINISHED.getValue())); resultMap.put("waitExecuteTask", statusNumberMap.get(PlanTaskDetailIsFinishEnum.UNFINISHED.getValue()) == null ? 0L : statusNumberMap.get(PlanTaskDetailIsFinishEnum.UNFINISHED.getValue()));
// 超时任务数量 // 超时任务数量
resultMap.put("overTimeTask", statusNumberMap.get(PlanTaskDetailIsFinishEnum.OVERTIME.getValue()) == null ? 0L : statusNumberMap.get(PlanTaskDetailIsFinishEnum.OVERTIME.getValue())); resultMap.put("overTimeTask", statusNumberMap.get(PlanTaskDetailIsFinishEnum.OVERTIME.getValue()) == null ? 0L : statusNumberMap.get(PlanTaskDetailIsFinishEnum.OVERTIME.getValue()));
List<Map<String, Object>> overTimeFacility = new ArrayList<>(); ResponseModel<List<Map<String, Object>>> response = equipFeign.overTimeMaintenanceFacility(opIdentifyInfo.getIdentityType(),opIdentifyInfo.getCompanyId());
//overTimeFacility = equipFeign.overTimeMaintenanceFacility(opIdentifyInfo.getIdentityType(),opIdentifyInfo.getCompanyId()); List<Map<String, Object>> overTimeFacility = response.getResult();
// 到期维保设备 // 到期维保设备
resultMap.put("overTimeFacility", overTimeFacility.size()); resultMap.put("overTimeFacility", overTimeFacility.size());
return resultMap; return resultMap;
......
...@@ -19,6 +19,6 @@ public @interface PersonIdentify { ...@@ -19,6 +19,6 @@ public @interface PersonIdentify {
* 是否进行人员校验 * 是否进行人员校验
* @return * @return
*/ */
boolean isNeedIdentity() default false; boolean isNeedIdentity() default true;
} }
...@@ -40,7 +40,7 @@ public class PersonIdentifyAspect { ...@@ -40,7 +40,7 @@ public class PersonIdentifyAspect {
String identityType = "1"; String identityType = "1";
String personSeq = "1421016571081420802"; String personSeq = "1421016571081420802";
String personName = "SHG"; String personName = "SHG";
String companyId = "10"; String companyId = "1420727427956502529";
reginParam.setPersonIdentity(new ReginParams.PersonIdentity(identityType, personSeq, personName, companyId)); reginParam.setPersonIdentity(new ReginParams.PersonIdentity(identityType, personSeq, personName, companyId));
redisUtils.set(buildKey(RequestContext.getToken()), JSONObject.toJSONString(reginParam)); redisUtils.set(buildKey(RequestContext.getToken()), JSONObject.toJSONString(reginParam));
} }
......
...@@ -373,43 +373,39 @@ public class AlertCalledController extends BaseController { ...@@ -373,43 +373,39 @@ public class AlertCalledController extends BaseController {
/** /**
* 冻结工单-维修 * 冻结工单-维修
* @param forzenResult
* @param alertId
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/saveForzen") @PostMapping(value = "/saveForzen")
@ApiOperation(httpMethod = "POST", value = "冻结工单-维修", notes = "冻结工单-维修") @ApiOperation(httpMethod = "POST", value = "冻结工单-维修", notes = "冻结工单-维修")
public ResponseModel<Boolean> forzenAlertById(@ApiParam(value = "冻结原因", required = true) @RequestParam String forzenResult, @ApiParam(value = "警情id", required = true) @RequestParam Long alertId) { public ResponseModel<Boolean> forzenAlertById(@RequestBody AlertCalledDto alertCalledDto) {
if (ValidationUtil.isEmpty(alertId) if (ValidationUtil.isEmpty(alertCalledDto.getSequenceNbr())
|| ValidationUtil.isEmpty(forzenResult)){ || ValidationUtil.isEmpty(alertCalledDto.getForzenResult())){
throw new BadRequest("参数校验失败."); throw new BadRequest("参数校验失败.");
} }
LambdaUpdateWrapper<AlertCalled> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<AlertCalled> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(AlertCalled::getForzenResult,forzenResult); updateWrapper.set(AlertCalled::getForzenResult,alertCalledDto.getForzenResult());
updateWrapper.set(AlertCalled::getAlertStage,1); updateWrapper.set(AlertCalled::getAlertStage,1);
updateWrapper.eq(AlertCalled::getSequenceNbr,alertId); updateWrapper.eq(AlertCalled::getSequenceNbr,alertCalledDto.getSequenceNbr());
return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper)); return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper));
} }
/** /**
* 工单结案-投诉 * 工单结案-投诉
* @param finalReason
* @param alertId
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/saveFinalReason") @PostMapping(value = "/saveFinalReason")
@ApiOperation(httpMethod = "POST", value = "工单结案-投诉", notes = "工单结案-投诉") @ApiOperation(httpMethod = "POST", value = "工单结案-投诉", notes = "工单结案-投诉")
public ResponseModel<Boolean> finishAlertById(@ApiParam(value = "结案说明", required = true) @RequestParam String finalReason, @ApiParam(value = "警情id", required = true) @RequestParam Long alertId) { public ResponseModel<Boolean> finishAlertById(@RequestBody AlertCalledDto alertCalledDto) {
if (ValidationUtil.isEmpty(finalReason) if (ValidationUtil.isEmpty(alertCalledDto.getFinalReason())
|| ValidationUtil.isEmpty(alertId)){ || ValidationUtil.isEmpty(alertCalledDto.getSequenceNbr())){
throw new BadRequest("参数校验失败."); throw new BadRequest("参数校验失败.");
} }
LambdaUpdateWrapper<AlertCalled> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<AlertCalled> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(AlertCalled::getFinalReason,finalReason); updateWrapper.set(AlertCalled::getFinalReason,alertCalledDto.getFinalReason());
updateWrapper.set(AlertCalled::getAlertStage,1); updateWrapper.set(AlertCalled::getAlertStage,1);
updateWrapper.eq(AlertCalled::getSequenceNbr,alertId); updateWrapper.eq(AlertCalled::getSequenceNbr,alertCalledDto.getSequenceNbr());
return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper)); return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper));
} }
......
...@@ -365,8 +365,10 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa ...@@ -365,8 +365,10 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
break; break;
} }
}); });
dispatchPaper.setFeedbackCode(dispatchSaveFeedbackDto.getFeedbackCode()); if(StringUtils.isNotBlank(dispatchSaveFeedbackDto.getFeedbackCode())) {
dispatchPaper.setFeedbackType(DispatchPaperEnums.getEnumById(dispatchSaveFeedbackDto.getFeedbackCode()).getValue()); dispatchPaper.setFeedbackCode(dispatchSaveFeedbackDto.getFeedbackCode());
dispatchPaper.setFeedbackType(DispatchPaperEnums.getEnumById(dispatchSaveFeedbackDto.getFeedbackCode()).getValue());
}
dispatchPaper.setFeedbackFinishTime(dispatchSaveFeedbackDto.getFeedbackFinishTime()); dispatchPaper.setFeedbackFinishTime(dispatchSaveFeedbackDto.getFeedbackFinishTime());
dispatchPaper.setFeedbackUid(dispatchSaveFeedbackDto.getFeedbackUid()); dispatchPaper.setFeedbackUid(dispatchSaveFeedbackDto.getFeedbackUid());
dispatchPaper.setFeedbackUname(dispatchSaveFeedbackDto.getFeedbackUname()); dispatchPaper.setFeedbackUname(dispatchSaveFeedbackDto.getFeedbackUname());
...@@ -568,8 +570,10 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa ...@@ -568,8 +570,10 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
break; break;
} }
}); });
dispatchPaper.setFeedbackCode(dispatchRepairFeedbackDto.getFeedbackCode()); if(StringUtils.isNotBlank(dispatchRepairFeedbackDto.getFeedbackCode())) {
dispatchPaper.setFeedbackType(DispatchPaperEnums.getEnumById(dispatchRepairFeedbackDto.getFeedbackCode()).getValue()); dispatchPaper.setFeedbackCode(dispatchRepairFeedbackDto.getFeedbackCode());
dispatchPaper.setFeedbackType(DispatchPaperEnums.getEnumById(dispatchRepairFeedbackDto.getFeedbackCode()).getValue());
}
dispatchPaper.setFeedbackFinishTime(dispatchRepairFeedbackDto.getFeedbackFinishTime()); dispatchPaper.setFeedbackFinishTime(dispatchRepairFeedbackDto.getFeedbackFinishTime());
dispatchPaper.setFeedbackUid(dispatchRepairFeedbackDto.getFeedbackUid()); dispatchPaper.setFeedbackUid(dispatchRepairFeedbackDto.getFeedbackUid());
dispatchPaper.setFeedbackUname(dispatchRepairFeedbackDto.getFeedbackUname()); dispatchPaper.setFeedbackUname(dispatchRepairFeedbackDto.getFeedbackUname());
...@@ -772,8 +776,10 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa ...@@ -772,8 +776,10 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
break; break;
} }
}); });
dispatchPaper.setFeedbackCode(dispatchConsultFeedbackDto.getFeedbackCode()); if(StringUtils.isNotBlank(dispatchConsultFeedbackDto.getFeedbackCode())) {
dispatchPaper.setFeedbackType(DispatchPaperEnums.getEnumById(dispatchConsultFeedbackDto.getFeedbackCode()).getValue()); dispatchPaper.setFeedbackCode(dispatchConsultFeedbackDto.getFeedbackCode());
dispatchPaper.setFeedbackType(DispatchPaperEnums.getEnumById(dispatchConsultFeedbackDto.getFeedbackCode()).getValue());
}
if(dispatchPaper.getFeedbackTime() == null && dispatchConsultFeedbackDto.getFeedbackTime() != null) { if(dispatchPaper.getFeedbackTime() == null && dispatchConsultFeedbackDto.getFeedbackTime() != null) {
tempMap.put("FEEDBACK",true); tempMap.put("FEEDBACK",true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment