|
@@ -2023,6 +2023,50 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Boolean majorMarketDepartmentId() {
|
|
|
+ List<Major> majors = majorServiceImpl.list(new LambdaQueryWrapper<Major>().select(BaseEntity::getId, Major::getClientManagerId));
|
|
|
+ for (Major major : majors){
|
|
|
+ Long clientManagerId = major.getClientManagerId();
|
|
|
+ Set<Long> departmentIdByUserId = userService.getDepartmentIdByUserId(clientManagerId);
|
|
|
+ if (CollectionUtil.isNotEmpty(departmentIdByUserId)){
|
|
|
+ Long departmentId = departmentIdByUserId.stream().findFirst().get();
|
|
|
+ majorServiceImpl.update(new LambdaUpdateWrapper<Major>().set(Major::getMarketDepartmentId,departmentId).eq(BaseEntity::getId,major.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Boolean majorProductionTime() {
|
|
|
+ List<MajorProduction> mps = majorProductionService.list(new LambdaQueryWrapper<MajorProduction>().select(BaseEntity::getId, MajorProduction::getMajorId, MajorProduction::getProduction, MajorProduction::getRepertoryInTime)
|
|
|
+ .isNull(MajorProduction::getProductionTime).eq(BaseEntity::getDeleted, Boolean.FALSE));
|
|
|
+ for (MajorProduction mp : mps){
|
|
|
+ if (mp.getProduction().equals(STATEMENT.name())){
|
|
|
+ Date majorProductionFinishedTime = workFlowNodeInstanceService.getMajorProductionFinishedTime(mp.getMajorId(), 62L);
|
|
|
+ if (majorProductionFinishedTime==null){
|
|
|
+ majorProductionFinishedTime = mp.getRepertoryInTime();
|
|
|
+ }
|
|
|
+ majorProductionService.update(new LambdaUpdateWrapper<MajorProduction>().set(MajorProduction::getProductionTime,majorProductionFinishedTime).eq(BaseEntity::getId,mp.getId()));
|
|
|
+ }
|
|
|
+ if (mp.getProduction().equals(REPORT.name())){
|
|
|
+ Date majorProductionFinishedTime = workFlowNodeInstanceService.getMajorProductionFinishedTime(mp.getMajorId(), 71L);
|
|
|
+ if (majorProductionFinishedTime==null){
|
|
|
+ majorProductionFinishedTime = mp.getRepertoryInTime();
|
|
|
+ }
|
|
|
+ majorProductionService.update(new LambdaUpdateWrapper<MajorProduction>().set(MajorProduction::getProductionTime,majorProductionFinishedTime).eq(BaseEntity::getId,mp.getId()));
|
|
|
+ }
|
|
|
+ if (mp.getProduction().equals(LETTER.name())){
|
|
|
+ Date majorProductionFinishedTime = workFlowNodeInstanceService.getMajorProductionFinishedTime(mp.getMajorId(), 78L);
|
|
|
+ if (majorProductionFinishedTime==null){
|
|
|
+ majorProductionFinishedTime = mp.getRepertoryInTime();
|
|
|
+ }
|
|
|
+ majorProductionService.update(new LambdaUpdateWrapper<MajorProduction>().set(MajorProduction::getProductionTime,majorProductionFinishedTime).eq(BaseEntity::getId,mp.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public Boolean updateProductionFund() {
|