Browse Source

BUG修改

wangliang 1 year ago
parent
commit
64147c2fec

+ 4 - 4
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingApplyServiceImpl.java

@@ -108,8 +108,8 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
      */
      */
     @Override
     @Override
     public IPage<DingApplyUnDoneResult> flowTaskUnDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, String customName, String startTime, String endTime, Long applyStartTime, Long applyEndTime) throws Exception {
     public IPage<DingApplyUnDoneResult> flowTaskUnDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, String customName, String startTime, String endTime, Long applyStartTime, Long applyEndTime) throws Exception {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        IPage<DingApplyUnDoneResult> dingApplyUnDoneResultIPage = this.baseMapper.flowTaskUnDoneList(iPage, Arrays.asList(sysUser.getId().toString()), serviceId, name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime);
+//        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        IPage<DingApplyUnDoneResult> dingApplyUnDoneResultIPage = this.baseMapper.flowTaskUnDoneList(iPage, null, serviceId, name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime);
         if (Objects.nonNull(dingApplyUnDoneResultIPage) && !CollectionUtils.isEmpty(dingApplyUnDoneResultIPage.getRecords())) {
         if (Objects.nonNull(dingApplyUnDoneResultIPage) && !CollectionUtils.isEmpty(dingApplyUnDoneResultIPage.getRecords())) {
             for (DingApplyUnDoneResult d : dingApplyUnDoneResultIPage.getRecords()) {
             for (DingApplyUnDoneResult d : dingApplyUnDoneResultIPage.getRecords()) {
                 if (Objects.nonNull(d.getAttachmentPaths())) {
                 if (Objects.nonNull(d.getAttachmentPaths())) {
@@ -143,8 +143,8 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
      */
      */
     @Override
     @Override
     public IPage<DingApplyDoneResult> flowTaskDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, DingExceptionApproveEnum dingExceptionApprove, String customName, String startTime, String endTime, Long applyStartTime, Long applyEndTime) throws Exception {
     public IPage<DingApplyDoneResult> flowTaskDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, DingExceptionApproveEnum dingExceptionApprove, String customName, String startTime, String endTime, Long applyStartTime, Long applyEndTime) throws Exception {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        IPage<DingApplyDoneResult> dingApplyDoneResultIPage = this.baseMapper.flowTaskDoneList(iPage, Arrays.asList(sysUser.getId().toString()), serviceId, name, supplierId, Objects.nonNull(dingExceptionApprove) ? dingExceptionApprove.getTitle() : null, customName, startTime, endTime, applyStartTime, applyEndTime);
+//        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        IPage<DingApplyDoneResult> dingApplyDoneResultIPage = this.baseMapper.flowTaskDoneList(iPage, null, serviceId, name, supplierId, Objects.nonNull(dingExceptionApprove) ? dingExceptionApprove.getTitle() : null, customName, startTime, endTime, applyStartTime, applyEndTime);
         if (Objects.nonNull(dingApplyDoneResultIPage) && !CollectionUtils.isEmpty(dingApplyDoneResultIPage.getRecords())) {
         if (Objects.nonNull(dingApplyDoneResultIPage) && !CollectionUtils.isEmpty(dingApplyDoneResultIPage.getRecords())) {
             for (DingApplyDoneResult d : dingApplyDoneResultIPage.getRecords()) {
             for (DingApplyDoneResult d : dingApplyDoneResultIPage.getRecords()) {
                 if (Objects.nonNull(d.getAttachmentPaths())) {
                 if (Objects.nonNull(d.getAttachmentPaths())) {

+ 5 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBProjectExchangeServiceImpl.java

@@ -134,6 +134,11 @@ public class TBProjectExchangeServiceImpl extends ServiceImpl<TBProjectExchangeM
         Task task = taskService.createTaskQuery().taskId(String.valueOf(taskId)).singleResult();
         Task task = taskService.createTaskQuery().taskId(String.valueOf(taskId)).singleResult();
         Optional.ofNullable(task).orElseThrow(() -> ExceptionResultEnum.FLOW_TASK_NO_DATA.exception());
         Optional.ofNullable(task).orElseThrow(() -> ExceptionResultEnum.FLOW_TASK_NO_DATA.exception());
 
 
+        List<String> taskApproveUserList = activitiService.getTaskApprove(task);
+        if (!CollectionUtils.isEmpty(taskApproveUserList) && !taskApproveUserList.contains(sysUser.getId().toString())) {
+            throw ExceptionResultEnum.FLOW_DATA_NOT_ME.exception();
+        }
+
         TFCustomFlowEntity tfCustomFlowEntity = tfCustomFlowEntityService.getOne(new QueryWrapper<TFCustomFlowEntity>().lambda().eq(TFCustomFlowEntity::getFlowId, Long.parseLong(task.getProcessInstanceId())));
         TFCustomFlowEntity tfCustomFlowEntity = tfCustomFlowEntityService.getOne(new QueryWrapper<TFCustomFlowEntity>().lambda().eq(TFCustomFlowEntity::getFlowId, Long.parseLong(task.getProcessInstanceId())));
         activitiService.taskApprove(new FlowApproveParam(taskId, flowApprove, Arrays.asList(String.valueOf(userId)), tfCustomFlowEntity.getCrmNo(), projectExchangeApprove.getTitle() + ";" + remark));
         activitiService.taskApprove(new FlowApproveParam(taskId, flowApprove, Arrays.asList(String.valueOf(userId)), tfCustomFlowEntity.getCrmNo(), projectExchangeApprove.getTitle() + ";" + remark));
 
 

+ 1 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -252,7 +252,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
 
 
         List<String> taskApproveUserList = activitiService.getTaskApprove(task);
         List<String> taskApproveUserList = activitiService.getTaskApprove(task);
         if (flowApproveParam.getApprove() != FlowApprovePassEnum.DRAFT && !CollectionUtils.isEmpty(taskApproveUserList) && !taskApproveUserList.contains(sysUser.getId().toString())) {
         if (flowApproveParam.getApprove() != FlowApprovePassEnum.DRAFT && !CollectionUtils.isEmpty(taskApproveUserList) && !taskApproveUserList.contains(sysUser.getId().toString())) {
-            throw ExceptionResultEnum.ERROR.exception("不能审批他人的sop数据");
+            throw ExceptionResultEnum.FLOW_SOP_DATA_NOT_ME.exception();
         }
         }
 
 
         TFCustomFlowEntity tfCustomFlowEntity = tfCustomFlowEntityService.getOne(new QueryWrapper<TFCustomFlowEntity>().lambda().eq(TFCustomFlowEntity::getFlowId, Long.parseLong(task.getProcessInstanceId())));
         TFCustomFlowEntity tfCustomFlowEntity = tfCustomFlowEntityService.getOne(new QueryWrapper<TFCustomFlowEntity>().lambda().eq(TFCustomFlowEntity::getFlowId, Long.parseLong(task.getProcessInstanceId())));

+ 6 - 1
sop-business/src/main/resources/db/log/wangliang_update_log.sql

@@ -1263,4 +1263,9 @@ SET code='CHECKBOX', `type`='FORM', form_id='manual_bar_code_cb', form_name='man
 WHERE id=157;
 WHERE id=157;
 UPDATE t_d_form_widget
 UPDATE t_d_form_widget
 SET code='CHECKBOX', `type`='FORM', form_id='bar_code_full_cb', form_name='bar_code_full_cb', title='条码数量完整性检查', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`='[{"value":"1","label":"“缺页异常”查询需无数据“"},{"value":"2","label":"“无条码考生”查询需无数据“"},{"value":"3","label":"“追加题卡”需和学校记录一致“"}]', flow_type='CLOUD_MARK_SOP_FLOW', form_setup=8, handle=0, create_id=1, create_time=1
 SET code='CHECKBOX', `type`='FORM', form_id='bar_code_full_cb', form_name='bar_code_full_cb', title='条码数量完整性检查', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`='[{"value":"1","label":"“缺页异常”查询需无数据“"},{"value":"2","label":"“无条码考生”查询需无数据“"},{"value":"3","label":"“追加题卡”需和学校记录一致“"}]', flow_type='CLOUD_MARK_SOP_FLOW', form_setup=8, handle=0, create_id=1, create_time=1
-WHERE id=160;
+WHERE id=160;
+
+--2023.9.22update
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(3049, '审核', 'Approve', 'LINK', 21, 1, 'AUTH', '1030,3044', 1, 0, 1);

+ 2 - 0
sop-common/src/main/java/com/qmth/sop/common/enums/ExceptionResultEnum.java

@@ -99,6 +99,8 @@ public enum ExceptionResultEnum {
 
 
     WXAPP_PHONE_NO_DATA(HttpStatus.INTERNAL_SERVER_ERROR, 5000036, "微信手机号获取失败"),
     WXAPP_PHONE_NO_DATA(HttpStatus.INTERNAL_SERVER_ERROR, 5000036, "微信手机号获取失败"),
 
 
+    FLOW_SOP_DATA_NOT_ME(HttpStatus.INTERNAL_SERVER_ERROR, 5000037, "不能审批他人的sop数据"),
+
     /**
     /**
      * 401
      * 401
      */
      */