Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0

This commit is contained in:
wulin 2020-11-06 14:48:43 +08:00
commit b43c90e360
8 changed files with 23 additions and 16 deletions

View File

@ -53,6 +53,7 @@ public class ShiroConfig {
filterMap.put("/webjars/**", "anon");
filterMap.put("/file/**", "anon");
filterMap.put("/user/lzstaffrole/role/**", "anon");
filterMap.put("/user/lzresultrecord/**", "anon");
filterMap.put("/test/**", "anon");
filterMap.put("/druid/**", "anon");
filterMap.put("/app/**", "anon");

View File

@ -999,7 +999,7 @@ public class ResultRecordController extends AbstractController {
/**
* 删除
*/
// http://localhost:8080/lz_management/user/lzresultrecord/new/resultRecordDetail?resultRecordId=331&loginUserId=825
// http://localhost:8080/lz_management/user/lzresultrecord/new/resultRecordDetail?resultRecordId=387&loginUserId=380
@RequestMapping("/new/resultRecordDetail")
public R newResultRecordList(RecordDetailDto recordDetailDto) {
if(recordDetailDto.getLoginUserId() ==null && getUser() !=null ){

View File

@ -261,7 +261,7 @@ public class TestController {
}
}
// http://localhost:8080/lz_management/test/resultrecord?resultRecordId=215
// http://localhost:8080/lz_management/test/resultrecord?resultRecordId=381
@RequestMapping("/test/resultrecord")
public void resultRecorcd(Long resultRecordId) throws Exception{
R r = resultRecordService.initFlowRecord(resultRecordId);

View File

@ -76,5 +76,5 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
FlowRecord selectFlowRecordByRecordIdMinIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("id") Long id, @Param("status") int status);
int batchUpdateExecution(@Param("recordIds")List<Long> recordIds,@Param("processId") Long processId);
int batchUpdateExecution(@Param("recordIds")List<Long> recordIds,@Param("processId") int processId);
}

View File

@ -90,7 +90,7 @@ public class AssessManagerServiceImpl implements AssessManagerService {
@Autowired
private DingtalkBusiness dingtalkBusiness;
public static final Long processId = 1L;
public static final int processId = 1;

View File

@ -773,7 +773,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
}
List<FlowApprovalRole> flowApprovalRoles =flowApprovalRoleService.selectFlowApprovalRoleList(flowIds);
int i = 0;
List<FlowRecord> flowRecords = new ArrayList<>();
for (FlowApprovalRole flowApprovalRole : flowApprovalRoles) {
FlowRecord flowRecord = new FlowRecord();
flowRecord.setRecordId(resultRecord.getId());
@ -814,9 +813,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
flowRecord.setFlowIndex(flowApprovalRole.getStepIndex());
flowRecord.setType(flowApprovalRole.getStepType()); //步骤类型0依次1或签同时通知一人通过或拒绝即可2会签同时通知所有人同意才可
i++;
flowRecords.add(flowRecord);
flowRecordService.insertFlowRecord(flowRecord);
}
flowRecordService.insertFlowRecords(flowRecords);
resultRecordService.updateResultRecordById(resultRecord);
return R.ok();
}
@ -824,6 +823,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
@Override
////1 提交审批,审批通过,2 撤回,3 催办,4 跳过,5 驳回6 申述7 流程终止8 转交
public R newApproval(ApprovalDto approvalDto) throws Exception{
log.info("newApproval args :" + JSON.toJSONString(approvalDto));
if(approvalDto.getResultRecordId() == null){
throw new RRException("resultRecordId 不能为空");
}
@ -923,6 +923,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
}
private R newSubmit(ApprovalDto approvalDto,Integer finishedStatus) {
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
if(approvalDto.getLoginUserId() == null){
approvalDto.setLoginUserId(resultRecord.getCurrentApprovalStaffId());
@ -1113,8 +1114,8 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
flowIndex = flowRecord.getFlowIndex();
}
boolean flag = true;
for(FlowRecordResp flowRecordResp : flowRecordList) {
if (flowRecordResp.getStatus() == 0) {
for (FlowRecord flowRecord : flowRecords) {
if (flowRecord.getStatus() == 2) {
flag = false;
break;
}
@ -1133,15 +1134,16 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
auth.put("showScore",1);
auth.put("showResult",1);
List<FlowRecord> currentResultRecords = flowRecordService.selectFlowRecordByRecordIdStatus(recordDetailDto.getResultRecordId(),2);
log.info("当前用户登陆用户 id :" + recordDetailDto.getLoginUserId());
if(currentResultRecords !=null && currentResultRecords.size() > 0 ){
FlowRecord currentResultRecord = null;
for(FlowRecord flowRecord:currentResultRecords){
if(flowRecord.getApprovalStaffId().equals(recordDetailDto.getLoginUserId())){
currentResultRecord = flowRecord;
log.info("当前审批用户 id id :" + currentResultRecord.getApprovalStaffId());
break;
}
}
if(currentResultRecord !=null){
if(StringUtil.isNotBlank(currentResultRecord.getFlowStaffIdRole())){
Map<String,Object> map = JSONObject.parseObject(currentResultRecord.getFlowStaffIdRole(),Map.class);

View File

@ -21,12 +21,13 @@
<result column="status_name" property="statusName"/>
<result column="type" property="type"/>
<result column="process_id" property="processId"/>
<result column="flow_process" property="flowProcess"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, department_level AS departmentLevel, record_id AS recordId, approval_staff_id AS approvalStaffId, approval_staff_name AS approvalStaffName, flow_name AS flowName, record_staff_id AS recordStaffId, flow_id AS flowId, flow_index AS flowIndex, status AS status, flow_staff_id_role AS flowStaffIdRole, status_name AS statusName, type AS type, process_id AS processId
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, department_level AS departmentLevel, record_id AS recordId, approval_staff_id AS approvalStaffId, approval_staff_name AS approvalStaffName, flow_name AS flowName, record_staff_id AS recordStaffId, flow_id AS flowId, flow_index AS flowIndex, status AS status, flow_staff_id_role AS flowStaffIdRole, status_name AS statusName, type AS type, process_id AS processId, flow_process AS flowProcess
</sql>
@ -52,6 +53,7 @@
<if test="statusName != null">status_name, </if>
<if test="type != null">type, </if>
<if test="processId != null">process_id, </if>
<if test="flowProcess != null">flow_process, </if>
is_delete,
gmt_create,
gmt_modified
@ -69,6 +71,7 @@
<if test="statusName != null">#{ statusName}, </if>
<if test="type != null">#{ type}, </if>
<if test="processId != null">#{ processId}, </if>
<if test="flowProcess != null">#{ flowProcess}, </if>
0,
now(),
now()
@ -94,7 +97,8 @@
<if test="flowStaffIdRole != null">flow_staff_id_role = #{flowStaffIdRole},</if>
<if test="statusName != null">status_name = #{statusName},</if>
<if test="type != null">type = #{type},</if>
<if test="processId != null">process_id = #{processId}</if>
<if test="processId != null">process_id = #{processId},</if>
<if test="flowProcess != null">flow_process = #{flowProcess}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -119,7 +123,8 @@
flow_staff_id_role = #{flowStaffIdRole},
status_name = #{statusName},
type = #{type},
process_id = #{processId}
process_id = #{processId},
flow_process = #{flowProcess}
,gmt_modified = now()
where id = #{id}
</update>
@ -130,8 +135,6 @@
</update>
<select id="selectLastFlowRecordByRecordId" resultType="com.lz.modules.flow.entity.FlowRecord">
select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and status = 0 order by id desc limit 1
</select>
@ -269,6 +272,7 @@
,gmt_modified = now()
where is_delete = 0 and status !=4 and flow_process = 2 and process_id = #{processId}
<if test="recordIds !=null and recordIds.size()!=0">
and record_id in (
<foreach collection="recordIds" item="record_id" separator=",">
#{record_id}
</foreach>

View File

@ -126,7 +126,7 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("lz_evaluation_group"));
list.add(new TablesBean("lz_flow_record"));
List<TablesBean> list2 = new ArrayList<TablesBean>();
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();