chenlu
2024-02-22 5e6e399169e41222d71cd21b9b7c667c5690326a
提交拉取
8个文件已修改
313 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/FolwCard.xml 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -21,7 +21,15 @@
      break
    }
    case 'setType': {
      alert('我接收到子组件传送的删除信息')
      request.post(`/processCard/updateLayoutStatus/${row.processId}`).then((res) => {
        if (res.code == 200) {
          ElMessage.success("排版成功")
          location.reload();
        } else {
          console.log(res.code)
          ElMessage.warning(res.msg)
        }
      })
      break
    }
    case 'delete': {
@@ -222,15 +230,15 @@
    {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    {title: '操作', width: 140, slots: { default: 'button_slot' },fixed:"left"},
    { type: 'seq',fixed:"left", title: '自序', width: 50 },
    {field: 'orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
    {field: 'processId', width: 130, title: '流程卡号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.project', title: '项目名称', sortable: true,showOverflow:"ellipsis"},
    {field: 'binningQuantity', title: '数量', sortable: true},
    {field: 'orderDetail.computeGrossArea', title: '面积', sortable: true},
    {field: 'founder', title: '分架员', sortable: true},
    {field: 'orderDetail.processingNote', title: '加工要求', sortable: true}
    {field: 'orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, },
    {field: 'processId', width: 130, title: '流程卡号' ,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId', title: '产品编号' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, },
    {field: 'order.project', title: '项目名称' ,showOverflow:"ellipsis"},
    {field: 'binningQuantity', title: '数量', },
    {field: 'orderDetail.computeGrossArea', title: '面积', },
    {field: 'founder', title: '分架员', },
    {field: 'orderDetail.processingNote', title: '加工要求', }
  ],//表头按钮
  toolbarConfig: {
@@ -238,8 +246,8 @@
    //
    // }],
    import: false,
    export: true,
    print: true,
    // export: true,
    // print: true,
    zoom: true,
    custom: true
  },
@@ -283,7 +291,11 @@
        />
          
        <el-button type="primary">查询</el-button>
        <el-button
            @click="getWorkOrder"
            id="select"
            type="primary" :icon="Search">查询
        </el-button>
      </el-row>
    </div>
north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue
@@ -115,11 +115,9 @@
    filterData.value[column.property] = value
  }
//获取选中时间
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  request.post(`/processCard/selectAddProcess/${startTime}/${endTime}`, filterData.value).then((res) => {
  request.post(`/processCard/detailsSelect/${id}`, filterData.value).then((res) => {
    if (res.code == 200) {
      pageTotal.value = res.data.total
@@ -173,12 +171,12 @@
    {title: '操作', width: 80, slots: { default: 'button_slot' },fixed:"left"},
    { type: 'seq',fixed:"left", title: '自序', width: 50 },
    {field: 'orderId',  title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, },
    {field: 'orderGlassDetail.productionId', title: '生产订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderDetail.quantity', title: '总数量', sortable: true,showOverflow:"ellipsis"},
    {field: 'orderDetail.computeGrossArea', title: '总面积', sortable: true},
    {field: 'orderDetail.perimeter', title: '周长', sortable: true},
    {field: 'productionId', title: '生产订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'productId', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'quantity', title: '总数量', sortable: true,showOverflow:"ellipsis"},
    {field: 'computeGrossArea', title: '总面积', sortable: true},
    {field: 'perimeter', title: '周长', sortable: true},
  ],//表头按钮
  toolbarConfig: {
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -45,8 +45,8 @@
    public Result DetailsSelect(
            @PathVariable String orderId,
            @RequestBody FlowCard  flowCard){
        return Result.seccess(flowCardService.DetailsSelectSv(orderId,flowCard));
            @RequestBody OrderDetail  orderDetail){
        return Result.seccess(flowCardService.DetailsSelectSv(orderId,orderDetail));
    }
@@ -65,14 +65,28 @@
        }
    }
    //分架明细查询
    //修改排版状态
    @PostMapping("/updateLayoutStatus/{processId}")
    public Result updateLayoutStatus(
            @PathVariable String processId
    ){
        System.out.println(flowCardService.UpdateLayoutStatusSv(processId));
        if(flowCardService.UpdateLayoutStatusSv(processId)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"修改失败");
        }
    }
    //分架新增明细查询
    @PostMapping  ("/selectNoCard/{orderId}/{productionId}")
    public Result SelectNoCard(
            @PathVariable String orderId,
            @PathVariable String productionId,
            @RequestBody FlowCard  flowCard){
        return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,flowCard));
            @RequestBody OrderDetail orderDetail){
        return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,orderDetail));
    }
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java
@@ -20,6 +20,8 @@
    private String productionId;
    //流程卡号
    private String processId;
    //落架顺序
    private Integer landingSequence;
    //序号
    private Integer orderNumber;
    //工艺确认序号
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -18,9 +18,18 @@
    List<FlowCard> selectFlowCardMp(Date selectTime1, Date selectTime2, FlowCard flowCard);
    //分架明细查询
    List<FlowCard> DetailsSelectMp(String orderId, FlowCard flowCard);
    List<OrderDetail> DetailsSelectMp(String orderId, OrderDetail orderDetail);
    //删除工单
    Boolean DeleteFlowCardMp(String orderId, String processId);
    List<FlowCard> SelectNoCardMp(String orderId, String productionId, FlowCard flowCard);
    //分架新增明细查询
    List<OrderDetail> SelectNoCardMp(String orderId, String productionId, OrderDetail orderDetail);
    //修改排版状态
    Boolean UpdateLayoutStatusMp(String processId);
    Integer SelectLayoutStatus(String processId);
    Integer ReportingWorkCount(String processId);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -18,41 +18,69 @@
@DS("pp")
public class FlowCardService {
    @Autowired
     FlowCardMapper flowCardMapper;
    FlowCardMapper flowCardMapper;
    public Map<String, Object>  selectProcessCard(Date selectTime1, Date selectTime2, FlowCard flowCard) {
    //流程卡管理查询
    public Map<String, Object> selectProcessCard(Date selectTime1, Date selectTime2, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        //System.out.println(flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard));
        map.put("data", flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard));
        map.put("data", flowCardMapper.selectFlowCard(selectTime1, selectTime2, flowCard));
        return map;
    }
    //分架查询
    public Map<String, Object> selectAddProcess(Date selectTime1, Date selectTime2, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, flowCard));
        map.put("data", flowCardMapper.selectFlowCardMp(selectTime1, selectTime2, flowCard));
        return map;
    }
    public Map<String, Object> DetailsSelectSv(String orderId, FlowCard flowCard) {
    //分架明细查询
    public Map<String, Object> DetailsSelectSv(String orderId, OrderDetail orderDetail) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.DetailsSelectMp( orderId, flowCard));
        map.put("data", flowCardMapper.DetailsSelectMp(orderId, orderDetail));
        return map;
    }
    //删除工单
    public Boolean DeleteFlowCardSv(String orderId, String processId) {
        if (!orderId.isEmpty()&&!processId.isEmpty()){
            flowCardMapper.DeleteFlowCardMp(orderId, processId);
            return true;
        }
        else {
        if (!orderId.isEmpty() && !processId.isEmpty()) {
            Integer count=flowCardMapper.ReportingWorkCount(processId);
            if (count==0){
                flowCardMapper.DeleteFlowCardMp(orderId, processId);
                return true;
            }
            else {
                return false;
            }
        } else {
            return false;
        }
    }
    public Map<String, Object> SelectNoCardSv(String orderId, String productionId, FlowCard flowCard) {
    //分架新增明细查询
    public Map<String, Object> SelectNoCardSv(String orderId, String productionId, OrderDetail orderDetail) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.SelectNoCardMp( orderId,productionId, flowCard));
        map.put("data", flowCardMapper.SelectNoCardMp(orderId, productionId, orderDetail));
        return map;
    }
    //修改排版状态
    public Boolean UpdateLayoutStatusSv(String processId) {
        if (!processId.isEmpty()) {
            Integer Status = flowCardMapper.SelectLayoutStatus(processId);
            if (Status == 0) {
                flowCardMapper.UpdateLayoutStatusMp(processId);
            } else {
                return false;
            }
            return true;
        } else {
            return false;
        }
    }
}
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -48,6 +48,7 @@
        <result column="g_type" property="glassTypes.type"/>-->
    </resultMap>
    <!--    流程卡管理查询-->
    <select id="selectFlowCard" resultMap="flowCardMap">
        select
        a.order_Id,
@@ -62,34 +63,28 @@
        from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id
        left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
        where a.create_time between #{selectTime1} and #{selectTime2}
        <!--        <where>-->
        <!--            <if test="flowCard.orderId != null and flowCard.orderId != ''">-->
        <!--                and a.order_id regexp #{flowCard.orderId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.productionId != null and flowCard.productionId != ''">-->
        <!--                and a.process_Id regexp #{flowCard.productionId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">-->
        <!--                and c.product_id regexp #{flowCard.orderDetail.productId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">-->
        <!--                and c.product_name regexp #{flowCard.orderDetail.productName}-->
        <!--            </if>-->
                    <if test="flowCard.orderId != null and flowCard.orderId != ''">
                        and a.order_id regexp #{flowCard.orderId}
                    </if>
                    <if test="flowCard.productionId != null and flowCard.productionId != ''">
                        and a.process_Id regexp #{flowCard.productionId}
                    </if>
                    <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
                        and c.product_id regexp #{flowCard.orderDetail.productId}
                    </if>
                    <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">
                        and c.product_name regexp #{flowCard.orderDetail.productName}
                    </if>
        <!--            <if test="flowCard.order.project != null and flowCard.order.project!= ''">-->
        <!--                and b.project regexp #{flowCard.order.project}-->
        <!--            </if>-->
                    <if test="flowCard.order.project != null and flowCard.order.project!= ''">
                        and b.project regexp #{flowCard.order.project}
                    </if>
        <!--            <if test="flowCard.createTime != null and flowCard.createTime != ''">-->
        <!--                and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }-->
        <!--            </if>-->
        <!--        </where>-->
        group by a.process_Id;
    </select>
    <!--分架查询-->
    <select id="selectFlowCardMp" resultMap="flowCardMap">
        select o.order_id,
        o.customer_name,
@@ -126,6 +121,7 @@
        ;
    </select>
<!--    分架明细查询-->
    <select id="DetailsSelectMp" resultMap="flowCardMap">
        select od.order_id,
               ogd.production_id,
@@ -136,12 +132,25 @@
               od.perimeter
        from sd.order_detail as od
                 left join sd.order_glass_detail as ogd
                           on od.order_id = ogd.order_id
                           on od.order_id = ogd.order_id and od.order_number = ogd.order_number
        where od.order_id = #{orderId}
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>
        <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''">
            and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId}
        </if>
        <if test="orderDetail.productId != null and orderDetail.productId != ''">
            and od.product_id regexp #{orderDetail.productId}
        </if>
        <if test="orderDetail.productName != null and orderDetail.productName != ''">
            and od.product_name regexp #{orderDetail.productName}
        </if>
        group by od.order_id, ogd.production_id
    </select>
    <!--    删除工单-->
    <update id="DeleteFlowCardMp">
        update sd.order_detail as od left join sd.order_glass_detail as ogd
            on od.order_id = ogd.order_id and od.order_number = ogd.order_number
@@ -152,6 +161,7 @@
          and od.product_name = #{productName}
    </update>
    <!--    分架新增明细查询-->
    <select id="SelectNoCardMp" resultMap="flowCardMap">
        select
        od.order_number,
@@ -165,9 +175,9 @@
        od.weight
        from
        sd.order_detail as od
        left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id
        left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number
        left join sd.product as p on od.product_name=p.product_name
        where od.order_id=#{orderId}and ogd.production_id=#{productionId}
        where od.order_id=#{orderId}and ogd.production_id=#{productionId} and ogd.splitting_status=0
        <if test="flowCard.orderDetail.orderNumber != null and flowCard.orderDetail.orderNumber != ''">
            and od.order_number regexp #{flowCard.orderDetail.orderNumber}
        </if>
@@ -186,4 +196,25 @@
    </select>
    <!--修改排版状态-->
    <update id="UpdateLayoutStatusMp">
        update flow_card as fc
        set fc.layout_status=1
        where fc.process_id = #{processId}
    </update>
<!--    查询对应流程卡号排版状态-->
    <select id="SelectLayoutStatus">
        select fc.layout_status
        from flow_card as fc
        where fc.process_id = #{processId}
        LIMIT 1
    </select>
<!--    查询报工表内是否有对应流程卡-->
    <select id="ReportingWorkCount">
        select COUNT(rw.process_id)
        from reporting_work as rw
        where rw.process_id = #{processId}
    </select>
</mapper>
north-glass-erp/target/classes/mapper/pp/FolwCard.xml
@@ -48,6 +48,7 @@
        <result column="g_type" property="glassTypes.type"/>-->
    </resultMap>
    <!--    流程卡管理查询-->
    <select id="selectFlowCard" resultMap="flowCardMap">
        select
        a.order_Id,
@@ -62,34 +63,28 @@
        from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id
        left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
        where a.create_time between #{selectTime1} and #{selectTime2}
        <!--        <where>-->
        <!--            <if test="flowCard.orderId != null and flowCard.orderId != ''">-->
        <!--                and a.order_id regexp #{flowCard.orderId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.productionId != null and flowCard.productionId != ''">-->
        <!--                and a.process_Id regexp #{flowCard.productionId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">-->
        <!--                and c.product_id regexp #{flowCard.orderDetail.productId}-->
        <!--            </if>-->
        <!--            <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">-->
        <!--                and c.product_name regexp #{flowCard.orderDetail.productName}-->
        <!--            </if>-->
                    <if test="flowCard.orderId != null and flowCard.orderId != ''">
                        and a.order_id regexp #{flowCard.orderId}
                    </if>
                    <if test="flowCard.productionId != null and flowCard.productionId != ''">
                        and a.process_Id regexp #{flowCard.productionId}
                    </if>
                    <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
                        and c.product_id regexp #{flowCard.orderDetail.productId}
                    </if>
                    <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">
                        and c.product_name regexp #{flowCard.orderDetail.productName}
                    </if>
        <!--            <if test="flowCard.order.project != null and flowCard.order.project!= ''">-->
        <!--                and b.project regexp #{flowCard.order.project}-->
        <!--            </if>-->
                    <if test="flowCard.order.project != null and flowCard.order.project!= ''">
                        and b.project regexp #{flowCard.order.project}
                    </if>
        <!--            <if test="flowCard.createTime != null and flowCard.createTime != ''">-->
        <!--                and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }-->
        <!--            </if>-->
        <!--        </where>-->
        group by a.process_Id;
    </select>
    <!--分架查询-->
    <select id="selectFlowCardMp" resultMap="flowCardMap">
        select o.order_id,
        o.customer_name,
@@ -126,6 +121,7 @@
        ;
    </select>
<!--    分架明细查询-->
    <select id="DetailsSelectMp" resultMap="flowCardMap">
        select od.order_id,
               ogd.production_id,
@@ -136,12 +132,25 @@
               od.perimeter
        from sd.order_detail as od
                 left join sd.order_glass_detail as ogd
                           on od.order_id = ogd.order_id
                           on od.order_id = ogd.order_id and od.order_number = ogd.order_number
        where od.order_id = #{orderId}
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>
        <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''">
            and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId}
        </if>
        <if test="orderDetail.productId != null and orderDetail.productId != ''">
            and od.product_id regexp #{orderDetail.productId}
        </if>
        <if test="orderDetail.productName != null and orderDetail.productName != ''">
            and od.product_name regexp #{orderDetail.productName}
        </if>
        group by od.order_id, ogd.production_id
    </select>
    <!--    删除工单-->
    <update id="DeleteFlowCardMp">
        update sd.order_detail as od left join sd.order_glass_detail as ogd
            on od.order_id = ogd.order_id and od.order_number = ogd.order_number
@@ -152,6 +161,7 @@
          and od.product_name = #{productName}
    </update>
    <!--    分架新增明细查询-->
    <select id="SelectNoCardMp" resultMap="flowCardMap">
        select
        od.order_number,
@@ -165,9 +175,9 @@
        od.weight
        from
        sd.order_detail as od
        left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id
        left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number
        left join sd.product as p on od.product_name=p.product_name
        where od.order_id=#{orderId}and ogd.production_id=#{productionId}
        where od.order_id=#{orderId}and ogd.production_id=#{productionId} and ogd.splitting_status=0
        <if test="flowCard.orderDetail.orderNumber != null and flowCard.orderDetail.orderNumber != ''">
            and od.order_number regexp #{flowCard.orderDetail.orderNumber}
        </if>
@@ -186,4 +196,25 @@
    </select>
    <!--修改排版状态-->
    <update id="UpdateLayoutStatusMp">
        update flow_card as fc
        set fc.layout_status=1
        where fc.process_id = #{processId}
    </update>
<!--    查询对应流程卡号排版状态-->
    <select id="SelectLayoutStatus">
        select fc.layout_status
        from flow_card as fc
        where fc.process_id = #{processId}
        LIMIT 1
    </select>
<!--    查询报工表内是否有对应流程卡-->
    <select id="ReportingWorkCount">
        select COUNT(rw.process_id)
        from reporting_work as rw
        where rw.process_id = #{processId}
    </select>
</mapper>