chenlu
昨天 b39599abcfce0b8db09fc5c94ff4655a2dc99ee1
Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
6个文件已修改
73 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkDetailMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReportingWorkDetail.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
@@ -204,12 +204,13 @@
                <th style="width: 6%;">序号</th>
                <th style="width: 10%;">楼层编号</th>
                <th style="width: 7%;">箱号</th>
                <th style="width: 17%;" colspan="1">宽X高</th>
                <th style="width: 10%;">数量</th>
                <th style="width: 15%;" colspan="1">宽X高</th>
                <th style="width: 8%;">数量</th>
                <th style="width: 10%;">面积</th>
                <th style="width: 10%;">单价</th>
                <th style="width: 8%;">单价</th>
                <th style="width: 12%;">金额</th>
                <th style="width: 18%;" colspan="2">加工要求</th>
                <th style="width: 12%;" >加工要求</th>
                <th style="width: 12%;">备注</th>
              </tr>
@@ -236,7 +237,8 @@
                <td>{{items.area}}</td>
                <td>{{items.price}}</td>
                <td>{{items.money}}</td>
                <td colspan="2">{{items.processingNote}}</td>
                <td>{{items.processingNote}}</td>
                <td>{{items.remarks}}</td>
              </tr>
              <tr class="day-in" >
                <td style="font-size: 15px;" colspan="4">小计:</td>
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue
@@ -151,7 +151,8 @@
                <th style="width: 20%;" colspan="2">宽X高</th>
                <th style="width: 10%;">数量</th>
                <th style="width: 10%;">面积</th>
                <th style="width: 32%;" colspan="3">加工要求</th>
                <th style="width: 22%;" colspan="2">加工要求</th>
                <th style="width: 12%;">备注</th>
              </tr>
@@ -176,7 +177,8 @@
                </td>
                <td>{{items.quantity}}</td>
                <td>{{items.area}}</td>
                <td colspan="3">{{items.processingNote}}</td>
                <td colspan="2">{{items.processingNote}}</td>
                <td>{{items.remarks}}</td>
              </tr>
              <tr class="day-in" >
                <td style="font-size: 15px;" colspan="5">小计:</td>
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java
@@ -68,6 +68,9 @@
    private Integer importNumber;
    //订单转移导出数量
    private Integer exportNumber;
    //终止数量
    private Integer terminationQuantity;
    //连线状态(0不连线1连线,默认1,添加时间
    private Integer onlineStatus;
    //建立时间
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ReportingWorkDetailMapper.java
@@ -28,4 +28,6 @@
    Integer selectInventory(@Param("processId") String processId, @Param("orderNumber") Integer orderNumber, @Param("technologyNumber") Integer technologyNumber, String thisProcess);
    String getGlassPliesCount(String reportingWorkId);
    int selectFinishQuantity(String reportingWorkId);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -1728,6 +1728,38 @@
                                JSONObject.toJSONString(stringRedisTemplate.opsForHash().entries(detailKey))
                                , ReportingWorkDetail.class
                        );
                        //判断流程卡是否报满
                        FlowCard flowCard = flowCardMapper.selectOne(new LambdaQueryWrapper<FlowCard>()
                                .eq(FlowCard::getProcessId, reportingWork.getProcessId())
                                .eq(FlowCard::getOrderNumber, reportingWorkDetail.getOrderNumber())
                                .eq(FlowCard::getTechnologyNumber, reportingWorkDetail.getTechnologyNumber())
                        );
                        //生产数量= 流程卡数量-终止数量
                        int flowCardReportingWorkNum = flowCard.getQuantity()-flowCard.getTerminationQuantity();
                        OrderProcessDetail orderProcessDetail = orderProcessDetailMapper
                                .selectOne(new LambdaQueryWrapper<OrderProcessDetail>()
                                        .eq(OrderProcessDetail::getProcessId, reportingWork.getProcessId())
                                        .eq(OrderProcessDetail::getOrderNumber, reportingWorkDetail.getOrderNumber())
                                        .eq(OrderProcessDetail::getTechnologyNumber, reportingWorkDetail.getTechnologyNumber())
                                        .eq(OrderProcessDetail::getProcess, reportingWork.getThisProcess())
                                );
                        //报工数量
                        int completedQuantity = reportingWorkDetail.getCompletedQuantity();
                        //已报数量
                        int finishReportingWorkNum =  orderProcessDetail.getReportingWorkNum();
                        //若报工数量+已报数量>流程卡数量 则报工数量为流程卡数量-已报数量
                        if((completedQuantity+finishReportingWorkNum)>flowCardReportingWorkNum){
                            completedQuantity = flowCardReportingWorkNum - finishReportingWorkNum;
                            reportingWorkDetail.setCompletedQuantity(completedQuantity);
                            //若报工数量小于0 则报工数量为0
                            if(completedQuantity<0){
                                reportingWorkDetail.setCompletedQuantity(0);
                            }
                        }
                        reportingWorkDetail.setReportingWorkId(reportingWorkId);
                        reportingWorkDetailMapper.insert(reportingWorkDetail);
@@ -1743,8 +1775,18 @@
                        orderProcessDetailMapper.update(null, updateWrapper);
                    });
                    //获取完工明细数量总和
                    int num   = reportingWorkDetailMapper.selectFinishQuantity(reportingWorkId);
                    reportingWorkMapper.update(null,
                            new LambdaUpdateWrapper<ReportingWork>()
                                    .eq(ReportingWork::getReportingWorkId, reportingWorkId)
                                    .setSql("this_completed_quantity = " + num)
                    );
                }
            });
        }
        Set<String> uploadKeys = stringRedisTemplate.keys("upload:reportingWork:*");
north-glass-erp/src/main/resources/mapper/pp/ReportingWorkDetail.xml
@@ -268,4 +268,12 @@
    </select>
    <select id="selectFinishQuantity">
      select sum(a.completed_quantity) from (Select completed_quantity
        from pp.reporting_work_detail
        where reporting_work_id = #{reportingWorkId}
        group by order_number) a
    </select>
</mapper>