chenlu
2025-03-25 e77728aaf2721e4777775134e223d4c90eadf7e9
根据报工转移的状态限制报工删除和修改
8个文件已修改
29 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/lang/ar.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/en.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/ru.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/zh.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/ar.js
@@ -552,6 +552,7 @@
        thisWornQuantity:'تنقطع هذه العملية',
        passAudit:'تمت الموافقة',
        patchCondition:'补片状态',
        changeFailed:'修改失败,请检查是否为报工转移订单',
        selectResponsibleTeam:'الرجاء اختيار الفريق المسؤول',
north-glass-erp/northglass-erp/src/lang/en.js
@@ -552,6 +552,7 @@
        thisWornQuantity:'This Worn Quantity',
        passAudit:'Pass The Audit',
        patchCondition:'Patch Condition',
        changeFailed:'修改失败,请检查是否为报工转移订单',
        selectResponsibleTeam:'Please select a responsible team',
        selectWorkReportingTeam:'Please select a responsible team',
north-glass-erp/northglass-erp/src/lang/ru.js
@@ -551,6 +551,7 @@
        thisWornQuantity:'Это процесс повреждение ',
        passAudit:'Проверка прошла',
        patchCondition:'补片状态',
        changeFailed:'修改失败,请检查是否为报工转移订单',
        selectResponsibleTeam:'Пожалуйста, выберите группу ответственности.',
north-glass-erp/northglass-erp/src/lang/zh.js
@@ -552,6 +552,7 @@
        thisWornQuantity:'本工序次破',
        passAudit:'审核通过',
        patchCondition:'补片状态',
        changeFailed:'修改失败,请检查是否为报工转移订单',
        selectResponsibleTeam:'请选择责任班组',
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -944,13 +944,15 @@
    reviewState = 'review'
  }
  request.post(`/reportingWork/updateReportingWork/${reviewState}`,requestData).then(res =>{
    if (res.code == 200){
    if (res.code == 200 && res.data===true){
      ElMessage.success(t('reportingWorks.successfulModificationOfWorkApplication'))
      router.push({path:'/main/reportingWorks/AddReportingWork',
        query:{
          processId:titleUploadData.value.processId,
          random:Math.random()}
      })
    } else {
      ElMessage.warning(t('reportingWorks.changeFailed'))
    }
  })
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkMapper.java
@@ -102,4 +102,6 @@
    String selectOrderid(String processIdStr);
    Map<String,Float> getFootSum(Date selectTime1, Date selectTime2, String orderId, ReportingWork reportingWork);
    Integer selectReviewedState(String reportingWorkId);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -485,7 +485,9 @@
        JSONObject reportingWorkJson = new JSONObject(reportingWorkMap);
        ReportingWork reportingWork = JSONObject.parseObject(JSONObject.toJSONString(reportingWorkJson.get("title")), ReportingWork.class);
        List<ReportingWorkDetail> reportingWorkDetails = JSONArray.parseArray(JSONObject.toJSONString(reportingWorkJson.get("detail")), ReportingWorkDetail.class);
        //查询该报工是否为报工转移订单
        Integer transferState = reportingWorkMapper.selectReviewedState(reportingWork.getReportingWorkId());
        if (transferState !=3){
        //删除刺破明细表刺破数据
        damageDetailsMapper.delete(
                new LambdaQueryWrapper<DamageDetails>()
@@ -552,6 +554,10 @@
        logService.saveLog(log);
        return true;
        } else {
            return false;
        }
    }
    //报工管理查询
@@ -578,6 +584,9 @@
            String lastProcess = reportingWorkMapper.selectLastProcess(processId);
            //获取是否有已补片或返工
            Integer countStates= Integer.valueOf(reportingWorkMapper.getPatchConditionMp(reportingWorkId));
            //查询该报工是否为报工转移订单
            Integer transferState = reportingWorkMapper.selectReviewedState(reportingWorkId);
            if (transferState !=3){
            //判断是否有补片返工数据
            if (countStates==0){
                //判断是否是入库工序
@@ -646,6 +655,10 @@
            else {
                return false;
            }
            } else {
                return false;
            }
        } else {
            return false;
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -1060,4 +1060,8 @@
             ) AS subquery;
    </select>
    <select id="selectReviewedState">
        select reviewed_state from pp.reporting_work where reporting_work_id=#{reportingWorkId};
    </select>
</mapper>