Commit 0e2f777c authored by zhangsen's avatar zhangsen

daima tijiao

parent 91c06195
...@@ -203,7 +203,7 @@ public class PlanVisual3dController extends BaseController { ...@@ -203,7 +203,7 @@ public class PlanVisual3dController extends BaseController {
@Permission @Permission
@ApiOperation(value = "根据批次号获取预案的消息等记录", notes = "根据批次号获取预案的消息等记录") @ApiOperation(value = "根据批次号获取预案的消息等记录", notes = "根据批次号获取预案的消息等记录")
@GetMapping(value = "/plan/getPlaneRecordByNew") @GetMapping(value = "/plan/getPlaneRecordByNew")
public ResponseModel getPlaneRecordByNew(@RequestParam Integer pageNum, @RequestParam Integer size, @RequestParam(required = false) String batchNo) { public ResponseModel<ContingencyPlanInstance> getPlaneRecordByNew(@RequestParam Integer pageNum, @RequestParam Integer size, @RequestParam(required = false) String batchNo) {
if (!StringUtil.isNotEmpty(batchNo)) { if (!StringUtil.isNotEmpty(batchNo)) {
batchNo = planVisual3dService.getNewestBatchNo(); batchNo = planVisual3dService.getNewestBatchNo();
} }
...@@ -218,8 +218,7 @@ public class PlanVisual3dController extends BaseController { ...@@ -218,8 +218,7 @@ public class PlanVisual3dController extends BaseController {
@PostMapping(value = "/plan/replyMessage") @PostMapping(value = "/plan/replyMessage")
public ResponseModel replyMessage(@RequestBody ContingencyPlanInstance dto) { public ResponseModel replyMessage(@RequestBody ContingencyPlanInstance dto) {
AgencyUserModel user = getUserInfo(); AgencyUserModel user = getUserInfo();
planVisual3dService.replyMessage(user, dto); return CommonResponseUtil.successNew(planVisual3dService.replyMessage(user, dto));
return CommonResponseUtil.successNew(null);
} }
@Permission @Permission
......
...@@ -389,7 +389,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -389,7 +389,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
} }
@Override @Override
public void replyMessage(AgencyUserModel user, ContingencyPlanInstance dto) { public ContingencyPlanInstance replyMessage(AgencyUserModel user, ContingencyPlanInstance dto) {
String json = ""; String json = "";
try { try {
json = IOUtils.toString(planStepResource.getInputStream(), String.valueOf(StandardCharsets.UTF_8)); json = IOUtils.toString(planStepResource.getInputStream(), String.valueOf(StandardCharsets.UTF_8));
...@@ -419,8 +419,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -419,8 +419,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
dto.setRoleCode(String.join(",", roleCodeList)); dto.setRoleCode(String.join(",", roleCodeList));
dto.setRoleName(String.join(",", roleNameList)); dto.setRoleName(String.join(",", roleNameList));
dto.setStartUserId(user.getUserId()); dto.setStartUserId(user.getUserId());
dto.setStartUserId(user.getRealName()); dto.setStartUserName(user.getRealName());
dto.setRecordType("REPLYMESSAGE"); dto.setRecordType("REPLYMESSAGE");
dto.setCreateDate(new Date());
Map<String, String> userInfo = contingencyPlanInstanceMapper.getUserByUserId(user.getUserId()); Map<String, String> userInfo = contingencyPlanInstanceMapper.getUserByUserId(user.getUserId());
dto.setPersonImg(userInfo.get("personImg")); dto.setPersonImg(userInfo.get("personImg"));
repository.save(dto); repository.save(dto);
...@@ -430,6 +431,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -430,6 +431,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
} catch (MqttException e) { } catch (MqttException e) {
e.printStackTrace(); e.printStackTrace();
} }
return dto;
} }
@Override @Override
......
...@@ -93,7 +93,7 @@ public interface IPlanVisual3dService { ...@@ -93,7 +93,7 @@ public interface IPlanVisual3dService {
*/ */
Page<ContingencyPlanInstance> getPlaneRecordByNew(Integer pageNum, Integer size, String batchNo); Page<ContingencyPlanInstance> getPlaneRecordByNew(Integer pageNum, Integer size, String batchNo);
void replyMessage(AgencyUserModel user, ContingencyPlanInstance dto); ContingencyPlanInstance replyMessage(AgencyUserModel user, ContingencyPlanInstance dto);
List<ContingencyPlanInstance> selectDisposalActionList(String batchNo , List<RoleModel> roleModelList, int dataType); List<ContingencyPlanInstance> selectDisposalActionList(String batchNo , List<RoleModel> roleModelList, int dataType);
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
contingency_plan_instance contingency_plan_instance
where batch_no = #{batchNo} where batch_no = #{batchNo}
AND record_type in ('REPLYMESSAGE', 'MESSAGE') AND record_type in ('REPLYMESSAGE', 'MESSAGE')
AND is_delete = 0
order by create_date DESC order by create_date DESC
limit #{pageNum}, #{size} limit #{pageNum}, #{size}
</select> </select>
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
contingency_plan_instance contingency_plan_instance
where batch_no = #{batchNo} where batch_no = #{batchNo}
AND record_type in ('REPLYMESSAGE', 'MESSAGE') AND record_type in ('REPLYMESSAGE', 'MESSAGE')
AND is_delete = 0
</select> </select>
<select id="getUserByUserId" resultType="java.util.Map"> <select id="getUserByUserId" resultType="java.util.Map">
......
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