@@ -1,13 +0,0 @@ | |||||
package com.ningdatech.pmapi.api.tiangu; | |||||
import com.aliyuncs.http.IHttpClient; | |||||
import org.springframework.stereotype.Component; | |||||
/** | |||||
* @author liuxinxin | |||||
* @date 2023/2/10 上午11:15 | |||||
*/ | |||||
@Component | |||||
public class SealApi { | |||||
} |
@@ -16,7 +16,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; | |||||
* @Date 2021/7/21 11:26 | * @Date 2021/7/21 11:26 | ||||
* @Version 1.0 | * @Version 1.0 | ||||
**/ | **/ | ||||
@RestControllerAdvice(basePackages = {}) | |||||
@RestControllerAdvice(basePackages = {"com.ningdatech.pmapi.fiscal.controller"}) | |||||
public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | ||||
private static final String SWAGGER_CLASS_PREFIX = "springfox.documentation"; | private static final String SWAGGER_CLASS_PREFIX = "springfox.documentation"; | ||||
@@ -0,0 +1,22 @@ | |||||
package com.ningdatech.pmapi.common.helper; | |||||
import org.springframework.stereotype.Component; | |||||
/** | |||||
* @author liuxinxin | |||||
* @date 2023/2/10 下午4:38 | |||||
* @Description: 用户信息管理工具类 helper | |||||
*/ | |||||
@Component | |||||
public interface UserInfoHelper { | |||||
/** | |||||
* 根据用户id 获取 用户所属公司id | |||||
* | |||||
* @param userId | |||||
* @return | |||||
*/ | |||||
Long getCompanyId(Long userId); | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.ningdatech.pmapi.common.helper.impl; | |||||
import com.ningdatech.pmapi.common.helper.UserInfoHelper; | |||||
import org.springframework.stereotype.Component; | |||||
/** | |||||
* @author liuxinxin | |||||
* @date 2023/2/10 下午4:40 | |||||
*/ | |||||
@Component | |||||
public class UserInfoHelperImpl implements UserInfoHelper { | |||||
@Override | |||||
public Long getCompanyId(Long userId) { | |||||
return null; | |||||
} | |||||
} |
@@ -1,9 +1,20 @@ | |||||
package com.ningdatech.pmapi.ding.task; | package com.ningdatech.pmapi.ding.task; | ||||
import cn.hutool.core.collection.CollUtil; | |||||
import com.ningdatech.basic.model.GenericResult; | |||||
import com.ningdatech.pmapi.common.config.GovDingProperties; | |||||
import com.ningdatech.pmapi.organization.entity.DingOrganization; | |||||
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | |||||
import com.ningdatech.zwdd.client.ZwddClient; | import com.ningdatech.zwdd.client.ZwddClient; | ||||
import com.ningdatech.zwdd.model.Page; | |||||
import com.ningdatech.zwdd.model.query.PageOrganizationEmployeePositionsQuery; | |||||
import com.ningdatech.zwdd.model.response.OrganizationEmployeePosition; | |||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.Transactional; | ||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
/** | /** | ||||
* @author liuxinxin | * @author liuxinxin | ||||
* @date 2023/2/10 上午9:52 | * @date 2023/2/10 上午9:52 | ||||
@@ -11,11 +22,59 @@ import org.springframework.transaction.annotation.Transactional; | |||||
public class EmployeeBatchGetTask { | public class EmployeeBatchGetTask { | ||||
private final static Integer PAGE_SIZE = 20; | |||||
@Autowired | @Autowired | ||||
private ZwddClient zwddClient; | private ZwddClient zwddClient; | ||||
private IDingOrganizationService iDingOrganizationService; | |||||
@Transactional(rollbackFor = Exception.class) | @Transactional(rollbackFor = Exception.class) | ||||
public void batchGetEmployeeTask() { | public void batchGetEmployeeTask() { | ||||
List<DingOrganization> dingOrganizationList = iDingOrganizationService.list(); | |||||
if (CollUtil.isNotEmpty(dingOrganizationList)) { | |||||
List<OrganizationEmployeePosition> allOrganizationEmployeePositionList = new ArrayList<>(); | |||||
for (DingOrganization dingOrganization : dingOrganizationList) { | |||||
String organizationCode = dingOrganization.getOrganizationCode(); | |||||
PageOrganizationEmployeePositionsQuery query = new PageOrganizationEmployeePositionsQuery(); | |||||
query.setEmployeeStatus("A"); | |||||
query.setOrganizationCode(organizationCode); | |||||
query.setReturnTotalSize(true); | |||||
query.setTenantId(GovDingProperties.tenantId); | |||||
int pageNo = 1; | |||||
query.setPageNo(pageNo); | |||||
query.setPageSize(PAGE_SIZE); | |||||
GenericResult<Page<OrganizationEmployeePosition>> firstPageGenericResult = zwddClient.pageOrganizationEmployeePositions(query); | |||||
Page<OrganizationEmployeePosition> data = firstPageGenericResult.getData(); | |||||
if (CollUtil.isNotEmpty(data.getData())) { | |||||
allOrganizationEmployeePositionList.addAll(data.getData()); | |||||
} | |||||
Long totalSize = data.getTotalSize(); | |||||
if (totalSize > PAGE_SIZE) { | |||||
int maxPageNo = (int) Math.ceil(totalSize / PAGE_SIZE); | |||||
for (pageNo = 2; pageNo <= maxPageNo; pageNo++) { | |||||
query.setPageNo(maxPageNo); | |||||
GenericResult<Page<OrganizationEmployeePosition>> pageGenericResult = zwddClient.pageOrganizationEmployeePositions(query); | |||||
if (CollUtil.isNotEmpty(pageGenericResult.getData().getData())) { | |||||
allOrganizationEmployeePositionList.addAll(pageGenericResult.getData().getData()); | |||||
} | |||||
} | |||||
} else { | |||||
} | |||||
} | |||||
// zwddClient.pageOrganizationEmployeePositions(query); | |||||
} | |||||
} | } | ||||
} | } |
@@ -0,0 +1,37 @@ | |||||
package com.ningdatech.pmapi.fiscal.controller; | |||||
import com.ningdatech.pmapi.fiscal.manage.CompanyFiscalCodeManage; | |||||
import com.ningdatech.pmapi.fiscal.model.po.ReqCompanyFiscalCodeAndSealSnPO; | |||||
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; | |||||
/** | |||||
* <p> | |||||
* 前端控制器 | |||||
* </p> | |||||
* | |||||
* @author Lierbao | |||||
* @since 2023-02-10 | |||||
*/ | |||||
@Controller | |||||
@RequestMapping("/api/v1/fiscal-code") | |||||
@RequiredArgsConstructor | |||||
public class CompanyFiscalCodeController { | |||||
private final CompanyFiscalCodeManage companyFiscalCodeManage; | |||||
@ApiOperation(value = "财政编码/配置", notes = "财政编码配置") | |||||
@PostMapping("/fiscal-and-seal/configure") | |||||
public void fiscalAndSealCodeConfigure(@Valid @RequestBody ReqCompanyFiscalCodeAndSealSnPO reqCompanyFiscalCodeAndSealSnPO) { | |||||
companyFiscalCodeManage.fiscalCodeConfigure(reqCompanyFiscalCodeAndSealSnPO); | |||||
} | |||||
} |
@@ -1,20 +0,0 @@ | |||||
package com.ningdatech.pmapi.fiscal.controller; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.stereotype.Controller; | |||||
/** | |||||
* <p> | |||||
* 前端控制器 | |||||
* </p> | |||||
* | |||||
* @author Lierbao | |||||
* @since 2023-02-10 | |||||
*/ | |||||
@Controller | |||||
@RequestMapping("/pmapi.fiscal/nd-company-fiscal-code") | |||||
public class NdCompanyFiscalCodeController { | |||||
} |
@@ -18,7 +18,7 @@ import java.time.LocalDateTime; | |||||
@Data | @Data | ||||
@TableName("nd_company_fiscal_code") | @TableName("nd_company_fiscal_code") | ||||
@ApiModel(value = "NdCompanyFiscalCode对象", description = "") | @ApiModel(value = "NdCompanyFiscalCode对象", description = "") | ||||
public class NdCompanyFiscalCode implements Serializable { | |||||
public class CompanyFiscalCode implements Serializable { | |||||
private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
@@ -0,0 +1,56 @@ | |||||
package com.ningdatech.pmapi.fiscal.manage; | |||||
import com.ningdatech.pmapi.common.helper.UserInfoHelper; | |||||
import com.ningdatech.pmapi.fiscal.entity.CompanyFiscalCode; | |||||
import com.ningdatech.pmapi.fiscal.model.po.ReqCompanyFiscalCodeAndSealSnPO; | |||||
import com.ningdatech.pmapi.fiscal.service.ICompanyFiscalCodeService; | |||||
import com.ningdatech.pmapi.signature.entity.CompanySignature; | |||||
import com.ningdatech.pmapi.signature.service.ICompanySignatureService; | |||||
import com.ningdatech.pmapi.user.util.LoginUserUtil; | |||||
import lombok.RequiredArgsConstructor; | |||||
import org.springframework.stereotype.Component; | |||||
import java.time.LocalDateTime; | |||||
/** | |||||
* @author liuxinxin | |||||
* @date 2023/2/10 下午4:23 | |||||
*/ | |||||
@Component | |||||
@RequiredArgsConstructor | |||||
public class CompanyFiscalCodeManage { | |||||
private final UserInfoHelper userInfoHelper; | |||||
private final ICompanyFiscalCodeService iCompanyFiscalCodeService; | |||||
private final ICompanySignatureService iCompanySignatureService; | |||||
public void fiscalCodeConfigure(ReqCompanyFiscalCodeAndSealSnPO reqCompanyFiscalCodeAndSealSnPO) { | |||||
Long userId = LoginUserUtil.getUserId(); | |||||
Long companyId = userInfoHelper.getCompanyId(userId); | |||||
// TODO 校验用户权限 | |||||
// 保存财政编码配置 | |||||
String fiscalCode = reqCompanyFiscalCodeAndSealSnPO.getFiscalCode(); | |||||
CompanyFiscalCode companyFiscalCodeSaveRecord = new CompanyFiscalCode(); | |||||
companyFiscalCodeSaveRecord.setFiscalCode(fiscalCode); | |||||
companyFiscalCodeSaveRecord.setCompanyId(companyId); | |||||
companyFiscalCodeSaveRecord.setCreateOn(LocalDateTime.now()); | |||||
companyFiscalCodeSaveRecord.setUpdateOn(LocalDateTime.now()); | |||||
companyFiscalCodeSaveRecord.setCreateBy(userId); | |||||
companyFiscalCodeSaveRecord.setUpdateBy(userId); | |||||
iCompanyFiscalCodeService.save(companyFiscalCodeSaveRecord); | |||||
// 保存印章配置 | |||||
String sealSn = reqCompanyFiscalCodeAndSealSnPO.getSealSn(); | |||||
CompanySignature companySignatureSaveRecord = new CompanySignature(); | |||||
companySignatureSaveRecord.setSealSn(sealSn); | |||||
companySignatureSaveRecord.setCompanyId(companyId); | |||||
companySignatureSaveRecord.setCreateOn(LocalDateTime.now()); | |||||
companySignatureSaveRecord.setUpdateOn(LocalDateTime.now()); | |||||
companySignatureSaveRecord.setCreateBy(userId); | |||||
companySignatureSaveRecord.setUpdateBy(userId); | |||||
iCompanySignatureService.save(companySignatureSaveRecord); | |||||
} | |||||
} |
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.pmapi.fiscal.mapper; | package com.ningdatech.pmapi.fiscal.mapper; | ||||
import com.ningdatech.pmapi.fiscal.entity.NdCompanyFiscalCode; | |||||
import com.ningdatech.pmapi.fiscal.entity.CompanyFiscalCode; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
/** | /** | ||||
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
* @author Lierbao | * @author Lierbao | ||||
* @since 2023-02-10 | * @since 2023-02-10 | ||||
*/ | */ | ||||
public interface NdCompanyFiscalCodeMapper extends BaseMapper<NdCompanyFiscalCode> { | |||||
public interface NdCompanyFiscalCodeMapper extends BaseMapper<CompanyFiscalCode> { | |||||
} | } |
@@ -0,0 +1,25 @@ | |||||
package com.ningdatech.pmapi.fiscal.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/10 下午4:24 | |||||
*/ | |||||
@Data | |||||
@ApiModel("财政编码配置") | |||||
public class ReqCompanyFiscalCodeAndSealSnPO { | |||||
@NotBlank | |||||
@ApiModelProperty("财政编码") | |||||
private String fiscalCode; | |||||
@NotBlank | |||||
@ApiModelProperty("印章编号") | |||||
private String sealSn; | |||||
} |
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.pmapi.fiscal.service; | package com.ningdatech.pmapi.fiscal.service; | ||||
import com.ningdatech.pmapi.fiscal.entity.NdCompanyFiscalCode; | |||||
import com.ningdatech.pmapi.fiscal.entity.CompanyFiscalCode; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
/** | /** | ||||
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.extension.service.IService; | |||||
* @author Lierbao | * @author Lierbao | ||||
* @since 2023-02-10 | * @since 2023-02-10 | ||||
*/ | */ | ||||
public interface INdCompanyFiscalCodeService extends IService<NdCompanyFiscalCode> { | |||||
public interface ICompanyFiscalCodeService extends IService<CompanyFiscalCode> { | |||||
} | } |
@@ -1,8 +1,8 @@ | |||||
package com.ningdatech.pmapi.fiscal.service.impl; | package com.ningdatech.pmapi.fiscal.service.impl; | ||||
import com.ningdatech.pmapi.fiscal.entity.NdCompanyFiscalCode; | |||||
import com.ningdatech.pmapi.fiscal.entity.CompanyFiscalCode; | |||||
import com.ningdatech.pmapi.fiscal.mapper.NdCompanyFiscalCodeMapper; | import com.ningdatech.pmapi.fiscal.mapper.NdCompanyFiscalCodeMapper; | ||||
import com.ningdatech.pmapi.fiscal.service.INdCompanyFiscalCodeService; | |||||
import com.ningdatech.pmapi.fiscal.service.ICompanyFiscalCodeService; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
@@ -15,6 +15,6 @@ import org.springframework.stereotype.Service; | |||||
* @since 2023-02-10 | * @since 2023-02-10 | ||||
*/ | */ | ||||
@Service | @Service | ||||
public class NdCompanyFiscalCodeServiceImpl extends ServiceImpl<NdCompanyFiscalCodeMapper, NdCompanyFiscalCode> implements INdCompanyFiscalCodeService { | |||||
public class CompanyFiscalCodeServiceImpl extends ServiceImpl<NdCompanyFiscalCodeMapper, CompanyFiscalCode> implements ICompanyFiscalCodeService { | |||||
} | } |
@@ -3,7 +3,7 @@ package com.ningdatech.pmapi.irs.sign; | |||||
import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; | import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; | ||||
import javafx.util.Pair; | |||||
import org.apache.commons.lang3.tuple.Pair; | |||||
import org.apache.http.HttpEntity; | import org.apache.http.HttpEntity; | ||||
import org.apache.http.HttpResponse; | import org.apache.http.HttpResponse; | ||||
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; | import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; | ||||
@@ -124,8 +124,7 @@ public class IRSAPIRequest { | |||||
req.addHeader("Content-Type", "application/json"); | req.addHeader("Content-Type", "application/json"); | ||||
// 设置HTTP请求体 | // 设置HTTP请求体 | ||||
HttpEntity entity = new ByteArrayEntity(stream, ContentType | |||||
.create(ContentType.APPLICATION_JSON.getMimeType(), "UTF-8")); | |||||
HttpEntity entity = new ByteArrayEntity(stream, ContentType.create(ContentType.APPLICATION_JSON.getMimeType(), "UTF-8")); | |||||
req.setEntity(entity); | req.setEntity(entity); | ||||
// 执行请求 | // 执行请求 | ||||
@@ -147,15 +146,12 @@ public class IRSAPIRequest { | |||||
return strRes; | return strRes; | ||||
} | } | ||||
private static String sign(byte[] stream) | |||||
throws Exception { | |||||
private static String sign(byte[] stream) throws Exception { | |||||
// 获取消息验证码类的实例,算法选择"HmacSHA256" | // 获取消息验证码类的实例,算法选择"HmacSHA256" | ||||
Mac mac = Mac.getInstance("HmacSHA256"); | Mac mac = Mac.getInstance("HmacSHA256"); | ||||
// 获取安全密钥 | // 获取安全密钥 | ||||
Key secKey = new SecretKeySpec( | |||||
ProjectSecret.getBytes("UTF-8"), | |||||
mac.getAlgorithm()); | |||||
Key secKey = new SecretKeySpec(ProjectSecret.getBytes("UTF-8"), mac.getAlgorithm()); | |||||
// 初始化 | // 初始化 | ||||
mac.init(secKey); | mac.init(secKey); | ||||
@@ -168,15 +164,12 @@ public class IRSAPIRequest { | |||||
} | } | ||||
private static String sign1(byte[] stream) | |||||
throws Exception { | |||||
private static String sign1(byte[] stream) throws Exception { | |||||
// 获取消息验证码类的实例,算法选择"HmacSHA256" | // 获取消息验证码类的实例,算法选择"HmacSHA256" | ||||
Mac mac = Mac.getInstance("HmacSHA256"); | Mac mac = Mac.getInstance("HmacSHA256"); | ||||
// 获取安全密钥 | // 获取安全密钥 | ||||
Key secKey = new SecretKeySpec( | |||||
secretKey.getBytes("UTF-8"), | |||||
mac.getAlgorithm()); | |||||
Key secKey = new SecretKeySpec(secretKey.getBytes("UTF-8"), mac.getAlgorithm()); | |||||
// 初始化 | // 初始化 | ||||
mac.init(secKey); | mac.init(secKey); | ||||
@@ -190,8 +183,7 @@ public class IRSAPIRequest { | |||||
} | } | ||||
public static String binaryEncode(byte[] data) { | public static String binaryEncode(byte[] data) { | ||||
final char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', | |||||
'9', 'a', 'b', 'c', 'd', 'e', 'f'}; | |||||
final char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; | |||||
StringBuilder builder = new StringBuilder(); | StringBuilder builder = new StringBuilder(); | ||||
@@ -254,8 +246,6 @@ public class IRSAPIRequest { | |||||
return Base64.encode(bytes); | return Base64.encode(bytes); | ||||
//return encoder.encodeBuffer(bytes); | //return encoder.encodeBuffer(bytes); | ||||
} catch (FileNotFoundException e) { | |||||
e.printStackTrace(); | |||||
} catch (IOException e) { | } catch (IOException e) { | ||||
e.printStackTrace(); | e.printStackTrace(); | ||||
} finally { | } finally { | ||||
@@ -321,7 +311,7 @@ public class IRSAPIRequest { | |||||
int eqIndex = param.indexOf("="); | int eqIndex = param.indexOf("="); | ||||
String key = param.substring(0, eqIndex); | String key = param.substring(0, eqIndex); | ||||
String value = param.substring(eqIndex + 1); | String value = param.substring(eqIndex + 1); | ||||
Pair<String, String> pair = new Pair<String, String>(key, value); | |||||
Pair<String, String> pair = Pair.of(key, value); | |||||
queryParamList.add(pair); | queryParamList.add(pair); | ||||
} | } | ||||
@@ -330,16 +320,8 @@ public class IRSAPIRequest { | |||||
sortedParamList.stream().forEach(param -> { | sortedParamList.stream().forEach(param -> { | ||||
try { | try { | ||||
String key = URLEncoder.encode(param.getKey(), "utf-8"); | String key = URLEncoder.encode(param.getKey(), "utf-8"); | ||||
String value = URLEncoder.encode(Optional.ofNullable(param.getValue()).orElse(""), "utf-8") | |||||
.replaceAll("\\%2B", "%20") | |||||
.replaceAll("\\+", "%20") | |||||
.replaceAll("\\%21", "!") | |||||
.replaceAll("\\%27", "'") | |||||
.replaceAll("\\%28", "(") | |||||
.replaceAll("\\%29", ")") | |||||
.replaceAll("\\%7E", "~") | |||||
.replaceAll("\\%25", "%"); | |||||
encodeParamList.add(new Pair<>(key, value)); | |||||
String value = URLEncoder.encode(Optional.ofNullable(param.getValue()).orElse(""), "utf-8").replaceAll("\\%2B", "%20").replaceAll("\\+", "%20").replaceAll("\\%21", "!").replaceAll("\\%27", "'").replaceAll("\\%28", "(").replaceAll("\\%29", ")").replaceAll("\\%7E", "~").replaceAll("\\%25", "%"); | |||||
encodeParamList.add(Pair.of(key, value)); | |||||
} catch (UnsupportedEncodingException e) { | } catch (UnsupportedEncodingException e) { | ||||
throw new RuntimeException("encoding error"); | throw new RuntimeException("encoding error"); | ||||
} | } | ||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Controller; | |||||
* @since 2023-02-09 | * @since 2023-02-09 | ||||
*/ | */ | ||||
@Controller | @Controller | ||||
@RequestMapping("/pmapi.organization/ding-organization") | |||||
@RequestMapping("/api/v1/organization") | |||||
public class DingOrganizationController { | public class DingOrganizationController { | ||||
} | } |
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.projectdeclared.entity.dto; | package com.ningdatech.pmapi.projectdeclared.entity.dto; | ||||
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | ||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
@@ -25,7 +26,7 @@ import java.util.Map; | |||||
public class DeclaredProjectDto implements Serializable { | public class DeclaredProjectDto implements Serializable { | ||||
@NotNull | @NotNull | ||||
private Project projectInfo; | |||||
private ProjectDto projectInfo; | |||||
private Map<String,Object> formData; | private Map<String,Object> formData; | ||||
@@ -140,13 +140,9 @@ public class DeclaredProjectManage { | |||||
} | } | ||||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | ProcessStartParamsVo params = new ProcessStartParamsVo(); | ||||
// ProcessInstanceUserDto user = new ProcessInstanceUserDto(); | |||||
// user.setOrgCode("6179678"); | |||||
// user.setOrgName("数转办"); | |||||
// user.setUserId("381496"); | |||||
// user.setUserName("旅人"); | |||||
params.setUser(dto.getUser()); | params.setUser(dto.getUser()); | ||||
params.setProcessUsers(Collections.emptyMap()); | params.setProcessUsers(Collections.emptyMap()); | ||||
//放入条件判断的项目字段 | |||||
dto.getFormData().putAll( | dto.getFormData().putAll( | ||||
JSON.parseObject(JSON.toJSONString(dto.getProjectInfo()), new TypeReference<Map<String, Object>>() { | JSON.parseObject(JSON.toJSONString(dto.getProjectInfo()), new TypeReference<Map<String, Object>>() { | ||||
})); | })); | ||||
@@ -0,0 +1,169 @@ | |||||
package com.ningdatech.pmapi.projectlib.model.dto; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.time.LocalDateTime; | |||||
/** | |||||
* <p> | |||||
* 项目应用表 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2023-02-05 | |||||
*/ | |||||
@ApiModel(value = "NdProjectApplication对象", description = "") | |||||
@Data | |||||
public class ProjectApplicationDto implements Serializable { | |||||
private static final long serialVersionUID = 1L; | |||||
@ApiModelProperty("应用ID") | |||||
private Long id; | |||||
@ApiModelProperty("项目ID") | |||||
private String projectId; | |||||
@ApiModelProperty("是否初次建设 0否 1是") | |||||
private Integer isFirst; | |||||
@ApiModelProperty("应用名称") | |||||
private String applicationName; | |||||
@ApiModelProperty("创建时间") | |||||
private LocalDateTime createOn; | |||||
@ApiModelProperty("更新时间") | |||||
private LocalDateTime updateOn; | |||||
@ApiModelProperty("删除时间") | |||||
private LocalDateTime deleteOn; | |||||
@ApiModelProperty("关联IRS现有应用") | |||||
private String relatedExistsApplication; | |||||
@ApiModelProperty("关联IRS现有应用-IRS应用编码") | |||||
private String relatedExistsApplicationCode; | |||||
@ApiModelProperty("应用类型") | |||||
private String applicationType; | |||||
@ApiModelProperty("建设层级 1:国家 2:省级 3:市级 4:县(市、区)") | |||||
private Integer buildLevel; | |||||
@ApiModelProperty("是否统建应用 0:否 1:是") | |||||
private Integer isUniteBuild; | |||||
@ApiModelProperty("统建类型 1:全省统建 2:全市统建") | |||||
private Integer unionBuildKind; | |||||
@ApiModelProperty("是否数改系统 0:否 1:是") | |||||
private Integer isDigitalModification; | |||||
@ApiModelProperty("数改系统") | |||||
private String digitalModification; | |||||
@ApiModelProperty("业务领域") | |||||
private String bizDomain; | |||||
@ApiModelProperty("发布端") | |||||
private String publishSide; | |||||
@ApiModelProperty("是否一本账场景应用名称 0:否 1:是") | |||||
private Integer isAccountAppName; | |||||
@ApiModelProperty("一本账应用名称") | |||||
private String accountAppName; | |||||
@ApiModelProperty("领域大脑一本账") | |||||
private String domainBrainAccount; | |||||
@ApiModelProperty("是否业务协同 0:否 1:是") | |||||
private Integer isBizCooperate; | |||||
@ApiModelProperty("业务协同描述") | |||||
private String bizCooperateInfo; | |||||
@ApiModelProperty("使用范围") | |||||
private String usesRangeRemark; | |||||
@ApiModelProperty("应用简介") | |||||
private String applicationSummary; | |||||
@ApiModelProperty("应用备注") | |||||
private String applicationRemark; | |||||
@ApiModelProperty("应用总投资测算明细-文件") | |||||
private String applicationEstimateFile; | |||||
@ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") | |||||
private Integer secrecyGrade; | |||||
@ApiModelProperty("密码测评级别 1:一级 2:二级 3:三级 4:四级 5:五级") | |||||
private Integer passwordGrade; | |||||
@ApiModelProperty("是否符合国家信息技术应用创新相关规范 0:否 1:是") | |||||
private Integer nationalItSpec; | |||||
@ApiModelProperty("是否使用政务云资源 0否 1是") | |||||
private Integer useGovCloud; | |||||
@ApiModelProperty("云资源类型") | |||||
private String cloudsType; | |||||
@ApiModelProperty("云资源基础规格") | |||||
private String cloudsFoundationSpecifications; | |||||
@ApiModelProperty("云资源台数") | |||||
private Integer cloudsNumber; | |||||
@ApiModelProperty("云资源用户描述") | |||||
private String cloudsDescription; | |||||
@ApiModelProperty("网络环境 1:政务内网 2:政务外网 3:互联网 4:业务专网 5:单机") | |||||
private Integer netEnv; | |||||
@ApiModelProperty("是否使用公共数据 0否 1是") | |||||
private Integer useCommonData; | |||||
@ApiModelProperty("数据名称") | |||||
private String dataName; | |||||
@ApiModelProperty("是否使用公共组件 0否 1是") | |||||
private Integer useCommonComponent; | |||||
@ApiModelProperty("使用的公共组件名称") | |||||
private String commonComponents; | |||||
@ApiModelProperty("是否产生公共组件 0否 1是") | |||||
private Integer produceCommonComponent; | |||||
@ApiModelProperty("预计产生组件名称") | |||||
private String produceCommonComponents; | |||||
@ApiModelProperty("试点任务名称") | |||||
private String pilotTasksName; | |||||
@ApiModelProperty("试点任务编号") | |||||
private String pilotTasksCode; | |||||
@ApiModelProperty("所属重大应用名称") | |||||
private String importantTaskName; | |||||
@ApiModelProperty("所属重大应用编号") | |||||
private String importantTaskCode; | |||||
@ApiModelProperty("所属子场景应用名称") | |||||
private String subSceneApplicationName; | |||||
@ApiModelProperty("试点文件") | |||||
private String experimentsFile; | |||||
private Long createBy; | |||||
private Long updateBy; | |||||
} |
@@ -7,6 +7,7 @@ import lombok.Data; | |||||
import java.io.Serializable; | import java.io.Serializable; | ||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.List; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -276,16 +277,14 @@ public class ProjectDto implements Serializable { | |||||
@ApiModelProperty("流程实例 formId") | @ApiModelProperty("流程实例 formId") | ||||
private String formId; | private String formId; | ||||
@ApiModelProperty("项目一级状态 10000 20000 30000") | |||||
private Integer projectStatusFirst; | |||||
@ApiModelProperty("项目应用实例") | |||||
private List<ProjectApplicationDto> applicationList; | |||||
@ApiModelProperty("项目二级状态") | |||||
private Integer projectStatusSecond; | |||||
@ApiModelProperty("流程状态") | |||||
private Integer processStatus; | |||||
@ApiModelProperty("单位名称") | |||||
private String orgName; | |||||
@ApiModelProperty("单位code") | |||||
private String orgCode; | |||||
@ApiModelProperty("动态表单 json") | |||||
private String dynamicForm; | |||||
private Long createBy; | private Long createBy; | ||||
@@ -281,21 +281,12 @@ public class Project implements Serializable { | |||||
@ApiModelProperty("前端所需验证字段") | @ApiModelProperty("前端所需验证字段") | ||||
private Integer allApplicationsDone; | private Integer allApplicationsDone; | ||||
@ApiModelProperty("项目一级状态 10000 20000 30000") | |||||
private Integer projectStatusFirst; | |||||
@ApiModelProperty("项目二级状态") | |||||
private Integer projectStatusSecond; | |||||
@ApiModelProperty("单位名称") | |||||
private String orgName; | |||||
@ApiModelProperty("单位code") | |||||
private String orgCode; | |||||
@ApiModelProperty("流程状态") | @ApiModelProperty("流程状态") | ||||
private Integer processStatus; | private Integer processStatus; | ||||
@ApiModelProperty("动态表单 json") | |||||
private String dynamicForm; | |||||
private Long createBy; | private Long createBy; | ||||
private Long updateBy; | private Long updateBy; | ||||
@@ -18,7 +18,7 @@ import java.time.LocalDateTime; | |||||
@TableName("nd_company_signature") | @TableName("nd_company_signature") | ||||
@Data | @Data | ||||
@ApiModel(value = "NdCompanySignature对象", description = "") | @ApiModel(value = "NdCompanySignature对象", description = "") | ||||
public class NdCompanySignature implements Serializable { | |||||
public class CompanySignature implements Serializable { | |||||
private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.pmapi.signature.mapper; | package com.ningdatech.pmapi.signature.mapper; | ||||
import com.ningdatech.pmapi.signature.entity.NdCompanySignature; | |||||
import com.ningdatech.pmapi.signature.entity.CompanySignature; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
/** | /** | ||||
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
* @author Lierbao | * @author Lierbao | ||||
* @since 2023-02-10 | * @since 2023-02-10 | ||||
*/ | */ | ||||
public interface NdCompanySignatureMapper extends BaseMapper<NdCompanySignature> { | |||||
public interface CompanySignatureMapper extends BaseMapper<CompanySignature> { | |||||
} | } |
@@ -1,5 +1,5 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | <?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"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
<mapper namespace="com.ningdatech.pmapi.signature.mapper.NdCompanySignatureMapper"> | |||||
<mapper namespace="com.ningdatech.pmapi.signature.mapper.CompanySignatureMapper"> | |||||
</mapper> | </mapper> |
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.pmapi.signature.service; | package com.ningdatech.pmapi.signature.service; | ||||
import com.ningdatech.pmapi.signature.entity.NdCompanySignature; | |||||
import com.ningdatech.pmapi.signature.entity.CompanySignature; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
/** | /** | ||||
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.extension.service.IService; | |||||
* @author Lierbao | * @author Lierbao | ||||
* @since 2023-02-10 | * @since 2023-02-10 | ||||
*/ | */ | ||||
public interface INdCompanySignatureService extends IService<NdCompanySignature> { | |||||
public interface ICompanySignatureService extends IService<CompanySignature> { | |||||
} | } |
@@ -0,0 +1,20 @@ | |||||
package com.ningdatech.pmapi.signature.service.impl; | |||||
import com.ningdatech.pmapi.signature.entity.CompanySignature; | |||||
import com.ningdatech.pmapi.signature.mapper.CompanySignatureMapper; | |||||
import com.ningdatech.pmapi.signature.service.ICompanySignatureService; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* <p> | |||||
* 服务实现类 | |||||
* </p> | |||||
* | |||||
* @author Lierbao | |||||
* @since 2023-02-10 | |||||
*/ | |||||
@Service | |||||
public class CompanySignatureServiceImpl extends ServiceImpl<CompanySignatureMapper, CompanySignature> implements ICompanySignatureService { | |||||
} |
@@ -1,20 +0,0 @@ | |||||
package com.ningdatech.pmapi.signature.service.impl; | |||||
import com.ningdatech.pmapi.signature.entity.NdCompanySignature; | |||||
import com.ningdatech.pmapi.signature.mapper.NdCompanySignatureMapper; | |||||
import com.ningdatech.pmapi.signature.service.INdCompanySignatureService; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* <p> | |||||
* 服务实现类 | |||||
* </p> | |||||
* | |||||
* @author Lierbao | |||||
* @since 2023-02-10 | |||||
*/ | |||||
@Service | |||||
public class NdCompanySignatureServiceImpl extends ServiceImpl<NdCompanySignatureMapper, NdCompanySignature> implements INdCompanySignatureService { | |||||
} |
@@ -31,8 +31,8 @@ public class ProjectStateTest extends AppTests { | |||||
project.setInstCode("1"); | project.setInstCode("1"); | ||||
project.setId(1L); | project.setId(1L); | ||||
project.setProjectStatusFirst(ProjectStatusEnum.NOT_APPROVED.getCode()); | project.setProjectStatusFirst(ProjectStatusEnum.NOT_APPROVED.getCode()); | ||||
project.setProjectStatusSecond(ProjectStatusEnum.NOT_APPROVED.getCode()); | |||||
stateMachineUtils.execute(project, ProjectStatusChangeEvent.PROJECT_APPLICATION_SUBMIT); | |||||
project.setProjectStatusSecond(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); | |||||
stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS); | |||||
stopWatch.stop(); | stopWatch.stop(); | ||||
System.out.println("调用状态机结束 :" + stopWatch.getTotalTimeSeconds()); | System.out.println("调用状态机结束 :" + stopWatch.getTotalTimeSeconds()); | ||||