Browse Source

厅长信箱来源无效件判断新增附件上传

master
wxc 3 months ago
parent
commit
20bf5b7e2c
  1. 6
      mailbox-lan/src/main/java/com/biutag/lan/controller/MailController.java
  2. 8
      mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java
  3. 3
      mailbox-lan/src/main/java/com/biutag/lan/domain/MailSource.java
  4. 11
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java
  5. 3
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java
  6. 1
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java
  7. 3
      mailbox-lan/src/main/java/com/biutag/lan/service/MailSourceService.java
  8. 2
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/DeptServiceImpl.java

6
mailbox-lan/src/main/java/com/biutag/lan/controller/MailController.java

@ -36,6 +36,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.simpleframework.xml.core.Validate; import org.simpleframework.xml.core.Validate;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -60,6 +61,9 @@ public class MailController {
private final MailBlameService mailBlameService; private final MailBlameService mailBlameService;
@Value("${spring.profiles.active}")
private String active;
@Operation(summary = "查看信件详情") @Operation(summary = "查看信件详情")
@Log(title="查看信件详情") @Log(title="查看信件详情")
@NotPower @NotPower
@ -73,7 +77,7 @@ public class MailController {
@SaCheckPermission("mail:add") @SaCheckPermission("mail:add")
@PostMapping("add") @PostMapping("add")
public AjaxResult<Boolean> add(@RequestBody @Valid MailOuter mail) { public AjaxResult<Boolean> add(@RequestBody @Valid MailOuter mail) {
if ("厅长信箱".equals(mail.getSource())) { if ("厅长信箱".equals(mail.getSource()) && "prod".equals(active)) {
throw new RuntimeException("厅长信箱不支持自建信件"); throw new RuntimeException("厅长信箱不支持自建信件");
} }
return AjaxResult.success(mailService.save(mail)); return AjaxResult.success(mailService.save(mail));

8
mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java

@ -417,4 +417,12 @@ public class Mail {
// 派驻督察人员-警号 // 派驻督察人员-警号
private String dispatchedInspectorEmpNo; private String dispatchedInspectorEmpNo;
// 是否取得联系
private String invalidationContactFlag;
// 无效判定佐证材料
private String invalidationAttachments;
private Boolean repeat;
} }

3
mailbox-lan/src/main/java/com/biutag/lan/domain/MailSource.java

@ -88,6 +88,9 @@ public class MailSource {
private String mailId; private String mailId;
//
private Boolean revisit = false;
public Mail toMail() { public Mail toMail() {
Mail mail = new Mail(); Mail mail = new Mail();
BeanUtils.copyProperties(this, mail); BeanUtils.copyProperties(this, mail);

11
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java

@ -404,6 +404,14 @@ public class MailVo {
// 派驻督察人员-警号 // 派驻督察人员-警号
private String dispatchedInspectorEmpNo; private String dispatchedInspectorEmpNo;
// 是否取得联系
private String invalidationContactFlag;
// 无效判定佐证材料
private JSONArray invalidationAttachments;
private Boolean revisit;
/** /**
* 部门会签 * 部门会签
*/ */
@ -449,6 +457,9 @@ public class MailVo {
if (StrUtil.isNotBlank(mail.getVerifyAttachments())) { if (StrUtil.isNotBlank(mail.getVerifyAttachments())) {
mailVo.setVerifyAttachments(JSON.parseArray(mail.getVerifyAttachments())); mailVo.setVerifyAttachments(JSON.parseArray(mail.getVerifyAttachments()));
} }
if (StrUtil.isNotBlank(mail.getInvalidationAttachments())) {
mailVo.setInvalidationAttachments(JSON.parseArray(mail.getInvalidationAttachments()));
}
// 下发信息 // 下发信息
if (StrUtil.isNotBlank(mail.getFirstDistributeInfo())) { if (StrUtil.isNotBlank(mail.getFirstDistributeInfo())) {

3
mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java

@ -104,6 +104,9 @@ public class FirstSignFlow extends Flow {
.setMailCategory(mailCategory) .setMailCategory(mailCategory)
.setMailLevel(data.getString("mailLevel")) .setMailLevel(data.getString("mailLevel"))
.setSimpleFlowFlag(data.getBoolean("simpleFlowFlag")) .setSimpleFlowFlag(data.getBoolean("simpleFlowFlag"))
.setInvalidationContactFlag(data.getString("invalidationContactFlag"))
.setInvalidationAttachments(data.getString("invalidationAttachments"))
.setRepeat(data.getBoolean("repeat"))
.setFlowKey(nextNode.getFlowNode().getKey()) .setFlowKey(nextNode.getFlowNode().getKey())
.setFlowName(nextNode.getFlowNode().getBeforeName()); .setFlowName(nextNode.getFlowNode().getBeforeName());
mailService.save(mail); mailService.save(mail);

1
mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java

@ -125,6 +125,7 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
.sorted(Comparator.comparing(MailFlow::getCreateTime).reversed()) .sorted(Comparator.comparing(MailFlow::getCreateTime).reversed())
.collect(Collectors.toList()); .collect(Collectors.toList());
MailVo mailVo = MailVo.of(mail) MailVo mailVo = MailVo.of(mail)
.setRevisit(mailSource.getRevisit())
.setMailBlames(mailBlameService.list(mailId)) .setMailBlames(mailBlameService.list(mailId))
// 部门会签 // 部门会签
.setCountersigns(mailCountersignService.list(mailId)) .setCountersigns(mailCountersignService.list(mailId))

3
mailbox-lan/src/main/java/com/biutag/lan/service/MailSourceService.java

@ -32,6 +32,9 @@ public class MailSourceService extends ServiceImpl<MailSourceMapper, MailSource>
List<MailSource> collect = mailOuterList.stream().map(MailOuter::toMailSource).collect(Collectors.toList()); List<MailSource> collect = mailOuterList.stream().map(MailOuter::toMailSource).collect(Collectors.toList());
// 将信件加入到我的专班的待办 // 将信件加入到我的专班的待办
workService.saveBatch(collect); workService.saveBatch(collect);
collect.forEach(item -> {
item.setRevisit(exists(new LambdaQueryWrapper<MailSource>().eq(MailSource::getContactPhone, item.getContactPhone())));
});
boolean flag = saveBatch(collect); boolean flag = saveBatch(collect);
log.info("信件NLP:{}, {} -----------------------", flag, aiUrl); log.info("信件NLP:{}, {} -----------------------", flag, aiUrl);
if (flag && StrUtil.isNotBlank(aiUrl)) { if (flag && StrUtil.isNotBlank(aiUrl)) {

2
mailbox-lan/src/main/java/com/biutag/lan/service/impl/DeptServiceImpl.java

@ -353,7 +353,7 @@ class DeptServiceImpl implements IDeptService {
PoliceUser PoliceUser = policeUserMapper.selectOne(new QueryWrapper<PoliceUser>() PoliceUser PoliceUser = policeUserMapper.selectOne(new QueryWrapper<PoliceUser>()
.select("id,nickname") .select("id,nickname")
.eq("dept_ids", id) .eq("dept_ids", id.toString())
.eq("is_delete", 0) .eq("is_delete", 0)
.last("limit 1")); .last("limit 1"));

Loading…
Cancel
Save