From f2cf0730508895e11eefbf666933b873a237a46a Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Tue, 14 Feb 2023 08:54:35 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=88=90=E5=91=98=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/ding/task/EmployeeBatchGetTask.java | 1 - .../controller/DingOrganizationController.java | 10 +++++ .../pmapi/user/controller/UserInfoController.java | 30 +++++++++++++- .../pmapi/user/manage/UserInfoManage.java | 29 +++++++++++++ .../pmapi/user/model/po/ReqUserDisablePO.java | 22 ++++++++++ .../pmapi/user/model/po/ReqUserInfoListPO.java | 37 +++++++++++++++++ .../pmapi/user/model/vo/ResUserInfoListVO.java | 47 ++++++++++++++++++++++ 7 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserInfoListPO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java index ab797aa..b5b3f89 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java @@ -66,7 +66,6 @@ public class EmployeeBatchGetTask { } - } // zwddClient.pageOrganizationEmployeePositions(query); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java index 12973e6..d61ea59 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java @@ -1,6 +1,8 @@ package com.ningdatech.pmapi.organization.controller; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; @@ -17,4 +19,12 @@ import org.springframework.stereotype.Controller; @RequestMapping("/api/v1/organization") public class DingOrganizationController { + @ApiModelProperty("单位成员配置") + @PostMapping("/member/config") + public void organizationManage() { + + } + + + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java index d178e0d..8e2ae4c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java @@ -1,9 +1,21 @@ package com.ningdatech.pmapi.user.controller; +import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.user.manage.UserInfoManage; +import com.ningdatech.pmapi.user.model.po.ReqUserDisablePO; +import com.ningdatech.pmapi.user.model.po.ReqUserInfoListPO; +import com.ningdatech.pmapi.user.model.vo.ResUserInfoListVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import javax.validation.Valid; + /** *

* 用户信息表 前端控制器 @@ -13,7 +25,23 @@ import org.springframework.web.bind.annotation.RequestMapping; * @since 2023-01-04 */ @Controller -@RequestMapping("/pmapi.user/user-info") +@RequestMapping("/api/v1/user-info") +@RequiredArgsConstructor +@Api(value = "UserInfoController", tags = "用户管理") public class UserInfoController { + private final UserInfoManage userInfoManage; + + @ApiOperation(value = "用户列表搜索", notes = "用户列表搜索") + @PostMapping("/list") + public PageVo userInfoList(@Valid @RequestBody ReqUserInfoListPO reqUserInfoListPO) { + return userInfoManage.list(reqUserInfoListPO); + } + + @ApiOperation(value = "用户禁用", notes = "用户禁用") + @PostMapping("/disable") + public void disable(@Valid @RequestBody ReqUserDisablePO reqUserDisablePO){ + userInfoManage.disable(reqUserDisablePO); + } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java new file mode 100644 index 0000000..39d3812 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -0,0 +1,29 @@ +package com.ningdatech.pmapi.user.manage; + +import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.user.mapper.UserInfoMapper; +import com.ningdatech.pmapi.user.model.po.ReqUserDisablePO; +import com.ningdatech.pmapi.user.model.po.ReqUserInfoListPO; +import com.ningdatech.pmapi.user.model.vo.ResUserInfoListVO; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; + +/** + * @author liuxinxin + * @date 2023/2/13 上午9:09 + */ +@Component +@RequiredArgsConstructor +public class UserInfoManage { + private final UserInfoMapper userInfoMapper; + + + public PageVo list(ReqUserInfoListPO reqUserInfoListPO) { + + return null; + } + + public void disable(ReqUserDisablePO reqUserDisablePO) { + + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java new file mode 100644 index 0000000..2f712df --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java @@ -0,0 +1,22 @@ +package com.ningdatech.pmapi.user.model.po; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @author liuxinxin + * @date 2023/2/13 上午9:31 + */ + +@Data +@ApiModel("用户禁用PO") +public class ReqUserDisablePO { + + @NotBlank(message = "用户ID不能为空") + @ApiModelProperty("用户id") + private Long userId; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserInfoListPO.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserInfoListPO.java new file mode 100644 index 0000000..9706f1e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserInfoListPO.java @@ -0,0 +1,37 @@ +package com.ningdatech.pmapi.user.model.po; + +import com.ningdatech.basic.model.PagePo; +import com.ningdatech.pmapi.sys.model.entity.Role; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2023/2/13 上午9:10 + */ +@Data +@ApiModel("用户管理查询 请求入参") +public class ReqUserInfoListPO extends PagePo { + + @ApiModelProperty("姓名") + private String name; + + @ApiModelProperty("手机号码") + private String phoneNo; + + @ApiModelProperty("所在单位(主职)") + private String orgName; + + @ApiModelProperty("所属区域") + private Long regionId; + + @ApiModelProperty("用户角色") + private List userRoleList; + + @ApiModelProperty("状态") + private String status; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java new file mode 100644 index 0000000..3e61983 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java @@ -0,0 +1,47 @@ +package com.ningdatech.pmapi.user.model.vo; + +import com.ningdatech.pmapi.sys.model.entity.Role; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * @author liuxinxin + * @date 2023/2/13 上午9:10 + */ +@Data +@ApiModel("用户管理查询 请求response") +public class ResUserInfoListVO { + + @ApiModelProperty("用户id") + private Long userId; + + @ApiModelProperty("姓名") + private String name; + + @ApiModelProperty("手机号码") + private String phoneNo; + + @ApiModelProperty("所在单位(主职)") + private String orgName; + + @ApiModelProperty("所在单位(主职)id") + private Long orgId; + + @ApiModelProperty("所属区域") + private Long regionId; + + @ApiModelProperty("用户角色") + private List userRoleList; + + @ApiModelProperty("状态") + private String status; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + +} From ecc5f491240d8aa21b1b73289a3bfc0626cb0184 Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Tue, 14 Feb 2023 08:59:14 +0800 Subject: [PATCH 2/8] fix --- .../controller/CompanyFiscalCodeController.java | 1 - .../controller/DingOrganizationController.java | 7 +-- .../user/controller/NdUserInfoController.java | 6 +- .../pmapi/user/controller/UserAuthController.java | 72 ++++++++++++++++++++-- 4 files changed, 73 insertions(+), 13 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/fiscal/controller/CompanyFiscalCodeController.java b/pmapi/src/main/java/com/ningdatech/pmapi/fiscal/controller/CompanyFiscalCodeController.java index 3d2f987..f7847d8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/fiscal/controller/CompanyFiscalCodeController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/fiscal/controller/CompanyFiscalCodeController.java @@ -33,5 +33,4 @@ public class CompanyFiscalCodeController { companyFiscalCodeManage.fiscalCodeConfigure(reqCompanyFiscalCodeAndSealSnPO); } - } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java index d61ea59..2ce1a10 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java @@ -2,14 +2,13 @@ package com.ningdatech.pmapi.organization.controller; import io.swagger.annotations.ApiModelProperty; +import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.stereotype.Controller; - /** *

- * 前端控制器 + * 前端控制器 *

* * @author Lierbao @@ -25,6 +24,4 @@ public class DingOrganizationController { } - - } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/NdUserInfoController.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/NdUserInfoController.java index 1ac0332..2e29add 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/NdUserInfoController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/NdUserInfoController.java @@ -1,13 +1,12 @@ package com.ningdatech.pmapi.user.controller; -import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; /** *

- * 前端控制器 + * 前端控制器 *

* * @author Lierbao @@ -17,4 +16,5 @@ import org.springframework.stereotype.Controller; @RequestMapping("/pmapi.user/nd-user-info") public class NdUserInfoController { + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java index 233a7a5..4b9f5e0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java @@ -1,9 +1,23 @@ package com.ningdatech.pmapi.user.controller; -import org.springframework.web.bind.annotation.RequestMapping; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.ningdatech.basic.util.StrPool; +import com.ningdatech.pmapi.common.constant.BizConst; +import com.ningdatech.pmapi.user.security.auth.constants.SessionTimeConstant; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.*; -import org.springframework.stereotype.Controller; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; /** *

@@ -13,8 +27,58 @@ import org.springframework.stereotype.Controller; * @author Liuxinxin * @since 2023-01-04 */ -@Controller -@RequestMapping("/pmapi.user/user-auth") + +@RestController +@RequestMapping("/api/v1/user/auth") +@Api(tags = {"用户鉴权-相关接口"}) +@RequiredArgsConstructor public class UserAuthController { + private final ObjectMapper objectMapper; + + @PostMapping(value = "/login/password", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE) + @ApiOperation(value = "账号密码的登陆方式") + @ApiImplicitParams({ + @ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "password", value = "密码", required = true, paramType = "form", dataType = "String"), + @ApiImplicitParam(name = "loginPlatform", value = "PC_PLATFORM PC 端,DRIVER_PLATFORM 驾驶员端,ENTERPRISE_PLATFORM 企业端" + , required = true, paramType = "form", dataType = "String")}) + public void loginByUsernameAndPassword(@RequestParam("username") String username, + @RequestParam("password") String password, + @RequestParam("loginPlatform") String loginPlatform) { + // 不实现任何内容,只是为了出api文档 + } + + @PostMapping(value = "/logout") + @ApiOperation(value = "退出登陆") + public void logout() { + // 不实现任何内容,具体实现交由Spring Security进行管理 + } + + /** + * 当需要身份认证时,跳转到这里 + */ + @GetMapping("/auth-require") + @CrossOrigin(originPatterns = "*", allowCredentials = "true", maxAge = 3600) + public void requireAuthentication(HttpServletResponse response) throws IOException { + response.setContentType(StrPool.CONTENT_TYPE); + response.setStatus(HttpStatus.UNAUTHORIZED.value()); + response.getWriter().write(objectMapper.writeValueAsString(BizConst.UNAUTHENTICATED)); + } + + /** + * 设置session失效 + */ + @GetMapping("/invalid-session") + @CrossOrigin(originPatterns = "*", allowCredentials = "true", maxAge = 3600) + public void invalidSession(HttpServletRequest request, HttpServletResponse response) throws IOException { + response.setContentType(StrPool.CONTENT_TYPE); + Cookie cookie = new Cookie(BizConst.COOKIE_KEY, null); + cookie.setPath(request.getContextPath() + "/"); + cookie.setMaxAge(SessionTimeConstant.SESSION_TIME_SECONDS); + response.addCookie(cookie); + response.setStatus(HttpStatus.UNAUTHORIZED.value()); + response.getWriter().write(objectMapper.writeValueAsString(BizConst.UNAUTHENTICATED)); + } + } From ea4ccc8072ed1974905a9551147327f7644e6dd8 Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Tue, 14 Feb 2023 09:01:25 +0800 Subject: [PATCH 3/8] fix --- .../com/ningdatech/pmapi/user/controller/UserAuthController.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java index 4b9f5e0..efbb287 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java @@ -40,12 +40,9 @@ public class UserAuthController { @ApiOperation(value = "账号密码的登陆方式") @ApiImplicitParams({ @ApiImplicitParam(name = "username", value = "用户名", required = true, paramType = "form", dataType = "String"), - @ApiImplicitParam(name = "password", value = "密码", required = true, paramType = "form", dataType = "String"), - @ApiImplicitParam(name = "loginPlatform", value = "PC_PLATFORM PC 端,DRIVER_PLATFORM 驾驶员端,ENTERPRISE_PLATFORM 企业端" - , required = true, paramType = "form", dataType = "String")}) + @ApiImplicitParam(name = "password", value = "密码", required = true, paramType = "form", dataType = "String")}) public void loginByUsernameAndPassword(@RequestParam("username") String username, - @RequestParam("password") String password, - @RequestParam("loginPlatform") String loginPlatform) { + @RequestParam("password") String password) { // 不实现任何内容,只是为了出api文档 } From 146e94cc2752b3af131e8b90e4b001c423a579b0 Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Tue, 14 Feb 2023 09:30:00 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=81=87=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java | 10 ++++++++-- .../pmapi/user/security/auth/model/UserInfoDetails.java | 9 +++++++-- .../security/auth/password/UsernamePasswordAuthProvider.java | 3 ++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java index 93ea820..d2e5cd2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java @@ -18,7 +18,13 @@ public class UserAuthLoginManage { private final IUserAuthService iUserAuthService; private final IUserInfoService iUserInfoService; - public UserFullInfoDTO queryUserInfoInPasswordAuth(String username){ - return null; + public UserFullInfoDTO queryUserInfoInPasswordAuth(String username) { + UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); + userFullInfoDTO.setCompanyId(1L); + userFullInfoDTO.setUserId(1L); + userFullInfoDTO.setIdentifier("123456"); + userFullInfoDTO.setRealName("测试账号"); + userFullInfoDTO.setUsername("测试账号"); + return userFullInfoDTO; } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java index 868fbff..53b8efc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java @@ -4,10 +4,12 @@ import cn.hutool.core.collection.CollectionUtil; import com.ningdatech.basic.auth.AbstractLoginUser; import lombok.Data; import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.StringUtils; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; +import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -41,8 +43,11 @@ public class UserInfoDetails extends AbstractLoginUser implements UserDetails { */ @Override public Collection getAuthorities() { - SimpleGrantedAuthority simpleGrantedAuthority = new SimpleGrantedAuthority(this.role); - return CollectionUtil.toList(simpleGrantedAuthority); + if (StringUtils.isNotBlank(role)) { + SimpleGrantedAuthority simpleGrantedAuthority = new SimpleGrantedAuthority(this.role); + return CollectionUtil.toList(simpleGrantedAuthority); + } + return new ArrayList<>(); } @Override diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/password/UsernamePasswordAuthProvider.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/password/UsernamePasswordAuthProvider.java index 8c7adae..f586d5b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/password/UsernamePasswordAuthProvider.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/password/UsernamePasswordAuthProvider.java @@ -31,7 +31,8 @@ public class UsernamePasswordAuthProvider implements AuthenticationProvider { if (user == null) { throw new InternalAuthenticationServiceException("can not get user info!"); } - additionalAuthenticationChecks(user, authenticationToken); + // TODO 开发使用暂时关闭账号密码验证 +// additionalAuthenticationChecks(user, authenticationToken); // 校验用户是否有当前端的登陆权限 // 将用户定义的user放入token中,这样可以在session中查询到所有自定义的用户信息 return new UsernamePasswordAuthToken(user, user.getPassword(), user.getAuthorities()); From 63bb4f310af5a4d8f270ec1c4828773da48c03df Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 14 Feb 2023 09:49:59 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E4=B8=B4=E6=97=B6=E5=A2=9E=E8=A1=A5=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/pmapi/projectlib/helper/ProjectHelper.java | 1 + .../com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/helper/ProjectHelper.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/helper/ProjectHelper.java index 264d154..51971af 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/helper/ProjectHelper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/helper/ProjectHelper.java @@ -40,6 +40,7 @@ public class ProjectHelper { query.le(req.getApproveAmountMax() != null, Project::getApprovalAmount, req.getApproveAmountMax()); query.like(req.getBuildOrg() != null, Project::getBuildOrgName, req.getBuildOrg()); + query.eq(req.getIsTemporaryAugment() != null, Project::getIsTemporaryAugment, req.getIsTemporaryAugment()); return query; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java index 398cf86..aeac65c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java @@ -66,4 +66,8 @@ public class ProjectListReq extends PagePo { @ApiModelProperty("用户ID") private Long userId; + + @ApiModelProperty("是否临时增补 0:否 1:是") + private Integer isTemporaryAugment; + } From 50093d82127fb7189fc7c0a7b25d56a850e0b67e Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 14 Feb 2023 09:56:34 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=20processType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enumeration/ProjectProcessStageEnum.java | 37 ++++++++++++++++++++++ .../common/enumeration/ProjectProessStageEnum.java | 22 ------------- .../manage/ConstructionPlanManage.java | 14 ++++---- .../manage/DeclaredProjectManage.java | 30 ++---------------- .../PrequalificationDeclaredProjectManage.java | 4 +-- .../pmapi/scheduler/contants/TaskContant.java | 8 +++++ .../pmapi/scheduler/task/InitProcessTask.java | 15 +++++---- 7 files changed, 64 insertions(+), 66 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProcessStageEnum.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProessStageEnum.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProcessStageEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProcessStageEnum.java new file mode 100644 index 0000000..bcc0cce --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProcessStageEnum.java @@ -0,0 +1,37 @@ +package com.ningdatech.pmapi.common.enumeration; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.StringUtils; + +import java.util.Objects; + +@Getter +@AllArgsConstructor +@NoArgsConstructor +public enum ProjectProcessStageEnum { + /** + * 项目流程配置 阶段枚举 + */ + ORG_INTERNAL_APPROVAL_PROCESS(1,"单位内部审批流程"), + PROJECT_PREQUALIFICATION_APPROVAL_PROCESS(2,"项目预审审批流程"), + DEPARTMENT_JOINT_APPROVAL_PROCESS(3,"部门联合审批流程"), + CONSTRUCTION_PROJECT_APPROVAL_PROCESS(4,"建设方案审批流程"), + ACCEPTANCE_DECLARATION_APPROVAL_PROCESS(5,"验收申报审批流程"); + + private Integer code; + private String desc; + + public static String getDesc(Integer code) { + if (Objects.isNull(code)) { + return StringUtils.EMPTY; + } + for (ProjectProcessStageEnum t : ProjectProcessStageEnum.values()) { + if (code.equals(t.getCode())) { + return t.desc; + } + } + return StringUtils.EMPTY; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProessStageEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProessStageEnum.java deleted file mode 100644 index 99cc654..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProessStageEnum.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.ningdatech.pmapi.common.enumeration; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@Getter -@AllArgsConstructor -@NoArgsConstructor -public enum ProjectProessStageEnum { - /** - * 项目流程配置 阶段枚举 - */ - ORG_INTERNAL_APPROVAL_PROCESS(1,"单位内部审批流程"), - PROJECT_PREQUALIFICATION_APPROVAL_PROCESS(2,"项目预审审批流程"), - DEPARTMENT_JOINT_APPROVAL_PROCESS(3,"部门联合审批流程"), - CONSTRUCTION_PROJECT_APPROVAL_PROCESS(4,"建设方案审批流程"), - ACCEPTANCE_DECLARATION_APPROVAL_PROCESS(5,"验收申报审批流程"); - - private Integer code; - private String desc; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java index ae1c659..ad5fd2f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java @@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.function.VUtils; -import com.ningdatech.pmapi.common.enumeration.ProjectProessStageEnum; +import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDto; import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto; @@ -59,7 +59,7 @@ public class ConstructionPlanManage { WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) .eq(WflowModels::getRegionCode, regionCode) - .eq(WflowModels::getFormName, ProjectProessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getDesc()) + .eq(WflowModels::getProcessType, ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode()) .last("limit 1")); if (Objects.isNull(model)) { @@ -79,12 +79,10 @@ public class ConstructionPlanManage { //放入条件判断的项目字段 ProjectConditionDto conditionDto = new ProjectConditionDto(); BeanUtils.copyProperties(projectInfo, conditionDto); - if (Objects.nonNull(conditionDto)) { - dto.getFormData().putAll( - JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference>() { - }) - ); - } + dto.getFormData().putAll( + JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference>() { + }) + ); params.setFormData(dto.getFormData()); String instanceId = processService.startProcess(model.getProcessDefId(), params); log.info("建设方案项目申报成功 【{}】", instanceId); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index b594e00..b0ffbe4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -2,26 +2,23 @@ package com.ningdatech.pmapi.projectdeclared.manage; import cn.hutool.core.collection.CollUtil; import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ningdatech.basic.model.PageVo; -import com.ningdatech.pmapi.common.enumeration.ProjectProessStageEnum; +import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft; import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto; import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto; import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto; import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDto; -import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDeclaredDetailVO; import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; -import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.wflow.bean.entity.WflowModels; @@ -63,29 +60,6 @@ public class DeclaredProjectManage { private final ProcessModelService processModelService; - public PageVo page(DeclaredProjectListParamDto params) { - Page page = params.page(); - LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(Project.class) - .ge(Objects.nonNull(params.getStartTime()), Project::getCreateOn, params.getStartTime()) - .le(Objects.nonNull(params.getEndTime()), Project::getCreateOn, params.getEndTime()) - .eq(Objects.nonNull(params.getProjectType()), Project::getProjectType, params.getProjectType()) - .eq(Objects.nonNull(params.getProjectYear()), Project::getProjectYear, params.getProjectYear()) - .eq(Objects.nonNull(params.getProjectStage()), Project::getStage, params.getProjectStage()) - .eq(Objects.nonNull(params.getProjectStatus()), Project::getStatus, params.getProjectStatus()) - .like(StringUtils.isNotBlank(params.getProjectName()), Project::getProjectName, params.getProjectName()) - .orderByDesc(Project::getUpdateOn); - projectService.page(page, wrapper); - if (0L == page.getTotal()) { - return PageVo.empty(); - } - List res = page.getRecords().stream().map(record -> { - ProjectLibListItemVO vo = new ProjectLibListItemVO(); - BeanUtils.copyProperties(record, vo); - return vo; - }).collect(Collectors.toList()); - return PageVo.of(res, page.getTotal()); - } - public PageVo pageDraft(DeclaredProjectListParamDto params) { Page page = params.page(); LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(ProjectDraft.class) @@ -135,7 +109,7 @@ public class DeclaredProjectManage { WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) .eq(WflowModels::getRegionCode, regionCode) - .eq(WflowModels::getFormName, ProjectProessStageEnum.ORG_INTERNAL_APPROVAL_PROCESS.getDesc()) + .eq(WflowModels::getProcessType, ProjectProcessStageEnum.ORG_INTERNAL_APPROVAL_PROCESS.getCode()) .last("limit 1")); if (Objects.isNull(model)) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java index e19f880..a0804f7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java @@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.function.VUtils; -import com.ningdatech.pmapi.common.enumeration.ProjectProessStageEnum; +import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDto; import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto; @@ -60,7 +60,7 @@ public class PrequalificationDeclaredProjectManage { WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) .eq(WflowModels::getRegionCode, regionCode) - .eq(WflowModels::getFormName, ProjectProessStageEnum.PROJECT_PREQUALIFICATION_APPROVAL_PROCESS.getDesc()) + .eq(WflowModels::getProcessType, ProjectProcessStageEnum.PROJECT_PREQUALIFICATION_APPROVAL_PROCESS.getCode()) .last("limit 1")); if (Objects.isNull(model)) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/contants/TaskContant.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/contants/TaskContant.java index 7f689f9..e303c10 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/contants/TaskContant.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/contants/TaskContant.java @@ -1,5 +1,7 @@ package com.ningdatech.pmapi.scheduler.contants; +import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; + /** * @author PoffyZhang * @Classname TaskContant @@ -19,5 +21,11 @@ public interface TaskContant { public static final String DEFAULT_FORM_NAME = "丽水申报项目表单"; public static final String[] DEFAULT_PROCESS_LIST = {"单位内部审批流程","项目预审审批流程","部门联合审批流程","建设方案审批流程","验收申报审批流程"}; + + public static final Integer[] DEFAULT_PROCESS_TYPE_LIST = {ProjectProcessStageEnum.ORG_INTERNAL_APPROVAL_PROCESS.getCode(), + ProjectProcessStageEnum.PROJECT_PREQUALIFICATION_APPROVAL_PROCESS.getCode(), + ProjectProcessStageEnum.DEPARTMENT_JOINT_APPROVAL_PROCESS.getCode(), + ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode(), + ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS.getCode()}; } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java index 08b54d3..9279584 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.StopWatch; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.exception.BizException; +import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.scheduler.contants.TaskContant; import com.ningdatech.pmapi.sys.contant.RegionConst; import com.ningdatech.pmapi.sys.model.entity.Region; @@ -96,15 +97,17 @@ public class InitProcessTask { // continue; // } - String[] processList = TaskContant.Wflow.DEFAULT_PROCESS_LIST; - for(String processName : processList){ + Integer[] processTypeList = TaskContant.Wflow.DEFAULT_PROCESS_TYPE_LIST; + for(Integer processType : processTypeList){ + String formName = ProjectProcessStageEnum.getDesc(processType); WflowModelHistorysDto models = new WflowModelHistorysDto(); models.setCreated(GregorianCalendar.getInstance().getTime()); // models.setFormId("wf" + IdUtil.objectId()); models.setVersion(1); models.setGroupId(1); // models.setProcessDefId("pd" + IdUtil.objectId()); - models.setFormName(processName); + models.setFormName(formName); + models.setProcessType(processType); models.setRegionCode(region.getRegionCode()); ProcessNode processNode = new ProcessNode(); models.setProcess(processNode); @@ -114,12 +117,12 @@ public class InitProcessTask { if(StringUtils.isNotBlank(processModelService.saveProcess(models))){ //初始的流程在部署表也存一份,用来查询 if(StringUtils.isNotBlank(processModelService.deployProcess(models.getFormId()))){ - log.info("当前区域 【{}】 流程名[{}] 流程数据已经保存成功",region.getName(),processName); + log.info("当前区域 【{}】 流程名[{}] 流程数据已经保存成功",region.getName(),formName); }else{ - log.info("当前区域 【{}】 流程名[{}] 流程数据保存失败",region.getName(),processName); + log.info("当前区域 【{}】 流程名[{}] 流程数据保存失败",region.getName(),formName); } }else{ - log.info("当前区域 【{}】流程名[{}] 流程数据保存失败",region.getName(),processName); + log.info("当前区域 【{}】流程名[{}] 流程数据保存失败",region.getName(),formName); } } } From 8fdc9a737f70b2fb298e5e20dd0a22e904653e2f Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 14 Feb 2023 10:01:52 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=20processType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java | 4 ++-- .../pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java | 4 ++-- .../pmapi/projectdeclared/manage/DeclaredProjectManage.java | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java index f88bd05..7f6dac1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java @@ -2,7 +2,7 @@ package com.ningdatech.pmapi.projectdeclared.entity.dto; import cn.hutool.core.collection.CollUtil; import com.google.common.collect.Maps; -import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; +import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import lombok.AllArgsConstructor; import lombok.Builder; @@ -26,7 +26,7 @@ import java.util.Map; public class DeclaredProjectDto implements Serializable { @NotNull - private ProjectDTO projectInfo; + private ProjectDto projectInfo; private Map formData; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java index 62070a3..0fdf995 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java @@ -1,6 +1,6 @@ package com.ningdatech.pmapi.projectdeclared.entity.dto; -import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; +import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import io.swagger.annotations.ApiModel; import lombok.*; @@ -26,7 +26,7 @@ public class ProjectDraftSaveDto implements Serializable { private static final long serialVersionUID = 1L; @NotNull - private ProjectDTO projectInfo; + private ProjectDto projectInfo; @NotNull private ProcessInstanceUserDto user; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index c6d266b..b0ffbe4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -16,7 +16,7 @@ import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDto; import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; -import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; +import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; @@ -104,7 +104,7 @@ public class DeclaredProjectManage { * @return */ public String startTheProcess(DeclaredProjectDto dto) { - ProjectDTO projectInfo = dto.getProjectInfo(); + ProjectDto projectInfo = dto.getProjectInfo(); String regionCode = projectInfo.getAreaCode(); WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) @@ -145,7 +145,7 @@ public class DeclaredProjectManage { * @param projectDto * @param instanceId */ - private void saveProject(ProjectDTO projectDto, String instanceId, String regionCode) { + private void saveProject(ProjectDto projectDto, String instanceId, String regionCode) { //流程启动之后 入库项目 重要业务信息 用于列表查询 展示 try { //保存项目表信息 @@ -181,7 +181,7 @@ public class DeclaredProjectManage { * @return */ public Long saveToDraft(ProjectDraftSaveDto dto) { - ProjectDTO projectInfo = dto.getProjectInfo(); + ProjectDto projectInfo = dto.getProjectInfo(); ProjectDraft draft = new ProjectDraft(); BeanUtils.copyProperties(projectInfo, draft); draft.setUserId(dto.getUser().getUserId()); From 6e05e665e14c3cf8314934c92e6cb2c9fe1aa429 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 14 Feb 2023 10:10:38 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=20processType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ConstructionPlanController.java | 4 +- .../controller/DeclaredProjectController.java | 16 +- .../PrequalificationDeclaredController.java | 4 +- .../entity/dto/ConstructionPlanDTO.java | 45 ++++ .../entity/dto/ConstructionPlanDto.java | 45 ---- .../entity/dto/DeclaredProjectDTO.java | 43 +++ .../entity/dto/DeclaredProjectDto.java | 43 --- .../entity/dto/DeclaredProjectListParamDTO.java | 39 +++ .../entity/dto/DeclaredProjectListParamDto.java | 39 --- .../entity/dto/PreDeclaredProjectDTO.java | 42 +++ .../entity/dto/PreDeclaredProjectDto.java | 42 --- .../entity/dto/ProjectConditionDTO.java | 35 +++ .../entity/dto/ProjectConditionDto.java | 35 --- .../entity/dto/ProjectDraftSaveDTO.java | 34 +++ .../entity/dto/ProjectDraftSaveDto.java | 34 --- .../projectdeclared/entity/vo/ProjectDraftVO.java | 297 +++++++++++++++++++++ .../projectdeclared/entity/vo/ProjectDraftVo.java | 297 --------------------- .../manage/ConstructionPlanManage.java | 8 +- .../manage/DeclaredProjectManage.java | 34 +-- .../PrequalificationDeclaredProjectManage.java | 8 +- 20 files changed, 572 insertions(+), 572 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDto.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDto.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDto.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVo.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java index c64adaf..d076821 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.projectdeclared.controller; import com.ningdatech.basic.model.PageVo; -import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDto; +import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDTO; import com.ningdatech.pmapi.projectdeclared.manage.ConstructionPlanManage; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; @@ -43,7 +43,7 @@ public class ConstructionPlanController { @ApiOperation(value = "建设方案申报", notes = "建设方案申报") @PostMapping("/start") - public String startTheProcess(@Validated @RequestBody ConstructionPlanDto dto) { + public String startTheProcess(@Validated @RequestBody ConstructionPlanDTO dto) { String instanceId = constructionPlanManage.startTheProcess(dto); return "建设方案申报 【" + instanceId + "】 成功"; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java index 67bfd0a..4c269a7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java @@ -1,10 +1,10 @@ package com.ningdatech.pmapi.projectdeclared.controller; import com.ningdatech.basic.model.PageVo; -import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto; -import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto; -import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDto; -import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; +import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDTO; +import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDTO; +import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDTO; +import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVO; import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; @@ -41,25 +41,25 @@ public class DeclaredProjectController { @ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表") @GetMapping("/draft") - public PageVo draft(@ModelAttribute DeclaredProjectListParamDto params) { + public PageVo draft(@ModelAttribute DeclaredProjectListParamDTO params) { return declaredProjectManage.pageDraft(params); } @ApiOperation(value = "申报项目草稿箱详情", notes = "申报项目草稿箱详情") @GetMapping("/draft/{id}") - public ProjectDraftVo draft(@PathVariable Long id) { + public ProjectDraftVO draft(@PathVariable Long id) { return declaredProjectManage.draftDatail(id); } @ApiOperation(value = "申报项目保存至草稿箱", notes = "申报项目保存至草稿箱") @PostMapping("/save-to-draft") - public Object saveToDraft(@Validated @RequestBody ProjectDraftSaveDto dto) { + public Object saveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) { return declaredProjectManage.saveToDraft(dto); } @ApiOperation(value = "申报项目", notes = "申报项目") @PostMapping("/start") - public String startTheProcess(@Validated @RequestBody DeclaredProjectDto dto) { + public String startTheProcess(@Validated @RequestBody DeclaredProjectDTO dto) { String instanceId = declaredProjectManage.startTheProcess(dto); return "启动流程实例 【" + instanceId + "】 成功"; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/PrequalificationDeclaredController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/PrequalificationDeclaredController.java index c05225f..e31be9a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/PrequalificationDeclaredController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/PrequalificationDeclaredController.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.projectdeclared.controller; import com.ningdatech.basic.model.PageVo; -import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDto; +import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDTO; import com.ningdatech.pmapi.projectdeclared.manage.PrequalificationDeclaredProjectManage; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; @@ -43,7 +43,7 @@ public class PrequalificationDeclaredController { @ApiOperation(value = "申报预审", notes = "申报预审") @PostMapping("/start") - public String startTheProcess(@Validated @RequestBody PreDeclaredProjectDto dto) { + public String startTheProcess(@Validated @RequestBody PreDeclaredProjectDTO dto) { String instanceId = prequalificationDeclaredProjectManage.startTheProcess(dto); return "提交预审 【" + instanceId + "】 成功"; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDTO.java new file mode 100644 index 0000000..f9630b8 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDTO.java @@ -0,0 +1,45 @@ +package com.ningdatech.pmapi.projectdeclared.entity.dto; + +import cn.hutool.core.collection.CollUtil; +import com.google.common.collect.Maps; +import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Map; + +/** + * @Classname DeclaredProjectDto + * @Description 申报项目 + * @Date 2023/2/1 14:52 + * @Author PoffyZhang + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ConstructionPlanDTO implements Serializable { + + @NotNull + private Long projectId; + + //建设方案文件 + private String constructionPlanFile; + + private Map formData; + + @NotNull + private ProcessInstanceUserDto user; + + public Map getFormData(){ + if(CollUtil.isEmpty(this.formData)){ + this.formData = Maps.newHashMap(); + return this.formData; + } + return this.formData; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDto.java deleted file mode 100644 index 86ba27c..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDto.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.ningdatech.pmapi.projectdeclared.entity.dto; - -import cn.hutool.core.collection.CollUtil; -import com.google.common.collect.Maps; -import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.Map; - -/** - * @Classname DeclaredProjectDto - * @Description 申报项目 - * @Date 2023/2/1 14:52 - * @Author PoffyZhang - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class ConstructionPlanDto implements Serializable { - - @NotNull - private Long projectId; - - //建设方案文件 - private String constructionPlanFile; - - private Map formData; - - @NotNull - private ProcessInstanceUserDto user; - - public Map getFormData(){ - if(CollUtil.isEmpty(this.formData)){ - this.formData = Maps.newHashMap(); - return this.formData; - } - return this.formData; - } -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDTO.java new file mode 100644 index 0000000..233b5d4 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDTO.java @@ -0,0 +1,43 @@ +package com.ningdatech.pmapi.projectdeclared.entity.dto; + +import cn.hutool.core.collection.CollUtil; +import com.google.common.collect.Maps; +import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; +import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Map; + +/** + * @Classname DeclaredProjectDto + * @Description 申报项目 + * @Date 2023/2/1 14:52 + * @Author PoffyZhang + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DeclaredProjectDTO implements Serializable { + + @NotNull + private ProjectDTO projectInfo; + + private Map formData; + + @NotNull + private ProcessInstanceUserDto user; + + public Map getFormData(){ + if(CollUtil.isEmpty(this.formData)){ + this.formData = Maps.newHashMap(); + return this.formData; + } + return this.formData; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java deleted file mode 100644 index 7f6dac1..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.ningdatech.pmapi.projectdeclared.entity.dto; - -import cn.hutool.core.collection.CollUtil; -import com.google.common.collect.Maps; -import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; -import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.Map; - -/** - * @Classname DeclaredProjectDto - * @Description 申报项目 - * @Date 2023/2/1 14:52 - * @Author PoffyZhang - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class DeclaredProjectDto implements Serializable { - - @NotNull - private ProjectDto projectInfo; - - private Map formData; - - @NotNull - private ProcessInstanceUserDto user; - - public Map getFormData(){ - if(CollUtil.isEmpty(this.formData)){ - this.formData = Maps.newHashMap(); - return this.formData; - } - return this.formData; - } -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDTO.java new file mode 100644 index 0000000..6f4b327 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDTO.java @@ -0,0 +1,39 @@ +package com.ningdatech.pmapi.projectdeclared.entity.dto; + +import com.ningdatech.basic.model.PagePo; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Classname DeclaredProjectParamDto + * @Description + * @Date 2023/2/1 14:52 + * @Author PoffyZhang + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DeclaredProjectListParamDTO extends PagePo { + + private String userId; + + private String projectName; + + private Integer projectType; + + private Integer projectStage; + + private Integer projectStatus; + + private Integer projectYear; + + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String startTime; + + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String endTime; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDto.java deleted file mode 100644 index 32b1868..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDto.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.ningdatech.pmapi.projectdeclared.entity.dto; - -import com.ningdatech.basic.model.PagePo; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.springframework.format.annotation.DateTimeFormat; - -/** - * @Classname DeclaredProjectParamDto - * @Description - * @Date 2023/2/1 14:52 - * @Author PoffyZhang - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class DeclaredProjectListParamDto extends PagePo { - - private String userId; - - private String projectName; - - private Integer projectType; - - private Integer projectStage; - - private Integer projectStatus; - - private Integer projectYear; - - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private String startTime; - - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private String endTime; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDTO.java new file mode 100644 index 0000000..e6ae09e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDTO.java @@ -0,0 +1,42 @@ +package com.ningdatech.pmapi.projectdeclared.entity.dto; + +import cn.hutool.core.collection.CollUtil; +import com.google.common.collect.Maps; +import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Map; + +/** + * @Classname DeclaredProjectDto + * @Description 申报项目 + * @Date 2023/2/1 14:52 + * @Author PoffyZhang + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class PreDeclaredProjectDTO implements Serializable { + + @NotNull + private Long projectId; + + private Map formData; + + @NotNull + private ProcessInstanceUserDto user; + + public Map getFormData(){ + if(CollUtil.isEmpty(this.formData)){ + this.formData = Maps.newHashMap(); + return this.formData; + } + return this.formData; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java deleted file mode 100644 index 92d2e62..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.ningdatech.pmapi.projectdeclared.entity.dto; - -import cn.hutool.core.collection.CollUtil; -import com.google.common.collect.Maps; -import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.Map; - -/** - * @Classname DeclaredProjectDto - * @Description 申报项目 - * @Date 2023/2/1 14:52 - * @Author PoffyZhang - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class PreDeclaredProjectDto implements Serializable { - - @NotNull - private Long projectId; - - private Map formData; - - @NotNull - private ProcessInstanceUserDto user; - - public Map getFormData(){ - if(CollUtil.isEmpty(this.formData)){ - this.formData = Maps.newHashMap(); - return this.formData; - } - return this.formData; - } -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDTO.java new file mode 100644 index 0000000..b74c2a0 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDTO.java @@ -0,0 +1,35 @@ +package com.ningdatech.pmapi.projectdeclared.entity.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Classname DeclaredProjectDto + * @Description 申报项目 里的条件判断实体 + * @Date 2023/2/1 14:52 + * @Author PoffyZhang + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProjectConditionDTO implements Serializable { + + private Long projectId; + + @ApiModelProperty("申报金额") + private BigDecimal declareAmount; + + @ApiModelProperty("是否临时增补 0:否 1:是") + private Integer isTemporaryAugment; + + @ApiModelProperty("是否数字化改革项目 0:否 1:是") + private Integer isDigitalReform; + + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDto.java deleted file mode 100644 index 4e60030..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDto.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.ningdatech.pmapi.projectdeclared.entity.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import java.io.Serializable; -import java.math.BigDecimal; - -/** - * @Classname DeclaredProjectDto - * @Description 申报项目 里的条件判断实体 - * @Date 2023/2/1 14:52 - * @Author PoffyZhang - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class ProjectConditionDto implements Serializable { - - private Long projectId; - - @ApiModelProperty("申报金额") - private BigDecimal declareAmount; - - @ApiModelProperty("是否临时增补 0:否 1:是") - private Integer isTemporaryAugment; - - @ApiModelProperty("是否数字化改革项目 0:否 1:是") - private Integer isDigitalReform; - - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDTO.java new file mode 100644 index 0000000..78ab8f3 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDTO.java @@ -0,0 +1,34 @@ +package com.ningdatech.pmapi.projectdeclared.entity.dto; + +import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; +import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; +import io.swagger.annotations.ApiModel; +import lombok.*; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + *

+ * 项目草稿箱 + *

+ * + * @author zpf + * @since 2023-02-06 + */ +@ApiModel(value = "NdProjectDraftDto", description = "") +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@ToString +public class ProjectDraftSaveDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @NotNull + private ProjectDTO projectInfo; + + @NotNull + private ProcessInstanceUserDto user; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java deleted file mode 100644 index 0fdf995..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.ningdatech.pmapi.projectdeclared.entity.dto; - -import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; -import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; -import io.swagger.annotations.ApiModel; -import lombok.*; -import javax.validation.constraints.NotNull; -import java.io.Serializable; - -/** - *

- * 项目草稿箱 - *

- * - * @author zpf - * @since 2023-02-06 - */ -@ApiModel(value = "NdProjectDraftDto", description = "") -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -@ToString -public class ProjectDraftSaveDto implements Serializable { - - private static final long serialVersionUID = 1L; - - @NotNull - private ProjectDto projectInfo; - - @NotNull - private ProcessInstanceUserDto user; - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVO.java new file mode 100644 index 0000000..a822fd0 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVO.java @@ -0,0 +1,297 @@ +package com.ningdatech.pmapi.projectdeclared.entity.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; + +/** + *

+ * 项目草稿箱 + *

+ * + * @author zpf + * @since 2023-02-06 + */ +@ApiModel(value = "NdProjectDraft对象", description = "") +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProjectDraftVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("应用ID") + @TableId(type = IdType.AUTO) + private Long id; + + @ApiModelProperty("所属地区编号") + private String areaCode; + + @ApiModelProperty("所属地区名称") + private String area; + + @ApiModelProperty("项目阶段") + private Integer stage; + + @ApiModelProperty("项目状态") + private Integer status; + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("是否临时增补 0:否 1:是") + private Integer isTemporaryAugment; + + @ApiModelProperty("项目负责人") + private String responsibleMan; + + @ApiModelProperty("负责人手机号码") + private String responsibleManMobile; + + @ApiModelProperty("项目联系人") + private String contactName; + + @ApiModelProperty("项目联系人手机号码") + private String contactPhone; + + @ApiModelProperty("建设单位名称") + private String buildOrgName; + + @ApiModelProperty("建设单位统一社会信用代码") + private String buildOrgCode; + + @ApiModelProperty("建设单位浙政钉ID") + private String buildOrgZheJiangGovDingId; + + @ApiModelProperty("项目类型 1:建设 2:运维") + private Integer projectType; + + @ApiModelProperty("是否首次新建 0:否 1:是") + private Integer isFirst; + + @ApiModelProperty("项目预算年度") + private Integer projectYear; + + @ApiModelProperty("项目建设起始时间") + private String beginTime; + + @ApiModelProperty("项目建设终止时间") + private String endTime; + + @ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施") + private Integer fourSystems; + + @ApiModelProperty("是否数字化改革项目 0:否 1:是") + private Integer isDigitalReform; + + @ApiModelProperty("综合业务领域") + private String bizDomain; + + @ApiModelProperty("建设层级 1:国家级 2:省级 3:省本级 4:市级 5:市本级 6:区县 7乡镇") + private Integer buildLevel; + + @ApiModelProperty("立项依据") + private String buildBasis; + + @ApiModelProperty("发改编码") + private String developCode; + + @ApiModelProperty("财政编码") + private String financialCode; + + @ApiModelProperty("是否上云 0:否 1:是") + private Integer isCloud; + + private String cloudType; + + @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer protectionLevel; + + @ApiModelProperty("是否密评 0:否 1:是") + private Integer isSecretComments; + + @ApiModelProperty("项目简介") + private String projectIntroduction; + + @ApiModelProperty("资金申报情况-申报金额(万元)") + private BigDecimal declareAmount; + + @ApiModelProperty("资金申报情况-自有金额(万元)") + private BigDecimal declareHaveAmount; + + @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") + private BigDecimal declareGovOwnFinanceAmount; + + @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") + private BigDecimal declareGovSuperiorFinanceAmount; + + @ApiModelProperty("银行贷款(万元)") + private BigDecimal declareBankLendingAmount; + + @ApiModelProperty("其它资金(万元)") + private BigDecimal declareOtherAmount; + + @ApiModelProperty("资金分配情况-软件开发(万元)") + private BigDecimal softwareDevelopmentAmount; + + @ApiModelProperty("资金分配情况-云资源、硬件购置(万元)") + private BigDecimal cloudHardwarePurchaseAmount; + + @ApiModelProperty("资金分配情况-第三方服务(万元)") + private BigDecimal thirdPartyAmount; + + @ApiModelProperty("年度支付计划-年度支付计划(万元)") + private BigDecimal annualPlanAmount; + + @ApiModelProperty("年度支付计划-自有金额(万元)") + private BigDecimal annualPlanHaveAmount; + + @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") + private BigDecimal annualPlanGovOwnFinanceAmount; + + @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") + private BigDecimal annualPlanGovSuperiorFinanceAmount; + + @ApiModelProperty("年度支付计划-银行贷款(万元)") + private BigDecimal annualPlanBankLendingAmount; + + @ApiModelProperty("年度支付计划-其它资金(万元)") + private BigDecimal annualPlanOtherAmount; + + @ApiModelProperty("立项批复资金(万元)") + private BigDecimal approvalAmount; + + private LocalDateTime annualPlanAddTime; + + @ApiModelProperty("核心业务-核心业务模块") + private String coreBusiness; + + @ApiModelProperty("安全投入-投入项") + private String safetyInputTitle; + + @ApiModelProperty("安全投入-内容描述") + private String safetyInputDescribe; + + @ApiModelProperty("安全投入-金额(万元)") + private BigDecimal safetyInputAmount; + + @ApiModelProperty("附件-初步方案") + private String preliminaryPlanFile; + + @ApiModelProperty("附件-佐证材料") + private String supportingMaterialsFile; + + @ApiModelProperty("附件-项目总投资测算明细") + private String calculationTotalInvestmentFile; + + @ApiModelProperty("附件-申报单位主要职责(单位三定方案)") + private String mainResponsibilitiesApplicantFile; + + @ApiModelProperty("备注") + private String projectRemarks; + + @ApiModelProperty("是否包含应用 0:否 1:是") + private Integer includeApplication; + + @ApiModelProperty("工程形象进度-第一季度") + private String engineeringSpeedOne; + + @ApiModelProperty("工程形象进度-第二季度") + private String engineeringSpeedTwo; + + @ApiModelProperty("工程形象进度-第三季度") + private String engineeringSpeedThree; + + @ApiModelProperty("工程形象进度-第四季度") + private String engineeringSpeedFour; + + @ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启") + private Boolean isOpenCoreBusiness; + + @ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启") + private Boolean isOpenSafetyInput; + + @ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启") + private Boolean isEngineeringSpeed; + + @ApiModelProperty("附件-是否开启 false:关闭 true:开启") + private Boolean isAccessories; + + @ApiModelProperty("备注-是否开启 false:关闭 true:开启") + private Boolean isRemarks; + + @ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") + private Boolean isAnnualPlanAmount; + + @ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") + private Boolean isInnovateWholeProvinceShare; + + private LocalDateTime createOn; + + private LocalDateTime updateOn; + + @ApiModelProperty("流程实例编号") + private String instCode; + + @ApiModelProperty("安全投入-模块信息") + private String safetyInputModular; + + @ApiModelProperty("项目申报pdf") + private String projectPdf; + + @ApiModelProperty("立项申报pdf") + private String declarationPdf; + + @ApiModelProperty("建设周期(月)") + private String buildCycle; + + @ApiModelProperty("建设方案文件") + private String constructionPlanFile; + + @ApiModelProperty("立项批复文件") + private String approvedFile; + + @ApiModelProperty("批复金额") + private BigDecimal approvedTotalInvestmentIncrease; + + @ApiModelProperty("上级主管部门") + private String higherSuperOrg; + + @ApiModelProperty("上级主管部门Code") + private String higherSuperOrgCode; + + @ApiModelProperty("主管部门名称") + private String superOrg; + + @ApiModelProperty("主管部门Code") + private String superOrgCode; + + @ApiModelProperty("前端所需验证字段") + private Integer allApplicationsDone; + + @ApiModelProperty("项目应用") + private List applicationList; + + @ApiModelProperty("新增form内容") + private Map dynamicForm; + + @ApiModelProperty("用户id") + private String userId; + + + private Long createBy; + private Long updateBy; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVo.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVo.java deleted file mode 100644 index 5cb5c4e..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVo.java +++ /dev/null @@ -1,297 +0,0 @@ -package com.ningdatech.pmapi.projectdeclared.entity.vo; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.List; -import java.util.Map; - -/** - *

- * 项目草稿箱 - *

- * - * @author zpf - * @since 2023-02-06 - */ -@ApiModel(value = "NdProjectDraft对象", description = "") -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class ProjectDraftVo implements Serializable { - - private static final long serialVersionUID = 1L; - - @ApiModelProperty("应用ID") - @TableId(type = IdType.AUTO) - private Long id; - - @ApiModelProperty("所属地区编号") - private String areaCode; - - @ApiModelProperty("所属地区名称") - private String area; - - @ApiModelProperty("项目阶段") - private Integer stage; - - @ApiModelProperty("项目状态") - private Integer status; - - @ApiModelProperty("项目名称") - private String projectName; - - @ApiModelProperty("是否临时增补 0:否 1:是") - private Integer isTemporaryAugment; - - @ApiModelProperty("项目负责人") - private String responsibleMan; - - @ApiModelProperty("负责人手机号码") - private String responsibleManMobile; - - @ApiModelProperty("项目联系人") - private String contactName; - - @ApiModelProperty("项目联系人手机号码") - private String contactPhone; - - @ApiModelProperty("建设单位名称") - private String buildOrgName; - - @ApiModelProperty("建设单位统一社会信用代码") - private String buildOrgCode; - - @ApiModelProperty("建设单位浙政钉ID") - private String buildOrgZheJiangGovDingId; - - @ApiModelProperty("项目类型 1:建设 2:运维") - private Integer projectType; - - @ApiModelProperty("是否首次新建 0:否 1:是") - private Integer isFirst; - - @ApiModelProperty("项目预算年度") - private Integer projectYear; - - @ApiModelProperty("项目建设起始时间") - private String beginTime; - - @ApiModelProperty("项目建设终止时间") - private String endTime; - - @ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施") - private Integer fourSystems; - - @ApiModelProperty("是否数字化改革项目 0:否 1:是") - private Integer isDigitalReform; - - @ApiModelProperty("综合业务领域") - private String bizDomain; - - @ApiModelProperty("建设层级 1:国家级 2:省级 3:省本级 4:市级 5:市本级 6:区县 7乡镇") - private Integer buildLevel; - - @ApiModelProperty("立项依据") - private String buildBasis; - - @ApiModelProperty("发改编码") - private String developCode; - - @ApiModelProperty("财政编码") - private String financialCode; - - @ApiModelProperty("是否上云 0:否 1:是") - private Integer isCloud; - - private String cloudType; - - @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") - private Integer protectionLevel; - - @ApiModelProperty("是否密评 0:否 1:是") - private Integer isSecretComments; - - @ApiModelProperty("项目简介") - private String projectIntroduction; - - @ApiModelProperty("资金申报情况-申报金额(万元)") - private BigDecimal declareAmount; - - @ApiModelProperty("资金申报情况-自有金额(万元)") - private BigDecimal declareHaveAmount; - - @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") - private BigDecimal declareGovOwnFinanceAmount; - - @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") - private BigDecimal declareGovSuperiorFinanceAmount; - - @ApiModelProperty("银行贷款(万元)") - private BigDecimal declareBankLendingAmount; - - @ApiModelProperty("其它资金(万元)") - private BigDecimal declareOtherAmount; - - @ApiModelProperty("资金分配情况-软件开发(万元)") - private BigDecimal softwareDevelopmentAmount; - - @ApiModelProperty("资金分配情况-云资源、硬件购置(万元)") - private BigDecimal cloudHardwarePurchaseAmount; - - @ApiModelProperty("资金分配情况-第三方服务(万元)") - private BigDecimal thirdPartyAmount; - - @ApiModelProperty("年度支付计划-年度支付计划(万元)") - private BigDecimal annualPlanAmount; - - @ApiModelProperty("年度支付计划-自有金额(万元)") - private BigDecimal annualPlanHaveAmount; - - @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") - private BigDecimal annualPlanGovOwnFinanceAmount; - - @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") - private BigDecimal annualPlanGovSuperiorFinanceAmount; - - @ApiModelProperty("年度支付计划-银行贷款(万元)") - private BigDecimal annualPlanBankLendingAmount; - - @ApiModelProperty("年度支付计划-其它资金(万元)") - private BigDecimal annualPlanOtherAmount; - - @ApiModelProperty("立项批复资金(万元)") - private BigDecimal approvalAmount; - - private LocalDateTime annualPlanAddTime; - - @ApiModelProperty("核心业务-核心业务模块") - private String coreBusiness; - - @ApiModelProperty("安全投入-投入项") - private String safetyInputTitle; - - @ApiModelProperty("安全投入-内容描述") - private String safetyInputDescribe; - - @ApiModelProperty("安全投入-金额(万元)") - private BigDecimal safetyInputAmount; - - @ApiModelProperty("附件-初步方案") - private String preliminaryPlanFile; - - @ApiModelProperty("附件-佐证材料") - private String supportingMaterialsFile; - - @ApiModelProperty("附件-项目总投资测算明细") - private String calculationTotalInvestmentFile; - - @ApiModelProperty("附件-申报单位主要职责(单位三定方案)") - private String mainResponsibilitiesApplicantFile; - - @ApiModelProperty("备注") - private String projectRemarks; - - @ApiModelProperty("是否包含应用 0:否 1:是") - private Integer includeApplication; - - @ApiModelProperty("工程形象进度-第一季度") - private String engineeringSpeedOne; - - @ApiModelProperty("工程形象进度-第二季度") - private String engineeringSpeedTwo; - - @ApiModelProperty("工程形象进度-第三季度") - private String engineeringSpeedThree; - - @ApiModelProperty("工程形象进度-第四季度") - private String engineeringSpeedFour; - - @ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启") - private Boolean isOpenCoreBusiness; - - @ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启") - private Boolean isOpenSafetyInput; - - @ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启") - private Boolean isEngineeringSpeed; - - @ApiModelProperty("附件-是否开启 false:关闭 true:开启") - private Boolean isAccessories; - - @ApiModelProperty("备注-是否开启 false:关闭 true:开启") - private Boolean isRemarks; - - @ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") - private Boolean isAnnualPlanAmount; - - @ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") - private Boolean isInnovateWholeProvinceShare; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - - @ApiModelProperty("流程实例编号") - private String instCode; - - @ApiModelProperty("安全投入-模块信息") - private String safetyInputModular; - - @ApiModelProperty("项目申报pdf") - private String projectPdf; - - @ApiModelProperty("立项申报pdf") - private String declarationPdf; - - @ApiModelProperty("建设周期(月)") - private String buildCycle; - - @ApiModelProperty("建设方案文件") - private String constructionPlanFile; - - @ApiModelProperty("立项批复文件") - private String approvedFile; - - @ApiModelProperty("批复金额") - private BigDecimal approvedTotalInvestmentIncrease; - - @ApiModelProperty("上级主管部门") - private String higherSuperOrg; - - @ApiModelProperty("上级主管部门Code") - private String higherSuperOrgCode; - - @ApiModelProperty("主管部门名称") - private String superOrg; - - @ApiModelProperty("主管部门Code") - private String superOrgCode; - - @ApiModelProperty("前端所需验证字段") - private Integer allApplicationsDone; - - @ApiModelProperty("项目应用") - private List applicationList; - - @ApiModelProperty("新增form内容") - private Map dynamicForm; - - @ApiModelProperty("用户id") - private String userId; - - - private Long createBy; - private Long updateBy; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java index ad5fd2f..2d69514 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java @@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.function.VUtils; import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; -import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDto; -import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto; +import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDTO; +import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDTO; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.service.IProjectService; @@ -50,7 +50,7 @@ public class ConstructionPlanManage { * @param dto * @return */ - public String startTheProcess(ConstructionPlanDto dto) { + public String startTheProcess(ConstructionPlanDTO dto) { Project projectInfo = projectService.getById(dto.getProjectId()); VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!"); @@ -77,7 +77,7 @@ public class ConstructionPlanManage { params.setUser(dto.getUser()); params.setProcessUsers(Collections.emptyMap()); //放入条件判断的项目字段 - ProjectConditionDto conditionDto = new ProjectConditionDto(); + ProjectConditionDTO conditionDto = new ProjectConditionDTO(); BeanUtils.copyProperties(projectInfo, conditionDto); dto.getFormData().putAll( JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference>() { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index b0ffbe4..14de447 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -9,14 +9,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ningdatech.basic.model.PageVo; import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft; -import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto; -import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto; -import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto; -import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDto; -import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; +import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDTO; +import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDTO; +import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDTO; +import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDTO; +import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVO; import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; -import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; +import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; @@ -60,7 +60,7 @@ public class DeclaredProjectManage { private final ProcessModelService processModelService; - public PageVo pageDraft(DeclaredProjectListParamDto params) { + public PageVo pageDraft(DeclaredProjectListParamDTO params) { Page page = params.page(); LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(ProjectDraft.class) .eq(ProjectDraft::getUserId,params.getUserId()) @@ -76,17 +76,17 @@ public class DeclaredProjectManage { if (0L == page.getTotal()) { return PageVo.empty(); } - List res = page.getRecords().stream().map(record -> { - ProjectDraftVo vo = new ProjectDraftVo(); + List res = page.getRecords().stream().map(record -> { + ProjectDraftVO vo = new ProjectDraftVO(); BeanUtils.copyProperties(record, vo); return vo; }).collect(Collectors.toList()); return PageVo.of(res, page.getTotal()); } - public ProjectDraftVo draftDatail(Long id) { + public ProjectDraftVO draftDatail(Long id) { ProjectDraft draft = projectDraftService.getById(id); - ProjectDraftVo vo = new ProjectDraftVo(); + ProjectDraftVO vo = new ProjectDraftVO(); BeanUtils.copyProperties(draft, vo); if(StringUtils.isNotBlank(draft.getProjectApplicationList())){ vo.setApplicationList(JSON.parseArray(draft.getProjectApplicationList(),ProjectApplication.class)); @@ -103,8 +103,8 @@ public class DeclaredProjectManage { * @param dto * @return */ - public String startTheProcess(DeclaredProjectDto dto) { - ProjectDto projectInfo = dto.getProjectInfo(); + public String startTheProcess(DeclaredProjectDTO dto) { + ProjectDTO projectInfo = dto.getProjectInfo(); String regionCode = projectInfo.getAreaCode(); WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) @@ -121,7 +121,7 @@ public class DeclaredProjectManage { params.setUser(dto.getUser()); params.setProcessUsers(Collections.emptyMap()); //放入条件判断的项目字段 - ProjectConditionDto conditionDto = new ProjectConditionDto(); + ProjectConditionDTO conditionDto = new ProjectConditionDTO(); BeanUtils.copyProperties(dto.getProjectInfo(), conditionDto); if (Objects.nonNull(conditionDto)) { dto.getFormData().putAll( @@ -145,7 +145,7 @@ public class DeclaredProjectManage { * @param projectDto * @param instanceId */ - private void saveProject(ProjectDto projectDto, String instanceId, String regionCode) { + private void saveProject(ProjectDTO projectDto, String instanceId, String regionCode) { //流程启动之后 入库项目 重要业务信息 用于列表查询 展示 try { //保存项目表信息 @@ -180,8 +180,8 @@ public class DeclaredProjectManage { * @param dto * @return */ - public Long saveToDraft(ProjectDraftSaveDto dto) { - ProjectDto projectInfo = dto.getProjectInfo(); + public Long saveToDraft(ProjectDraftSaveDTO dto) { + ProjectDTO projectInfo = dto.getProjectInfo(); ProjectDraft draft = new ProjectDraft(); BeanUtils.copyProperties(projectInfo, draft); draft.setUserId(dto.getUser().getUserId()); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java index a0804f7..c7991bd 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java @@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.function.VUtils; import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; -import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDto; -import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto; +import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDTO; +import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDTO; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.service.IProjectService; @@ -51,7 +51,7 @@ public class PrequalificationDeclaredProjectManage { * @param dto * @return */ - public String startTheProcess(PreDeclaredProjectDto dto) { + public String startTheProcess(PreDeclaredProjectDTO dto) { Project projectInfo = projectService.getById(dto.getProjectId()); VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!"); @@ -78,7 +78,7 @@ public class PrequalificationDeclaredProjectManage { params.setUser(dto.getUser()); params.setProcessUsers(Collections.emptyMap()); //放入条件判断的项目字段 - ProjectConditionDto conditionDto = new ProjectConditionDto(); + ProjectConditionDTO conditionDto = new ProjectConditionDTO(); BeanUtils.copyProperties(projectInfo, conditionDto); if (Objects.nonNull(conditionDto)) { dto.getFormData().putAll(