Merge branch 'master' into docker_package
This commit is contained in:
commit
15998bcc48
|
@ -59,7 +59,7 @@ public class AbilityCenterController {
|
|||
@Autowired
|
||||
private ActRunningService actRunningService;
|
||||
|
||||
private CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
private final CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
|
||||
private static final String key = "abilityprocess";
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class AbilityCenterController {
|
|||
if (page.getTotal() <= 0) { //
|
||||
return new Result().error("联系管理员添加流程");
|
||||
}
|
||||
String applyNumber = codeGenerationUtils.getApplyNumber("NLSY");
|
||||
// String applyNumber = codeGenerationUtils.getApplyNumber("NLSY");
|
||||
return new Result().ok(abilityBatchApplicationDTO.getSystem().stream().map(index -> {
|
||||
if (index.get("resourceId") == null) {
|
||||
logger.error("未携带资源id");
|
||||
|
@ -97,7 +97,7 @@ public class AbilityCenterController {
|
|||
return null;
|
||||
}
|
||||
TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO();
|
||||
tAbilityApplicationDTO.setApplyNumber(applyNumber);
|
||||
// tAbilityApplicationDTO.setApplyNumber(applyNumber);
|
||||
tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea());
|
||||
tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment());
|
||||
tAbilityApplicationDTO.setBasis(abilityBatchApplicationDTO.getBasis());
|
||||
|
@ -120,6 +120,7 @@ public class AbilityCenterController {
|
|||
if (tAbilityApplicationDTO.getId() == null) {
|
||||
return null;
|
||||
}
|
||||
codeGenerationUtils.setApplyNumber("NLSY", tAbilityApplicationDTO.getId().toString());
|
||||
tAbilityApplicationDTO.setCompleteEntry(Boolean.TRUE);
|
||||
|
||||
// 仿照请求接口 /act/running/startOfBusinessKey
|
||||
|
|
|
@ -70,7 +70,7 @@ public class AbilityCenterControllerV2 {
|
|||
private JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private SysDeptService sysDeptService;
|
||||
private CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
private final CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
|
||||
|
||||
@Value("${big_date.name}")
|
||||
|
@ -98,7 +98,7 @@ public class AbilityCenterControllerV2 {
|
|||
}
|
||||
final String applyFlag = UUID.randomUUID().toString();
|
||||
abilityBatchApplicationDTO.setApplyFlag(applyFlag); // 同一次的申请标识
|
||||
String applyNumber = codeGenerationUtils.getApplyNumber("NLSY");
|
||||
// String applyNumber = codeGenerationUtils.getApplyNumber("NLSY");
|
||||
|
||||
final Optional<SysDeptDTO> deptDTO = Optional.ofNullable(sysDeptService.getByName(bigDateDeptName));
|
||||
final UserDetail user = SecurityUser.getUser();
|
||||
|
@ -108,7 +108,7 @@ public class AbilityCenterControllerV2 {
|
|||
return null;
|
||||
}
|
||||
TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO();
|
||||
tAbilityApplicationDTO.setApplyNumber(applyNumber);
|
||||
// tAbilityApplicationDTO.setApplyNumber(applyNumber);
|
||||
tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea());
|
||||
tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment());
|
||||
tAbilityApplicationDTO.setBasis(abilityBatchApplicationDTO.getBasis());
|
||||
|
@ -143,6 +143,7 @@ public class AbilityCenterControllerV2 {
|
|||
if (tAbilityApplicationDTO.getId() == null) {
|
||||
return null;
|
||||
}
|
||||
codeGenerationUtils.setApplyNumber("NLSY", tAbilityApplicationDTO.getId().toString());
|
||||
tAbilityApplicationDTO.setCompleteEntry(Boolean.TRUE);
|
||||
return tAbilityApplicationDTO;
|
||||
}).filter(ObjectUtil::isNotNull).collect(Collectors.toList()); // 申请入库
|
||||
|
|
|
@ -48,7 +48,7 @@ public class CommentController {
|
|||
private TDemandCommentService tDemandCommentService;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
private CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
private final CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(CommentController.class);
|
||||
|
@ -84,10 +84,11 @@ public class CommentController {
|
|||
if (tDemandCommentDTO.getId() == null) {
|
||||
return new Result().error("该评论不存在");
|
||||
}
|
||||
tDemandCommentDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("XQPL"));
|
||||
// tDemandCommentDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("XQPL"));
|
||||
tDemandCommentDTO.setDelFlag(2); // 待审核
|
||||
tDemandCommentDTO.setCompleteEntry(Boolean.TRUE);
|
||||
tDemandCommentService.update(tDemandCommentDTO);
|
||||
codeGenerationUtils.setApplyNumber("XQPL", tDemandCommentDTO.getId().toString());
|
||||
|
||||
// 仿照请求接口 /act/running/startOfBusinessKey
|
||||
ProcessStartDTO processStartDTO = new ProcessStartDTO();
|
||||
|
|
|
@ -44,7 +44,7 @@ public class DemandDataController {
|
|||
private ActRunningService actRunningService;
|
||||
@Autowired
|
||||
private TDemandDataService tDemandDataService;
|
||||
private CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
private final CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
|
||||
|
||||
private static final String key = "abilitydemandapply";
|
||||
|
@ -69,13 +69,14 @@ public class DemandDataController {
|
|||
logger.info(JSONObject.toJSONString(tDemandDataDTO));
|
||||
logger.info("####################################################");
|
||||
tDemandDataDTO.setFlag(TDemandDataEntityFlag.UNDER_REVIEW.getFlag());
|
||||
tDemandDataDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("NLXQ"));
|
||||
// tDemandDataDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("NLXQ"));
|
||||
|
||||
ValidatorUtils.validateEntity(tDemandDataDTO, AddGroup.class, DefaultGroup.class);
|
||||
tDemandDataService.save(tDemandDataDTO);
|
||||
if (tDemandDataDTO.getId() == null) {
|
||||
return null;
|
||||
}
|
||||
codeGenerationUtils.setApplyNumber("NLXQ", tDemandDataDTO.getId().toString());
|
||||
tDemandDataDTO.setCompleteEntry(Boolean.TRUE);
|
||||
logger.info("-------------------1.保存申请表单成功--------------------------");
|
||||
// 仿照请求接口 /act/running/startOfBusinessKey
|
||||
|
|
|
@ -58,7 +58,7 @@ public class ResourceMountController {
|
|||
private ResourceService resourceService;
|
||||
@Autowired
|
||||
private SysUserService sysUserService;
|
||||
private CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
private final CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
|
||||
|
||||
@Autowired
|
||||
protected TaskService taskService;
|
||||
|
@ -104,7 +104,7 @@ public class ResourceMountController {
|
|||
tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index)));
|
||||
tResourceMountApplyDTO.setResourceDTO(index);
|
||||
tResourceMountApplyDTO.setEnclosure(index.getEnclosure());
|
||||
tResourceMountApplyDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("NLSJ"));
|
||||
// tResourceMountApplyDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("NLSJ"));
|
||||
try {
|
||||
tResourceMountApplyDTO.setResourceId(tResourceMountApplyDTO.getResourceDTO().getId());
|
||||
} catch (Exception e) {
|
||||
|
@ -116,6 +116,7 @@ public class ResourceMountController {
|
|||
if (tResourceMountApplyDTO.getId() == null) {
|
||||
return null;
|
||||
}
|
||||
codeGenerationUtils.setApplyNumber("NLSJ", tResourceMountApplyDTO.getId().toString());
|
||||
TaskQuery taskQuery = taskService.createTaskQuery();
|
||||
Task task = taskQuery.active().processInstanceBusinessKey(tResourceMountApplyDTO.getId().toString()).singleResult();
|
||||
if (task != null) {
|
||||
|
@ -187,12 +188,13 @@ public class ResourceMountController {
|
|||
}
|
||||
dto.setUndercarriageReason(tResourceUndercarriageApplyDTO.getReason());
|
||||
dto.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag()); // 设置为正常
|
||||
dto.setApplyNumber(codeGenerationUtils.getApplyNumber("NLXJ"));
|
||||
// dto.setApplyNumber(codeGenerationUtils.getApplyNumber("NLXJ"));
|
||||
String userId = SecurityUser.getUserId().toString();
|
||||
Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.get(Long.valueOf(userId)));
|
||||
userDTO.ifPresent(user -> {
|
||||
dto.setUndercarriageUserName(user.getRealName());
|
||||
});
|
||||
codeGenerationUtils.setApplyNumber("NLXJ", dto.getId().toString());
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
resourceService.update(dto);
|
||||
logger.error(resourceDTO.get().toString());
|
||||
|
|
|
@ -107,11 +107,14 @@ public class CodeGenerationUtils {
|
|||
}
|
||||
}
|
||||
|
||||
private void setApplyNumber(String type, final String id) {
|
||||
public void setApplyNumber(String type, final String id) {
|
||||
String applyNumberPattern = type + SIMPLE_DATE_FORMAT.format(new Date());
|
||||
if (StringUtils.isBlank(type)) {
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
return;
|
||||
}
|
||||
String tableName = null;
|
||||
switch (type) {
|
||||
//能力上架
|
||||
|
|
Loading…
Reference in New Issue