|
|
|
@ -4,9 +4,7 @@ |
|
|
|
package org.springblade.desk.quality.controller; |
|
|
|
package org.springblade.desk.quality.controller; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.date.DateTime; |
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
@ -38,35 +36,30 @@ import org.springblade.desk.basic.constant.BaseRequest; |
|
|
|
import org.springblade.desk.basic.util.ExcelExtUtil; |
|
|
|
import org.springblade.desk.basic.util.ExcelExtUtil; |
|
|
|
import org.springblade.desk.basic.util.RequestUtil; |
|
|
|
import org.springblade.desk.basic.util.RequestUtil; |
|
|
|
import org.springblade.desk.common.constant.BizTypeConstant; |
|
|
|
import org.springblade.desk.common.constant.BizTypeConstant; |
|
|
|
|
|
|
|
import org.springblade.desk.common.enums.MesApprovalRecordBizTypeEnum; |
|
|
|
import org.springblade.desk.common.feign.IMesNotifyMessageClient; |
|
|
|
import org.springblade.desk.common.feign.IMesNotifyMessageClient; |
|
|
|
import org.springblade.desk.common.feign.MesNotifyMessageClient; |
|
|
|
|
|
|
|
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
|
|
|
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
|
|
|
import org.springblade.desk.energy.pojo.entity.BsTowerReportEntity; |
|
|
|
import org.springblade.desk.common.service.IMesApprovalRecordService; |
|
|
|
import org.springblade.desk.quality.constant.QAModuleConst; |
|
|
|
import org.springblade.desk.quality.constant.QAModuleConst; |
|
|
|
import org.springblade.desk.quality.excel.LiquidTankWaveExcel; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.excel.RaiseHandExcel; |
|
|
|
import org.springblade.desk.quality.excel.RaiseHandExcel; |
|
|
|
import org.springblade.desk.quality.pojo.entity.*; |
|
|
|
import org.springblade.desk.quality.pojo.entity.LiquidTankReport; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.pojo.entity.RaiseHand; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.pojo.entity.RaiseHandRecord; |
|
|
|
import org.springblade.desk.quality.pojo.vo.LiquidTankTaskCopyVO; |
|
|
|
import org.springblade.desk.quality.pojo.vo.LiquidTankTaskCopyVO; |
|
|
|
import org.springblade.desk.quality.pojo.vo.LiquidTankWaveVO; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.pojo.vo.RaiseHandVO; |
|
|
|
import org.springblade.desk.quality.pojo.vo.RaiseHandVO; |
|
|
|
import org.springblade.desk.quality.service.*; |
|
|
|
import org.springblade.desk.quality.service.ILiquidTankTaskCopyService; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.service.IRaiseHandRecordService; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.service.IRaiseHandService; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.service.IRelTankWaveItemService; |
|
|
|
import org.springblade.desk.quality.util.FullMergeExcelUtil; |
|
|
|
import org.springblade.desk.quality.util.FullMergeExcelUtil; |
|
|
|
import org.springblade.desk.quality.wrapper.LiquidTankTaskCopyWrapper; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.wrapper.LiquidTankWaveWrapper; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.wrapper.RaiseHandWrapper; |
|
|
|
import org.springblade.desk.quality.wrapper.RaiseHandWrapper; |
|
|
|
import org.springblade.system.feign.IUserClient; |
|
|
|
import org.springblade.system.feign.IUserClient; |
|
|
|
import org.springblade.system.pojo.entity.User; |
|
|
|
import org.springblade.system.pojo.entity.User; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
|
|
|
import org.springframework.http.ResponseEntity; |
|
|
|
import org.springframework.http.ResponseEntity; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
|
|
import java.time.ZoneId; |
|
|
|
|
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
|
|
|
|
import java.time.format.DateTimeParseException; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
@ -98,6 +91,8 @@ public class RaiseHandController extends BladeController { |
|
|
|
IRaiseHandRecordService recordService; |
|
|
|
IRaiseHandRecordService recordService; |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
IMesNotifyMessageClient mesNotifyMessageClient; |
|
|
|
IMesNotifyMessageClient mesNotifyMessageClient; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private IMesApprovalRecordService mesApprovalRecordService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -107,79 +102,7 @@ public class RaiseHandController extends BladeController { |
|
|
|
@ApiOperationSupport(order = 10) |
|
|
|
@ApiOperationSupport(order = 10) |
|
|
|
@Operation(summary = "详情", description = "传入LiquidTankWave Obj") |
|
|
|
@Operation(summary = "详情", description = "传入LiquidTankWave Obj") |
|
|
|
public R<RaiseHandVO> detail(RaiseHand liquidTankWave) { |
|
|
|
public R<RaiseHandVO> detail(RaiseHand liquidTankWave) { |
|
|
|
QueryWrapper<RaiseHand> qw = Condition.getQueryWrapper(liquidTankWave); |
|
|
|
RaiseHandVO detailVO = service.detail(liquidTankWave); |
|
|
|
RaiseHand detail = service.getOne(qw); |
|
|
|
|
|
|
|
RaiseHandVO detailVO = RaiseHandWrapper.build().entityVO(detail); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<RaiseHandRecord> all = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<RaiseHandRecord> qwRecord = new QueryWrapper<>(); |
|
|
|
|
|
|
|
qwRecord.eq("HAND_ID", detail.getId()); |
|
|
|
|
|
|
|
qwRecord.eq("CURRENT_STATUS", 0); |
|
|
|
|
|
|
|
qwRecord.orderByDesc("CREATE_TIME"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<RaiseHandRecord> record01s = recordService.list(qwRecord); |
|
|
|
|
|
|
|
if(null != record01s && record01s.size() > 0){ |
|
|
|
|
|
|
|
RaiseHandRecord record01 = record01s.get(0); |
|
|
|
|
|
|
|
record01.setPointName("提交人"); |
|
|
|
|
|
|
|
all.add(record01); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
RaiseHandRecord record01 = new RaiseHandRecord(); |
|
|
|
|
|
|
|
record01.setPointName("提交人"); |
|
|
|
|
|
|
|
all.add(record01); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<RaiseHandRecord> qwRecord1 = new QueryWrapper<>(); |
|
|
|
|
|
|
|
qwRecord1.eq("HAND_ID", detail.getId()); |
|
|
|
|
|
|
|
qwRecord1.eq("CURRENT_STATUS", 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
qwRecord1.orderByDesc("CREATE_TIME"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<RaiseHandRecord> record1s = recordService.list(qwRecord1); |
|
|
|
|
|
|
|
if(null != record1s && record1s.size() > 0){ |
|
|
|
|
|
|
|
RaiseHandRecord record01 = record1s.get(0); |
|
|
|
|
|
|
|
record01.setPointName("工艺管理员"); |
|
|
|
|
|
|
|
all.add(record01); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
RaiseHandRecord record01 = new RaiseHandRecord(); |
|
|
|
|
|
|
|
record01.setPointName("工艺管理员"); |
|
|
|
|
|
|
|
all.add(record01); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<RaiseHandRecord> qwRecord2 = new QueryWrapper<>(); |
|
|
|
|
|
|
|
qwRecord2.eq("HAND_ID", detail.getId()); |
|
|
|
|
|
|
|
qwRecord2.eq("CURRENT_STATUS", 2); |
|
|
|
|
|
|
|
qwRecord2.orderByDesc("CREATE_TIME"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<RaiseHandRecord> record2s = recordService.list(qwRecord2); |
|
|
|
|
|
|
|
if(null != record2s && record2s.size() > 0){ |
|
|
|
|
|
|
|
RaiseHandRecord record01 = record2s.get(0); |
|
|
|
|
|
|
|
record01.setPointName("质量管理员"); |
|
|
|
|
|
|
|
all.add(record01); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
RaiseHandRecord record01 = new RaiseHandRecord(); |
|
|
|
|
|
|
|
record01.setPointName("质量管理员"); |
|
|
|
|
|
|
|
all.add(record01); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<RaiseHandRecord> qwRecord3 = new QueryWrapper<>(); |
|
|
|
|
|
|
|
qwRecord3.eq("HAND_ID", detail.getId()); |
|
|
|
|
|
|
|
qwRecord3.eq("CURRENT_STATUS", 3); |
|
|
|
|
|
|
|
qwRecord3.orderByDesc("CREATE_TIME"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<RaiseHandRecord> record3s = recordService.list(qwRecord3); |
|
|
|
|
|
|
|
if(null != record3s && record3s.size() > 0){ |
|
|
|
|
|
|
|
RaiseHandRecord record01 = record3s.get(0); |
|
|
|
|
|
|
|
record01.setPointName("主管业务领导"); |
|
|
|
|
|
|
|
all.add(record01); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
RaiseHandRecord record01 = new RaiseHandRecord(); |
|
|
|
|
|
|
|
record01.setPointName("主管业务领导"); |
|
|
|
|
|
|
|
all.add(record01); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
detailVO.setAll( all); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.data(detailVO); |
|
|
|
return R.data(detailVO); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -255,7 +178,6 @@ public class RaiseHandController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPage<RaiseHandVO> pagesVO = service.selectRaiseHandPage( |
|
|
|
IPage<RaiseHandVO> pagesVO = service.selectRaiseHandPage( |
|
|
|
Condition.getPage(query), liquidTankWave |
|
|
|
Condition.getPage(query), liquidTankWave |
|
|
|
); |
|
|
|
); |
|
|
|
@ -263,8 +185,6 @@ public class RaiseHandController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/reviewData") |
|
|
|
@PostMapping("/reviewData") |
|
|
|
@ApiOperationSupport(order = 30) |
|
|
|
@ApiOperationSupport(order = 30) |
|
|
|
@Operation(summary = "新增一条", description = "传入LiquidTankWave Obj") |
|
|
|
@Operation(summary = "新增一条", description = "传入LiquidTankWave Obj") |
|
|
|
@ -305,7 +225,15 @@ public class RaiseHandController extends BladeController { |
|
|
|
if (one.getStatus() > 1 && one.getStatus() < 4) { |
|
|
|
if (one.getStatus() > 1 && one.getStatus() < 4) { |
|
|
|
createNextNodeRecord(one, addOne.getNextUserId()); |
|
|
|
createNextNodeRecord(one, addOne.getNextUserId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ("0".equals(addOne.getIsSuccess())) { |
|
|
|
|
|
|
|
mesApprovalRecordService.rejectApproval(one.getId(), MesApprovalRecordBizTypeEnum.RAISE_HAND.getDesc(), one.getUpdateUser(), one.getUpdateTime()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(addOne.getNextUserId())) { |
|
|
|
|
|
|
|
mesApprovalRecordService.passApprovalWithUsers(one.getId(), MesApprovalRecordBizTypeEnum.RAISE_HAND.getDesc(), one.getUpdateUser(), one.getUpdateTime(), Arrays.asList(Long.parseLong(addOne.getNextUserId()))); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
mesApprovalRecordService.passApproval(one.getId(), MesApprovalRecordBizTypeEnum.RAISE_HAND.getDesc(), one.getUpdateUser(), one.getUpdateTime()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return R.status(true); |
|
|
|
return R.status(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -393,6 +321,7 @@ public class RaiseHandController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 根据状态获取审批节点名称 |
|
|
|
* 根据状态获取审批节点名称 |
|
|
|
|
|
|
|
* |
|
|
|
* @param status 审批状态 |
|
|
|
* @param status 审批状态 |
|
|
|
* @return 节点名称 |
|
|
|
* @return 节点名称 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -436,7 +365,7 @@ public class RaiseHandController extends BladeController { |
|
|
|
recordService.save(record); |
|
|
|
recordService.save(record); |
|
|
|
//}
|
|
|
|
//}
|
|
|
|
createNextNodeRecord(addOne, addOne.getProcessUserId().toString()); |
|
|
|
createNextNodeRecord(addOne, addOne.getProcessUserId().toString()); |
|
|
|
|
|
|
|
mesApprovalRecordService.createApprovalWithUsers(addOne.getId(), MesApprovalRecordBizTypeEnum.RAISE_HAND.getDesc(), record.getCreateUser(), record.getCreateTime(), Arrays.asList(addOne.getProcessUserId())); |
|
|
|
return R.status(true); |
|
|
|
return R.status(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -495,7 +424,9 @@ public class RaiseHandController extends BladeController { |
|
|
|
recordService.save(record); |
|
|
|
recordService.save(record); |
|
|
|
|
|
|
|
|
|
|
|
updateOne.setStatus(1); |
|
|
|
updateOne.setStatus(1); |
|
|
|
return R.status(service.updateById(updateOne)); |
|
|
|
boolean b = service.updateById(updateOne); |
|
|
|
|
|
|
|
mesApprovalRecordService.createApprovalWithUsers(updateOne.getId(), MesApprovalRecordBizTypeEnum.RAISE_HAND.getDesc(), updateOne.getUpdateUser(), updateOne.getUpdateTime(), Arrays.asList(updateOne.getProcessUserId())); |
|
|
|
|
|
|
|
return R.status(b); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -531,7 +462,12 @@ public class RaiseHandController extends BladeController { |
|
|
|
@ApiLog("删除举手免责") |
|
|
|
@ApiLog("删除举手免责") |
|
|
|
@Operation(summary = "逻辑删除", description = "传入ids") |
|
|
|
@Operation(summary = "逻辑删除", description = "传入ids") |
|
|
|
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
return R.status(service.removeByIds(Func.toLongList(ids))); |
|
|
|
List<Long> idList = Func.toLongList(ids); |
|
|
|
|
|
|
|
boolean b = service.removeByIds(Func.toLongList(ids)); |
|
|
|
|
|
|
|
for (Long id : idList) { |
|
|
|
|
|
|
|
mesApprovalRecordService.removeApproval(id, MesApprovalRecordBizTypeEnum.RAISE_HAND.getDesc()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return R.status(b); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|