feat:二级封闭区域申请,临时

koumen
dearLin 2026-03-23 08:32:08 +08:00
parent 1fc8255b1b
commit 9aad4222fe
12 changed files with 30 additions and 32 deletions

View File

@ -41,6 +41,7 @@ public class ClosedTmpApplyController {
Long id = 0L; Long id = 0L;
if (cmd.getTmpApplyType().equals(TmpApplyEnum.PERSON_APPLY.getCode())) { if (cmd.getTmpApplyType().equals(TmpApplyEnum.PERSON_APPLY.getCode())) {
if (cmd.getTmpMkmjType().equals(TmpApplyEnum.TWO_LEVEL_PERSON_APPLY.getCode())) { if (cmd.getTmpMkmjType().equals(TmpApplyEnum.TWO_LEVEL_PERSON_APPLY.getCode())) {
id = closedAreaPersonApplyServiceI.saveTmpPersonApply(cmd);
} }
if (cmd.getTmpMkmjType().equals(TmpApplyEnum.ONE_LEVEL_PERSON_APPLY.getCode())) { if (cmd.getTmpMkmjType().equals(TmpApplyEnum.ONE_LEVEL_PERSON_APPLY.getCode())) {
} }
@ -55,13 +56,13 @@ public class ClosedTmpApplyController {
HashMap<String, Object> stringLongHashMap = new HashMap<>(); HashMap<String, Object> stringLongHashMap = new HashMap<>();
stringLongHashMap.put("id", id); stringLongHashMap.put("id", id);
stringLongHashMap.put("tmpApplyType", cmd.getTmpApplyType()); stringLongHashMap.put("tmpApplyType", cmd.getTmpApplyType());
stringLongHashMap.put("tmpMkmjType", cmd.getTmpApplyType()); stringLongHashMap.put("tmpMkmjType", cmd.getTmpMkmjType());
return SingleResponse.of(stringLongHashMap); return SingleResponse.of(stringLongHashMap);
} }
@ApiOperation("详情") @ApiOperation("详情")
@GetMapping("/{id}") @GetMapping("/getInfoById")
public SingleResponse<ClosedAreaCarApplyCO> getInfoById(@PathVariable("id") Long id) { public SingleResponse<ClosedAreaCarApplyCO> getInfoById(@RequestParam("id") Long id, @RequestParam("tmpApplyType") String tmpApplyType, @RequestParam("tmpMkmjType") String tmpMkmjType) {
return SingleResponse.of(closedAreaCarApplyService.queryById(id)); return SingleResponse.of(closedAreaCarApplyService.queryById(id));
} }

View File

@ -33,7 +33,7 @@ public class ClosedAreaCarApplyAddExe {
private ZcloudUserFacade zcloudUserFacade; private ZcloudUserFacade zcloudUserFacade;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean execute(ClosedAreaCarApplyAddCmd cmd) { public Long execute(ClosedAreaCarApplyAddCmd cmd) {
ClosedAreaCarApplyE closedAreaCarApplyE = new ClosedAreaCarApplyE(); ClosedAreaCarApplyE closedAreaCarApplyE = new ClosedAreaCarApplyE();
BeanUtils.copyProperties(cmd, closedAreaCarApplyE); BeanUtils.copyProperties(cmd, closedAreaCarApplyE);
closedAreaCarApplyE.setAuditFlag(AuditEnum.WAITING.getCode()); closedAreaCarApplyE.setAuditFlag(AuditEnum.WAITING.getCode());
@ -66,7 +66,7 @@ public class ClosedAreaCarApplyAddExe {
if (!res) { if (!res) {
throw new BizException("保存失败"); throw new BizException("保存失败");
} }
return true; return closedAreaCarApplyE.getId();
} }
} }

View File

@ -31,7 +31,7 @@ public class ClosedAreaPersonApplyAddExe {
private ZcloudUserFacade zcloudUserFacade; private ZcloudUserFacade zcloudUserFacade;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean execute(ClosedAreaPersonApplyAddCmd cmd) { public Long execute(ClosedAreaPersonApplyAddCmd cmd) {
ClosedAreaPersonApplyE closedAreaPersonApplyE = new ClosedAreaPersonApplyE(); ClosedAreaPersonApplyE closedAreaPersonApplyE = new ClosedAreaPersonApplyE();
BeanUtils.copyProperties(cmd, closedAreaPersonApplyE); BeanUtils.copyProperties(cmd, closedAreaPersonApplyE);
closedAreaPersonApplyE.setAuditFlag(1); closedAreaPersonApplyE.setAuditFlag(1);
@ -60,7 +60,7 @@ public class ClosedAreaPersonApplyAddExe {
if (!res) { if (!res) {
throw new BizException("保存失败"); throw new BizException("保存失败");
} }
return true; return closedAreaPersonApplyE.getId();
} }
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -12,7 +12,9 @@ import com.zcloud.primeport.dto.clientobject.ClosedAreaCarApplyCO;
import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse; import com.alibaba.cola.dto.SingleResponse;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/** /**
* web-app * web-app
@ -67,17 +69,12 @@ public class ClosedAreaCarApplyServiceImpl implements ClosedAreaCarApplyServiceI
} }
@Override @Override
@Transactional
public Long saveTmpCarApply(ClosedTmpApplyAddCmd cmd) { public Long saveTmpCarApply(ClosedTmpApplyAddCmd cmd) {
ClosedAreaCarApplyAddCmd closedAreaCarApplyAddCmd = new ClosedAreaCarApplyAddCmd(); ClosedAreaCarApplyAddCmd closedAreaCarApplyAddCmd = new ClosedAreaCarApplyAddCmd();
// BeanUtils BeanUtils.copyProperties(cmd, closedAreaCarApplyAddCmd);
closedAreaCarApplyAddCmd.setCarBelongType(CloseCarBelongTypeEnum.TEMPORARY_VEHICLES.getCode()); closedAreaCarApplyAddCmd.setCarBelongType(CloseCarBelongTypeEnum.TEMPORARY_VEHICLES.getCode());
// ClosedAreaCarApplyAddCmd.builder() return closedAreaCarApplyAddExe.execute(closedAreaCarApplyAddCmd);
// .carBelongType(CloseCarBelongTypeEnum.TEMPORARY_VEHICLES.getCode())
// .
//
return 0L;
} }
} }

View File

@ -5,6 +5,7 @@ import com.zcloud.primeport.command.ClosedAreaPersonApplyAddExe;
import com.zcloud.primeport.command.ClosedAreaPersonApplyRemoveExe; import com.zcloud.primeport.command.ClosedAreaPersonApplyRemoveExe;
import com.zcloud.primeport.command.ClosedAreaPersonApplyUpdateExe; import com.zcloud.primeport.command.ClosedAreaPersonApplyUpdateExe;
import com.zcloud.primeport.command.query.ClosedAreaPersonApplyQueryExe; import com.zcloud.primeport.command.query.ClosedAreaPersonApplyQueryExe;
import com.zcloud.primeport.domain.enums.CloseCarBelongTypeEnum;
import com.zcloud.primeport.dto.*; import com.zcloud.primeport.dto.*;
import com.zcloud.primeport.dto.clientobject.ClosedAreaPersonApplyCO; import com.zcloud.primeport.dto.clientobject.ClosedAreaPersonApplyCO;
@ -13,6 +14,7 @@ import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.primeport.dto.clientobject.UserCo; import com.zcloud.primeport.dto.clientobject.UserCo;
import com.zcloud.primeport.persistence.dataobject.UserDto; import com.zcloud.primeport.persistence.dataobject.UserDto;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
@ -74,5 +76,13 @@ public class ClosedAreaPersonApplyServiceImpl implements ClosedAreaPersonApplySe
public void authPerson(ClosedAreaPersonApplyAuthCmd cmd) { public void authPerson(ClosedAreaPersonApplyAuthCmd cmd) {
closedAreaPersonApplyUpdateExe.authPerson(cmd); closedAreaPersonApplyUpdateExe.authPerson(cmd);
} }
@Override
public Long saveTmpPersonApply(ClosedTmpApplyAddCmd cmd) {
ClosedAreaPersonApplyAddCmd personApplyAddCmd = new ClosedAreaPersonApplyAddCmd();
BeanUtils.copyProperties(cmd, personApplyAddCmd);
personApplyAddCmd.setPersonBelongType(CloseCarBelongTypeEnum.TEMPORARY_VEHICLES.getCode());
return closedAreaPersonApplyAddExe.execute(personApplyAddCmd);
}
} }

View File

@ -30,5 +30,7 @@ public interface ClosedAreaPersonApplyServiceI {
void auditPersonApply(ClosedAreaPersonApplyAuditCmd auditCmd); void auditPersonApply(ClosedAreaPersonApplyAuditCmd auditCmd);
void authPerson(ClosedAreaPersonApplyAuthCmd cmd); void authPerson(ClosedAreaPersonApplyAuthCmd cmd);
Long saveTmpPersonApply(ClosedTmpApplyAddCmd cmd);
} }

View File

@ -43,11 +43,9 @@ public class ClosedAreaCarApplyAddCmd extends Command {
private String vehicleTypeName; private String vehicleTypeName;
@ApiModelProperty(value = "一级口门id", name = "levelOneMkmjId", required = true) @ApiModelProperty(value = "一级口门id", name = "levelOneMkmjId", required = true)
// @NotNull(message = "一级口门id不能为空")
private Long levelOneMkmjId; private Long levelOneMkmjId;
@ApiModelProperty(value = "二级口门id(封闭区域口门)", name = "levelTwoMkmjId", required = true) @ApiModelProperty(value = "二级口门id(封闭区域口门)", name = "levelTwoMkmjId", required = true)
// @NotNull(message = "二级口门id(封闭区域口门)不能为空")
private Long levelTwoMkmjId; private Long levelTwoMkmjId;
@ApiModelProperty(value = "封闭区域id", name = "closedAreaId", required = true) @ApiModelProperty(value = "封闭区域id", name = "closedAreaId", required = true)
@ -55,7 +53,6 @@ public class ClosedAreaCarApplyAddCmd extends Command {
private Long closedAreaId; private Long closedAreaId;
@ApiModelProperty(value = "封闭区域名称", name = "closedAreaName", required = true) @ApiModelProperty(value = "封闭区域名称", name = "closedAreaName", required = true)
// @NotEmpty(message = "封闭区域名称不能为空")
private String closedAreaName; private String closedAreaName;
@ApiModelProperty(value = "访问起始时间", name = "visitStartTime", required = true) @ApiModelProperty(value = "访问起始时间", name = "visitStartTime", required = true)
@ -67,28 +64,22 @@ public class ClosedAreaCarApplyAddCmd extends Command {
private String visitEndTime; private String visitEndTime;
@ApiModelProperty(value = "区域管辖单位名id", name = "jurisdictionalCorpId", required = true) @ApiModelProperty(value = "区域管辖单位名id", name = "jurisdictionalCorpId", required = true)
// @NotNull(message = "区域管辖单位名id不能为空")
private Long jurisdictionalCorpId; private Long jurisdictionalCorpId;
@ApiModelProperty(value = "区域管辖单位名称", name = "jurisdictionalCorpName", required = true) @ApiModelProperty(value = "区域管辖单位名称", name = "jurisdictionalCorpName", required = true)
// @NotEmpty(message = "区域管辖单位名称不能为空")
private String jurisdictionalCorpName; private String jurisdictionalCorpName;
@ApiModelProperty(value = "项目id", name = "projectId", required = true) @ApiModelProperty(value = "项目id", name = "projectId", required = true)
// @NotNull(message = "项目id不能为空")
private Long projectId; private Long projectId;
@ApiModelProperty(value = "项目名称", name = "projectName", required = true) @ApiModelProperty(value = "项目名称", name = "projectName", required = true)
// @NotEmpty(message = "项目名称不能为空")
private String projectName; private String projectName;
@ApiModelProperty(value = "申请理由", name = "applyReason", required = true) @ApiModelProperty(value = "申请理由", name = "applyReason", required = true)
@NotEmpty(message = "申请理由不能为空") @NotEmpty(message = "申请理由不能为空")
private String applyReason; private String applyReason;
@ApiModelProperty(value = "随行人员", name = "entourage", required = true) @ApiModelProperty(value = "随行人员", name = "entourage", required = true)
// @NotEmpty(message = "随行人员不能为空")
private String entourage; private String entourage;
@ApiModelProperty(value = "告知签字", name = "informSignId", required = true) @ApiModelProperty(value = "告知签字", name = "informSignId", required = true)

View File

@ -22,22 +22,16 @@ public class ClosedAreaUpdateCmd extends Command {
@NotNull(message = "主键不能为空") @NotNull(message = "主键不能为空")
private Long id; private Long id;
@ApiModelProperty(value = "封闭区域名称", name = "closedAreaName", required = true) @ApiModelProperty(value = "封闭区域名称", name = "closedAreaName", required = true)
// @NotEmpty(message = "封闭区域名称不能为空")
private String closedAreaName; private String closedAreaName;
@ApiModelProperty(value = "区域类型", name = "closedAreaType", required = true) @ApiModelProperty(value = "区域类型", name = "closedAreaType", required = true)
// @NotEmpty(message = "区域类型不能为空")
private String closedAreaType; private String closedAreaType;
@ApiModelProperty(value = "区域类型名称", name = "closedAreaTypeName", required = true) @ApiModelProperty(value = "区域类型名称", name = "closedAreaTypeName", required = true)
// @NotEmpty(message = "区域类型名称不能为空")
private String closedAreaTypeName; private String closedAreaTypeName;
@ApiModelProperty(value = "管辖单位名id", name = "jurisdictionalCorpId", required = true) @ApiModelProperty(value = "管辖单位名id", name = "jurisdictionalCorpId", required = true)
// @NotNull(message = "管辖单位名id不能为空")
private Long jurisdictionalCorpId; private Long jurisdictionalCorpId;
@ApiModelProperty(value = "管辖单位名称", name = "jurisdictionalCorpName", required = true) @ApiModelProperty(value = "管辖单位名称", name = "jurisdictionalCorpName", required = true)
// @NotEmpty(message = "管辖单位名称不能为空")
private String jurisdictionalCorpName; private String jurisdictionalCorpName;
@ApiModelProperty(value = "区域经纬度", name = "location", required = true) @ApiModelProperty(value = "区域经纬度", name = "location", required = true)
// @NotEmpty(message = "区域经纬度不能为空")
private String location; private String location;
} }

View File

@ -25,7 +25,8 @@ public class ClosedTmpApplyAddCmd extends Command {
@ApiModelProperty(value = "临时申请类型PERSON_APPLYCAR_APPLY不能为空", name = "tmpApplyType", required = true) @ApiModelProperty(value = "临时申请类型PERSON_APPLYCAR_APPLY不能为空", name = "tmpApplyType", required = true)
@NotNull(message = "临时申请类型 PERSON_APPLYCAR_APPLY 不能为空") @NotNull(message = "临时申请类型 PERSON_APPLYCAR_APPLY 不能为空")
private String tmpApplyType; private String tmpApplyType;
@ApiModelProperty(value = "临时口门类型LEVEL_ONE 一级LEVEL_TOW 二级不能为空", name = "tmpMkmjType", required = true)
@ApiModelProperty(value = "临时口门类型人=》 ONE_LEVEL_PERSON_APPLY 一级TWO_LEVEL_PERSON_APPLY 二级不能为空,临时口门类型车 ONE_LEVEL_CAR_APPLY一级TWO_LEVEL_CAR_APPLY二级", name = "tmpMkmjType", required = true)
@NotNull(message = "临时口门类型LEVEL_ONE 一级LEVEL_TOW 二级不能为空") @NotNull(message = "临时口门类型LEVEL_ONE 一级LEVEL_TOW 二级不能为空")
private String tmpMkmjType; private String tmpMkmjType;

View File

@ -4,7 +4,7 @@ public enum TmpApplyEnum {
CAR_APPLY("CAR_APPLY", "临时车辆申请"), CAR_APPLY("CAR_APPLY", "临时车辆申请"),
PERSON_APPLY("PERSON_APPLY", "临时人申请"), PERSON_APPLY("PERSON_APPLY", "临时人申请"),
ONE_LEVEL_CAR_APPLY("ONE_LEVEL_CAR_APPLY", "一级临时车"), ONE_LEVEL_CAR_APPLY("ONE_LEVEL_CAR_APPLY", "一级临时车"),
ONE_LEVEL_PERSON_APPLY("ONE_PERSON_APPLY", "一级临时人"), ONE_LEVEL_PERSON_APPLY("ONE_LEVEL_PERSON_APPLY", "一级临时人"),
TWO_LEVEL_PERSON_APPLY("TWO_LEVEL_PERSON_APPLY", "二级临时人"), TWO_LEVEL_PERSON_APPLY("TWO_LEVEL_PERSON_APPLY", "二级临时人"),
TWO_LEVEL_CAR_APPLY("TWO_LEVEL_CAR_APPLY", "二级临时车"); TWO_LEVEL_CAR_APPLY("TWO_LEVEL_CAR_APPLY", "二级临时车");
private String code; private String code;

View File

@ -26,6 +26,7 @@ public class ClosedAreaCarApplyGatewayImpl implements ClosedAreaCarApplyGateway
ClosedAreaCarApplyDO d = new ClosedAreaCarApplyDO(); ClosedAreaCarApplyDO d = new ClosedAreaCarApplyDO();
BeanUtils.copyProperties(closedAreaCarApplyE, d); BeanUtils.copyProperties(closedAreaCarApplyE, d);
closedAreaCarApplyRepository.save(d); closedAreaCarApplyRepository.save(d);
closedAreaCarApplyE.setId(d.getId());
return true; return true;
} }

View File

@ -25,6 +25,7 @@ public class ClosedAreaPersonApplyGatewayImpl implements ClosedAreaPersonApplyGa
ClosedAreaPersonApplyDO d = new ClosedAreaPersonApplyDO(); ClosedAreaPersonApplyDO d = new ClosedAreaPersonApplyDO();
BeanUtils.copyProperties(closedAreaPersonApplyE, d); BeanUtils.copyProperties(closedAreaPersonApplyE, d);
closedAreaPersonApplyRepository.save(d); closedAreaPersonApplyRepository.save(d);
closedAreaPersonApplyE.setId(d.getId());
return true; return true;
} }