工艺报工修改

This commit is contained in:
z 2025-09-30 14:21:09 +08:00
parent ea8dcc3300
commit 060d627cba
6 changed files with 96 additions and 37 deletions

View File

@ -55,5 +55,6 @@ public class TaskDispatchDetailLogDO extends BaseDO {
* 工序名称 * 工序名称
*/ */
private String procedureName; private String procedureName;
private String type;
} }

View File

@ -342,6 +342,7 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
taskDispatchDetailDO.setPlanStatus(1); taskDispatchDetailDO.setPlanStatus(1);
taskDispatchDetailDO.setMatPlanProcess("Y"); taskDispatchDetailDO.setMatPlanProcess("Y");
taskDispatchDetailDO.setProjectMaterialPlanNo(planDO.getProjectMaterialPlanNo()); taskDispatchDetailDO.setProjectMaterialPlanNo(planDO.getProjectMaterialPlanNo());
taskDispatchDetailDO.setType("提交");
saveLog(taskDispatchDetailDO); saveLog(taskDispatchDetailDO);
} }
// materialPlanBoomMapper.insertBatch(materialPlanBoomDOList); // materialPlanBoomMapper.insertBatch(materialPlanBoomDOList);
@ -588,6 +589,7 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
log.setBlueprintNo(detailDO.getBlueprintNo()); log.setBlueprintNo(detailDO.getBlueprintNo());
log.setProcedureName(detailDO.getProcedureName()); log.setProcedureName(detailDO.getProcedureName());
log.setProjectSubName(detailDO.getProjectSubName()); log.setProjectSubName(detailDO.getProjectSubName());
log.setType(detailDO.getType());
taskDispatchDetailLogMapper.insert(log); taskDispatchDetailLogMapper.insert(log);
return true; return true;
} }

View File

@ -370,32 +370,32 @@ public class ScreenServiceImpl implements ScreenService {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
LocalDateTime firstDayInNewYearTime = LocalDateTime.of(calendar.get(Calendar.YEAR), 1, 1, 0, 0); LocalDateTime firstDayInNewYearTime = LocalDateTime.of(calendar.get(Calendar.YEAR), 1, 1, 0, 0);
// MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>(); MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
// query.selectAll(ProjectOrderDO.class) query.selectAll(ProjectOrderDO.class)
//// .selectCount(ProjectOrderDO::getId, "projectCount") // .selectCount(ProjectOrderDO::getId, "projectCount")
// .select("DATE_FORMAT(create_time, '%m') as projectMonth") .select("DATE_FORMAT(create_time, '%m') as projectMonth")
// .ge(ProjectOrderDO::getCreateTime, firstDayInNewYearTime) .ge(ProjectOrderDO::getCreateTime, firstDayInNewYearTime)
// .eq(ProjectOrderDO::getProperty,1) .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)
.eq(ProjectOrderDO::getIsSnapshot,0) .eq(ProjectOrderDO::getIsSnapshot,0)
.innerJoin(PlanDO.class, "a", PlanDO::getId, PlanSubDO::getProjectPlanId) .eq(ProjectOrderDO::getOrderStatus, ProjectOrderStatusEnum.APPROVE.getCode())
.notIn(PlanDO::getStatus, ProjectPlanStatusEnum.TERMINATE.getCode(), ProjectPlanStatusEnum.COMPLETE.getCode()); // .groupBy("t.business_line", "DATE_FORMAT(create_time, '%m')")
List<PlanSubDO> planSubDOS = planSubMapper.selectList(planQuery); ;
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 -> { 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)){ if (CollUtil.isEmpty(monthProjectList)){
total.add(0); total.add(0);
black.add(0); black.add(0);
@ -404,7 +404,7 @@ public class ScreenServiceImpl implements ScreenService {
} }
int coloredCount = 0; int coloredCount = 0;
int blackCount=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()))){ if(CollUtil.isNotEmpty(countWithByBusinessLine.get(BusinessLineEnum.BLACK.getCode()))){
blackCount = countWithByBusinessLine.get(BusinessLineEnum.BLACK.getCode()).size() ; blackCount = countWithByBusinessLine.get(BusinessLineEnum.BLACK.getCode()).size() ;
} }

View File

@ -238,6 +238,7 @@ const change =(row:any)=>{
} }
} }
if (row){ if (row){
row.type='修改'
MaterialPlanApi.saveLog(row) MaterialPlanApi.saveLog(row)
} }
} }

View File

@ -25,7 +25,7 @@
<td colspan="6"> <td colspan="6">
<span style="font-size: 16px">{{ formData.customerName }}({{ formData.customer.brief}})</span> <span style="font-size: 16px">{{ formData.customerName }}({{ formData.customer.brief}})</span>
</td> </td>
<td style="font-size: 16px"> 编码 </td> <td style="font-size: 16px"> 编码 </td>
<td style="font-size: 16px">{{ formData.customer.code }} </td> <td style="font-size: 16px">{{ formData.customer.code }} </td>
</tr> </tr>
</tbody> </tbody>
@ -35,7 +35,7 @@
<td colspan="6" style="font-size: 16px"> <td colspan="6" style="font-size: 16px">
{{ formData.projectName }} {{ formData.projectName }}
</td> </td>
<td style="font-size: 16px"> 业务员 </td> <td style="font-size: 16px"> 业务员 </td>
<td style="font-size: 16px">{{ formData.businessManName }} </td> <td style="font-size: 16px">{{ formData.businessManName }} </td>
</tr> </tr>
<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 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 style="min-width: 70px;">天数</td>
<td colspan="1" width="60px">{{ betweenDay(new Date(formData.projectStartTime), new Date(formData.projectEndTime)) +1 }}</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> <td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.hasPrice) }} </td>
</tr> </tr>
<tr class="masterClass"> <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="2" class="masterClass">{{ userInit.find((user) => user.id == planData.projectOwner)?.nickname }} </td>
<td colspan="1"> <td colspan="1">
<!-- <div style="width: 100%; display: flex; justify-content: center; font-size: 12px"> --> <!-- <div style="width: 100%; display: flex; justify-content: center; font-size: 12px"> -->
<div> <div>
<div style="border-bottom: 1px solid #333; 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 style="padding: 0 5px; height: 30%">性质</div>
</div> </div>
</td> </td>
<td colspan="1"> <td colspan="1">
@ -69,7 +69,7 @@
<td colspan="4" > <td colspan="4" >
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div style="width: 100%; font-size: 12px; display: flex; flex-direction: column"> <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"> <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-if="formData.hasContract == 0"></span>
<span class="checkbox" v-else-if="formData.hasContract == 1"></span> <span class="checkbox" v-else-if="formData.hasContract == 1"></span>
@ -87,7 +87,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2" style="font-size: 16px">是否要工艺:</td> <td colspan="2" style="font-size: 16px">是否要工艺</td>
<td> <td>
{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, planData.hasCraft) }} {{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, planData.hasCraft) }}
@ -107,7 +107,7 @@
</tr> </tr>
<tr> <tr>
<td colspan="2" style="font-size: 16px">备注</td> <td colspan="2" style="font-size: 16px">备注</td>
<td colspan="8"> <td colspan="8" style="text-align: left;padding-left: 10px">
{{ formData.remark }} {{ formData.remark }}
</td> </td>
</tr> </tr>
@ -116,7 +116,7 @@
<tbody> <tbody>
<tr> <tr>
<td colspan="10" style="height: 30px"> <td colspan="10" style="height: 30px">
<div style="text-align: left; width: 100%">子项目信息:</div> <div style="text-align: left; width: 100%">子项目信息</div>
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@ -754,10 +754,65 @@ const updateFlag = async(row:any) =>{
} }
await ProcessDesignApi.updateFlag(row) await ProcessDesignApi.updateFlag(row)
// //
message.success(t('common.operationSuccess')) formData.value.processDesignProgressList = await ProcessDesignApi.getProcessDesignProgressListByProcessDesignId(formData.value.id)
commonStore.setStore('active', 'update'); const newVar = await UserApi.isAdministrator();
commonStore.setStore('id', processDesignId); if (newVar==true){
reload() 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 = () =>{ const overProcess = () =>{
if(formData.value.processDesignProgressList != null && formData.value.processDesignProgressList.length > 0){ if(formData.value.processDesignProgressList != null && formData.value.processDesignProgressList.length > 0){