Commit 40aacfd6 authored by KeYong's avatar KeYong

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

parents 47d8a4d3 06ce621a
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
<groupId>org.typroject</groupId> <groupId>org.typroject</groupId>
<artifactId>tyboot-core-auth</artifactId> <artifactId>tyboot-core-auth</artifactId>
</exclusion> </exclusion>
<exclusion>
<artifactId>fastjson</artifactId>
<groupId>com.alibaba</groupId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
...@@ -36,12 +40,6 @@ ...@@ -36,12 +40,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!-- 添加fastjson 依赖包. -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.15</version>
</dependency>
<dependency> <dependency>
<groupId>org.quartz-scheduler</groupId> <groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId> <artifactId>quartz</artifactId>
......
...@@ -519,9 +519,9 @@ public class CheckController extends AbstractBaseController { ...@@ -519,9 +519,9 @@ public class CheckController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "维保记录详情", notes = "维保记录详情") @ApiOperation(value = "维保记录详情", notes = "维保记录详情")
@GetMapping(value = "/detail/{id}") @GetMapping(value = "/{id}/detail")
public CommonResponse getCheckDetail( public CommonResponse getCheckDetail(
@ApiParam(value = "记录Id") @PathVariable(value = "id") String id) throws Exception { @ApiParam(value = "记录Id",required = true) @PathVariable(value = "id") String id) {
return CommonResponseUtil.success(checkService.getCheckDetail(id)); return CommonResponseUtil.success(checkService.getCheckDetail(id));
} }
......
...@@ -75,6 +75,12 @@ public class PlanTaskPointInputItemBo { ...@@ -75,6 +75,12 @@ public class PlanTaskPointInputItemBo {
* 巡检任务详情id * 巡检任务详情id
*/ */
private long planTaskDetailId; private long planTaskDetailId;
/**
* 风险辨识与管控措施
*/
private String riskAndManage;
/** /**
* 巡检路线 * 巡检路线
......
...@@ -156,8 +156,11 @@ public class CheckServiceImpl implements ICheckService { ...@@ -156,8 +156,11 @@ public class CheckServiceImpl implements ICheckService {
check.setPointName(point.getName()); check.setPointName(point.getName());
check.setPointId(point.getId()); check.setPointId(point.getId());
check.setPointNo(point.getPointNo()); check.setPointNo(point.getPointNo());
check.setRiskAndManage(point.getRemark());
check.setRemark(recordParam.getRemark()); check.setRemark(recordParam.getRemark());
check.setCheckTime(new Date()); check.setCheckTime(new Date());
check.setBeginTime(planTask.getBeginTime());
check.setEndTime(planTask.getEndTime());
check.setUploadTime(new Date()); check.setUploadTime(new Date());
check.setOrgCode(recordParam.getOrgCode()); check.setOrgCode(recordParam.getOrgCode());
check.setUserId(mtUserSeq); check.setUserId(mtUserSeq);
...@@ -268,8 +271,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -268,8 +271,8 @@ public class CheckServiceImpl implements ICheckService {
//7.返回不合格记录 //7.返回不合格记录
return new CheckDto(check.getId(), unqualifiedCheckItemList); return new CheckDto(check.getId(), unqualifiedCheckItemList);
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(),e); log.error(e.getMessage(), e);
throw new Exception(e.getMessage(),e); throw new Exception(e.getMessage(), e);
} }
} }
...@@ -445,10 +448,10 @@ public class CheckServiceImpl implements ICheckService { ...@@ -445,10 +448,10 @@ public class CheckServiceImpl implements ICheckService {
@Override @Override
public List<CheckInputDto> getInputDetail(String checkId) { public List<CheckInputDto> getInputDetail(String checkId) {
List<CheckInputDto> list = this.checkMapper.queryCheckInputDetail(checkId,fileUrl); List<CheckInputDto> list = this.checkMapper.queryCheckInputDetail(checkId, fileUrl);
list.forEach(input->{ list.forEach(input -> {
CheckStatusEnum statusEnum = CheckStatusEnum.getEnum(input.getIsOk()); CheckStatusEnum statusEnum = CheckStatusEnum.getEnum(input.getIsOk());
if(statusEnum != null){ if (statusEnum != null) {
input.setIsOkDesc(statusEnum.getName()); input.setIsOkDesc(statusEnum.getName());
} }
}); });
...@@ -1110,15 +1113,19 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1110,15 +1113,19 @@ public class CheckServiceImpl implements ICheckService {
} }
@Override @Override
public Map<String, Object> getCheckDetail(String id) { public Map<String, Object> getCheckDetail(String checkId) {
Map<String, Object> map = checkMapper.getCheckDetail(id); Map<String, Object> result = new HashMap<>();
if (map.containsKey("isOk")) { result.put("facility", this.buildCheckMainInfo(checkId));
map.put("status", CheckStatusEnum.getEnum(String.valueOf(map.get("isOk"))).getName()); result.put("itemList", this.getInputDetail(checkId));
} return result;
if (map.containsKey("picture")) { }
map.put("picture", fileUrl + map.get("picture"));
private Map<String, Object> buildCheckMainInfo(String checkId) {
Map<String, Object> facility = checkMapper.getCheckDetail(checkId);
if (facility.containsKey("isOk")) {
facility.put("isOkDesc", CheckStatusEnum.getEnum(String.valueOf(facility.get("isOk"))).getName());
} }
return map; return facility;
} }
@Override @Override
......
...@@ -8,10 +8,8 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskDetailMapper; ...@@ -8,10 +8,8 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskDetailMapper;
import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper; 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.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.IPlanTaskService; import com.yeejoin.amos.maintenance.business.service.intfc.IPlanTaskService;
import com.yeejoin.amos.maintenance.business.util.PlanTaskUtil; import com.yeejoin.amos.maintenance.business.util.PlanTaskUtil;
import com.yeejoin.amos.maintenance.business.vo.CalDateVo; import com.yeejoin.amos.maintenance.business.vo.CalDateVo;
...@@ -57,29 +55,17 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -57,29 +55,17 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Autowired @Autowired
IPlanDao iplanDao; IPlanDao iplanDao;
@Autowired @Autowired
private ICheckDao checkDao;
@Autowired
private RemoteSecurityService remoteSecurityService; private RemoteSecurityService remoteSecurityService;
@Autowired @Autowired
private IPlanTaskDetailDao planTaskDetail; private IPlanTaskDetailDao planTaskDetail;
@Autowired @Autowired
IRoutePointDao iRoutePointDao; IRoutePointDao iRoutePointDao;
@Autowired @Autowired
IJobService jobService; IJobService jobService;
@Autowired
private ICheckService checkService;
@Autowired
private EquipFeignClient equipFeign;
@Autowired @Autowired
IPointDao iPointDao; IPointDao iPointDao;
@Autowired @Autowired
IPlanTaskDetailDao iPlanTaskDetailDao; IPlanTaskDetailDao iPlanTaskDetailDao;
@Autowired @Autowired
InputItemMapper inputItemMapper; InputItemMapper inputItemMapper;
...@@ -515,12 +501,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService { ...@@ -515,12 +501,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
} }
@Override @Override
public List<Map<String,Object>> getPlanTaskPoints(Map<String, Object> param) { public List<Map<String, Object>> getPlanTaskPoints(Map<String, Object> param) {
List<Map<String,Object>> result = planTaskMapper.getPlanTaskPoints(param); List<Map<String, Object>> result = planTaskMapper.getPlanTaskPoints(param);
result.forEach(r->{ result.forEach(r -> {
if(r.containsKey("isFinish")){ if (r.containsKey("isFinish")) {
String isFinishDesc = PlanTaskDetailIsFinishEnum.getName(Integer.parseInt(r.get("isFinish").toString())); String isFinishDesc = PlanTaskDetailIsFinishEnum.getName(Integer.parseInt(r.get("isFinish").toString()));
r.put("isFinishDesc",isFinishDesc); r.put("isFinishDesc", isFinishDesc);
} }
}); });
return result; return result;
......
...@@ -47,7 +47,7 @@ public class PersonIdentifyAspect { ...@@ -47,7 +47,7 @@ public class PersonIdentifyAspect {
if (ObjectUtils.isEmpty(responseModel.getResult()) || responseModel.getStatus() != HTTP_OK_STATUS) { if (ObjectUtils.isEmpty(responseModel.getResult()) || responseModel.getStatus() != HTTP_OK_STATUS) {
throw new RuntimeException(responseModel.getDevMessage()); throw new RuntimeException(responseModel.getDevMessage());
} }
ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(),ReginParams.PersonIdentity.class); ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(), ReginParams.PersonIdentity.class);
reginParam.setPersonIdentity(personIdentity); reginParam.setPersonIdentity(personIdentity);
redisUtils.set(buildKey(RequestContext.getToken()), JSONObject.toJSONString(reginParam)); redisUtils.set(buildKey(RequestContext.getToken()), JSONObject.toJSONString(reginParam));
} }
......
...@@ -198,6 +198,9 @@ public class JobService implements IJobService { ...@@ -198,6 +198,9 @@ public class JobService implements IJobService {
check.setPointName(arg.getPointName()); check.setPointName(arg.getPointName());
check.setPointId(arg.getPointId()); check.setPointId(arg.getPointId());
check.setPointNo(arg.getPointNo()); check.setPointNo(arg.getPointNo());
check.setRiskAndManage(arg.getRiskAndManage());
check.setBeginTime(planTask.getBeginTime());
check.setEndTime(planTask.getEndTime());
check.setBuildingName(arg.getBuildingName()); check.setBuildingName(arg.getBuildingName());
check.setUploadTime(new Date()); check.setUploadTime(new Date());
check.setPlanId(arg.getPlanId()); check.setPlanId(arg.getPlanId());
......
...@@ -13,11 +13,13 @@ import org.springframework.cloud.openfeign.EnableFeignClients; ...@@ -13,11 +13,13 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import org.typroject.tyboot.core.restful.config.JsonSerializerManage;
import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler; import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
import java.io.IOException; import java.io.IOException;
...@@ -42,8 +44,9 @@ import java.net.UnknownHostException; ...@@ -42,8 +44,9 @@ import java.net.UnknownHostException;
@EnableFeignClients @EnableFeignClients
@EnableAsync @EnableAsync
@EnableEurekaClient @EnableEurekaClient
@ComponentScan({"org.typroject", "com.yeejoin.amos"}) @ComponentScan(value = {"org.typroject", "com.yeejoin.amos"}, excludeFilters = {
@MapperScan(basePackages = {"com.yeejoin.amos.maintenance.business.dao.mapper", "org.typroject.tyboot.core.auth.face.orm.dao","com.yeejoin.amos.boot.biz.common.dao.mapper"}) @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {JsonSerializerManage.class})})
@MapperScan(basePackages = {"com.yeejoin.amos.maintenance.business.dao.mapper", "org.typroject.tyboot.core.auth.face.orm.dao", "com.yeejoin.amos.boot.biz.common.dao.mapper"})
public class MaintenanceApplication { public class MaintenanceApplication {
private static final Logger logger = LoggerFactory.getLogger(MaintenanceApplication.class); private static final Logger logger = LoggerFactory.getLogger(MaintenanceApplication.class);
...@@ -61,9 +64,9 @@ public class MaintenanceApplication { ...@@ -61,9 +64,9 @@ public class MaintenanceApplication {
* @throws IOException * @throws IOException
* @throws URISyntaxException * @throws URISyntaxException
*/ */
public static void main(String[] args) throws UnknownHostException{ public static void main(String[] args) throws UnknownHostException {
logger.info("start Service.........."); logger.info("start Service..........");
ConfigurableApplicationContext context = SpringApplication.run(MaintenanceApplication.class, args); ConfigurableApplicationContext context = SpringApplication.run(MaintenanceApplication.class, args);
GlobalExceptionHandler.setAlwaysOk(true); GlobalExceptionHandler.setAlwaysOk(true);
Environment env = context.getEnvironment(); Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress(); String ip = InetAddress.getLocalHost().getHostAddress();
......
...@@ -190,4 +190,37 @@ ...@@ -190,4 +190,37 @@
ALTER TABLE p_plan_task add COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '维保公司名称'; ALTER TABLE p_plan_task add COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '维保公司名称';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="suhuiguang" id="1630291249911-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="p_check" columnName="risk_and_manage"/>
</not>
</preConditions>
<comment>p_check add COLUMN risk_and_manage '风险辨识与管控措施'</comment>
<sql>
ALTER TABLE p_check add COLUMN `risk_and_manage` varchar(255) DEFAULT NULL COMMENT '风险辨识与管控措施' after `point_no`;
</sql>
</changeSet>
<changeSet author="suhuiguang" id="1630291249911-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="p_check" columnName="begin_time"/>
</not>
</preConditions>
<comment>p_check add COLUMN begin_time '开始时间'</comment>
<sql>
ALTER TABLE p_check add COLUMN `begin_time` datetime DEFAULT NULL COMMENT '开始时间' after `plan_task_detail_id`;
</sql>
</changeSet>
<changeSet author="suhuiguang" id="1630291249911-3">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="p_check" columnName="end_time"/>
</not>
</preConditions>
<comment>p_check add COLUMN end_time '结束时间'</comment>
<sql>
ALTER TABLE p_check add COLUMN `end_time` datetime DEFAULT NULL COMMENT '结束时间' after `begin_time`;
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -2023,42 +2023,22 @@ ...@@ -2023,42 +2023,22 @@
</select> </select>
<select id="getCheckDetail" resultType="Map"> <select id="getCheckDetail" resultType="Map">
SELECT SELECT
pc.id checkId, pc.id,
pci.is_ok isOk, pc.point_name as pointName,
date_format( pc.point_no as pointNo,
pc.check_time, pc.is_ok isOk,
'%Y-%m-%d %H:%i:%s' CONCAT_WS(',',pc.building_name,pc.address) address,
) maintenanceDate, pc.user_name as userName,
pp.id pointId, pc.plan_id as planId,
pp.equipment_id equipmentId, pc.plan_name as planName,
pp.remark remark, pc.plan_type as planType,
pp.owner_name ownerName, pc.owner_name as ownerName,
pp.equipment_name equipmentName, pc.begin_time as beginTime,
pp.belong_system_id systemId, pc.end_time as endTime,
pp.belong_system_name systemName, pc.check_time as checkTime,
CONCAT_WS(',',pp.building_name,pp.address) address, pc.risk_and_manage as riskAndManage,
CONCAT(date_format( pc.remark
ppl.plan_begin,
'%Y-%m-%d %H:%i:%s'
), '-', date_format(
ppl.plan_end,
'%Y-%m-%d %H:%i:%s'
)) planDate,
ppl.name planName,
ppl.plan_type planType,
ppt.user_name planUser,
pci.input_name itemName,
pii.maintenance_content itemContent,
pcs.photo_data picture,
pcs.point_name pointName,
pcs.shot_type shotType
FROM p_check pc FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_plan ppl ON ppl.id = pc.plan_id
LEFT JOIN p_check_input pci ON pci.check_id = pc.id
LEFT JOIN p_input_item pii ON pii.id = pci.input_id
LEFT JOIN p_check_shot pcs ON pcs.check_id = pc.id
LEFT JOIN p_plan_task ppt ON ppt.id = pc.plan_task_id
WHERE WHERE
pc.id = #{id} pc.id = #{id}
</select> </select>
......
...@@ -392,6 +392,7 @@ ...@@ -392,6 +392,7 @@
temp1.pointNo, temp1.pointNo,
temp1.buildingName, temp1.buildingName,
temp1.equipmentName, temp1.equipmentName,
temp1.remark as riskAndManage,
pii.`name` inputName, pii.`name` inputName,
temp2.* temp2.*
FROM FROM
...@@ -412,7 +413,8 @@ ...@@ -412,7 +413,8 @@
p.owner_id as ownerId, p.owner_id as ownerId,
p.point_no as pointNo, p.point_no as pointNo,
p.building_name as buildingName, p.building_name as buildingName,
p.equipment_name as equipmentName p.equipment_name as equipmentName,
p.remark
FROM FROM
p_route_point_item prpi p_route_point_item prpi
LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id
......
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