...
This commit is contained in:
parent
1290072076
commit
e5dc75844c
|
@ -15,6 +15,13 @@ import java.lang.annotation.Target;
|
||||||
@Documented
|
@Documented
|
||||||
public @interface LogOperation {
|
public @interface LogOperation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作名称
|
||||||
|
*/
|
||||||
String value() default "";
|
String value() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作数据库表
|
||||||
|
*/
|
||||||
String operationTable() default "";
|
String operationTable() default "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,11 @@ import java.util.concurrent.Executors;
|
||||||
@Aspect
|
@Aspect
|
||||||
@Component
|
@Component
|
||||||
public class ActivitiNoticeAspect {
|
public class ActivitiNoticeAspect {
|
||||||
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors();
|
|
||||||
|
private static final Integer cpuNUm = Runtime.getRuntime().availableProcessors();
|
||||||
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm * 3);
|
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm * 3);
|
||||||
private static Logger logger = LoggerFactory.getLogger(ActivitiNoticeAspect.class);
|
private static final Logger logger = LoggerFactory.getLogger(ActivitiNoticeAspect.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysNoticeService sysNoticeService;
|
private SysNoticeService sysNoticeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -56,6 +58,7 @@ public class ActivitiNoticeAspect {
|
||||||
private SysDeptService sysDeptService;
|
private SysDeptService sysDeptService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysRoleService sysRoleService;
|
private SysRoleService sysRoleService;
|
||||||
|
|
||||||
private Set<String> work_ = new CopyOnWriteArraySet<>();
|
private Set<String> work_ = new CopyOnWriteArraySet<>();
|
||||||
|
|
||||||
@Value("${big_date.name}")
|
@Value("${big_date.name}")
|
||||||
|
|
|
@ -1,16 +1,10 @@
|
||||||
package io.renren.common.config;
|
package io.renren.common.config;
|
||||||
|
|
||||||
import org.apache.catalina.connector.Connector;
|
|
||||||
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
|
|
||||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||||
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
|
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static com.google.common.collect.Lists.newArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger配置
|
* Swagger配置
|
||||||
*
|
*
|
||||||
|
@ -21,12 +15,7 @@ public class TomcatConfig {
|
||||||
@Bean
|
@Bean
|
||||||
public ConfigurableServletWebServerFactory webServerFactory() {
|
public ConfigurableServletWebServerFactory webServerFactory() {
|
||||||
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
|
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
|
||||||
factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
|
factory.addConnectorCustomizers(connector -> connector.setProperty("relaxedQueryChars", "^|{}[]"));
|
||||||
@Override
|
|
||||||
public void customize(Connector connector) {
|
|
||||||
connector.setProperty("relaxedQueryChars", "^|{}[]");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,6 +4,7 @@ package io.renren.common.controller;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import io.renren.common.annotation.LogOperation;
|
import io.renren.common.annotation.LogOperation;
|
||||||
import io.renren.common.page.PageData;
|
import io.renren.common.page.PageData;
|
||||||
|
import io.renren.common.utils.CodeGenerationUtils;
|
||||||
import io.renren.common.utils.Result;
|
import io.renren.common.utils.Result;
|
||||||
import io.renren.common.validator.ValidatorUtils;
|
import io.renren.common.validator.ValidatorUtils;
|
||||||
import io.renren.common.validator.group.AddGroup;
|
import io.renren.common.validator.group.AddGroup;
|
||||||
|
@ -44,7 +45,7 @@ import java.util.stream.Collectors;
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/ability/center")
|
@RequestMapping("/ability/center")
|
||||||
public class AbilityCenterController {
|
public class AbilityCenterController {
|
||||||
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors();
|
private static final Integer cpuNUm = Runtime.getRuntime().availableProcessors();
|
||||||
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm);
|
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm);
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(AbilityCenterController.class);
|
private static final Logger logger = LoggerFactory.getLogger(AbilityCenterController.class);
|
||||||
|
@ -57,6 +58,8 @@ public class AbilityCenterController {
|
||||||
private TAbilityApplicationService tAbilityApplicationService;
|
private TAbilityApplicationService tAbilityApplicationService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ActRunningService actRunningService;
|
private ActRunningService actRunningService;
|
||||||
|
@Autowired
|
||||||
|
private CodeGenerationUtils codeGenerationUtils;
|
||||||
|
|
||||||
private static final String key = "abilityprocess";
|
private static final String key = "abilityprocess";
|
||||||
|
|
||||||
|
@ -83,6 +86,7 @@ public class AbilityCenterController {
|
||||||
if (page.getTotal() <= 0) { //
|
if (page.getTotal() <= 0) { //
|
||||||
return new Result().error("联系管理员添加流程");
|
return new Result().error("联系管理员添加流程");
|
||||||
}
|
}
|
||||||
|
String applyNumber = codeGenerationUtils.getApplyNumber("NLSY");
|
||||||
return new Result().ok(abilityBatchApplicationDTO.getSystem().stream().map(index -> {
|
return new Result().ok(abilityBatchApplicationDTO.getSystem().stream().map(index -> {
|
||||||
if (index.get("resourceId") == null) {
|
if (index.get("resourceId") == null) {
|
||||||
logger.error("未携带资源id");
|
logger.error("未携带资源id");
|
||||||
|
@ -93,6 +97,7 @@ public class AbilityCenterController {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO();
|
TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO();
|
||||||
|
tAbilityApplicationDTO.setApplyNumber(applyNumber);
|
||||||
tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea());
|
tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea());
|
||||||
tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment());
|
tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment());
|
||||||
tAbilityApplicationDTO.setBasis(abilityBatchApplicationDTO.getBasis());
|
tAbilityApplicationDTO.setBasis(abilityBatchApplicationDTO.getBasis());
|
||||||
|
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.renren.common.dto.AuditingBaseDTO;
|
import io.renren.common.dto.AuditingBaseDTO;
|
||||||
import io.renren.common.page.PageData;
|
import io.renren.common.page.PageData;
|
||||||
|
import io.renren.common.utils.CodeGenerationUtils;
|
||||||
import io.renren.common.utils.Result;
|
import io.renren.common.utils.Result;
|
||||||
import io.renren.common.validator.ValidatorUtils;
|
import io.renren.common.validator.ValidatorUtils;
|
||||||
import io.renren.common.validator.group.AddGroup;
|
import io.renren.common.validator.group.AddGroup;
|
||||||
|
@ -68,6 +69,9 @@ public class AbilityCenterControllerV2 {
|
||||||
private JdbcTemplate jdbcTemplate;
|
private JdbcTemplate jdbcTemplate;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysDeptService sysDeptService;
|
private SysDeptService sysDeptService;
|
||||||
|
@Autowired
|
||||||
|
private CodeGenerationUtils codeGenerationUtils;
|
||||||
|
|
||||||
@Value("${big_date.name}")
|
@Value("${big_date.name}")
|
||||||
private String bigDateDeptName; // 大数据局名称
|
private String bigDateDeptName; // 大数据局名称
|
||||||
private static final String key = "abilityprocess_v2";
|
private static final String key = "abilityprocess_v2";
|
||||||
|
@ -92,6 +96,7 @@ public class AbilityCenterControllerV2 {
|
||||||
}
|
}
|
||||||
final String applyFlag = UUID.randomUUID().toString();
|
final String applyFlag = UUID.randomUUID().toString();
|
||||||
abilityBatchApplicationDTO.setApplyFlag(applyFlag); // 同一次的申请标识
|
abilityBatchApplicationDTO.setApplyFlag(applyFlag); // 同一次的申请标识
|
||||||
|
String applyNumber = codeGenerationUtils.getApplyNumber("NLSY");
|
||||||
|
|
||||||
final Optional<SysDeptDTO> deptDTO = Optional.ofNullable(sysDeptService.getByName(bigDateDeptName));
|
final Optional<SysDeptDTO> deptDTO = Optional.ofNullable(sysDeptService.getByName(bigDateDeptName));
|
||||||
final UserDetail user = SecurityUser.getUser();
|
final UserDetail user = SecurityUser.getUser();
|
||||||
|
@ -101,6 +106,7 @@ public class AbilityCenterControllerV2 {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO();
|
TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO();
|
||||||
|
tAbilityApplicationDTO.setApplyNumber(applyNumber);
|
||||||
tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea());
|
tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea());
|
||||||
tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment());
|
tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment());
|
||||||
tAbilityApplicationDTO.setBasis(abilityBatchApplicationDTO.getBasis());
|
tAbilityApplicationDTO.setBasis(abilityBatchApplicationDTO.getBasis());
|
||||||
|
@ -117,7 +123,7 @@ public class AbilityCenterControllerV2 {
|
||||||
tAbilityApplicationDTO.setApproveStatus("审核中");
|
tAbilityApplicationDTO.setApproveStatus("审核中");
|
||||||
tAbilityApplicationDTO.setDelFlag(0);
|
tAbilityApplicationDTO.setDelFlag(0);
|
||||||
// v2 新增字段
|
// v2 新增字段
|
||||||
tAbilityApplicationDTO.setCameraList(index.get("cameraId"));
|
tAbilityApplicationDTO.setCameraList(index.get("cameraId").toString());
|
||||||
tAbilityApplicationDTO.setTitle(abilityBatchApplicationDTO.getTitle());
|
tAbilityApplicationDTO.setTitle(abilityBatchApplicationDTO.getTitle());
|
||||||
tAbilityApplicationDTO.setApplicationBackground(abilityBatchApplicationDTO.getApplicationBackground());
|
tAbilityApplicationDTO.setApplicationBackground(abilityBatchApplicationDTO.getApplicationBackground());
|
||||||
tAbilityApplicationDTO.setApplicationScene(abilityBatchApplicationDTO.getApplicationScene());
|
tAbilityApplicationDTO.setApplicationScene(abilityBatchApplicationDTO.getApplicationScene());
|
||||||
|
|
|
@ -3,6 +3,7 @@ package io.renren.common.controller;
|
||||||
|
|
||||||
import io.renren.common.annotation.LogOperation;
|
import io.renren.common.annotation.LogOperation;
|
||||||
import io.renren.common.page.PageData;
|
import io.renren.common.page.PageData;
|
||||||
|
import io.renren.common.utils.CodeGenerationUtils;
|
||||||
import io.renren.common.utils.Result;
|
import io.renren.common.utils.Result;
|
||||||
import io.renren.modules.activiti.dto.ProcessInstanceDTO;
|
import io.renren.modules.activiti.dto.ProcessInstanceDTO;
|
||||||
import io.renren.modules.activiti.dto.ProcessStartDTO;
|
import io.renren.modules.activiti.dto.ProcessStartDTO;
|
||||||
|
@ -47,6 +48,8 @@ public class CommentController {
|
||||||
private TDemandCommentService tDemandCommentService;
|
private TDemandCommentService tDemandCommentService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private JdbcTemplate jdbcTemplate;
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
@Autowired
|
||||||
|
private CodeGenerationUtils codeGenerationUtils;
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(CommentController.class);
|
private static final Logger logger = LoggerFactory.getLogger(CommentController.class);
|
||||||
|
|
||||||
|
@ -81,6 +84,7 @@ public class CommentController {
|
||||||
if (tDemandCommentDTO.getId() == null) {
|
if (tDemandCommentDTO.getId() == null) {
|
||||||
return new Result().error("该评论不存在");
|
return new Result().error("该评论不存在");
|
||||||
}
|
}
|
||||||
|
tDemandCommentDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("XQPL"));
|
||||||
tDemandCommentDTO.setDelFlag(2); // 待审核
|
tDemandCommentDTO.setDelFlag(2); // 待审核
|
||||||
tDemandCommentDTO.setCompleteEntry(Boolean.TRUE);
|
tDemandCommentDTO.setCompleteEntry(Boolean.TRUE);
|
||||||
tDemandCommentService.update(tDemandCommentDTO);
|
tDemandCommentService.update(tDemandCommentDTO);
|
||||||
|
|
|
@ -4,6 +4,7 @@ package io.renren.common.controller;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.renren.common.annotation.LogOperation;
|
import io.renren.common.annotation.LogOperation;
|
||||||
import io.renren.common.page.PageData;
|
import io.renren.common.page.PageData;
|
||||||
|
import io.renren.common.utils.CodeGenerationUtils;
|
||||||
import io.renren.common.utils.Result;
|
import io.renren.common.utils.Result;
|
||||||
import io.renren.common.validator.ValidatorUtils;
|
import io.renren.common.validator.ValidatorUtils;
|
||||||
import io.renren.common.validator.group.AddGroup;
|
import io.renren.common.validator.group.AddGroup;
|
||||||
|
@ -43,6 +44,8 @@ public class DemandDataController {
|
||||||
private ActRunningService actRunningService;
|
private ActRunningService actRunningService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TDemandDataService tDemandDataService;
|
private TDemandDataService tDemandDataService;
|
||||||
|
@Autowired
|
||||||
|
private CodeGenerationUtils codeGenerationUtils;
|
||||||
|
|
||||||
private static final String key = "abilitydemandapply";
|
private static final String key = "abilitydemandapply";
|
||||||
|
|
||||||
|
@ -66,6 +69,7 @@ public class DemandDataController {
|
||||||
logger.info(JSONObject.toJSONString(tDemandDataDTO));
|
logger.info(JSONObject.toJSONString(tDemandDataDTO));
|
||||||
logger.info("####################################################");
|
logger.info("####################################################");
|
||||||
tDemandDataDTO.setFlag(TDemandDataEntityFlag.UNDER_REVIEW.getFlag());
|
tDemandDataDTO.setFlag(TDemandDataEntityFlag.UNDER_REVIEW.getFlag());
|
||||||
|
tDemandDataDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("NLXQ"));
|
||||||
|
|
||||||
ValidatorUtils.validateEntity(tDemandDataDTO, AddGroup.class, DefaultGroup.class);
|
ValidatorUtils.validateEntity(tDemandDataDTO, AddGroup.class, DefaultGroup.class);
|
||||||
tDemandDataService.save(tDemandDataDTO);
|
tDemandDataService.save(tDemandDataDTO);
|
||||||
|
|
|
@ -6,6 +6,7 @@ import cn.hutool.crypto.SecureUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.renren.common.annotation.LogOperation;
|
import io.renren.common.annotation.LogOperation;
|
||||||
import io.renren.common.page.PageData;
|
import io.renren.common.page.PageData;
|
||||||
|
import io.renren.common.utils.CodeGenerationUtils;
|
||||||
import io.renren.common.utils.Result;
|
import io.renren.common.utils.Result;
|
||||||
import io.renren.common.validator.ValidatorUtils;
|
import io.renren.common.validator.ValidatorUtils;
|
||||||
import io.renren.common.validator.group.AddGroup;
|
import io.renren.common.validator.group.AddGroup;
|
||||||
|
@ -57,6 +58,8 @@ public class ResourceMountController {
|
||||||
private ResourceService resourceService;
|
private ResourceService resourceService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysUserService sysUserService;
|
private SysUserService sysUserService;
|
||||||
|
@Autowired
|
||||||
|
private CodeGenerationUtils codeGenerationUtils;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected TaskService taskService;
|
protected TaskService taskService;
|
||||||
|
@ -102,6 +105,7 @@ public class ResourceMountController {
|
||||||
tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index)));
|
tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index)));
|
||||||
tResourceMountApplyDTO.setResourceDTO(index);
|
tResourceMountApplyDTO.setResourceDTO(index);
|
||||||
tResourceMountApplyDTO.setEnclosure(index.getEnclosure());
|
tResourceMountApplyDTO.setEnclosure(index.getEnclosure());
|
||||||
|
tResourceMountApplyDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("NLSJ"));
|
||||||
try {
|
try {
|
||||||
tResourceMountApplyDTO.setResourceId(tResourceMountApplyDTO.getResourceDTO().getId());
|
tResourceMountApplyDTO.setResourceId(tResourceMountApplyDTO.getResourceDTO().getId());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -184,6 +188,7 @@ public class ResourceMountController {
|
||||||
}
|
}
|
||||||
dto.setUndercarriageReason(tResourceUndercarriageApplyDTO.getReason());
|
dto.setUndercarriageReason(tResourceUndercarriageApplyDTO.getReason());
|
||||||
dto.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag()); // 设置为正常
|
dto.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag()); // 设置为正常
|
||||||
|
dto.setApplyNumber(codeGenerationUtils.getApplyNumber("NLXJ"));
|
||||||
String userId = SecurityUser.getUserId().toString();
|
String userId = SecurityUser.getUserId().toString();
|
||||||
Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.get(Long.valueOf(userId)));
|
Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.get(Long.valueOf(userId)));
|
||||||
userDTO.ifPresent(user -> {
|
userDTO.ifPresent(user -> {
|
||||||
|
|
|
@ -4,7 +4,6 @@ import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核流程各数据类 基础DTO
|
* 审核流程各数据类 基础DTO
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package io.renren.common.interceptor;
|
package io.renren.common.interceptor;
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package io.renren.common.listener;
|
package io.renren.common.listener;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.google.gson.JsonDeserializer;
|
import com.google.gson.JsonDeserializer;
|
||||||
|
@ -22,7 +21,8 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class InitiatorDataEntryListener implements TaskListener {
|
public class InitiatorDataEntryListener implements TaskListener {
|
||||||
private static Logger logger = LoggerFactory.getLogger(InitiatorDataEntryListener.class);
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(InitiatorDataEntryListener.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TaskService taskService;
|
private TaskService taskService;
|
||||||
|
|
|
@ -3,6 +3,7 @@ package io.renren.common.utils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -10,6 +11,7 @@ import java.util.Date;
|
||||||
/**
|
/**
|
||||||
* 编码生成工具类
|
* 编码生成工具类
|
||||||
*/
|
*/
|
||||||
|
@Component
|
||||||
public class CodeGenerationUtils {
|
public class CodeGenerationUtils {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -68,12 +70,16 @@ public class CodeGenerationUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getApplyNumberString (String tableName, String applyNumberPattern) {
|
private String getApplyNumberString (String tableName, String applyNumberPattern) {
|
||||||
String sql = "SELECT SUBSTR(apply_number, 5) FROM" + tableName +
|
String sql = "SELECT SUBSTR(apply_number, 5) FROM " + tableName +
|
||||||
"WHERE 1 = 1 AND apply_number IS NOT NULL " +
|
" WHERE 1 = 1 AND apply_number IS NOT NULL " +
|
||||||
"AND apply_number LIKE '" + applyNumberPattern + "%'" +
|
"AND apply_number LIKE '" + applyNumberPattern + "%' " +
|
||||||
"ORDER BY apply_number DESC " +
|
"ORDER BY apply_number DESC " +
|
||||||
"LIMIT 1";
|
"LIMIT 1";
|
||||||
|
try {
|
||||||
String s = jdbcTemplate.queryForObject(sql, String.class);
|
String s = jdbcTemplate.queryForObject(sql, String.class);
|
||||||
return StringUtils.isNotBlank(s) ? applyNumberPattern + "0001" : String.valueOf(Long.parseLong(s) + 1);
|
return "NLSY" + (Long.parseLong(s) + 1);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return applyNumberPattern + "0001";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,6 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 能力申请表单
|
* 能力申请表单
|
||||||
*
|
*
|
||||||
|
@ -86,7 +85,10 @@ public class TAbilityApplicationController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("my_page")
|
@GetMapping("my_page")
|
||||||
@LogOperation("我的申请分页")
|
@LogOperation("我的申请分页")
|
||||||
@ApiImplicitParams({@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"), @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String")})
|
@ApiImplicitParams({@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||||
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String")})
|
||||||
public Result<PageData<TAbilityApplicationDTO>> myPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
public Result<PageData<TAbilityApplicationDTO>> myPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
final UserDetail user = SecurityUser.getUser();
|
final UserDetail user = SecurityUser.getUser();
|
||||||
params.put("abilityprocess_v2", Boolean.TRUE); // 是否根据流程 abilityprocess_v2 来分页
|
params.put("abilityprocess_v2", Boolean.TRUE); // 是否根据流程 abilityprocess_v2 来分页
|
||||||
|
@ -122,7 +124,6 @@ public class TAbilityApplicationController {
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@GetMapping("deal")
|
@GetMapping("deal")
|
||||||
public Result<String> test() {
|
public Result<String> test() {
|
||||||
List<Map<String, Object>> re = jdbcTemplate.queryForList("SELECT t_ability_application.id,t_ability_application.resource_id,tb_data_resource.dept_id from t_ability_application JOIN tb_data_resource ON t_ability_application.resource_id = tb_data_resource.id WHERE resource_owner_dept IS NULL;");
|
List<Map<String, Object>> re = jdbcTemplate.queryForList("SELECT t_ability_application.id,t_ability_application.resource_id,tb_data_resource.dept_id from t_ability_application JOIN tb_data_resource ON t_ability_application.resource_id = tb_data_resource.id WHERE resource_owner_dept IS NULL;");
|
||||||
|
|
|
@ -107,6 +107,9 @@ public class ResourceDTO extends AuditingBaseDTO implements Serializable {
|
||||||
@ApiModelProperty(value = "总体评价")
|
@ApiModelProperty(value = "总体评价")
|
||||||
private Integer total;
|
private Integer total;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请单号")
|
||||||
|
private String applyNumber;
|
||||||
|
|
||||||
public String getDelFlagTip() {
|
public String getDelFlagTip() {
|
||||||
if (this.delFlag != null) {
|
if (this.delFlag != null) {
|
||||||
Optional<ResourceEntityDelFlag> resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag));
|
Optional<ResourceEntityDelFlag> resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag));
|
||||||
|
|
|
@ -136,4 +136,9 @@ public class ResourceEntity extends BaseEntity {
|
||||||
|
|
||||||
@TableField(value = "info_list", typeHandler = FastjsonTypeHandler.class)
|
@TableField(value = "info_list", typeHandler = FastjsonTypeHandler.class)
|
||||||
private List<AttrEntity> infoList;
|
private List<AttrEntity> infoList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请单号
|
||||||
|
*/
|
||||||
|
private String applyNumber;
|
||||||
}
|
}
|
|
@ -54,8 +54,8 @@
|
||||||
<logger name="org.springframework.web" level="ERROR">
|
<logger name="org.springframework.web" level="ERROR">
|
||||||
<appender-ref ref="FILE_INFO"/>
|
<appender-ref ref="FILE_INFO"/>
|
||||||
</logger>
|
</logger>
|
||||||
<logger name="org.springboot.sample" level="ERROR"></logger>
|
<logger name="org.springboot.sample" level="ERROR"/>
|
||||||
<logger name="io.renren" level="ERROR"></logger>
|
<logger name="io.renren" level="ERROR"/>
|
||||||
</springProfile>
|
</springProfile>
|
||||||
|
|
||||||
<root level="INFO">
|
<root level="INFO">
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
<result property="approvalUserName" column="approval_user_name"/>
|
<result property="approvalUserName" column="approval_user_name"/>
|
||||||
<result property="approvalUserDeptName" column="approval_user_dept_name"/>
|
<result property="approvalUserDeptName" column="approval_user_dept_name"/>
|
||||||
<result property="visits" column="visits"/>
|
<result property="visits" column="visits"/>
|
||||||
|
<result property="applyNumber" column="apply_number"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<update id="updateInstanceId">
|
<update id="updateInstanceId">
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<result property="note3" column="note3"/>
|
<result property="note3" column="note3"/>
|
||||||
<result property="note4" column="note4"/>
|
<result property="note4" column="note4"/>
|
||||||
<result property="note5" column="note5"/>
|
<result property="note5" column="note5"/>
|
||||||
|
<result property="applyNumber" column="apply_number"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="commentCount" resultType="java.lang.Long">
|
<select id="commentCount" resultType="java.lang.Long">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
<result property="applyFlag" column="apply_flag"/>
|
<result property="applyFlag" column="apply_flag"/>
|
||||||
<result property="resourceOwnerDept" column="resource_owner_dept"
|
<result property="resourceOwnerDept" column="resource_owner_dept"
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
|
<result property="applyNumber" column="apply_number"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="resourceDTO" type="io.renren.modules.processForm.dto.TAbilityApplicationDTO">
|
<resultMap id="resourceDTO" type="io.renren.modules.processForm.dto.TAbilityApplicationDTO">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
|
@ -51,6 +52,7 @@
|
||||||
<result property="applyFlag" column="apply_flag"/>
|
<result property="applyFlag" column="apply_flag"/>
|
||||||
<result property="resourceOwnerDept" column="resource_owner_dept"
|
<result property="resourceOwnerDept" column="resource_owner_dept"
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
|
<result property="applyNumber" column="apply_number"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<update id="updateInstanceId">
|
<update id="updateInstanceId">
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
<result property="undercarriageUserName" column="undercarriage_user_name"/>
|
<result property="undercarriageUserName" column="undercarriage_user_name"/>
|
||||||
<result property="infoList" column="info_list"
|
<result property="infoList" column="info_list"
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
|
<result property="applyNumber" column="apply_number"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
|
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
|
||||||
|
@ -77,6 +78,7 @@
|
||||||
<result property="infoList" column="info_list"
|
<result property="infoList" column="info_list"
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
<result property="total" column="total"/>
|
<result property="total" column="total"/>
|
||||||
|
<result property="applyNumber" column="apply_number"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<update id="deleteByIds">
|
<update id="deleteByIds">
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<result property="resourceDTO" column="resource_dto"
|
<result property="resourceDTO" column="resource_dto"
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
<result property="createtime" column="createtime"/>
|
<result property="createtime" column="createtime"/>
|
||||||
|
<result property="applyNumber" column="apply_number"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<update id="updateInstanceId">
|
<update id="updateInstanceId">
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getByUsername" resultType="io.renren.modules.sys.entity.SysUserEntity">
|
<select id="getByUsername" resultType="io.renren.modules.sys.entity.SysUserEntity">
|
||||||
select * from sys_user where username = #{value}
|
select * from sys_user where BINARY username = #{value}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updatePassword">
|
<update id="updatePassword">
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getCountByDeptId" resultType="int">
|
<select id="getCountByDeptId" resultType="int">
|
||||||
select count(*) from sys_user where dept_id = #{value}
|
SELECT count(*) FROM sys_user WHERE dept_id = #{value}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUserIdListByDeptId" resultType="Long">
|
<select id="getUserIdListByDeptId" resultType="Long">
|
||||||
|
|
Loading…
Reference in New Issue