班组产量报表添加字段,报工审核添加根据是否合片工序字段判断而非写死
5个文件已修改
23 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/dto/pp/TeamOutputDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/Report.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/TeamOutput.vue
@@ -272,6 +272,8 @@
    {field: 'edgingType', width: 110, title: t('order.edgingType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'completedQuantity', width: 90, title: t('reportingWorks.completedQuantity')},
    {field: 'area', width: 100, title: t('reportingWorks.completedArea')},
    {field: 'reviewed', title: t('processCard.reviewed')},
    {field: 'examineTime', title: t('ingredientsStock.reviewedTime')},
    {field: 'productName', title: t('order.product')},
  ],//表头按钮
north-glass-erp/src/main/java/com/example/erp/dto/pp/TeamOutputDTO.java
@@ -39,4 +39,8 @@
    private String productName;
    @ExcelProperty("编号")
    private String code;
    @ExcelProperty("审核人")
    private String reviewed;
    @ExcelProperty("审核时间")
    private String examineTime;
}
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -30,6 +30,7 @@
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;
@@ -383,8 +384,11 @@
        String result = processId.substring(index);
        String technologyStr = reportingWork.get("technologyStr");
        String[] processIdStr = processId.split("/");
        String nowDate = LocalDate.now().toString();
        //获取报工工序是否为复合工程
        String laminating = reportingWorkMapper.getProcessLaminating(thisProcess);
//合片工序
if (thisProcess.equals("夹胶") || thisProcess.equals("中空") || thisProcess.equals("包装")){
if (laminating.equals("laminating")){
    LambdaUpdateWrapper
                <ReportingWork> updateWrapper = new LambdaUpdateWrapper<>();
        updateWrapper
@@ -392,7 +396,8 @@
                .eq(ReportingWork::getThisProcess, reportingWork.get("process"))
                .eq(ReportingWork::getReviewedState, 0)
                .setSql("reviewed_state =1")
                .set(ReportingWork::getReviewed, userName);
                .set(ReportingWork::getReviewed, userName)
                .set(ReportingWork::getExamineTime, nowDate);
        reportingWorkMapper.update(null, updateWrapper);
}else {
    reportingWorkMapper.ReviewReportingWorkMp(processIdStr[0],reportingWork.get("process"),technologyStr,userName);
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -121,6 +121,8 @@
        <result column="area" property="area"/>
        <result column="product_name" property="productName"/>
        <result column="code" property="code"/>
        <result column="reviewed" property="reviewed"/>
        <result column="examine_time" property="examineTime"/>
    </resultMap>
    <resultMap id="scheduleProductionScheduleMap" type="com.example.erp.dto.pp.ScheduleProductionScheduleDTO">
@@ -1326,7 +1328,9 @@
        rwd.completed_quantity as completed_quantity,
        ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area,
        od.product_name,
        JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code
        JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code,
        rw.reviewed,
        rw.examine_time
        FROM
        reporting_work as rw left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id
        left join flow_card as fc on fc.order_id=rw.order_id and fc.process_id=rw.process_id  and fc.order_number=rwd.order_number and fc.technology_number=rwd.technology_number
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -812,7 +812,7 @@
    <update id="ReviewReportingWorkMp">
        update reporting_work as rw
            left join reporting_work_detail as rwd on rw.reporting_work_id = rwd.reporting_work_id
        set rw.reviewed_state = 1 ,rw.reviewed=#{userName}
        set rw.reviewed_state = 1 ,rw.reviewed=#{userName},rw.examine_time=NOW()
        where rw.process_id = #{substring} and rw.this_process=#{process}
          and POSITION(rwd.technology_number in #{result}) and reviewed_state=0
    </update>