Commit 0e2f777c authored by zhangsen's avatar zhangsen

daima tijiao

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