From b9086588c215b7493682d65d49ed1070d88c3058 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Tue, 26 Sep 2023 15:49:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wb' into wb
---
screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionPageVo.java | 96 +
screen-api/src/main/java/com/moral/api/pojo/enums/AllocationEscalationTypeEnum.java | 59 +
screen-api/src/main/java/com/moral/api/entity/AllocationExtension.java | 56 +
screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionPageCond.java | 49
screen-api/src/main/java/com/moral/api/pojo/query/PageCond.java | 44
screen-api/src/main/java/com/moral/api/pojo/bean/BaseCreateEntity.java | 53
screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationExt.java | 37
screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionListExt.java | 22
screen-api/pom.xml | 9
screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableUpdateCond.java | 70 +
screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionListVo.java | 83 +
screen-api/src/main/java/com/moral/api/controller/AllocationController.java | 89 +
screen-api/src/main/java/com/moral/api/pojo/enums/AllocationApproveEnum.java | 10
screen-api/src/main/resources/mapper/AllocationMapper.xml | 96 +
screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionExt.java | 69 +
screen-api/src/main/java/com/moral/api/mapper/AllocationExtensionMapper.java | 37
screen-api/src/main/java/com/moral/api/pojo/vo/DictionaryVo.java | 11
screen-api/src/main/java/com/moral/api/pojo/enums/AllocationExtensionApproveEnum.java | 68 +
screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationListExt.java | 22
screen-api/src/main/java/com/moral/api/service/AllocationService.java | 37
screen-api/src/main/java/com/moral/api/pojo/vo/allocation/AllocationVo.java | 144 ++
screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationCheckCond.java | 53
screen-api/src/main/java/com/moral/api/pojo/enums/FileTableEnum.java | 5
screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java | 93 +
screen-api/src/main/java/com/moral/api/service/impl/FileTableServiceImpl.java | 49
screen-api/src/main/resources/mapper/AllocationExtensionMapper.xml | 69 +
screen-api/src/main/java/com/moral/api/pojo/bean/BaseUpdateEntity.java | 53
screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableAddCond.java | 70 +
screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionVo.java | 122 ++
screen-api/src/main/java/com/moral/api/exception/GlobalExceptionHandler.java | 16
screen-common/src/main/java/com/moral/constant/PageInfo.java | 27
screen-api/src/main/java/com/moral/api/mapper/AllocationMapper.java | 25
screen-api/src/main/java/com/moral/api/service/AllocationExtensionService.java | 44
screen-api/src/main/java/com/moral/api/service/FileTableService.java | 4
screen-api/src/main/java/com/moral/api/controller/DictController.java | 2
screen-api/src/main/java/com/moral/api/pojo/query/OrderByItem.java | 41
screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionPageExt.java | 40
screen-api/src/main/java/com/moral/api/entity/ApproveTable.java | 21
screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java | 234 +++
screen-api/src/main/java/com/moral/api/controller/AllocationExtensionController.java | 64 +
screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationListCond.java | 37
screen-common/src/main/java/com/moral/constant/PageResult.java | 34
screen-api/src/main/java/com/moral/api/pojo/bean/BaseEntity.java | 13
screen-api/src/main/java/com/moral/api/entity/Allocation.java | 27
screen-api/src/main/java/com/moral/api/pojo/bean/BaseDelEntity.java | 33
screen-api/src/main/java/com/moral/api/pojo/vo/approvetable/ApproveTableListVo.java | 47
screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationAddCond.java | 77 +
screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionUpdateCond.java | 76 +
screen-api/src/main/java/com/moral/api/config/mybatis/PlusConfig.java | 125 ++
screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableListCond.java | 28
screen-api/src/main/java/com/moral/api/config/mybatis/MybatisPlusConfig.java | 2
screen-api/src/main/java/com/moral/api/service/ApproveTableService.java | 29
screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationPageExt.java | 24
screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTablePageCond.java | 31
screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationUpdateCond.java | 84 +
screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionListCond.java | 28
screen-api/src/main/java/com/moral/api/pojo/bean/BaseInvalidEntity.java | 31
screen-api/src/main/java/com/moral/api/pojo/enums/YesOrNo.java | 2
screen-api/src/main/java/com/moral/api/pojo/query/OrderType.java | 55
screen-api/src/main/java/com/moral/api/pojo/vo/allocation/AllocationPageVo.java | 122 ++
screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionAddCond.java | 51
screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationPageCond.java | 54
screen-api/src/main/resources/application-qa.yml | 1
screen-api/src/main/java/com/moral/api/service/impl/ApproveTableServiceImpl.java | 50
screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationChangeCond.java | 58 +
65 files changed, 3,203 insertions(+), 109 deletions(-)
diff --git a/screen-api/pom.xml b/screen-api/pom.xml
index 0e2bee0..2c3b9ac 100644
--- a/screen-api/pom.xml
+++ b/screen-api/pom.xml
@@ -72,8 +72,17 @@
<artifactId>poi-tl</artifactId>
<version>1.5.1</version>
</dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-validation</artifactId>
+ </dependency>
<dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
<version>0.4.8</version>
diff --git a/screen-api/src/main/java/com/moral/api/config/mybatis/MybatisPlusConfig.java b/screen-api/src/main/java/com/moral/api/config/mybatis/MybatisPlusConfig.java
index e57509c..804a61f 100644
--- a/screen-api/src/main/java/com/moral/api/config/mybatis/MybatisPlusConfig.java
+++ b/screen-api/src/main/java/com/moral/api/config/mybatis/MybatisPlusConfig.java
@@ -22,7 +22,7 @@
import java.util.*;
-@Configuration
+/*@Configuration*/
public class MybatisPlusConfig {
public static ThreadLocal<String> tableName = new ThreadLocal<>();
diff --git a/screen-api/src/main/java/com/moral/api/config/mybatis/PlusConfig.java b/screen-api/src/main/java/com/moral/api/config/mybatis/PlusConfig.java
new file mode 100644
index 0000000..55cf12d
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/config/mybatis/PlusConfig.java
@@ -0,0 +1,125 @@
+package com.moral.api.config.mybatis;
+
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import com.baomidou.mybatisplus.core.injector.AbstractMethod;
+import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
+import com.baomidou.mybatisplus.extension.injector.methods.LogicDeleteByIdWithFill;
+import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import com.moral.api.config.Interceptor.UserHelper;
+import com.moral.api.pojo.enums.YesOrNo;
+import com.moral.api.pojo.vo.user.QxUser;
+import org.apache.ibatis.reflection.MetaObject;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @ClassName PlusConfig
+ * @Description TODO
+ * @Author @cjl
+ * @Date 2023-09-25 10:28
+ * @Version 1.0
+ */
+@Configuration
+@MapperScan(basePackages = {"com.moral.*.mapper"})
+public class PlusConfig {
+ @Bean
+ public PaginationInterceptor paginationInterceptor() {
+ return new PaginationInterceptor();
+ }
+
+ @Bean
+ public OptimisticLockerInterceptor optimisticLockerInterceptor() {
+ return new OptimisticLockerInterceptor();
+ }
+
+
+ @Bean
+ public DefaultSqlInjector logicSqlInjector() {
+ return new DefaultSqlInjector() {
+ @Override
+ public List<AbstractMethod> getMethodList(Class<?> mapperClass) {
+ List<AbstractMethod> methodList = super.getMethodList(mapperClass);
+ methodList.add(new LogicDeleteByIdWithFill());
+ return methodList;
+ }
+ };
+ }
+
+ @Bean
+ public MetaObjectHandler metaObjectHandler() {
+ return new MetaObjectHandler() {
+
+ private final static String IS_DEL = "isDel";
+ private final static String IS_INVALID = "isInvalid";
+ private final static String CREATOR_ID = "createId";
+ private final static String CREATOR_NAME = "createName";
+ private final static String CREATE_TIME = "createTime";
+ private final static String LAST_MODIFY_ID = "updateId";
+ private final static String LAST_MODIFY_NAME = "updateName";
+ private final static String LAST_MODIFY_TIME = "updateTime";
+
+ @Override
+ public void insertFill(MetaObject metaObject) {
+ if (metaObject.hasSetter(IS_DEL)) {
+ this.setFieldValByName(IS_DEL, 0, metaObject);
+ }
+ if (metaObject.hasSetter(IS_INVALID)) {
+ this.setFieldValByName(IS_INVALID, 0, metaObject);
+ }
+ creatorHandler(metaObject);
+ lastModifyHandler(metaObject);
+ }
+
+ @Override
+ public void updateFill(MetaObject metaObject) {
+ lastModifyHandler(metaObject);
+ }
+
+ private void creatorHandler(MetaObject metaObject) {
+ QxUser currentUser = UserHelper.getCurrentUser();
+ Integer userId = currentUser == null ? 0 : currentUser.getUserId()==null?null:currentUser.getUserId().intValue();
+ String userName = currentUser == null ? "admin" : currentUser.getUserName();
+ if (metaObject.hasSetter(IS_INVALID)) {
+ this.strictInsertFill(metaObject, IS_INVALID, Integer.class, YesOrNo.NO.getValue());
+ }
+ if (metaObject.hasSetter(IS_DEL)) {
+ this.strictInsertFill(metaObject, IS_DEL, Integer.class, YesOrNo.NO.getValue());
+ }
+
+ if (metaObject.hasSetter(CREATOR_ID)) {
+ this.strictInsertFill(metaObject, CREATOR_ID, Integer.class, userId);
+ }
+ if (metaObject.hasSetter(CREATOR_NAME)) {
+ this.strictInsertFill(metaObject, CREATOR_NAME, String.class, userName);
+ }
+ if (metaObject.hasSetter(CREATE_TIME)) {
+ this.strictInsertFill(metaObject, CREATE_TIME, Date.class, new Date());
+ }
+ }
+
+ private void lastModifyHandler(MetaObject metaObject) {
+ QxUser currentUser = UserHelper.getCurrentUser();
+ Integer userId = currentUser == null ? 0 : currentUser.getUserId()==null?null:currentUser.getUserId().intValue();
+ String userName = currentUser == null ? "admin" : currentUser.getUserName();
+ if (metaObject.hasSetter(LAST_MODIFY_ID)) {
+ this.strictUpdateFill(metaObject, LAST_MODIFY_ID, Integer.class, userId);
+ }
+ if (metaObject.hasSetter(LAST_MODIFY_NAME)) {
+ this.strictUpdateFill(metaObject, LAST_MODIFY_NAME, String.class, userName);
+ }
+ if (metaObject.hasSetter(LAST_MODIFY_TIME)) {
+ this.strictUpdateFill(metaObject, LAST_MODIFY_TIME, Date.class, new Date());
+ }
+ }
+
+
+ };
+ }
+
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/controller/AllocationController.java b/screen-api/src/main/java/com/moral/api/controller/AllocationController.java
index 97e6100..67e7547 100644
--- a/screen-api/src/main/java/com/moral/api/controller/AllocationController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/AllocationController.java
@@ -7,13 +7,17 @@
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.CollectionUtils;
import org.aspectj.apache.bcel.generic.RET;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.moral.api.pojo.ext.allocation.AllocationExt;
+import com.moral.api.pojo.ext.allocation.AllocationPageExt;
+import com.moral.api.pojo.query.allocation.*;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionAddCond;
+import com.moral.api.pojo.vo.allocation.AllocationPageVo;
+import com.moral.api.pojo.vo.allocation.AllocationVo;
+import com.moral.constant.PageResult;
+import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import java.lang.reflect.Field;
import java.util.ArrayList;
@@ -33,6 +37,8 @@
import com.moral.constant.Constants;
import com.moral.constant.ResultMessage;
import com.moral.util.WebUtils;
+
+import javax.validation.Valid;
@Api(tags = {"������������"})
@@ -55,9 +61,6 @@
}
-
-
-
@ApiOperation(value = "������������", notes = "������������")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String")
@@ -73,7 +76,8 @@
* @return
*/
@PostMapping("insert")
- public ResultMessage insert(@RequestBody Allocation allocation){
+ @ApiOperation("������")
+ public ResultMessage insert(@Valid @RequestBody AllocationAddCond allocation){
allocationService.insertAllocation(allocation);
return ResultMessage.ok();
}
@@ -83,23 +87,39 @@
* ���������������
* @return
*/
- @GetMapping("check")
+ /* @GetMapping("check")
public ResultMessage check(Integer id){
allocationService.check(id);
return ResultMessage.ok();
- }
+ }*/
/**
* ������������
- * @param allocation
+ * @param allocationUpdateCond
* @return
+ *
+ *
*/
@PostMapping("update")
- public ResultMessage update(@RequestBody Allocation allocation){
- allocationService.updateAll(allocation);
+ @ApiOperation("������")
+ public ResultMessage update(@Valid @RequestBody AllocationUpdateCond allocationUpdateCond){
+ allocationService.updateAll(allocationUpdateCond);
return ResultMessage.ok();
}
+ @PostMapping("change")
+ @ApiOperation("������")
+ public ResultMessage changeAllocation(@Valid @RequestBody AllocationChangeCond changeCond){
+ allocationService.changeAllocation(changeCond);
+ return ResultMessage.ok();
+ }
+
+ @PostMapping("check")
+ @ApiOperation("������")
+ public ResultMessage checkAllocation(@Valid @RequestBody AllocationCheckCond checkCond){
+ allocationService.checkAllocation(checkCond);
+ return ResultMessage.ok();
+ }
/**
* ������������������
* @return
@@ -110,6 +130,45 @@
return ResultMessage.ok();
}
+ @PostMapping("/page")
+ @ApiOperation("������")
+ public ResultMessage<PageResult<AllocationPageVo>> page(@Valid @RequestBody AllocationPageCond allocationPageCond) {
+ Page<AllocationPageExt> page = allocationService.extPage(allocationPageCond);
+ PageResult<AllocationPageVo> result = new PageResult<>(page);
+ result.setList(AllocationPageVo.convert(page.getRecords()));
+ return ResultMessage.ok(result);
+ }
+ @GetMapping("/detail")
+ @ApiOperation("������")
+ public ResultMessage<AllocationVo> get(Integer id) {
+ AllocationExt allocationext = allocationService.extOne(id);
+ AllocationVo allocationVo = AllocationVo.convert(allocationext);
+ allocationVo.setFileBaseList(allocationext.getFileBaseList());
+ allocationVo.setFileChangeList(allocationext.getFileChangeList());
+ allocationVo.setFileApproveList(allocationext.getFileApproveList());
+ allocationVo.setApproveList(allocationext.getApproveList());
+ return ResultMessage.ok(allocationVo);
+ }
+ @GetMapping("remove")
+ @ApiOperation("������")
+ public ResultMessage removeById(Integer id){
+ allocationService.removeById(id);
+ return ResultMessage.ok();
+ }
+ @GetMapping("invalid")
+ @ApiOperation("������")
+ public ResultMessage invalidResult(@RequestParam @ApiParam(value = "id",name = "������id") Integer id,
+ @RequestParam @ApiParam(value = "invalidReason",name = "������������") String invalidReason){
+ allocationService.invalidResult(id,invalidReason);
+ return ResultMessage.ok();
+ }
+
+ @PostMapping("/applyfor")
+ @ApiOperation("������������")
+ public ResultMessage applyFor(@Valid @RequestBody AllocationExtensionAddCond allocationExtensionAddCond) {
+ return allocationService.applyFor(allocationExtensionAddCond) ? ResultMessage.ok() : ResultMessage.fail();
+ }
+
/**
* ������������������
diff --git a/screen-api/src/main/java/com/moral/api/controller/AllocationExtensionController.java b/screen-api/src/main/java/com/moral/api/controller/AllocationExtensionController.java
new file mode 100644
index 0000000..d5ded3c
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/controller/AllocationExtensionController.java
@@ -0,0 +1,64 @@
+package com.moral.api.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionExt;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionPageExt;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionAddCond;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionPageCond;
+import com.moral.api.pojo.vo.allocationextension.AllocationExtensionPageVo;
+import com.moral.api.pojo.vo.allocationextension.AllocationExtensionVo;
+import com.moral.api.service.AllocationExtensionService;
+import com.moral.constant.PageResult;
+import com.moral.constant.ResultMessage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * ��������������� ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@RestController
+@RequestMapping("/allocationExtension")
+@Api(tags = {"������������"})
+public class AllocationExtensionController {
+
+ private final AllocationExtensionService allocationExtensionService;
+
+ public AllocationExtensionController(AllocationExtensionService allocationExtensionService) {
+ this.allocationExtensionService = allocationExtensionService;
+ }
+
+ @GetMapping("/detail")
+ @ApiOperation("������")
+ public ResultMessage<AllocationExtensionVo> get(Integer id) {
+ AllocationExtensionExt allocationExtensionext = allocationExtensionService.extOne(id);
+ return ResultMessage.ok(allocationExtensionext == null ? null : AllocationExtensionVo.convert(allocationExtensionext));
+ }
+
+
+ @PostMapping("/page")
+ @ApiOperation("������")
+ public ResultMessage<PageResult<AllocationExtensionPageVo>> page(@Valid @RequestBody AllocationExtensionPageCond allocationExtensionPageCond) {
+ Page<AllocationExtensionPageExt> page = allocationExtensionService.extPage(allocationExtensionPageCond);
+ PageResult<AllocationExtensionPageVo> result = new PageResult<>(page);
+ result.setList(AllocationExtensionPageVo.convert(page.getRecords()));
+ return ResultMessage.ok(result);
+ }
+
+ @GetMapping("check")
+ @ApiOperation("������")
+ public ResultMessage check(@RequestParam @ApiParam(value = "id",name = "������id") Integer id,
+ @RequestParam @ApiParam(value = "state",name = "������") Integer state){
+ allocationExtensionService.check(id,state);
+ return ResultMessage.ok();
+ }
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/controller/DictController.java b/screen-api/src/main/java/com/moral/api/controller/DictController.java
index 2d698e1..0c7cc2a 100644
--- a/screen-api/src/main/java/com/moral/api/controller/DictController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/DictController.java
@@ -30,6 +30,8 @@
.setInvestigationEnum(InvestigationEnum.values())
.setYesOrNo(YesOrNo.values())
.setFileTableEnum(FileTableEnum.values())
+ .setAllocationApproveEnum(AllocationApproveEnum.values())
+ .setAllocationExtensionApproveEnum(AllocationExtensionApproveEnum.values())
;
return ResultMessage.ok(dictionaryVo);
}
diff --git a/screen-api/src/main/java/com/moral/api/entity/Allocation.java b/screen-api/src/main/java/com/moral/api/entity/Allocation.java
index 7a23920..4124f6e 100644
--- a/screen-api/src/main/java/com/moral/api/entity/Allocation.java
+++ b/screen-api/src/main/java/com/moral/api/entity/Allocation.java
@@ -1,6 +1,7 @@
package com.moral.api.entity;
+import com.moral.api.pojo.bean.BaseInvalidEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -13,7 +14,7 @@
@Data
@EqualsAndHashCode(callSuper = false)
-public class Allocation extends Model<Allocation> {
+public class Allocation extends BaseInvalidEntity<Allocation> {
private static final long serialVersionUID = 1L;
@@ -32,7 +33,7 @@
/**
* ������or������
*/
- private String escalationType;
+ private Integer escalationType;
/**
* ������������
@@ -129,31 +130,11 @@
/**
* ������ 0 ������ 1 ������ 2������ 3 ������ 4 ������
*/
- private String state;
- /**
- * ������������
- */
- private String isDel;
- /**
- * ������������
- */
- private String isInvalid;
+ private Integer state;
/**
* ������������
*/
private String invalidReason;
-
- private Integer createId;
-
- private String createName;
-
- private Date createTime;
-
- private Integer updateId;
-
- private String updateName;
-
- private Date updateTime;
}
diff --git a/screen-api/src/main/java/com/moral/api/entity/AllocationExtension.java b/screen-api/src/main/java/com/moral/api/entity/AllocationExtension.java
new file mode 100644
index 0000000..b02f7d6
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/entity/AllocationExtension.java
@@ -0,0 +1,56 @@
+package com.moral.api.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.moral.api.pojo.bean.BaseInvalidEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class AllocationExtension extends BaseInvalidEntity<AllocationExtension> {
+
+
+ /**
+ * ������id
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * ���������id
+ */
+ private Integer allocationId;
+
+ /**
+ * ������������
+ */
+ private Integer extensionNum;
+
+ /**
+ * ������������
+ */
+ private String remake;
+
+ /**
+ * ������
+ */
+ private Integer state;
+
+
+ /**
+ * ������������
+ */
+ private String invalidReason;
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/entity/ApproveTable.java b/screen-api/src/main/java/com/moral/api/entity/ApproveTable.java
index c5e38e8..b628f9c 100644
--- a/screen-api/src/main/java/com/moral/api/entity/ApproveTable.java
+++ b/screen-api/src/main/java/com/moral/api/entity/ApproveTable.java
@@ -1,6 +1,7 @@
package com.moral.api.entity;
+import com.moral.api.pojo.bean.BaseDelEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -12,7 +13,7 @@
@Data
@EqualsAndHashCode(callSuper = false)
-public class ApproveTable extends Model<ApproveTable> {
+public class ApproveTable extends BaseDelEntity<ApproveTable> {
private static final long serialVersionUID = 1L;
@@ -43,25 +44,7 @@
*/
private String stateName;
- /**
- * ������������
- *
- */
- private Integer isDel;
-
- private Integer createId;
-
-
- private String createName;
-
- private Date createTime;
-
- private Integer updateId;
-
- private String updateName;
-
- private Date updateTime;
diff --git a/screen-api/src/main/java/com/moral/api/exception/GlobalExceptionHandler.java b/screen-api/src/main/java/com/moral/api/exception/GlobalExceptionHandler.java
index 4cd4759..8a924de 100644
--- a/screen-api/src/main/java/com/moral/api/exception/GlobalExceptionHandler.java
+++ b/screen-api/src/main/java/com/moral/api/exception/GlobalExceptionHandler.java
@@ -1,15 +1,24 @@
package com.moral.api.exception;
+import com.alibaba.druid.wall.violation.ErrorCode;
+import com.moral.api.utils.StringUtils;
import com.moral.constant.Constants;
import com.moral.constant.ResponseCodeEnum;
import com.moral.constant.ResultMessage;
import com.moral.exception.TokenException;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.support.DefaultMessageSourceResolvable;
import org.springframework.http.HttpStatus;
+import org.springframework.validation.FieldError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
@ControllerAdvice
@@ -36,6 +45,13 @@
return ResultMessage.fail(ResponseCodeEnum.FAIL.getCode(), "������������������������");
}
+ @ExceptionHandler
+ public ResultMessage exceptionHandler(MethodArgumentNotValidException e){
+ List<String> collect = e.getBindingResult().getFieldErrors().stream().map(DefaultMessageSourceResolvable::getDefaultMessage)
+ .collect(Collectors.toList());
+ return ResultMessage.fail(ResponseCodeEnum.FAIL.getCode(), StringUtils.join(collect, ","));
+ }
+
/**
* ������TokenException������
*/
diff --git a/screen-api/src/main/java/com/moral/api/mapper/AllocationExtensionMapper.java b/screen-api/src/main/java/com/moral/api/mapper/AllocationExtensionMapper.java
new file mode 100644
index 0000000..1e7abbc
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/mapper/AllocationExtensionMapper.java
@@ -0,0 +1,37 @@
+package com.moral.api.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.moral.api.entity.AllocationExtension;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionExt;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionPageExt;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionPageCond;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * ��������������� Mapper ������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+public interface AllocationExtensionMapper extends BaseMapper<AllocationExtension> {
+
+
+ /**
+ * ������������������
+ * @param id
+ * @return AllocationExtensionExt
+ */
+ AllocationExtensionExt extOne(@Param("id") Integer id);
+
+ /**
+ * ������������������
+ * @param page
+ * @param allocation
+ * @return AllocationExtensionPageExt
+ */
+ Page<AllocationExtensionPageExt> extPage(Page page, @Param("allocation") AllocationExtensionPageCond allocation);
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/mapper/AllocationMapper.java b/screen-api/src/main/java/com/moral/api/mapper/AllocationMapper.java
index b5864d2..87fb92b 100644
--- a/screen-api/src/main/java/com/moral/api/mapper/AllocationMapper.java
+++ b/screen-api/src/main/java/com/moral/api/mapper/AllocationMapper.java
@@ -1,8 +1,33 @@
package com.moral.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.moral.api.entity.Allocation;
+import com.moral.api.pojo.ext.allocation.AllocationExt;
+import com.moral.api.pojo.ext.allocation.AllocationListExt;
+import com.moral.api.pojo.ext.allocation.AllocationPageExt;
+import com.moral.api.pojo.query.allocation.AllocationListCond;
+import com.moral.api.pojo.query.allocation.AllocationPageCond;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
public interface AllocationMapper extends BaseMapper<Allocation> {
+ /**
+ * ������������������
+ * @param id
+ * @return AllocationExt
+ */
+ AllocationExt extOne(@Param("id") Integer id);
+
+ Page<AllocationPageExt> extPage(Page page, @Param("allocation") AllocationPageCond allocationPageCond);
+
+ /**
+ * ������������������
+ * @param allocationListCond
+ * @return AllocationListExt
+ */
+ List<AllocationListExt> extList(@Param("allocation") AllocationListCond allocationListCond);
+
}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/bean/BaseCreateEntity.java b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseCreateEntity.java
new file mode 100644
index 0000000..b35d9b4
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseCreateEntity.java
@@ -0,0 +1,53 @@
+package com.moral.api.pojo.bean;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Getter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName BaseCreateEntity
+ * @Description TODO
+ * @Author @cjl
+ * @Date 2023-09-25 10:54
+ * @Version 1.0
+ */
+@Getter
+@SuppressWarnings("unchecked")
+public abstract class BaseCreateEntity <T extends Serializable> implements BaseEntity<T>{
+ /**
+ * ���������ID
+ */
+ @TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
+ private Integer createId;
+
+ /**
+ * ���������������
+ */
+ @TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
+ private String createName;
+
+ /**
+ * ������������
+ */
+ @TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
+ private Date createTime;
+
+ public T setCreateUserId(Integer createId) {
+ this.createId = createId;
+ return (T) this;
+ }
+
+ public T setCreateUserName(String createName) {
+ this.createName = createName;
+ return (T) this;
+ }
+
+ public T setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ return (T) this;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/bean/BaseDelEntity.java b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseDelEntity.java
new file mode 100644
index 0000000..5c37fe4
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseDelEntity.java
@@ -0,0 +1,33 @@
+package com.moral.api.pojo.bean;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName BaseDelEntity
+ * @Description TODO
+ * @Author @cjl
+ * @Date 2023-09-25 11:01
+ * @Version 1.0
+ */
+public abstract class BaseDelEntity <T extends Serializable> extends BaseUpdateEntity<T>{
+ /**
+ * ������������
+ */
+ @TableLogic
+ @TableField(fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
+ private Integer isDel;
+
+ public T setIsDel(Integer isDel) {
+ this.isDel = isDel;
+ return (T) this;
+ }
+
+ public Integer getIsDel() {
+ return isDel;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/bean/BaseEntity.java b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseEntity.java
new file mode 100644
index 0000000..cb9c68e
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseEntity.java
@@ -0,0 +1,13 @@
+package com.moral.api.pojo.bean;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName BaseEntity
+ * @Description TODO
+ * @Author @cjl
+ * @Date 2023-09-25 10:56
+ * @Version 1.0
+ */
+public interface BaseEntity <T extends Serializable> extends Serializable{
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/bean/BaseInvalidEntity.java b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseInvalidEntity.java
new file mode 100644
index 0000000..4d50b4d
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseInvalidEntity.java
@@ -0,0 +1,31 @@
+package com.moral.api.pojo.bean;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName BaseInvalidEntity
+ * @Description TODO
+ * @Author @cjl
+ * @Date 2023-09-25 11:00
+ * @Version 1.0
+ */
+public abstract class BaseInvalidEntity <T extends Serializable> extends BaseDelEntity<T>{
+ /**
+ * ������������
+ */
+ @TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
+ private Integer isInvalid;
+
+ public T setIsInvalid(Integer isInvalid) {
+ this.isInvalid = isInvalid;
+ return (T) this;
+ }
+
+ public Integer getIsInvalid() {
+ return isInvalid;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/bean/BaseUpdateEntity.java b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseUpdateEntity.java
new file mode 100644
index 0000000..5868a70
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/bean/BaseUpdateEntity.java
@@ -0,0 +1,53 @@
+package com.moral.api.pojo.bean;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Getter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName BaseUpdateEntity
+ * @Description TODO
+ * @Author @cjl
+ * @Date 2023-09-25 10:57
+ * @Version 1.0
+ */
+@Getter
+@SuppressWarnings("unchecked")
+public abstract class BaseUpdateEntity <T extends Serializable> extends BaseCreateEntity<T>{
+ /**
+ * ���������ID
+ */
+ @TableField(fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
+ private Integer updateId;
+
+ /**
+ * ���������������
+ */
+ @TableField(fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
+ private String updateName;
+
+ /**
+ * ������������
+ */
+ @TableField(fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
+ private Date updateTime;
+
+ public T setUpdateId(Integer updateId) {
+ this.updateId = updateId;
+ return (T) this;
+ }
+
+ public T setUpdateName(String updateName) {
+ this.updateName = updateName;
+ return (T) this;
+ }
+
+ public T setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ return (T) this;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationApproveEnum.java b/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationApproveEnum.java
index 24d3383..10946d3 100644
--- a/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationApproveEnum.java
+++ b/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationApproveEnum.java
@@ -20,13 +20,21 @@
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum AllocationApproveEnum implements IntegerValueEnum{
/**
+ *������
+ */
+ DRAFT(9, "������"),
+ /**
*������
*/
NEW_BUILT(10, "������"),
/**
*���������
*/
- UNDER_RECTIFICATION(20, "���������"),
+ // CHANGE(19, "������"),
+ /**
+ *���������
+ */
+ UNDER_RECTIFICATION(20, "������"),
/**
*���������
*/
diff --git a/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationEscalationTypeEnum.java b/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationEscalationTypeEnum.java
new file mode 100644
index 0000000..4d450e0
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationEscalationTypeEnum.java
@@ -0,0 +1,59 @@
+package com.moral.api.pojo.enums;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.moral.api.exception.BusinessException;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @ClassName StateEnum
+ * @Description TODO
+ * @Author @lizijie
+ * @Date 2023-09-20 11:11
+ * @Version 1.0
+ */
+@Getter
+@JsonFormat(shape = JsonFormat.Shape.OBJECT)
+public enum AllocationEscalationTypeEnum implements IntegerValueEnum {
+
+ /**
+ *������
+ */
+ SELF(1, "������"),
+ /**
+ *������
+ */
+ CHECK(2, "������"),
+ ;
+
+ @EnumValue
+ public final Integer value;
+ public final String name;
+
+ AllocationEscalationTypeEnum(Integer value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ private static Map<Integer, AllocationEscalationTypeEnum> valueMap = new HashMap<>();
+ static {
+ for (AllocationEscalationTypeEnum v : AllocationEscalationTypeEnum.values()) {
+ valueMap.put(v.value, v);
+ }
+ }
+ @JsonCreator
+ public static AllocationEscalationTypeEnum getByValue(Integer value) {
+ if (value == null) {
+ return null;
+ }
+ AllocationEscalationTypeEnum result = valueMap.get(value);
+ if (result == null) {
+ throw new BusinessException("������������������" + value);
+ }
+ return result;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationExtensionApproveEnum.java b/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationExtensionApproveEnum.java
new file mode 100644
index 0000000..18a3f15
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/enums/AllocationExtensionApproveEnum.java
@@ -0,0 +1,68 @@
+package com.moral.api.pojo.enums;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.moral.api.exception.BusinessException;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @ClassName InvestigationEnum
+ * @Description TODO
+ * @Author @cjl
+ * @Date 2023-09-20 14:47
+ * @Version 1.0
+ */
+@Getter
+@JsonFormat(shape = JsonFormat.Shape.OBJECT)
+public enum AllocationExtensionApproveEnum implements IntegerValueEnum{
+
+ /**
+ *���������
+ */
+ NOT_AAPPROVE(10, "���������"),
+ /**
+ *���������
+ */
+ APPLYING(30, "���������"),
+ /**
+ *������
+ */
+ PASS(40, "������"),
+ /**
+ *������
+ */
+ REFUSE(50, "������"),
+
+ ;
+
+ @EnumValue
+ public final Integer value;
+ public final String name;
+
+ AllocationExtensionApproveEnum(Integer value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ private static Map<Integer, AllocationExtensionApproveEnum> valueMap = new HashMap<>();
+ static {
+ for (AllocationExtensionApproveEnum v : AllocationExtensionApproveEnum.values()) {
+ valueMap.put(v.value, v);
+ }
+ }
+ @JsonCreator
+ public static AllocationExtensionApproveEnum getByValue(Integer value) {
+ if (value == null) {
+ return null;
+ }
+ AllocationExtensionApproveEnum result = valueMap.get(value);
+ if (result == null) {
+ throw new BusinessException("������������������" + value);
+ }
+ return result;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/enums/FileTableEnum.java b/screen-api/src/main/java/com/moral/api/pojo/enums/FileTableEnum.java
index 62fb34d..7907409 100644
--- a/screen-api/src/main/java/com/moral/api/pojo/enums/FileTableEnum.java
+++ b/screen-api/src/main/java/com/moral/api/pojo/enums/FileTableEnum.java
@@ -32,6 +32,11 @@
*/
ALLOCATION_APPROVE(1010203, "���������������"),
+ /**
+ *������������
+ */
+ ALLOCATION_EXTENSION(1251701, "������������"),
+
;
@EnumValue
diff --git a/screen-api/src/main/java/com/moral/api/pojo/enums/YesOrNo.java b/screen-api/src/main/java/com/moral/api/pojo/enums/YesOrNo.java
index 7035cd3..2e9d929 100644
--- a/screen-api/src/main/java/com/moral/api/pojo/enums/YesOrNo.java
+++ b/screen-api/src/main/java/com/moral/api/pojo/enums/YesOrNo.java
@@ -26,7 +26,7 @@
/**
*���������
*/
- No(0, "���");
+ NO(0, "���");
@EnumValue
public final Integer value;
diff --git a/screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationExt.java b/screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationExt.java
new file mode 100644
index 0000000..a0fca82
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationExt.java
@@ -0,0 +1,37 @@
+package com.moral.api.pojo.ext.allocation;
+
+import com.moral.api.entity.Allocation;
+import com.moral.api.pojo.vo.approvetable.ApproveTableListVo;
+import com.moral.api.pojo.vo.file.FileVo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class AllocationExt extends Allocation {
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileBaseList;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileChangeList;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileApproveList;
+
+ @ApiModelProperty(value = "������������")
+ private List<ApproveTableListVo> approveList;
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationListExt.java b/screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationListExt.java
new file mode 100644
index 0000000..f3f57fb
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationListExt.java
@@ -0,0 +1,22 @@
+package com.moral.api.pojo.ext.allocation;
+
+import com.moral.api.entity.Allocation;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class AllocationListExt extends Allocation {
+
+}
+
diff --git a/screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationPageExt.java b/screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationPageExt.java
new file mode 100644
index 0000000..4608560
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/ext/allocation/AllocationPageExt.java
@@ -0,0 +1,24 @@
+package com.moral.api.pojo.ext.allocation;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.moral.api.entity.Allocation;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @ClassName AllocationPageExt
+ * @Description TODO
+ * @Author @cjl
+ * @Date 2023-09-25 14:34
+ * @Version 1.0
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class AllocationPageExt extends Allocation {
+
+
+ private Integer applyState;
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionExt.java b/screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionExt.java
new file mode 100644
index 0000000..c1c6561
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionExt.java
@@ -0,0 +1,69 @@
+package com.moral.api.pojo.ext.allocationextension;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.moral.api.entity.AllocationExtension;
+import com.moral.api.pojo.vo.file.FileVo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class AllocationExtensionExt extends AllocationExtension {
+
+ @ApiModelProperty(value = "������������")
+ private String allocationNum;
+
+
+ @ApiModelProperty(value = "������������")
+ private Date escalationTime;
+
+
+ @ApiModelProperty(value = "������������")
+ private String pollutePosition;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer changeType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer changeDay;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer escalationUnitId;
+
+ @ApiModelProperty(value = "���������")
+ private String escalationName;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer investigationType;
+
+ @ApiModelProperty(value = "������������")
+ private String problemDescribe;
+
+
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileBaseList;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileList;
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionListExt.java b/screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionListExt.java
new file mode 100644
index 0000000..45a8322
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionListExt.java
@@ -0,0 +1,22 @@
+package com.moral.api.pojo.ext.allocationextension;
+
+import com.moral.api.entity.AllocationExtension;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class AllocationExtensionListExt extends AllocationExtension {
+
+}
+
diff --git a/screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionPageExt.java b/screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionPageExt.java
new file mode 100644
index 0000000..0ce0e29
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/ext/allocationextension/AllocationExtensionPageExt.java
@@ -0,0 +1,40 @@
+package com.moral.api.pojo.ext.allocationextension;
+
+import com.moral.api.entity.AllocationExtension;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class AllocationExtensionPageExt extends AllocationExtension {
+
+ @ApiModelProperty(value = "������������")
+ private String allocationNum;
+
+ @ApiModelProperty(value = "������������")
+ private Date escalationTime;
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer changeType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer changeDay;
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/OrderByItem.java b/screen-api/src/main/java/com/moral/api/pojo/query/OrderByItem.java
new file mode 100644
index 0000000..2dcc3cf
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/OrderByItem.java
@@ -0,0 +1,41 @@
+package com.moral.api.pojo.query;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description
+ *
+ * @Date 2020/10/27 10:59
+ * @Version 1.0
+ */
+@Data
+@Accessors(chain = true)
+@ApiModel(value = "������������", description = "������������")
+public class OrderByItem {
+
+ @ApiModelProperty(value = "���������������")
+ private String name;
+
+ @ApiModelProperty(value = "������������")
+ private OrderType order;
+
+ public OrderItem convertOrderItem() {
+ OrderItem orderItem = new OrderItem();
+ switch (order) {
+ case ASC:
+ orderItem = OrderItem.asc(this.name);
+ break;
+ case DESC:
+ orderItem = OrderItem.desc(this.name);
+ break;
+ default:
+ break;
+ }
+ return orderItem;
+ }
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/OrderType.java b/screen-api/src/main/java/com/moral/api/pojo/query/OrderType.java
new file mode 100644
index 0000000..08c5ab2
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/OrderType.java
@@ -0,0 +1,55 @@
+package com.moral.api.pojo.query;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Description
+ *
+ * @Date 2020/10/27 11:00
+ * @Version 1.0
+ */
+@Getter
+@JsonFormat(shape = JsonFormat.Shape.OBJECT)
+public enum OrderType {
+
+ /**
+ * ASC
+ */
+ ASC("ascending"),
+ /**
+ * DESC
+ */
+ DESC("descending"),
+ ;
+
+ private static Map<String, OrderType> valueMap = new HashMap<>();
+
+ static {
+ for (OrderType orderType : OrderType.values()) {
+ valueMap.put(orderType.code, orderType);
+ }
+ }
+
+ @EnumValue
+ public final String code;
+
+ OrderType(String code) {
+ this.code = code;
+ }
+
+ @JsonCreator
+ public static OrderType getByValue(String code) {
+ OrderType result = valueMap.get(code);
+ if (result == null) {
+ throw new IllegalArgumentException("No element matches " + code);
+ }
+ return result;
+ }
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/PageCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/PageCond.java
new file mode 100644
index 0000000..0fab677
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/PageCond.java
@@ -0,0 +1,44 @@
+package com.moral.api.pojo.query;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.apache.commons.collections4.CollectionUtils;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ *
+ */
+@Data
+@Accessors(chain = true)
+@ApiModel(value = "������������", description = "������������")
+public class PageCond {
+
+ @ApiModelProperty(value = "������")
+ private List<OrderByItem> orders;
+
+ @ApiModelProperty(value = "������������")
+ private long pageSize;
+
+ @ApiModelProperty(value = "������������")
+ private long currentPage;
+
+ public List<OrderByItem> orders() {
+ return this.orders;
+ }
+
+ public Page convertPage() {
+ Page page = new Page();
+ page.setCurrent(this.currentPage);
+ page.setSize(this.pageSize);
+ if (CollectionUtils.isNotEmpty(orders)) {
+ page.setOrders(this.orders.stream().map(orderByItem -> orderByItem.convertOrderItem()).collect(Collectors.toList()));
+ }
+ return page;
+ }
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationAddCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationAddCond.java
new file mode 100644
index 0000000..02375d9
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationAddCond.java
@@ -0,0 +1,77 @@
+package com.moral.api.pojo.query.allocation;
+
+import com.moral.api.entity.Allocation;
+import com.moral.api.pojo.vo.file.FileVo;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="Allocation - ������������", description="Allocation - ������������")
+public class AllocationAddCond implements Serializable {
+
+
+ @ApiModelProperty(value = "������������")
+ @NotNull(message = "���������������������������")
+ private Date escalationTime;
+
+ @ApiModelProperty(value = "������������")
+ private String pollutePosition;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer changeType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer changeDay;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer escalationUnitId;
+
+ @ApiModelProperty(value = "���������")
+ private String escalationName;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer investigationType;
+
+ @ApiModelProperty(value = "������������")
+ private String problemDescribe;
+
+ @ApiModelProperty(value = "������")
+ @NotNull(message = "���������������������")
+ private Integer state;
+
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileBaseList;
+
+
+ public Allocation convert() {
+ Allocation allocation = BeanConverts.convert(this, Allocation.class);
+ return allocation;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationChangeCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationChangeCond.java
new file mode 100644
index 0000000..a08f7ce
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationChangeCond.java
@@ -0,0 +1,58 @@
+package com.moral.api.pojo.query.allocation;
+
+import com.moral.api.entity.Allocation;
+import com.moral.api.pojo.vo.file.FileVo;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="Allocation - ������������������", description="Allocation - ������������������")
+public class AllocationChangeCond implements Serializable {
+
+ @ApiModelProperty(value = "������id")
+ @NotNull(message = "������id���������������")
+ private Integer allocationId;
+
+ @ApiModelProperty(value = "������������")
+ @NotNull(message = "���������������������������")
+ private Integer isChange;
+
+ @ApiModelProperty(value = "������������")
+ private String changeDescribe;
+
+ @ApiModelProperty(value = "���������������")
+ @NotEmpty(message = "������������������������������")
+ private String changeName;
+
+ @ApiModelProperty(value = "������")
+ @NotEmpty(message = "���������������������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileChangeList;
+
+ public Allocation convert() {
+ Allocation allocation = BeanConverts.convert(this, Allocation.class);
+ return allocation;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationCheckCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationCheckCond.java
new file mode 100644
index 0000000..a998a8d
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationCheckCond.java
@@ -0,0 +1,53 @@
+package com.moral.api.pojo.query.allocation;
+
+import com.moral.api.entity.Allocation;
+import com.moral.api.pojo.vo.file.FileVo;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="Allocation - ������������������", description="Allocation - ������������������")
+public class AllocationCheckCond implements Serializable {
+
+ @ApiModelProperty(value = "������id")
+ @NotNull(message = "������id���������������")
+ private Integer allocationId;
+
+ @ApiModelProperty(value = "������������")
+ @NotNull(message = "���������������������������")
+ private Integer checkScore;
+
+ @ApiModelProperty(value = "������������")
+ private String checkDescribe;
+
+ @ApiModelProperty(value = "������")
+ @NotEmpty(message = "���������������������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileApproveList;
+
+ public Allocation convert() {
+ Allocation allocation = BeanConverts.convert(this, Allocation.class);
+ return allocation;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationListCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationListCond.java
new file mode 100644
index 0000000..df6251d
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationListCond.java
@@ -0,0 +1,37 @@
+package com.moral.api.pojo.query.allocation;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="Allocation - ������������������", description="Allocation - ������������������")
+public class AllocationListCond implements Serializable {
+
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������")
+ private String startTime;
+
+ @ApiModelProperty(value = "������������")
+ private String endTime;
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationPageCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationPageCond.java
new file mode 100644
index 0000000..a9f41f7
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationPageCond.java
@@ -0,0 +1,54 @@
+package com.moral.api.pojo.query.allocation;
+
+import com.moral.api.pojo.query.PageCond;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="Allocation - ������������������", description="Allocation - ������������������")
+public class AllocationPageCond implements Serializable{
+
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer investigationType;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer changeType;
+
+
+ @ApiModelProperty(value = "������������")
+ private Integer isInvalid;
+
+ @ApiModelProperty(value = "������������")
+ private String startTime;
+
+ @ApiModelProperty(value = "������������")
+ private String endTime;
+
+ @ApiModelProperty(value = "������������")
+ private PageCond page;
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationUpdateCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationUpdateCond.java
new file mode 100644
index 0000000..0760bea
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocation/AllocationUpdateCond.java
@@ -0,0 +1,84 @@
+package com.moral.api.pojo.query.allocation;
+
+import com.moral.api.entity.Allocation;
+import com.moral.api.pojo.vo.file.FileVo;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="Allocation - ������������", description="Allocation - ������������")
+public class AllocationUpdateCond implements Serializable {
+
+ @ApiModelProperty(value = "������id")
+ @NotNull(message = "������id���������������")
+ private Integer allocationId;
+
+ @ApiModelProperty(value = "������������")
+ @NotNull(message = "���������������������������")
+ private Date escalationTime;
+
+ @ApiModelProperty(value = "������������")
+ @NotEmpty(message = "���������������������������")
+ private String pollutePosition;
+
+ @ApiModelProperty(value = "������������id")
+ @NotNull(message = "���������������������������")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ @NotNull(message = "���������������������������")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������id")
+ @NotNull(message = "���������������������������")
+ private Integer changeType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer changeDay;
+
+ @ApiModelProperty(value = "������������id")
+ @NotNull(message = "���������������������������")
+ private Integer escalationUnitId;
+
+ @ApiModelProperty(value = "���������")
+ @NotEmpty(message = "������������������������")
+ private String escalationName;
+
+ @ApiModelProperty(value = "������������id")
+ @NotNull(message = "���������������������������")
+ private Integer investigationType;
+
+ @ApiModelProperty(value = "������������")
+ private String problemDescribe;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileBaseList;
+
+ public Allocation convert() {
+ Allocation allocation = BeanConverts.convert(this, Allocation.class);
+ return allocation;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionAddCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionAddCond.java
new file mode 100644
index 0000000..5b01be4
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionAddCond.java
@@ -0,0 +1,51 @@
+package com.moral.api.pojo.query.allocationextension;
+
+import com.moral.api.entity.AllocationExtension;
+import com.moral.api.pojo.vo.file.FileVo;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="AllocationExtension - ������������", description="AllocationExtension - ������������")
+public class AllocationExtensionAddCond implements Serializable {
+
+
+ @ApiModelProperty(value = "���������id")
+ @NotNull(message = "���������id���������������")
+ private Integer allocationId;
+
+ @ApiModelProperty(value = "������������")
+ @NotNull(message = "���������������������������")
+ private Integer extensionNum;
+
+ @ApiModelProperty(value = "������������")
+ @NotEmpty(message = "���������������������������")
+ private String remake;
+
+ @ApiModelProperty(value = "������")
+ private List<FileVo> fileList;
+ public AllocationExtension convert() {
+ AllocationExtension allocationExtension = BeanConverts.convert(this, AllocationExtension.class);
+ return allocationExtension;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionListCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionListCond.java
new file mode 100644
index 0000000..6a2b90d
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionListCond.java
@@ -0,0 +1,28 @@
+package com.moral.api.pojo.query.allocationextension;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="AllocationExtension - ������������������", description="AllocationExtension - ������������������")
+public class AllocationExtensionListCond implements Serializable {
+
+ @ApiModelProperty(value = "ID")
+ private Integer id;
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionPageCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionPageCond.java
new file mode 100644
index 0000000..63d70bf
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionPageCond.java
@@ -0,0 +1,49 @@
+package com.moral.api.pojo.query.allocationextension;
+
+import com.moral.api.pojo.query.PageCond;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="AllocationExtension - ������������������", description="AllocationExtension - ������������������")
+public class AllocationExtensionPageCond implements Serializable{
+
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer investigationType;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer changeType;
+
+ @ApiModelProperty(value = "������������")
+ private String startTime;
+
+ @ApiModelProperty(value = "������������")
+ private String endTime;
+
+ @ApiModelProperty(value = "������������")
+ private PageCond page;
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionUpdateCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionUpdateCond.java
new file mode 100644
index 0000000..9cddc8f
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/allocationextension/AllocationExtensionUpdateCond.java
@@ -0,0 +1,76 @@
+package com.moral.api.pojo.query.allocationextension;
+
+import com.moral.api.entity.AllocationExtension;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="AllocationExtension - ������������", description="AllocationExtension - ������������")
+public class AllocationExtensionUpdateCond implements Serializable {
+
+ @ApiModelProperty(value = "������id")
+ private Integer id;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer allocationId;
+
+ @ApiModelProperty(value = "������������")
+ private Integer extensionNum;
+
+ @ApiModelProperty(value = "������������")
+ private String remake;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isDel;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isInvalid;
+
+ @ApiModelProperty(value = "������������")
+ private String invalidReason;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer createId;
+
+ @ApiModelProperty(value = "���������������")
+ private String createName;
+
+ @ApiModelProperty(value = "������������")
+ private Date createTime;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer updateId;
+
+ @ApiModelProperty(value = "���������������")
+ private String updateName;
+
+ @ApiModelProperty(value = "������������")
+ private Date updateTime;
+
+
+
+ public AllocationExtension convert() {
+ AllocationExtension allocationExtension = BeanConverts.convert(this, AllocationExtension.class);
+ return allocationExtension;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableAddCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableAddCond.java
new file mode 100644
index 0000000..0f1e6cf
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableAddCond.java
@@ -0,0 +1,70 @@
+package com.moral.api.pojo.query.approvetable;
+
+import com.moral.api.entity.ApproveTable;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ApproveTable - ������������", description="ApproveTable - ������������")
+public class ApproveTableAddCond implements Serializable {
+
+ @ApiModelProperty(value = "������������id")
+ private Integer id;
+
+ @ApiModelProperty(value = "������")
+ private Integer approveModule;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer relationId;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private String stateName;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isDel;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer createId;
+
+ @ApiModelProperty(value = "���������������")
+ private String createName;
+
+ @ApiModelProperty(value = "������������")
+ private Date createTime;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer updateId;
+
+ @ApiModelProperty(value = "���������������")
+ private String updateName;
+
+ @ApiModelProperty(value = "������������")
+ private Date updateTime;
+
+
+
+ public ApproveTable convert() {
+ ApproveTable approveTable = BeanConverts.convert(this, ApproveTable.class);
+ return approveTable;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableListCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableListCond.java
new file mode 100644
index 0000000..4d3ce16
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableListCond.java
@@ -0,0 +1,28 @@
+package com.moral.api.pojo.query.approvetable;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ApproveTable - ������������������", description="ApproveTable - ������������������")
+public class ApproveTableListCond implements Serializable {
+
+ @ApiModelProperty(value = "ID")
+ private Integer id;
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTablePageCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTablePageCond.java
new file mode 100644
index 0000000..443d856
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTablePageCond.java
@@ -0,0 +1,31 @@
+package com.moral.api.pojo.query.approvetable;
+
+import com.moral.api.pojo.query.PageCond;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ApproveTable - ������������������", description="ApproveTable - ������������������")
+public class ApproveTablePageCond implements Serializable{
+
+ @ApiModelProperty(value = "ID")
+ private Integer id;
+
+ @ApiModelProperty(value = "������������")
+ private PageCond page;
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableUpdateCond.java b/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableUpdateCond.java
new file mode 100644
index 0000000..2e83c1b
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/query/approvetable/ApproveTableUpdateCond.java
@@ -0,0 +1,70 @@
+package com.moral.api.pojo.query.approvetable;
+
+import com.moral.api.entity.ApproveTable;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ApproveTable - ������������", description="ApproveTable - ������������")
+public class ApproveTableUpdateCond implements Serializable {
+
+ @ApiModelProperty(value = "������������id")
+ private Integer id;
+
+ @ApiModelProperty(value = "������")
+ private Integer approveModule;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer relationId;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private String stateName;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isDel;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer createId;
+
+ @ApiModelProperty(value = "���������������")
+ private String createName;
+
+ @ApiModelProperty(value = "������������")
+ private Date createTime;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer updateId;
+
+ @ApiModelProperty(value = "���������������")
+ private String updateName;
+
+ @ApiModelProperty(value = "������������")
+ private Date updateTime;
+
+
+
+ public ApproveTable convert() {
+ ApproveTable approveTable = BeanConverts.convert(this, ApproveTable.class);
+ return approveTable;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/vo/DictionaryVo.java b/screen-api/src/main/java/com/moral/api/pojo/vo/DictionaryVo.java
index dc6ff19..dacd8de 100644
--- a/screen-api/src/main/java/com/moral/api/pojo/vo/DictionaryVo.java
+++ b/screen-api/src/main/java/com/moral/api/pojo/vo/DictionaryVo.java
@@ -33,9 +33,10 @@
private List<Map<String, Object>> ChangeEnum;
private List<Map<String, Object>> YesOrNo;
+ private List<Map<String, Object>> AllocationApproveEnum;
private List<Map<String, Object>> FileTableEnum;
-
+ private List<Map<String, Object>> AllocationExtensionApproveEnum;
public static List<Map<String, Object>> enumArray2Map(Enum[] enums) {
@@ -68,5 +69,13 @@
this.FileTableEnum = enumArray2Map(enumResult);
return this;
}
+ public DictionaryVo setAllocationApproveEnum(com.moral.api.pojo.enums.AllocationApproveEnum[] enumResult) {
+ this.AllocationApproveEnum = enumArray2Map(enumResult);
+ return this;
+ }
+ public DictionaryVo setAllocationExtensionApproveEnum(com.moral.api.pojo.enums.AllocationExtensionApproveEnum[] enumResult) {
+ this.AllocationExtensionApproveEnum = enumArray2Map(enumResult);
+ return this;
+ }
}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/vo/allocation/AllocationPageVo.java b/screen-api/src/main/java/com/moral/api/pojo/vo/allocation/AllocationPageVo.java
new file mode 100644
index 0000000..3264fd6
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/vo/allocation/AllocationPageVo.java
@@ -0,0 +1,122 @@
+package com.moral.api.pojo.vo.allocation;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.moral.api.pojo.enums.AllocationApproveEnum;
+import com.moral.api.pojo.ext.allocation.AllocationPageExt;
+import com.moral.api.utils.BeanConverts;
+import com.moral.util.DateUtils;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="Allocation - ������VO������", description="Allocation - ������VO������")
+public class AllocationPageVo implements Serializable {
+
+
+ @ApiModelProperty(value = "������id")
+ private Integer allocationId;
+
+ @ApiModelProperty(value = "������������")
+ private String allocationNum;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd")
+ private Date escalationTime;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer changeType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer changeDay;
+
+ @ApiModelProperty(value = "������������")
+ private Integer residueDay;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer escalationUnitId;
+
+ @ApiModelProperty(value = "���������")
+ private String escalationName;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer investigationType;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isInvalid;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer createId;
+
+ @ApiModelProperty(value = "���������������")
+ private String createName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date createTime;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer updateId;
+
+ @ApiModelProperty(value = "���������������")
+ private String updateName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date updateTime;
+
+ @ApiModelProperty(value = "������������������")
+ private Integer applyState;
+
+
+ public static AllocationPageVo convert(AllocationPageExt allocationPageExt) {
+ AllocationPageVo allocationPageVo = BeanConverts.convert(allocationPageExt, AllocationPageVo.class);
+ return allocationPageVo;
+ }
+
+ public static List<AllocationPageVo> convert(List<AllocationPageExt> allocationPageExtList) {
+ return allocationPageExtList.stream().map(AllocationPageVo::convert).collect(Collectors.toList());
+ }
+
+ public Integer getResidueDay() {
+ int day = this.changeDay;
+ if(AllocationApproveEnum.UNDER_RECTIFICATION.value.equals(state)){
+ Date date = new Date();
+ int days = DateUtils.getDays(escalationTime, date);
+ return day-days;
+ }
+ return day;
+ }
+
+ public Integer getApplyState() {
+ return Objects.isNull(applyState)?0:applyState;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/vo/allocation/AllocationVo.java b/screen-api/src/main/java/com/moral/api/pojo/vo/allocation/AllocationVo.java
new file mode 100644
index 0000000..5dfca31
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/vo/allocation/AllocationVo.java
@@ -0,0 +1,144 @@
+package com.moral.api.pojo.vo.allocation;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.moral.api.pojo.ext.allocation.AllocationExt;
+import com.moral.api.pojo.vo.approvetable.ApproveTableListVo;
+import com.moral.api.pojo.vo.file.FileVo;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="Allocation - ������VO������", description="Allocation - ������VO������")
+public class AllocationVo implements Serializable {
+
+
+ @ApiModelProperty(value = "������id")
+ private Integer allocationId;
+
+ @ApiModelProperty(value = "������������")
+ private String allocationNum;
+
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd")
+ private Date escalationTime;
+
+ @ApiModelProperty(value = "������������")
+ private String pollutePosition;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer changeType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer changeDay;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer escalationUnitId;
+
+ @ApiModelProperty(value = "���������")
+ private String escalationName;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer investigationType;
+
+ @ApiModelProperty(value = "������������")
+ private String problemDescribe;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isChange;
+
+ @ApiModelProperty(value = "������������")
+ private String changeDescribe;
+
+ @ApiModelProperty(value = "���������������")
+ private String changeName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd")
+ private Date changeTime;
+
+ @ApiModelProperty(value = "������������")
+ private Integer checkScore;
+
+ @ApiModelProperty(value = "������������")
+ private String checkDescribe;
+
+ @ApiModelProperty(value = "���������")
+ private String checkName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date checkTime;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isInvalid;
+
+ @ApiModelProperty(value = "������������")
+ private String invalidReason;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer createId;
+
+ @ApiModelProperty(value = "���������������")
+ private String createName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date createTime;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer updateId;
+
+ @ApiModelProperty(value = "���������������")
+ private String updateName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date updateTime;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileBaseList;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileChangeList;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileApproveList;
+
+ @ApiModelProperty(value = "������������")
+ private List<ApproveTableListVo> approveList;
+
+
+ public static AllocationVo convert(AllocationExt allocationExt) {
+ AllocationVo allocationVo = BeanConverts.convert(allocationExt, AllocationVo.class);
+ return allocationVo;
+ }
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionListVo.java b/screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionListVo.java
new file mode 100644
index 0000000..754e362
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionListVo.java
@@ -0,0 +1,83 @@
+package com.moral.api.pojo.vo.allocationextension;
+
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionListExt;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="AllocationExtension - ������VO������", description="AllocationExtension - ������VO������")
+public class AllocationExtensionListVo implements Serializable {
+
+
+ @ApiModelProperty(value = "������id")
+ private Integer id;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer allocationId;
+
+ @ApiModelProperty(value = "������������")
+ private Integer extensionNum;
+
+ @ApiModelProperty(value = "������������")
+ private String remake;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isDel;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isInvalid;
+
+ @ApiModelProperty(value = "������������")
+ private String invalidReason;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer createId;
+
+ @ApiModelProperty(value = "���������������")
+ private String createName;
+
+ @ApiModelProperty(value = "������������")
+ private Date createTime;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer updateId;
+
+ @ApiModelProperty(value = "���������������")
+ private String updateName;
+
+ @ApiModelProperty(value = "������������")
+ private Date updateTime;
+
+
+
+ public static AllocationExtensionListVo convert(AllocationExtensionListExt allocationExtensionListExt) {
+ AllocationExtensionListVo allocationExtensionListVo = BeanConverts.convert(allocationExtensionListExt, AllocationExtensionListVo.class);
+ return allocationExtensionListVo;
+ }
+
+ public static List<AllocationExtensionListVo> convert(List<AllocationExtensionListExt> allocationExtensionListExtList) {
+ return allocationExtensionListExtList.stream().map(AllocationExtensionListVo::convert).collect(Collectors.toList());
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionPageVo.java b/screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionPageVo.java
new file mode 100644
index 0000000..f9915bc
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionPageVo.java
@@ -0,0 +1,96 @@
+package com.moral.api.pojo.vo.allocationextension;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionPageExt;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="AllocationExtension - ������VO������", description="AllocationExtension - ������VO������")
+public class AllocationExtensionPageVo implements Serializable {
+
+
+ @ApiModelProperty(value = "������id")
+ private Integer id;
+
+ @ApiModelProperty(value = "������������")
+ private String allocationNum;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd")
+ private Date escalationTime;
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer changeType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer changeDay;
+
+
+ @ApiModelProperty(value = "������������")
+ private Integer extensionNum;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer escalationUnitId;
+
+ @ApiModelProperty(value = "���������")
+ private String escalationName;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer createId;
+
+ @ApiModelProperty(value = "���������������")
+ private String createName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date createTime;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer updateId;
+
+ @ApiModelProperty(value = "���������������")
+ private String updateName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date updateTime;
+
+
+
+ public static AllocationExtensionPageVo convert(AllocationExtensionPageExt allocationExtensionPageExt) {
+ AllocationExtensionPageVo allocationExtensionPageVo = BeanConverts.convert(allocationExtensionPageExt, AllocationExtensionPageVo.class);
+ return allocationExtensionPageVo;
+ }
+
+ public static List<AllocationExtensionPageVo> convert(List<AllocationExtensionPageExt> allocationExtensionPageExtList) {
+ return allocationExtensionPageExtList.stream().map(AllocationExtensionPageVo::convert).collect(Collectors.toList());
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionVo.java b/screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionVo.java
new file mode 100644
index 0000000..c93ad27
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/vo/allocationextension/AllocationExtensionVo.java
@@ -0,0 +1,122 @@
+package com.moral.api.pojo.vo.allocationextension;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionExt;
+import com.moral.api.pojo.vo.file.FileVo;
+import com.moral.api.utils.BeanConverts;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="AllocationExtension - ������VO������", description="AllocationExtension - ������VO������")
+public class AllocationExtensionVo implements Serializable {
+
+
+ @ApiModelProperty(value = "������id")
+ private Integer id;
+
+ @ApiModelProperty(value = "������������")
+ private String allocationNum;
+
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd")
+ private Date escalationTime;
+
+
+ @ApiModelProperty(value = "������������")
+ private String pollutePosition;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer unitId;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer polluteType;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer changeType;
+
+ @ApiModelProperty(value = "������������")
+ private Integer changeDay;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer escalationUnitId;
+
+ @ApiModelProperty(value = "���������")
+ private String escalationName;
+
+ @ApiModelProperty(value = "������������id")
+ private Integer investigationType;
+
+ @ApiModelProperty(value = "������������")
+ private String problemDescribe;
+
+
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileBaseList;
+
+ @ApiModelProperty(value = "������������")
+ private List<FileVo> fileList;
+
+
+ @ApiModelProperty(value = "������������")
+ private Integer extensionNum;
+
+ @ApiModelProperty(value = "������������")
+ private String remake;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private Integer isInvalid;
+
+ @ApiModelProperty(value = "������������")
+ private String invalidReason;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer createId;
+
+ @ApiModelProperty(value = "���������������")
+ private String createName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date createTime;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer updateId;
+
+ @ApiModelProperty(value = "���������������")
+ private String updateName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date updateTime;
+
+
+
+ public static AllocationExtensionVo convert(AllocationExtensionExt allocationExtensionExt) {
+ AllocationExtensionVo allocationExtensionVo = BeanConverts.convert(allocationExtensionExt, AllocationExtensionVo.class);
+ return allocationExtensionVo;
+ }
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/pojo/vo/approvetable/ApproveTableListVo.java b/screen-api/src/main/java/com/moral/api/pojo/vo/approvetable/ApproveTableListVo.java
new file mode 100644
index 0000000..1317d7e
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/pojo/vo/approvetable/ApproveTableListVo.java
@@ -0,0 +1,47 @@
+package com.moral.api.pojo.vo.approvetable;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ApproveTable - ������VO������", description="ApproveTable - ������VO������")
+public class ApproveTableListVo implements Serializable {
+
+
+ @ApiModelProperty(value = "������������id")
+ private Integer id;
+
+ @ApiModelProperty(value = "������")
+ private Integer state;
+
+ @ApiModelProperty(value = "������������")
+ private String stateName;
+
+ @ApiModelProperty(value = "���������id")
+ private Integer createId;
+
+ @ApiModelProperty(value = "���������������")
+ private String createName;
+
+ @ApiModelProperty(value = "������������")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date createTime;
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/service/AllocationExtensionService.java b/screen-api/src/main/java/com/moral/api/service/AllocationExtensionService.java
new file mode 100644
index 0000000..fd0a982
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/service/AllocationExtensionService.java
@@ -0,0 +1,44 @@
+package com.moral.api.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.moral.api.entity.AllocationExtension;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionExt;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionPageExt;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionAddCond;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionPageCond;
+
+/**
+ * <p>
+ * ��������������� ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+public interface AllocationExtensionService extends IService<AllocationExtension> {
+
+ /**
+ * ������id������������
+ * @param id
+ * @return AllocationExtensionExt
+ */
+ AllocationExtensionExt extOne(Integer id);
+
+ /**
+ * ������������������
+ * @param allocationExtensionPageCond
+ * @return AllocationExtensionPageExt
+ */
+ Page<AllocationExtensionPageExt> extPage(AllocationExtensionPageCond allocationExtensionPageCond);
+
+ /**
+ * ������
+ * @param allocationExtensionAddCond
+ * @return
+ */
+ boolean save(AllocationExtensionAddCond allocationExtensionAddCond);
+
+ boolean check(Integer id,Integer state);
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/service/AllocationService.java b/screen-api/src/main/java/com/moral/api/service/AllocationService.java
index 9baf339..8fb6916 100644
--- a/screen-api/src/main/java/com/moral/api/service/AllocationService.java
+++ b/screen-api/src/main/java/com/moral/api/service/AllocationService.java
@@ -4,11 +4,16 @@
import java.util.Map;
-
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.moral.api.entity.Allocation;
import com.moral.api.entity.ResponsibilityUnit;
+import com.moral.api.pojo.ext.allocation.AllocationExt;
+import com.moral.api.pojo.ext.allocation.AllocationListExt;
+import com.moral.api.pojo.ext.allocation.AllocationPageExt;
+import com.moral.api.pojo.query.allocation.*;
import com.moral.api.pojo.dto.allocation.AllocationUnitDto;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionAddCond;
public interface AllocationService extends IService<Allocation> {
@@ -16,11 +21,11 @@
List<ResponsibilityUnit> seleteUnit();
- Integer insertAllocation(Allocation allocation);
+ Integer insertAllocation(AllocationAddCond allocation);
AllocationUnitDto check(Integer id);
- void updateAll(Allocation allocation);
+ void updateAll(AllocationUpdateCond allocationUpdateCond);
List<Allocation> selectAll(Map<String,Object> map);
@@ -29,4 +34,30 @@
List<Map<String,Object>> unitExel(Map<String,Object> map);
+ Page<AllocationPageExt> extPage(AllocationPageCond allocationPageCond);
+ /**
+ * ������id������������
+ * @param id
+ * @return AllocationExt
+ */
+ AllocationExt extOne(Integer id);
+
+ AllocationExt oneAllocation(Integer id);
+
+ void changeAllocation(AllocationChangeCond changeCond);
+
+ void checkAllocation(AllocationCheckCond checkCond);
+
+ boolean removeById(Integer id);
+
+ boolean invalidResult (Integer id,String invalidReason);
+
+ /**
+ * ������������������
+ * @param allocationListCond
+ * @return AllocationListExt
+ */
+ List<AllocationListExt> extList(AllocationListCond allocationListCond);
+
+ boolean applyFor (AllocationExtensionAddCond allocationExtensionAddCond);
}
diff --git a/screen-api/src/main/java/com/moral/api/service/ApproveTableService.java b/screen-api/src/main/java/com/moral/api/service/ApproveTableService.java
new file mode 100644
index 0000000..df2c464
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/service/ApproveTableService.java
@@ -0,0 +1,29 @@
+package com.moral.api.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.moral.api.entity.ApproveTable;
+import com.moral.api.pojo.vo.approvetable.ApproveTableListVo;
+
+import java.util.List;
+
+/**
+ * <p>
+ * ��������� ���������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+public interface ApproveTableService extends IService<ApproveTable> {
+
+
+ /**
+ * ������
+ * @param approveTable
+ * @return
+ */
+ boolean saveResult(ApproveTable approveTable);
+
+ List<ApproveTableListVo> listAll(int relationId,int fileModule);
+
+}
diff --git a/screen-api/src/main/java/com/moral/api/service/FileTableService.java b/screen-api/src/main/java/com/moral/api/service/FileTableService.java
index f37594d..b63cec4 100644
--- a/screen-api/src/main/java/com/moral/api/service/FileTableService.java
+++ b/screen-api/src/main/java/com/moral/api/service/FileTableService.java
@@ -26,4 +26,8 @@
void preview(Integer id, HttpServletRequest request, HttpServletResponse response);
void coverPreview(Integer id, HttpServletRequest request, HttpServletResponse response);
+
+ void upDateResult(List<FileVo> list,int relationId,int fileModule);
+
+ List<FileVo> list(int relationId,int fileModule);
}
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java
new file mode 100644
index 0000000..a2259b6
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/service/impl/AllocationExtensionServiceImpl.java
@@ -0,0 +1,93 @@
+package com.moral.api.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.moral.api.entity.Allocation;
+import com.moral.api.entity.AllocationExtension;
+import com.moral.api.exception.BusinessException;
+import com.moral.api.mapper.AllocationExtensionMapper;
+import com.moral.api.pojo.enums.AllocationExtensionApproveEnum;
+import com.moral.api.pojo.enums.FileTableEnum;
+import com.moral.api.pojo.ext.allocation.AllocationExt;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionExt;
+import com.moral.api.pojo.ext.allocationextension.AllocationExtensionPageExt;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionAddCond;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionPageCond;
+import com.moral.api.service.AllocationExtensionService;
+import com.moral.api.service.AllocationService;
+import com.moral.api.service.FileTableService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * <p>
+ * ��������������� ���������������
+ * </p>
+ * deyt template generate
+ * @author JI
+ * @since 2023-09-25
+ */
+@Service
+public class AllocationExtensionServiceImpl extends ServiceImpl<AllocationExtensionMapper, AllocationExtension> implements AllocationExtensionService {
+
+ private final AllocationService allocationService;
+ private final FileTableService fileTableService;
+
+ public AllocationExtensionServiceImpl(AllocationService allocationService, FileTableService fileTableService) {
+ this.allocationService = allocationService;
+ this.fileTableService = fileTableService;
+ }
+
+
+ @Override
+ public AllocationExtensionExt extOne(Integer id) {
+ AllocationExtensionExt extensionExt = this.baseMapper.extOne(id);
+ AllocationExt extOne = allocationService.oneAllocation(extensionExt.getAllocationId());
+ extensionExt.setAllocationNum(extOne.getAllocationNum())
+ .setEscalationTime(extOne.getEscalationTime())
+ .setPollutePosition(extOne.getPollutePosition())
+ .setUnitId(extOne.getUnitId())
+ .setPolluteType(extOne.getPolluteType())
+ .setChangeType(extOne.getChangeType())
+ .setChangeDay(extOne.getChangeDay())
+ .setEscalationName(extOne.getEscalationName())
+ .setInvestigationType(extOne.getInvestigationType())
+ .setProblemDescribe(extOne.getProblemDescribe())
+ .setEscalationUnitId(extOne.getEscalationUnitId());
+ extensionExt.setFileBaseList(fileTableService.list(extensionExt.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value));
+ extensionExt.setFileList(fileTableService.list(id, FileTableEnum.ALLOCATION_EXTENSION.value));
+ return extensionExt;
+ }
+
+
+
+ @Override
+ public Page<AllocationExtensionPageExt> extPage(AllocationExtensionPageCond allocationExtensionPageCond) {
+ return this.baseMapper.extPage(allocationExtensionPageCond.getPage().convertPage(), allocationExtensionPageCond);
+ }
+
+ @Override
+ public boolean save(AllocationExtensionAddCond allocationExtensionAddCond) {
+ return this.save(allocationExtensionAddCond.convert());
+ }
+
+ @Override
+ @Transactional
+ public boolean check(Integer id, Integer state) {
+ AllocationExtensionExt extensionExt = this.baseMapper.extOne(id);
+ if(!AllocationExtensionApproveEnum.APPLYING.value.equals(extensionExt.getState())){
+ throw new BusinessException("������������������������������");
+ }
+ AllocationExtension allocationExtension = new AllocationExtension();
+ allocationExtension.setId(id);
+ allocationExtension.setState(state);
+ this.baseMapper.updateById(allocationExtension);
+ if(AllocationExtensionApproveEnum.PASS.value.equals(state)){
+ Allocation allocation = new Allocation();
+ allocation.setAllocationId(extensionExt.getAllocationId());
+ allocation.setChangeDay(extensionExt.getChangeDay()+extensionExt.getExtensionNum());
+ allocationService.updateById(allocation);
+ }
+ return true;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
index c96615c..b2d902b 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
@@ -1,5 +1,21 @@
package com.moral.api.service.impl;
+import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.moral.api.config.Interceptor.UserHelper;
+import com.moral.api.entity.*;
+import com.moral.api.exception.BusinessException;
+import com.moral.api.pojo.bean.BaseInvalidEntity;
+import com.moral.api.pojo.enums.*;
+import com.moral.api.pojo.ext.allocation.AllocationExt;
+import com.moral.api.pojo.ext.allocation.AllocationListExt;
+import com.moral.api.pojo.ext.allocation.AllocationPageExt;
+import com.moral.api.pojo.query.PageCond;
+import com.moral.api.pojo.query.allocation.*;
+import com.moral.api.pojo.query.allocationextension.AllocationExtensionAddCond;
+import com.moral.api.pojo.vo.user.QxUser;
+import com.moral.api.service.AllocationExtensionService;
+import com.moral.api.service.ApproveTableService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -16,6 +32,7 @@
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
+import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -27,9 +44,7 @@
import com.moral.api.entity.SysDictData;
import com.moral.api.entity.SysDictType;
import com.moral.api.mapper.AllocationMapper;
-import com.moral.api.mapper.ApproveTableMapper;
import com.moral.api.mapper.ResponsibilityUnitMapper;
-import com.moral.api.mapper.SysAreaMapper;
import com.moral.api.mapper.SysDictDataMapper;
import com.moral.api.mapper.SysDictTypeMapper;
import com.moral.api.pojo.dto.allocation.AllocationUnitDto;
@@ -64,6 +79,11 @@
private ApproveTableMapper approveTableMapper;
@Autowired
private SysAreaService sysAreaService;
+ private ApproveTableService approveTableService;
+ @Autowired
+ private FileTableService fileTableService;
+ @Autowired
+ private AllocationExtensionService allocationExtensionService;
/**
* ������������������������������������
@@ -104,53 +124,46 @@
/**
* ���������������
- * @param allocation
+ * @param allocationCond
* @return
*/
@Override
@Transactional
- public Integer insertAllocation(Allocation allocation) {
- ApproveTable approveTable = new ApproveTable();
- //������������������
- Map<String, Object> userInfo = (Map<String, Object>) TokenUtils.getUserInfo();
+ public Integer insertAllocation(AllocationAddCond allocationCond) {
+ Allocation allocation = allocationCond.convert();
+ allocation.setEscalationType(AllocationEscalationTypeEnum.SELF.getValue());
String dateString = DateUtils.dateToDateString(new Date(), DateUtils.yyyyMMdd_EN);
- QueryWrapper<Allocation> wrapper = new QueryWrapper<>();
Object o = redisTemplate.opsForValue().get(RedisConstants.JBD_DATA);
int i;
if (ObjectUtils.isEmpty(o)){
- wrapper.last("limit 1");
- Allocation selectOne = allocationMapper.selectOne(wrapper);
- String allocationNum = selectOne.getAllocationNum();
- String num = allocationNum.substring(10);
- i = Integer.parseInt(num)+1;
+ i = 1;
}else {
i = Integer.parseInt(o.toString()) + 1;
}
//������
String allocationNum = "JBD" + dateString + String.format("%04d", i);
allocation.setAllocationNum(allocationNum);
- allocation.setIsDel("0");
- allocation.setIsInvalid("0");
- allocation.setCreateId(Integer.parseInt(userInfo.get("userId").toString()));
- allocation.setCreateTime(new Date());
- allocation.setCreateName(userInfo.get("account").toString());
- allocation.setUpdateId(Integer.parseInt(userInfo.get("userId").toString()));
- allocation.setUpdateTime(new Date());
- allocation.setUpdateName(userInfo.get("account").toString());
+ if(Objects.nonNull(allocationCond.getEscalationUnitId())&&allocationCond.getEscalationUnitId().toString().length()==6) {
+ allocation.setEscalationType(AllocationEscalationTypeEnum.CHECK.getValue());
+ }
+ if(AllocationApproveEnum.NEW_BUILT.value.equals(allocationCond.getState())) {
+ allocation.setState(AllocationApproveEnum.UNDER_RECTIFICATION.value);
+ }
//������������������
allocationMapper.insert(allocation);
-
redisTemplate.opsForValue().set(RedisConstants.JBD_DATA,i);
- //������������������
- approveTable.setRelationId(allocation.getAllocationId());
- approveTable.setState(Integer.parseInt(allocation.getState()));
- approveTable.setApproveModule(null);
- approveTable.setStateName(null);
- approveTable.setIsDel(0);
- approveTableMapper.insert(approveTable);
- return null;
+ if(AllocationApproveEnum.NEW_BUILT.value.equals(allocationCond.getState())) {
+ //������������������
+ ApproveTable approveTable = new ApproveTable();
+ approveTable.setRelationId(allocation.getAllocationId());
+ approveTable.setState(AllocationApproveEnum.NEW_BUILT.value);
+ approveTable.setApproveModule(FileTableEnum.ALLOCATION_FOUNDATION.value);
+ approveTable.setStateName(AllocationApproveEnum.NEW_BUILT.name);
+ approveTableService.saveResult(approveTable);
+ }
+ fileTableService.upDateResult(allocationCond.getFileBaseList(),allocation.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value);
+ return allocation.getAllocationId();
}
-
/**
* ������������
@@ -175,29 +188,36 @@
}
allocationUnitDto.setChangeTypeName(allocation.getChangeType()==0?"������������":"������������");
allocationUnitDto.setInvestigationTypeName(allocation.getChangeType()==0?"������":"���������");
-
//������������
return allocationUnitDto;
}
/**
* ���������������
- * @param allocation
+ * @param allocationUpdateCond
*/
@Override
- public void updateAll(Allocation allocation) {
- //������������������
- Map<String, Object> userInfo = (Map<String, Object>) TokenUtils.getUserInfo();
- if (allocation.getState().equals("1")){
- //������������������
- allocation.setChangeTime(new Date());
- }else {
- //������������������
- allocation.setCheckTime(new Date());
+ @Transactional
+ public void updateAll(AllocationUpdateCond allocationUpdateCond) {
+ AllocationExt allocationExt = oneAllocation(allocationUpdateCond.getAllocationId());
+ if(!AllocationApproveEnum.DRAFT.value.equals(allocationExt.getState())) {
+ throw new BusinessException("���������������������������������������");
}
- allocation.setUpdateId(Integer.parseInt(userInfo.get("userId").toString()));
- allocation.setUpdateTime(new Date());
- allocation.setUpdateName(userInfo.get("account").toString());
+ //������������������
+ Allocation allocation = allocationUpdateCond.convert();
+ if(Objects.nonNull(allocationUpdateCond.getEscalationUnitId())&&allocationUpdateCond.getEscalationUnitId().toString().length()==6) {
+ allocation.setEscalationType(AllocationEscalationTypeEnum.CHECK.getValue());
+ }
+ if(AllocationApproveEnum.NEW_BUILT.value.equals(allocationUpdateCond.getState())) {
+ //������������������
+ ApproveTable approveTable = new ApproveTable();
+ approveTable.setRelationId(allocation.getAllocationId());
+ approveTable.setState(AllocationApproveEnum.NEW_BUILT.value);
+ approveTable.setApproveModule(FileTableEnum.ALLOCATION_FOUNDATION.value);
+ approveTable.setStateName(AllocationApproveEnum.NEW_BUILT.name);
+ approveTableService.saveResult(approveTable);
+ }
+ fileTableService.upDateResult(allocationUpdateCond.getFileBaseList(),allocation.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value);
allocationMapper.updateById(allocation);
}
@@ -434,4 +454,128 @@
public List<Map<String, Object>> unitExel(Map<String, Object> map) {
return null;
}
+
+ @Override
+ public Page<AllocationPageExt> extPage(AllocationPageCond allocationPageCond) {
+ return this.baseMapper.extPage(allocationPageCond.getPage().convertPage(), allocationPageCond);
+ }
+
+ @Override
+ public AllocationExt extOne(Integer id) {
+ AllocationExt allocationExt = oneAllocation(id);
+ allocationExt.setFileBaseList(fileTableService.list(id,FileTableEnum.ALLOCATION_FOUNDATION.value));
+ allocationExt.setFileChangeList(fileTableService.list(id,FileTableEnum.ALLOCATION_RECTIFICATION.value));
+ allocationExt.setFileApproveList(fileTableService.list(id,FileTableEnum.ALLOCATION_APPROVE.value));
+ allocationExt.setApproveList(approveTableService.listAll(id,FileTableEnum.ALLOCATION_FOUNDATION.value));
+ return allocationExt;
+ }
+
+ @Override
+ public AllocationExt oneAllocation(Integer id){
+ return this.baseMapper.extOne(id);
+ }
+
+ @Override
+ @Transactional
+ public void changeAllocation(AllocationChangeCond changeCond) {
+ AllocationExt allocationExt = oneAllocation(changeCond.getAllocationId());
+ if(!AllocationApproveEnum.UNDER_RECTIFICATION.value.equals(allocationExt.getState())) {
+ throw new BusinessException("������������������������������������");
+ }
+ Allocation allocation = new Allocation();
+ allocation.setAllocationId(changeCond.getAllocationId());
+ allocation.setIsChange(changeCond.getIsChange());
+ allocation.setChangeName(changeCond.getChangeName());
+ allocation.setChangeDescribe(changeCond.getChangeDescribe());
+ allocation.setState(changeCond.getState());
+ allocation.setChangeTime(new Date());
+ this.updateById(allocation);
+ //������������������
+ ApproveTable approveTable = new ApproveTable();
+ approveTable.setRelationId(allocation.getAllocationId());
+ approveTable.setState(AllocationApproveEnum.UNDER_RECTIFICATION.value);
+ approveTable.setStateName(AllocationApproveEnum.UNDER_RECTIFICATION.name);
+ approveTable.setApproveModule(FileTableEnum.ALLOCATION_FOUNDATION.value);
+ approveTableService.saveResult(approveTable);
+ fileTableService.upDateResult(changeCond.getFileChangeList(),allocation.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value);
+ }
+
+ @Override
+ @Transactional
+ public void checkAllocation(AllocationCheckCond checkCond) {
+ AllocationExt allocationExt = oneAllocation(checkCond.getAllocationId());
+ if(!AllocationApproveEnum.IN_APPROVAL.value.equals(allocationExt.getState())) {
+ throw new BusinessException("������������������������������������������");
+ }
+ QxUser qxUser = UserHelper.getCurrentUser();
+ Allocation allocation = new Allocation();
+ allocation.setCheckScore(checkCond.getCheckScore());
+ allocation.setCheckDescribe(checkCond.getCheckDescribe());
+ allocation.setCheckName(qxUser.getUserName());
+ allocation.setCheckTime(new Date());
+ allocation.setState(checkCond.getState());
+ this.updateById(allocation);
+ //������������������
+ ApproveTable approveTable = new ApproveTable();
+ approveTable.setRelationId(allocation.getAllocationId());
+ if(AllocationApproveEnum.PASS.value.equals(checkCond.getState())){
+ approveTable.setState(AllocationApproveEnum.PASS.value);
+ approveTable.setStateName(AllocationApproveEnum.PASS.name);
+ }else {
+ approveTable.setState(AllocationApproveEnum.REFUSE.value);
+ approveTable.setStateName(AllocationApproveEnum.REFUSE.name);
+ }
+ approveTable.setApproveModule(FileTableEnum.ALLOCATION_FOUNDATION.value);
+ approveTableService.saveResult(approveTable);
+ fileTableService.upDateResult(checkCond.getFileApproveList(),allocation.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value);
+ }
+
+ @Override
+ @Transactional
+ public boolean removeById(Integer id) {
+ AllocationExt allocationExt = oneAllocation(id);
+ if(!AllocationApproveEnum.DRAFT.value.equals(allocationExt.getState())) {
+ throw new BusinessException("������������������������������������");
+ }
+ this.baseMapper.deleteById(id);
+ return true;
+ }
+
+ @Override
+ @Transactional
+ public boolean invalidResult(Integer id,String invalidReason) {
+ AllocationExt allocationExt = oneAllocation(id);
+ if( AllocationApproveEnum.IN_APPROVAL.value >= allocationExt.getState() ) {
+ throw new BusinessException("���������������������������");
+ }
+ LambdaUpdateChainWrapper<Allocation> wrapper =lambdaUpdate();
+ wrapper.eq(Allocation::getAllocationId,id).set(Allocation::getInvalidReason,invalidReason).set(BaseInvalidEntity::getIsInvalid, YesOrNo.YES.value);
+ return wrapper.update();
+ }
+
+ @Override
+ public List<AllocationListExt> extList(AllocationListCond allocationListCond) {
+ return null;
+ }
+
+ @Override
+ @Transactional
+ public boolean applyFor(AllocationExtensionAddCond allocationExtensionAddCond) {
+ AllocationExt allocationExt = oneAllocation(allocationExtensionAddCond.getAllocationId());
+ boolean type = false;
+ if( !AllocationApproveEnum.UNDER_RECTIFICATION.value.equals(allocationExt.getState())) {
+ type = true;
+ }
+ if(!ChangeEnum.DEADLINE.value.equals(allocationExt.getState())){
+ type = true;
+ }
+ if(type){
+ throw new BusinessException("���������������������������������������������������������������������������");
+ }
+ AllocationExtension allocationExtension = allocationExtensionAddCond.convert();
+ allocationExtension.setState(AllocationExtensionApproveEnum.APPLYING.value);
+ allocationExtensionService.save(allocationExtension);
+ fileTableService.upDateResult(allocationExtensionAddCond.getFileList(),allocationExtension.getId(), FileTableEnum.ALLOCATION_EXTENSION.value);
+ return true;
+ }
}
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/ApproveTableServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/ApproveTableServiceImpl.java
new file mode 100644
index 0000000..a232bcf
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/service/impl/ApproveTableServiceImpl.java
@@ -0,0 +1,50 @@
+package com.moral.api.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.moral.api.entity.ApproveTable;
+import com.moral.api.entity.FileTable;
+import com.moral.api.mapper.ApproveTableMapper;
+import com.moral.api.pojo.enums.YesOrNo;
+import com.moral.api.pojo.vo.approvetable.ApproveTableListVo;
+import com.moral.api.pojo.vo.file.FileVo;
+import com.moral.api.service.ApproveTableService;
+import com.moral.api.utils.BeanConverts;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>
+ * ��������� ���������������
+ * </p>
+ * deyt template generate
+ *
+ * @author JI
+ * @since 2023-09-25
+ */
+@Service
+public class ApproveTableServiceImpl extends ServiceImpl<ApproveTableMapper, ApproveTable> implements ApproveTableService {
+
+
+ @Override
+ @Transactional
+ public boolean saveResult(ApproveTable approveTable) {
+ return this.save(approveTable);
+ }
+
+ @Override
+ public List<ApproveTableListVo> listAll(int relationId,int fileModule) {
+ List<ApproveTableListVo> list = new ArrayList<>();
+ List<ApproveTable> existsList = this.lambdaQuery().eq(ApproveTable::getRelationId, relationId)
+ .eq(ApproveTable::getApproveModule, fileModule)
+ .eq(ApproveTable::getIsDel, YesOrNo.NO.value).orderByAsc(ApproveTable::getCreateTime).list();
+
+ existsList.forEach(it->{
+ ApproveTableListVo listVo = BeanConverts.convert(it,ApproveTableListVo.class);
+ list.add(listVo);
+ });
+ return list;
+ }
+}
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/FileTableServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/FileTableServiceImpl.java
index 63915c5..304d0bb 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/FileTableServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/FileTableServiceImpl.java
@@ -5,6 +5,7 @@
import com.moral.api.exception.BusinessException;
import com.moral.api.mapper.FileTableMapper;
import com.moral.api.pojo.enums.FileType;
+import com.moral.api.pojo.enums.YesOrNo;
import com.moral.api.pojo.vo.file.FileVo;
import com.moral.api.pojo.vo.user.QxUser;
import com.moral.api.service.FileTableService;
@@ -14,8 +15,11 @@
import com.moral.util.DateUtils;
import lombok.extern.slf4j.Slf4j;
import net.coobird.thumbnailator.Thumbnails;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
@@ -23,6 +27,7 @@
import java.io.*;
import java.net.URLEncoder;
import java.util.*;
+import java.util.stream.Collectors;
/**
* <p>
@@ -185,4 +190,48 @@
log.error("������������������!!! e={}", e.getMessage());
}
}
+
+ @Override
+ @Transactional
+ public void upDateResult(List<FileVo> list,int relationId,int fileModule) {
+ List<FileTable> existsList = this.lambdaQuery().eq(FileTable::getRelationId, relationId)
+ .eq(FileTable::getFileModule, fileModule)
+ .eq(FileTable::getIsDel, YesOrNo.NO.value).list();
+
+ // ������������
+ if (!CollectionUtils.isEmpty(list)) {
+ List<FileTable> addList = new ArrayList();
+ // 2.2.������������������������������
+ list.forEach(it -> {
+ existsList.removeIf(file -> file.getFileId().equals(it.getFileId()));
+ FileTable file = new FileTable();
+ BeanUtils.copyProperties(it,file);
+ file.setRelationId(relationId);
+ addList.add(file);
+ });
+ if (!CollectionUtils.isEmpty(addList)) {
+ // ������
+ this.updateBatchById(addList);
+ }
+ }
+ // ������������
+ if (!CollectionUtils.isEmpty(existsList)) {
+ removeByIds(existsList.stream().map(FileTable::getFileId).collect(Collectors.toList()));
+ }
+ }
+
+ @Override
+ public List<FileVo> list(int relationId, int fileModule) {
+ List<FileVo> list = new ArrayList<>();
+ List<FileTable> existsList = this.lambdaQuery().eq(FileTable::getRelationId, relationId)
+ .eq(FileTable::getFileModule, fileModule)
+ .eq(FileTable::getIsDel, YesOrNo.NO.value).orderByAsc(FileTable::getCreateTime).list();
+ existsList.forEach(it->{
+ FileVo fileVo = new FileVo();
+ fileVo.setFileId(it.getFileId());
+ fileVo.setFileName(it.getFileName());
+ list.add(fileVo);
+ });
+ return list;
+ }
}
diff --git a/screen-api/src/main/resources/application-qa.yml b/screen-api/src/main/resources/application-qa.yml
index 589ed97..6777caa 100644
--- a/screen-api/src/main/resources/application-qa.yml
+++ b/screen-api/src/main/resources/application-qa.yml
@@ -128,6 +128,7 @@
- /webjars/**
- /verificationCode/**
- /static/**
+ - /doc.html
- /file/preview/**
diff --git a/screen-api/src/main/resources/mapper/AllocationExtensionMapper.xml b/screen-api/src/main/resources/mapper/AllocationExtensionMapper.xml
new file mode 100644
index 0000000..ee948ea
--- /dev/null
+++ b/screen-api/src/main/resources/mapper/AllocationExtensionMapper.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.moral.api.mapper.AllocationExtensionMapper">
+
+ <!-- ������������������������ deyt template generate -->
+ <resultMap id="BaseResultMap" type="com.moral.api.entity.AllocationExtension">
+ <id column="id" property="id" />
+ <result column="allocation_id" property="allocationId" />
+ <result column="extension_num" property="extensionNum" />
+ <result column="remake" property="remake" />
+ <result column="state" property="state" />
+ <result column="invalid_reason" property="invalidReason" />
+ </resultMap>
+
+ <!-- ��������������������� -->
+ <sql id="Base_Column_List">
+ id, allocation_id, extension_num, remake, state, is_del, is_invalid, invalid_reason, create_id, create_name, create_time, update_id, update_name, update_time
+ </sql>
+
+ <!-- ��������������������� -->
+ <sql id="AllocationExtension_Column_List">
+ allocationextension.id, allocationextension.allocation_id, allocationextension.extension_num, allocationextension.remake, allocationextension.state, allocationextension.is_del, allocationextension.is_invalid, allocationextension.invalid_reason, allocationextension.create_id, allocationextension.create_name, allocationextension.create_time, allocationextension.update_id, allocationextension.update_name, allocationextension.update_time
+ </sql>
+
+
+ <select id="extOne" resultType="com.moral.api.pojo.ext.allocationextension.AllocationExtensionExt">
+ SELECT
+ <include refid="AllocationExtension_Column_List"/>
+ FROM allocation_extension allocationextension
+ where allocationextension.id = #{id} and allocationextension.is_del = 0
+ </select>
+
+
+ <select id="extPage" resultType="com.moral.api.pojo.ext.allocationextension.AllocationExtensionPageExt">
+ SELECT
+ <include refid="AllocationExtension_Column_List"/>,
+ t1.allocation_num,t1.escalation_time,t1.unit_id,t1.pollute_type,t1.change_type,t1.change_day,t1.escalation_unit_id,t1.escalation_name
+ FROM allocation_extension allocationextension
+ left join allocation t1 on allocationextension.allocation_id = t1.allocation_id
+ <where>
+ 1 = 1 and allocationextension.is_del = 0
+
+ <if test="allocation.unitId != null and allocation.unitId != 0">
+ and t1.unit_id = #{allocation.unitId}
+ </if>
+ <if test="allocation.polluteType != null and allocation.polluteType != 0">
+ and t1.pollute_type = #{allocation.polluteType}
+ </if>
+ <if test="allocation.state != null and allocation.state != 0">
+ and t1.state = #{allocation.state}
+ </if>
+ <if test="allocation.investigationType != null and allocation.investigationType != 0">
+ and t1.investigation_type = #{allocation.investigationType}
+ </if>
+ <if test="allocation.changeType != null and allocation.changeType != 0">
+ and t1.change_type = #{allocation.changeType}
+ </if>
+
+ <if test="allocation.startTime != null and allocation.startTime != '' ">
+ and date(t1.escalation_time) <![CDATA[>=]]> #{allocation.startTime}
+ </if>
+ <if test="allocation.endTime != null and allocation.endTime !='' ">
+ and date(t1.escalation_time) <![CDATA[<=]]> #{allocation.endTime}
+ </if>
+
+ </where>
+ order by t1.escalation_time desc,t1.allocation_id desc
+ </select>
+</mapper>
diff --git a/screen-api/src/main/resources/mapper/AllocationMapper.xml b/screen-api/src/main/resources/mapper/AllocationMapper.xml
new file mode 100644
index 0000000..32c9a32
--- /dev/null
+++ b/screen-api/src/main/resources/mapper/AllocationMapper.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.moral.api.mapper.AllocationMapper">
+
+ <!-- ������������������������ deyt template generate -->
+ <resultMap id="BaseResultMap" type="com.moral.api.entity.Allocation">
+ <id column="allocation_id" property="allocationId" />
+ <result column="allocation_num" property="allocationNum" />
+ <result column="escalation_type" property="escalationType" />
+ <result column="escalation_time" property="escalationTime" />
+ <result column="pollute_position" property="pollutePosition" />
+ <result column="unit_id" property="unitId" />
+ <result column="pollute_type" property="polluteType" />
+ <result column="change_type" property="changeType" />
+ <result column="change_day" property="changeDay" />
+ <result column="escalation_unit_id" property="escalationUnitId" />
+ <result column="escalation_name" property="escalationName" />
+ <result column="investigation_type" property="investigationType" />
+ <result column="problem_describe" property="problemDescribe" />
+ <result column="is_change" property="isChange" />
+ <result column="change_describe" property="changeDescribe" />
+ <result column="change_name" property="changeName" />
+ <result column="change_time" property="changeTime" />
+ <result column="check_score" property="checkScore" />
+ <result column="check_describe" property="checkDescribe" />
+ <result column="check_name" property="checkName" />
+ <result column="check_time" property="checkTime" />
+ <result column="state" property="state" />
+ <result column="invalid_reason" property="invalidReason" />
+ </resultMap>
+
+ <!-- ��������������������� -->
+ <sql id="Base_Column_List">
+ allocation_id, allocation_num, escalation_type, escalation_time, pollute_position, unit_id, pollute_type, change_type, change_day, escalation_unit_id, escalation_name, investigation_type, problem_describe, is_change, change_describe, change_name, change_time, check_score, check_describe, check_name, check_time, state, is_del, is_invalid, invalid_reason, create_id, create_name, create_time, update_id, update_name, update_time
+ </sql>
+
+ <!-- ��������������������� -->
+ <sql id="Allocation_Column_List">
+ allocation.allocation_id, allocation.allocation_num, allocation.escalation_type, allocation.escalation_time, allocation.pollute_position, allocation.unit_id, allocation.pollute_type, allocation.change_type, allocation.change_day, allocation.escalation_unit_id, allocation.escalation_name, allocation.investigation_type, allocation.problem_describe, allocation.is_change, allocation.change_describe, allocation.change_name, allocation.change_time, allocation.check_score, allocation.check_describe, allocation.check_name, allocation.check_time, allocation.state, allocation.is_del, allocation.is_invalid, allocation.invalid_reason, allocation.create_id, allocation.create_name, allocation.create_time, allocation.update_id, allocation.update_name, allocation.update_time
+ </sql>
+
+
+ <select id="extOne" resultType="com.moral.api.pojo.ext.allocation.AllocationExt">
+ SELECT
+ <include refid="Allocation_Column_List"/>
+ FROM allocation allocation
+ where allocation.allocation_id = #{id} and allocation.is_del = 0
+ </select>
+
+ <select id="extList" resultType="com.moral.api.pojo.ext.allocation.AllocationListExt">
+ SELECT
+ <include refid="Allocation_Column_List"/>
+ FROM allocation allocation
+ <where>
+ 1 = 1
+ <if test="allocation.id != null and allocation.id != 0">
+ and allocation.allocation_id = #{allocation.id} and allocation.is_del = 0
+ </if>
+ </where>
+ </select>
+
+ <select id="extPage" resultType="com.moral.api.pojo.ext.allocation.AllocationPageExt">
+ SELECT
+ <include refid="Allocation_Column_List"/>,t1.id as applyState
+ FROM allocation allocation
+ left join allocation_extension t1 on t1.allocation_id = allocation.allocation_id and t1.is_del =0 and t1.is_invalid = 0 and t1.state = 30
+ <where>
+ 1 = 1 and allocation.is_del = 0
+ <if test="allocation.unitId != null and allocation.unitId != 0">
+ and allocation.unit_id = #{allocation.unitId}
+ </if>
+ <if test="allocation.polluteType != null and allocation.polluteType != 0">
+ and allocation.pollute_type = #{allocation.polluteType}
+ </if>
+ <if test="allocation.state != null and allocation.state != 0">
+ and allocation.state = #{allocation.state}
+ </if>
+ <if test="allocation.investigationType != null and allocation.investigationType != 0">
+ and allocation.investigation_type = #{allocation.investigationType}
+ </if>
+ <if test="allocation.changeType != null and allocation.changeType != 0">
+ and allocation.change_type = #{allocation.changeType}
+ </if>
+ <if test="allocation.isInvalid != null and allocation.isInvalid != 0">
+ and allocation.is_invalid = #{allocation.isInvalid}
+ </if>
+ <if test="allocation.startTime != null and allocation.startTime != '' ">
+ and date(allocation.escalation_time) <![CDATA[>=]]> #{allocation.startTime}
+ </if>
+ <if test="allocation.endTime != null and allocation.endTime !='' ">
+ and date(allocation.escalation_time) <![CDATA[<=]]> #{allocation.endTime}
+ </if>
+ </where>
+ order by allocation.escalation_time desc,allocation.allocation_id desc
+ </select>
+</mapper>
diff --git a/screen-common/src/main/java/com/moral/constant/PageInfo.java b/screen-common/src/main/java/com/moral/constant/PageInfo.java
new file mode 100644
index 0000000..5f38829
--- /dev/null
+++ b/screen-common/src/main/java/com/moral/constant/PageInfo.java
@@ -0,0 +1,27 @@
+package com.moral.constant;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ *
+ */
+@Data
+@Accessors(chain = true)
+@ApiModel(value = "������������", description = "������������")
+public class PageInfo {
+
+ @ApiModelProperty(value = "������������")
+ private long pageSize;
+
+ @ApiModelProperty(value = "������������")
+ private long currentPage;
+
+ @ApiModelProperty(value = "���������")
+ private long totalPage;
+
+ @ApiModelProperty(value = "������������")
+ private long totalNum;
+}
diff --git a/screen-common/src/main/java/com/moral/constant/PageResult.java b/screen-common/src/main/java/com/moral/constant/PageResult.java
new file mode 100644
index 0000000..28d95f4
--- /dev/null
+++ b/screen-common/src/main/java/com/moral/constant/PageResult.java
@@ -0,0 +1,34 @@
+package com.moral.constant;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+/**
+ *
+ */
+@Data
+@Accessors(chain = true)
+@ApiModel(value = "������������", description = "������������")
+public class PageResult<T> {
+
+ @ApiModelProperty(value = "������������")
+ private PageInfo page;
+
+ @ApiModelProperty(value = "������")
+ private List<T> list;
+
+ public PageResult() {
+ }
+
+ public PageResult(Page page) {
+ this.page = new PageInfo().setCurrentPage(page.getCurrent())
+ .setPageSize(page.getSize())
+ .setTotalPage(page.getPages())
+ .setTotalNum(page.getTotal());
+ }
+}
--
Gitblit v1.8.0