工艺报工修改
This commit is contained in:
		
							parent
							
								
									ea8dcc3300
								
							
						
					
					
						commit
						060d627cba
					
				@ -55,5 +55,6 @@ public class TaskDispatchDetailLogDO extends BaseDO {
 | 
			
		||||
     * 工序名称
 | 
			
		||||
     */
 | 
			
		||||
    private String procedureName;
 | 
			
		||||
    private String type;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -342,6 +342,7 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
 | 
			
		||||
            taskDispatchDetailDO.setPlanStatus(1);
 | 
			
		||||
            taskDispatchDetailDO.setMatPlanProcess("Y");
 | 
			
		||||
            taskDispatchDetailDO.setProjectMaterialPlanNo(planDO.getProjectMaterialPlanNo());
 | 
			
		||||
            taskDispatchDetailDO.setType("提交");
 | 
			
		||||
            saveLog(taskDispatchDetailDO);
 | 
			
		||||
        }
 | 
			
		||||
//        materialPlanBoomMapper.insertBatch(materialPlanBoomDOList);
 | 
			
		||||
@ -588,6 +589,7 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
 | 
			
		||||
        log.setBlueprintNo(detailDO.getBlueprintNo());
 | 
			
		||||
        log.setProcedureName(detailDO.getProcedureName());
 | 
			
		||||
        log.setProjectSubName(detailDO.getProjectSubName());
 | 
			
		||||
        log.setType(detailDO.getType());
 | 
			
		||||
        taskDispatchDetailLogMapper.insert(log);
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -370,32 +370,32 @@ public class ScreenServiceImpl implements ScreenService {
 | 
			
		||||
        Calendar calendar = Calendar.getInstance();
 | 
			
		||||
        LocalDateTime firstDayInNewYearTime = LocalDateTime.of(calendar.get(Calendar.YEAR), 1, 1, 0, 0);
 | 
			
		||||
 | 
			
		||||
//        MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
 | 
			
		||||
//        query.selectAll(ProjectOrderDO.class)
 | 
			
		||||
////                .selectCount(ProjectOrderDO::getId, "projectCount")
 | 
			
		||||
//                .select("DATE_FORMAT(create_time, '%m') as projectMonth")
 | 
			
		||||
//                .ge(ProjectOrderDO::getCreateTime, firstDayInNewYearTime)
 | 
			
		||||
//                .eq(ProjectOrderDO::getProperty,1)
 | 
			
		||||
//                .eq(ProjectOrderDO::getIsSnapshot,0)
 | 
			
		||||
//                .eq(ProjectOrderDO::getOrderStatus, ProjectOrderStatusEnum.APPROVE.getCode())
 | 
			
		||||
////                .groupBy("t.business_line", "DATE_FORMAT(create_time, '%m')")
 | 
			
		||||
//        ;
 | 
			
		||||
//        List<ProjectOrderDO> projectOrderDOList = projectOrderMapper.selectList(query);
 | 
			
		||||
        MPJLambdaWrapper<PlanSubDO> planQuery = new MPJLambdaWrapper<>();
 | 
			
		||||
        planQuery.selectAll(PlanSubDO.class)
 | 
			
		||||
                .select("DATE_FORMAT(t.create_time, '%m') as projectMonth")
 | 
			
		||||
                .select("po.business_line as businessLine")
 | 
			
		||||
                .leftJoin(ProjectOrderDO.class,"po",ProjectOrderDO::getId,PlanSubDO::getProjectId)
 | 
			
		||||
                .ge(PlanSubDO::getCreateTime, firstDayInNewYearTime)
 | 
			
		||||
        MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
 | 
			
		||||
        query.selectAll(ProjectOrderDO.class)
 | 
			
		||||
//                .selectCount(ProjectOrderDO::getId, "projectCount")
 | 
			
		||||
                .select("DATE_FORMAT(create_time, '%m') as projectMonth")
 | 
			
		||||
                .ge(ProjectOrderDO::getCreateTime, firstDayInNewYearTime)
 | 
			
		||||
                .eq(ProjectOrderDO::getProperty,1)
 | 
			
		||||
                .eq(ProjectOrderDO::getIsSnapshot,0)
 | 
			
		||||
                .innerJoin(PlanDO.class, "a", PlanDO::getId, PlanSubDO::getProjectPlanId)
 | 
			
		||||
                .notIn(PlanDO::getStatus, ProjectPlanStatusEnum.TERMINATE.getCode(), ProjectPlanStatusEnum.COMPLETE.getCode());
 | 
			
		||||
        List<PlanSubDO> planSubDOS = planSubMapper.selectList(planQuery);
 | 
			
		||||
                .eq(ProjectOrderDO::getOrderStatus, ProjectOrderStatusEnum.APPROVE.getCode())
 | 
			
		||||
//                .groupBy("t.business_line", "DATE_FORMAT(create_time, '%m')")
 | 
			
		||||
        ;
 | 
			
		||||
        List<ProjectOrderDO> projectOrderDOList = projectOrderMapper.selectList(query);
 | 
			
		||||
//        MPJLambdaWrapper<PlanSubDO> planQuery = new MPJLambdaWrapper<>();
 | 
			
		||||
//        planQuery.selectAll(PlanSubDO.class)
 | 
			
		||||
//                .select("DATE_FORMAT(t.create_time, '%m') as projectMonth")
 | 
			
		||||
//                .select("po.business_line as businessLine")
 | 
			
		||||
//                .leftJoin(ProjectOrderDO.class,"po",ProjectOrderDO::getId,PlanSubDO::getProjectId)
 | 
			
		||||
//                .ge(PlanSubDO::getCreateTime, firstDayInNewYearTime)
 | 
			
		||||
//                .eq(ProjectOrderDO::getIsSnapshot,0)
 | 
			
		||||
//                .innerJoin(PlanDO.class, "a", PlanDO::getId, PlanSubDO::getProjectPlanId)
 | 
			
		||||
//                .notIn(PlanDO::getStatus, ProjectPlanStatusEnum.TERMINATE.getCode(), ProjectPlanStatusEnum.COMPLETE.getCode());
 | 
			
		||||
//        List<PlanSubDO> planSubDOS = planSubMapper.selectList(planQuery);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        Map<Integer, List<PlanSubDO>> countWithByBusinessLineGroupMonth = planSubDOS.stream().collect(Collectors.groupingBy(PlanSubDO::getProjectMonth));
 | 
			
		||||
        Map<Integer, List<ProjectOrderDO>> countWithByBusinessLineGroupMonth = projectOrderDOList.stream().collect(Collectors.groupingBy(ProjectOrderDO::getProjectMonth));
 | 
			
		||||
        months.forEach(month -> {
 | 
			
		||||
            List<PlanSubDO> monthProjectList = countWithByBusinessLineGroupMonth.get(Integer.valueOf(month.replace("月","")));
 | 
			
		||||
            List<ProjectOrderDO> monthProjectList = countWithByBusinessLineGroupMonth.get(Integer.valueOf(month.replace("月","")));
 | 
			
		||||
            if (CollUtil.isEmpty(monthProjectList)){
 | 
			
		||||
                total.add(0);
 | 
			
		||||
                black.add(0);
 | 
			
		||||
@ -404,7 +404,7 @@ public class ScreenServiceImpl implements ScreenService {
 | 
			
		||||
            }
 | 
			
		||||
            int coloredCount = 0;
 | 
			
		||||
            int blackCount=0;
 | 
			
		||||
            Map<String, List<PlanSubDO>> countWithByBusinessLine = monthProjectList.stream().collect(Collectors.groupingBy(PlanSubDO::getBusinessLine));
 | 
			
		||||
            Map<String, List<ProjectOrderDO>> countWithByBusinessLine = monthProjectList.stream().collect(Collectors.groupingBy(ProjectOrderDO::getBusinessLine));
 | 
			
		||||
            if(CollUtil.isNotEmpty(countWithByBusinessLine.get(BusinessLineEnum.BLACK.getCode()))){
 | 
			
		||||
                blackCount = countWithByBusinessLine.get(BusinessLineEnum.BLACK.getCode()).size()  ;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@ -238,6 +238,7 @@ const change =(row:any)=>{
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
  if (row){
 | 
			
		||||
    row.type='修改'
 | 
			
		||||
    MaterialPlanApi.saveLog(row)
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -25,7 +25,7 @@
 | 
			
		||||
          <td colspan="6">
 | 
			
		||||
            <span style="font-size: 16px">{{ formData.customerName }}({{ formData.customer.brief}})</span>
 | 
			
		||||
          </td>
 | 
			
		||||
          <td style="font-size: 16px"> 编码: </td>
 | 
			
		||||
          <td style="font-size: 16px"> 编码 </td>
 | 
			
		||||
          <td style="font-size: 16px">{{ formData.customer.code }} </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        </tbody>
 | 
			
		||||
@ -35,7 +35,7 @@
 | 
			
		||||
          <td colspan="6" style="font-size: 16px">
 | 
			
		||||
            {{ formData.projectName }}
 | 
			
		||||
          </td>
 | 
			
		||||
          <td style="font-size: 16px"> 业务员: </td>
 | 
			
		||||
          <td style="font-size: 16px"> 业务员 </td>
 | 
			
		||||
          <td style="font-size: 16px">{{ formData.businessManName }} </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
@ -46,17 +46,17 @@
 | 
			
		||||
          <td colspan="1" style="min-width: 90px; font-size: 16px ">{{ formatDate(new Date(formData.projectEndTime), 'YYYY-MM-DD') }}</td>
 | 
			
		||||
          <td style="min-width: 70px;">天数</td>
 | 
			
		||||
          <td colspan="1" width="60px">{{ betweenDay(new Date(formData.projectStartTime), new Date(formData.projectEndTime)) +1 }}</td>
 | 
			
		||||
          <td colspan="1"> 是否有价格: </td>
 | 
			
		||||
          <td colspan="1"> 是否有价格 </td>
 | 
			
		||||
          <td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.hasPrice) }} </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr  class="masterClass">
 | 
			
		||||
          <td colspan="2" style="font-size: 16px"> 项目负责人: </td>
 | 
			
		||||
          <td colspan="2" style="font-size: 16px"> 项目负责人</td>
 | 
			
		||||
          <td colspan="2" class="masterClass">{{ userInit.find((user) => user.id == planData.projectOwner)?.nickname }} </td>
 | 
			
		||||
          <td colspan="1">
 | 
			
		||||
            <!-- <div style="width: 100%; display: flex; justify-content: center; font-size: 12px"> -->
 | 
			
		||||
            <div>
 | 
			
		||||
              <div style="border-bottom: 1px solid #333; padding: 0 5px; height: 30%">类别:</div>
 | 
			
		||||
              <div style="padding: 0 5px; height: 30%">性质:</div>
 | 
			
		||||
              <div style="border-bottom: 1px solid #333; padding: 0 5px; height: 30%">类别</div>
 | 
			
		||||
              <div style="padding: 0 5px; height: 30%">性质</div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </td>
 | 
			
		||||
          <td colspan="1">
 | 
			
		||||
@ -69,7 +69,7 @@
 | 
			
		||||
          <td colspan="4" >
 | 
			
		||||
            <div style="display: flex; justify-content: space-between">
 | 
			
		||||
              <div style="width: 100%; font-size: 12px; display: flex; flex-direction: column">
 | 
			
		||||
                <div style="text-align: left; width: 100; margin-left: 10px">自客户提供资料:</div>
 | 
			
		||||
                <div style="text-align: left; width: 100; margin-left: 10px">自客户提供资料</div>
 | 
			
		||||
                <div id="fruitForm" style="display: flex; justify-content: flex-start; align-items: center">
 | 
			
		||||
                  <span class="checkbox" v-if="formData.hasContract == 0"></span>
 | 
			
		||||
                  <span class="checkbox" v-else-if="formData.hasContract == 1">√</span>
 | 
			
		||||
@ -87,7 +87,7 @@
 | 
			
		||||
          </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
          <td colspan="2" style="font-size: 16px">是否要工艺:</td>
 | 
			
		||||
          <td colspan="2" style="font-size: 16px">是否要工艺</td>
 | 
			
		||||
          <td>
 | 
			
		||||
 | 
			
		||||
            {{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, planData.hasCraft) }}
 | 
			
		||||
@ -107,7 +107,7 @@
 | 
			
		||||
        </tr>
 | 
			
		||||
                  <tr>
 | 
			
		||||
                    <td colspan="2" style="font-size: 16px">备注</td>
 | 
			
		||||
                    <td colspan="8">
 | 
			
		||||
                    <td colspan="8" style="text-align: left;padding-left: 10px">
 | 
			
		||||
                      {{ formData.remark }}
 | 
			
		||||
                    </td>
 | 
			
		||||
                  </tr>
 | 
			
		||||
@ -116,7 +116,7 @@
 | 
			
		||||
        <tbody>
 | 
			
		||||
        <tr>
 | 
			
		||||
          <td colspan="10" style="height: 30px">
 | 
			
		||||
            <div style="text-align: left; width: 100%">子项目信息:</div>
 | 
			
		||||
            <div style="text-align: left; width: 100%">子项目信息</div>
 | 
			
		||||
          </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
 | 
			
		||||
@ -754,10 +754,65 @@ const updateFlag = async(row:any) =>{
 | 
			
		||||
  }
 | 
			
		||||
  await ProcessDesignApi.updateFlag(row)
 | 
			
		||||
  //更新一下这条数据的状态
 | 
			
		||||
  message.success(t('common.operationSuccess'))
 | 
			
		||||
  commonStore.setStore('active', 'update');
 | 
			
		||||
  commonStore.setStore('id', processDesignId);
 | 
			
		||||
  reload()
 | 
			
		||||
  formData.value.processDesignProgressList = await ProcessDesignApi.getProcessDesignProgressListByProcessDesignId(formData.value.id)
 | 
			
		||||
  const newVar = await UserApi.isAdministrator();
 | 
			
		||||
  if (newVar==true){
 | 
			
		||||
    ststus.value=true
 | 
			
		||||
  }
 | 
			
		||||
  if( formData.value.processDesignProgressList != null &&  formData.value.processDesignProgressList.length > 0){
 | 
			
		||||
    var maxTime = null;
 | 
			
		||||
    if(formData.value.processDesignProgressList.length == 1){
 | 
			
		||||
      formData.value.processDesignProgressList[0].hasNext = false;
 | 
			
		||||
      console.log(ststus.value)
 | 
			
		||||
      if(formData.value.processDesignProgressList[0].endTime != null && formData.value.processDesignProgressList[0].endTime != ''){
 | 
			
		||||
        if (ststus.value){
 | 
			
		||||
          formData.value.processDesignProgressList[0].flag=0
 | 
			
		||||
        }else {
 | 
			
		||||
          if (formData.value.processDesignProgressList[0].isOver == 1 || formData.value.isOverProcess == 1) {
 | 
			
		||||
            formData.value.processDesignProgressList[0].flag = 1
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        formData.value.processDesignProgressList[0].maxTime = (formData.value.processDesignProgressList[0].endTime - formData.value.processDesignProgressList[0].beginTime)/ (1000 * 60 * 60);
 | 
			
		||||
      }else {
 | 
			
		||||
        formData.value.processDesignProgressList[0].flag=1
 | 
			
		||||
 | 
			
		||||
      }
 | 
			
		||||
    } else{
 | 
			
		||||
      console.log(ststus.value)
 | 
			
		||||
 | 
			
		||||
      var maxIndex = 0;
 | 
			
		||||
      for (let index = 0; index <  formData.value.processDesignProgressList.length; index++) {
 | 
			
		||||
        var item = formData.value.processDesignProgressList[index];
 | 
			
		||||
        if(item.endTime != null && item.endTime != ''){
 | 
			
		||||
          item.maxTime = (item.endTime - item.beginTime)/ (1000 * 60 * 60);
 | 
			
		||||
          if (ststus.value){
 | 
			
		||||
            item.flag=0
 | 
			
		||||
          }else {
 | 
			
		||||
            if (item.isOver==1||formData.value.isOverProcess == 1)
 | 
			
		||||
              item.flag=1
 | 
			
		||||
          }
 | 
			
		||||
        }else {
 | 
			
		||||
          formData.value.processDesignProgressList[0].flag=1
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
        if(maxTime == null){
 | 
			
		||||
          maxIndex = index;
 | 
			
		||||
          maxTime = item.createTime;
 | 
			
		||||
          item.hasNext = false;
 | 
			
		||||
        }else{
 | 
			
		||||
          if(item.createTime > maxTime){
 | 
			
		||||
            formData.value.processDesignProgressList[maxIndex].hasNext = true;
 | 
			
		||||
            maxIndex  = index;
 | 
			
		||||
            item.hasNext = false;
 | 
			
		||||
          }else{
 | 
			
		||||
            item.hasNext = true;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
const overProcess = () =>{
 | 
			
		||||
  if(formData.value.processDesignProgressList != null && formData.value.processDesignProgressList.length > 0){
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user