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