chenlu
2024-03-07 ba78a4af86a2916ecec4a92bfef6bc4f5a4e6d8e
排产删除、审核,修改代码格式
19个文件已修改
497 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/ProcessCard.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/WorkOrderMapper.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/FolwCard.xml 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/ProductionScheduling.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/WordOrder.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -167,12 +167,12 @@
    {type: 'checkbox', fixed: "left", title: '选择'},
    {field: 'orderNumber', title: '订序', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'shape', title: '形状', showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'width', title: '宽', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'height', title: '高', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'baiscQuantity', title: '待分数量', showOverflow: "ellipsis"},
    {field: 'computeGrossArea', title: '待分面积'},
    {field: 'totalThickness', title: '总厚度'},
    {field: 'thickness', title: '玻璃厚度'},
    {field: 'width', title: '宽', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged,width:'60px'},
    {field: 'height', title: '高', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged,width:'60px'},
    {field: 'baiscQuantity', title: '待分数量', showOverflow: "ellipsis",width:'60px'},
    {field: 'computeGrossArea', title: '待分面积',width:'60px'},
    {field: 'totalThickness', title: '总厚度',width:'80px'},
    {field: 'thickness', title: '玻璃厚度',width:'60px'},
    {field: 'weight', title: '重量'}
  ],//表头按钮
@@ -475,12 +475,11 @@
              if (res.code == 200) {
                ElMessage.success("保存成功")
                //router.push('/main/processCard/SplittingDetails?orderId=${orderId}')
                router.push({path: '/main/processCard/SplittingDetails', query: {orderId: orderId}})
                  router.push({path: '/main/processCard/AddProcessCard', query: {orderId: orderId,productionId:productionId,random:Math.random()}})
                //location.reload();
              } else {
                ElMessage.warning(res.msg)
                router.push("/login")
              }
            })
@@ -497,10 +496,10 @@
</script>
<template>
  <div>
  <div style="width: 100%;height: 100%">
    <div class="common-layout" style="height: 100%">
      <div class="header">
    <div class="common-layout" style="width: 100%;height: 100%">
      <div class="header" style="height: 5%;width: 100%">
        <el-button
            style="float: left"
@@ -517,8 +516,8 @@
        </div>
      </div>
      <el-container height="600px">
        <el-aside width="44%" >
      <el-container style="height: 100%;width: 100%">
        <el-aside style="width: 44%;height: 100%" >
          <vxe-grid
              max-height="100%"
              class="mytable-scrollbar"
@@ -560,22 +559,27 @@
        </el-aside>
        <el-main width="12%" style="">
          <span>选中数量:<el-input type="number" v-model="checkedNum"></el-input></span><br>
          <el-button type="primary" @click="addRight"> →</el-button>
          <br>
          <br>
          <el-button type="primary" @click="addLeft"> ←</el-button>
          <br>
          <br>
          <el-button @click="createProcessCard" type="primary">建立流程卡</el-button>
        </el-main>
        <div width="12%">
          <el-main  style="">
            <span>选中数量:<el-input type="number" v-model="checkedNum"></el-input></span><br>
            <el-button type="primary" @click="addRight"> →</el-button>
            <br>
            <br>
            <el-button type="primary" @click="addLeft"> ←</el-button>
            <br>
            <br>
            <el-button @click="createProcessCard" type="primary">建立流程卡</el-button>
          </el-main>
        </div>
<!--        右侧-->
        <el-aside width="45%" height="500px" style="">
        <div style="height: 100%;width: 100%">
        <el-aside style="width: 100%;height: 100%">
          <vxe-grid
              max-height="97%"
              max-height="100%"
              class="mytable-scrollbar"
              ref="xGrid"
              v-bind="gridOptions"
@@ -605,6 +609,7 @@
            </template>
          </vxe-grid>
        </el-aside>
        </div>
      </el-container>
    </div>
  </div>
north-glass-erp/northglass-erp/src/views/pp/processCard/ProcessCard.vue
@@ -4,10 +4,10 @@
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router";
import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router";
import  GlassType from '@/components/basic/product/GlassType.vue'
const route = useRoute()
const router = useRouter()
let indexFlag=$ref(1)
function changeRouter(index){
@@ -27,7 +27,7 @@
    </div>
    <div id="main-body">
      <router-view  />
      <router-view :key="route.fullPath"  />
    </div>
  </div>
</template>
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
@@ -149,6 +149,8 @@
//点击时查询
const getWorkOrder = () => {
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  let selectProcesses = value.value
  let selectState = stateValue.value
  let inputVal = form.orderId
@@ -169,13 +171,15 @@
        //禁用删除、保存按钮
        gridOptions.toolbarConfig.buttons[0].disabled = true
        gridOptions.toolbarConfig.buttons[1].disabled = true
        //启用保存
        gridOptions.toolbarConfig.buttons[2].disabled = false
      } else {
        ElMessage.warning(res.msg)
      }
    })
  } else if (inputVal != null && selectState == 1) {
    //根据订单号查询未排产数据
    //根据工序查询未排产数据
    request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
      if (res.code == 200) {
        pageTotal.value = res.data.total
@@ -184,12 +188,15 @@
        //禁用删除、保存按钮
        gridOptions.toolbarConfig.buttons[0].disabled = true
        gridOptions.toolbarConfig.buttons[1].disabled = true
        //启用保存
        gridOptions.toolbarConfig.buttons[2].disabled = false
      } else {
        ElMessage.warning(res.msg)
      }
    })
  } else if (inputVal == null && selectState == 2) {
    //根据时间查询已排产数据
    console.log(startTime, endTime, selectProcesses, selectState)
    request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
      if (res.code == 200) {
        pageTotal.value = res.data.total
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -119,12 +119,18 @@
form.date1=getNowTime()
let startTime = form.date1[0]
let endTime = form.date1[1]
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 100
})
//第一次加载数据
request.post(`/processCard/flowCard/${startTime}/${endTime}`, filterData.value).then((res) => {
request.post(`/processCard/flowCard/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => {
  if (res.code == 200) {
    total.dataTotal = res.data.total.total*1
    total.pageTotal= res.data.total.pageTotal
    pageTotal.value = res.data.total
    produceList = produceList.value.concat(deepClone(res.data.data))
    xGrid.value.reloadData(produceList)
@@ -149,6 +155,13 @@
      ElMessage.warning(res.msg)
    }
  })
}
//页脚跳转
const handlePageChange = ({ currentPage, pageSize }) => {
  pageNum.value=currentPage
  total.pageTotal    = pageSize
  selectOrderList()
}
/*使用筛选,后端获取数据*/
@@ -255,15 +268,14 @@
  ],//table body实际数据
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['总数量','总面积','分箱数']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        return ''
      })
    ]
@@ -333,7 +345,19 @@
          </div>
        </div>
      </template>
      <template #pager>
        <!--使用 pager 插槽-->
        <!--        'PrevJump','NextJump', -->
        <vxe-pager
            @page-change="handlePageChange"
            :layouts="[  'PrevPage', 'Jump','PageCount', 'NextPage',  'Total']"
            v-model:current-page="pageNum"
            v-model:page-size="total.pageSize"
            v-model:pager-count="total.pageTotal"
            :total="total.dataTotal"
        >
        </vxe-pager>
      </template>
    </vxe-grid>
  </div>
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -8,6 +8,8 @@
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.pp.FlowCardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -15,24 +17,29 @@
import java.util.Map;
@RestController
@Api(value="流程卡controller",tags={"流程卡操作接口"})
@RequestMapping("/processCard")
public class ProcessCardController {
    @Autowired
    FlowCardService flowCardService;
    //流程卡管理查询
    @PostMapping  ("/flowCard/{selectTime1}/{selectTime2}")
    public Result DateProcess(
    @ApiOperation("流程卡管理查询接口")
    @PostMapping  ("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}")
    public Result dateProcess(
            @PathVariable Integer pageNum,
            @PathVariable Integer pageSize,
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @RequestBody FlowCard  flowCard){
        return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard));
        return Result.seccess(flowCardService.selectProcessCard(pageNum,pageSize,selectTime1,selectTime2,flowCard));
        
    }
    //分架查询
    @ApiOperation("分架查询接口")
    @PostMapping  ("/selectAddProcess/{selectTime1}/{selectTime2}")
    public Result SelectAddProcess(
    public Result selectAddProcess(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @RequestBody FlowCard  flowCard){
@@ -41,23 +48,25 @@
    }
    //分架明细查询
    @ApiOperation("分架明细查询接口")
    @PostMapping  ("/detailsSelect/{orderId}")
    public Result DetailsSelect(
    public Result detailsSelect(
            @PathVariable String orderId,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.DetailsSelectSv(orderId,flowCard));
        return Result.seccess(flowCardService.detailsSelectSv(orderId,flowCard));
    }
    //删除工单
    @ApiOperation("删除工单接口")
    @PostMapping("/deleteFlowCard/{orderId}/{processId}")
    public Result deleteOrderWork(
            @PathVariable String orderId,
            @PathVariable String processId
    ){
        if(flowCardService.DeleteFlowCardSv(orderId,processId)){
        if(flowCardService.deleteFlowCardSv(orderId,processId)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"删除失败");
@@ -66,11 +75,12 @@
    }
    //修改排版状态
    @ApiOperation("修改排版状态接口")
    @PostMapping("/updateLayoutStatus/{processId}")
    public Result updateLayoutStatus(
            @PathVariable String processId
    ){
        if(flowCardService.UpdateLayoutStatusSv(processId)){
        if(flowCardService.updateLayoutStatusSv(processId)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"修改失败");
@@ -79,19 +89,21 @@
    }
    //分架新增明细查询
    @ApiOperation("分架明细新增接口")
    @PostMapping  ("/selectNoCard/{orderId}/{productionId}")
    public Result SelectNoCard(
            @PathVariable String orderId,
            @PathVariable String productionId,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,flowCard));
        return Result.seccess(flowCardService.selectNoCardSv(orderId,productionId,flowCard));
    }
    //添加流程卡
    @ApiOperation("流程卡创建接口")
    @PostMapping("/addFlowCard")
    public Result AddOrderWork( @RequestBody Map<String,Object> object){
        if(flowCardService.AddFlowCardSv(object)){
        if(flowCardService.addFlowCardSv(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"保存失败");
@@ -99,7 +111,8 @@
        }
    }
    //查询第一次排版数据
    //查询第一次排产数据
    @ApiOperation("排产界面加载查询接口")
    @PostMapping  ("/selectLastScheduling/{selectTime1}/{selectTime2}")
    public Result selectLastScheduling(
            @PathVariable String selectTime1,
@@ -108,7 +121,8 @@
        return Result.seccess(flowCardService.selectLastScheduling(selectTime1,selectTime2,flowCard));
    }
    //查询排版数据
    //查询排产数据
    @ApiOperation("排产点击按钮查询接口")
    @PostMapping  ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
    public Result selectScheduling(
            @PathVariable String selectTime1,
@@ -117,7 +131,7 @@
            @PathVariable String processes,
            @PathVariable Integer state,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.SelectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard));
        return Result.seccess(flowCardService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard));
    }
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java
@@ -41,14 +41,14 @@
    //点击查询排版数据(带订单号查询)
    @PostMapping  ("/selectSchedulingNot/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
    public Result SelectSchedulingNot(
    public Result selectSchedulingNot(
            @PathVariable String selectTime1,
            @PathVariable String selectTime2,
            @PathVariable String orderId,
            @PathVariable String processes,
            @PathVariable Integer state,
            @RequestBody ProductionScheduling productionScheduling){
        return Result.seccess(productionSchedulingService.SelectSchedulingNotSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling));
        return Result.seccess(productionSchedulingService.selectSchedulingNotSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling));
    }
@@ -66,9 +66,9 @@
    //删除排产数据
    @PostMapping("/deleteScheduling")
    public Result DeleteScheduling( @RequestBody Map<String,Object>  object) throws Exception{
    public Result deleteScheduling( @RequestBody Map<String,Object>  object) throws Exception{
        if(productionSchedulingService.DeleteSchedulingSv(object)){
        if(productionSchedulingService.deleteSchedulingSv(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"删除失败");
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java
@@ -20,7 +20,7 @@
    //查询工单
    @PostMapping  ("/orderGlassDetail/{selectTime1}/{selectTime2}/{state}")
    public Result DateWork(
    public Result dateWork(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @PathVariable Integer state,
@@ -31,19 +31,19 @@
    //转生产订单查询
    @PostMapping  ("/addWork/{orderId}")
    public Result AddWork(
    public Result addWork(
            @PathVariable String orderId,
            @RequestBody OrderDetail orderDetail){
        return Result.seccess(workOrderService.AddDateWork(orderId,orderDetail));
        return Result.seccess(workOrderService.addDateWork(orderId,orderDetail));
    }
    //添加工单
    @PostMapping("/addOrderWork")
    public Result AddOrderWork( @RequestBody Map<String,Object>  object){
    public Result addOrderWork( @RequestBody Map<String,Object>  object){
        if(workOrderService.AddOrderWorkSv(object)){
        if(workOrderService.addOrderWorkSv(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"保存失败");
@@ -57,7 +57,7 @@
            @PathVariable String orderId,
            @PathVariable String productName
    ){
        if(workOrderService.DeleteOrderWorkSv(orderId,productName)){
        if(workOrderService.deleteOrderWorkSv(orderId,productName)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"删除失败");
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -13,45 +13,50 @@
@Mapper
public interface FlowCardMapper {
    //流程卡管理查询
    List<FlowCard> selectFlowCard(Date selectTime1, Date selectTime2,FlowCard flowCard);
    List<FlowCard> selectFlowCard(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard);
    //分页查询
    Map<String, Integer> getPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard);
    //分架数据查询
    List<FlowCard> selectFlowCardMp(Date selectTime1, Date selectTime2, FlowCard flowCard);
    //分架明细查询
    List<FlowCard> DetailsSelectMp(String orderId, FlowCard flowCard);
    List<FlowCard> detailsSelectMp(String orderId, FlowCard flowCard);
    //删除流程卡
    Boolean DeleteFlowCardMp(String orderId, String processId);
    Boolean deleteFlowCardMp(String orderId, String processId);
    //分架新增明细查询
    List<Map<String,String>> SelectNoCardMp(String orderId, String productionId, FlowCard flowCard);
    List<Map<String, String>> selectNoCardMp(String orderId, String productionId, FlowCard flowCard);
    //修改排版状态
    Boolean UpdateLayoutStatusMp(String processId);
    Boolean updateLayoutStatusMp(String processId);
    Integer SelectLayoutStatus(String processId);
    Integer selectLayoutStatus(String processId);
    //查询报工表内是否存在对应流程卡的数据
    Integer ReportingWorkCount(String processId);
    Integer reportingWorkCount(String processId);
    //插入Flow_card表
    Boolean AddFlowCardMp(String processId, Integer orderNumber, Integer landingSequence, Integer quantity, String productionId, String userName,Integer layer);
    Boolean addFlowCardMp(String processId, Integer orderNumber, Integer landingSequence, Integer quantity, String productionId, String userName, Integer layer);
    Boolean UpdateFlowState(String productionId, Integer orderNumber);
    Boolean updateFlowState(String productionId, Integer orderNumber);
    Integer SelectFlowCount(String productionId);
    Integer selectFlowCount(String productionId);
    Boolean UpdateProcessingCard(String productionId, int state);
    Boolean updateProcessingCard(String productionId, int state);
    Boolean UpdateDeleteState(String orderId, String processId);
    Boolean updateDeleteState(String orderId, String processId);
    List<FlowCard> SelectOkSchedulingMp(String selectTime1, String selectTime2, String orderId,String processes, FlowCard flowCard);
    List<FlowCard> selectOkSchedulingMp(String selectTime1, String selectTime2, String orderId, String processes, FlowCard flowCard);
    List<FlowCard> SelectNoSchedulingMp(String selectTime1, String selectTime2, String orderId,String processes, FlowCard flowCard);
    List<FlowCard> selectNoSchedulingMp(String selectTime1, String selectTime2, String orderId, String processes, FlowCard flowCard);
    List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2, FlowCard flowCard);
    List<Map<String, String>> selectLastSchedulingMp(String selectTime1, String selectTime2, FlowCard flowCard);
    Integer SelectLayer(String productionId, Integer orderNumber);
    Integer selectLayer(String productionId, Integer orderNumber);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java
@@ -19,11 +19,13 @@
    List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2, ProductionScheduling productionScheduling);
    List<Map<String,String>> SelectSchedulingNotMp(String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling);
    List<Map<String,String>> selectSchedulingNotMp(String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling);
    Integer selectMaxId();
    Boolean insertSelective(String schedulingId, String orderId, String orderNumber, String processes, Integer schedulingQuantity, LocalDate scheduledStartTime, LocalDate planEndTime, String notes);
    Boolean ExamineSchedulingMp(String schedulingId, String userName);
    Boolean deleteSchedulingMp(String schedulingId);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/WorkOrderMapper.java
@@ -21,20 +21,20 @@
    List<OrderDetail> addWordOrder(String orderId, OrderDetail orderDetail);
    //转工单
    Boolean AddOrderWorkMp(String productIdVl,
    Boolean addOrderWorkMp(String productIdVl,
                           @Param("orderId") String orderId,
                           @Param("productId") Integer productId,
                           @Param("productName") String productName,
                           String userName);
    //查询对应订单号订序
    Integer SelectOrderNumber(String productIdVl);
    Integer selectOrderNumber(String productIdVl);
    //删除工单,将对应产品生产订单号改为null
    Boolean DeleteOrderWorkMp(String orderId, String productName);
    Boolean deleteOrderWorkMp(String orderId, String productName);
    Integer SelectWorkCount(String orderId);
    Integer selectWorkCount(String orderId);
    Boolean UpdateWorkType(String orderId, Integer state);
    Boolean updateWorkType(String orderId, Integer state);
    Integer SelectYesWorkCount(String orderId);
    Integer selectYesWorkCount(String orderId);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -24,10 +24,12 @@
    FlowCardMapper flowCardMapper;
    //流程卡管理查询
    public Map<String, Object> selectProcessCard(Date selectTime1, Date selectTime2, FlowCard flowCard) {
    public Map<String, Object> selectProcessCard(Integer pageNum, Integer pageSize,Date selectTime1, Date selectTime2, FlowCard flowCard) {
        Integer offset = (pageNum-1)*pageSize;
        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(offset, pageSize,selectTime1, selectTime2, flowCard));
        map.put("total",flowCardMapper.getPageTotal(offset, pageSize, selectTime1, selectTime2, flowCard));
        System.out.println(map);
        return map;
    }
@@ -39,23 +41,23 @@
    }
    //分架明细查询
    public Map<String, Object> DetailsSelectSv(String orderId, FlowCard flowCard) {
    public Map<String, Object> detailsSelectSv(String orderId, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.DetailsSelectMp(orderId, flowCard));
        map.put("data", flowCardMapper.detailsSelectMp(orderId, flowCard));
        return map;
    }
    //删除流程卡
    public Boolean DeleteFlowCardSv(String orderId, String processId) {
    public Boolean deleteFlowCardSv(String orderId, String processId) {
        if (!orderId.isEmpty() && !processId.isEmpty()) {
            Integer count = flowCardMapper.ReportingWorkCount(processId);
            Integer count = flowCardMapper.reportingWorkCount(processId);
            if (count == 0) {
                //修改订单表分架状态为1,未全部分架完成
                flowCardMapper.UpdateProcessingCard(orderId, 1);
                flowCardMapper.updateProcessingCard(orderId, 1);
                //修改分架状态
                flowCardMapper.UpdateDeleteState(orderId, processId);
                flowCardMapper.updateDeleteState(orderId, processId);
                //删除分架明细
                flowCardMapper.DeleteFlowCardMp(orderId, processId);
                flowCardMapper.deleteFlowCardMp(orderId, processId);
                return true;
            } else {
                return false;
@@ -67,20 +69,20 @@
    }
    //分架新增明细查询
    public Map<String, Object> SelectNoCardSv(String orderId, String productionId, FlowCard flowCard) {
    public Map<String, Object> selectNoCardSv(String orderId, String productionId, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.SelectNoCardMp(orderId, productionId, flowCard));
        map.put("data", flowCardMapper.selectNoCardMp(orderId, productionId, flowCard));
        return map;
    }
    //修改排版状态
    public Boolean UpdateLayoutStatusSv(String processId) {
    public Boolean updateLayoutStatusSv(String processId) {
        if (!processId.isEmpty()) {
            Integer Status = flowCardMapper.SelectLayoutStatus(processId);
            Integer Status = flowCardMapper.selectLayoutStatus(processId);
            if (Status == 1) {
                flowCardMapper.UpdateLayoutStatusMp(processId);
                flowCardMapper.updateLayoutStatusMp(processId);
            } else {
                return false;
            }
@@ -92,7 +94,7 @@
    }
    //保存流程卡数据
    public Boolean AddFlowCardSv(Map<String, Object> object) {
    public Boolean addFlowCardSv(Map<String, Object> object) {
        String userName = "";
        if (object.get("userName") != null) {
            userName = object.get("userName").toString();
@@ -107,19 +109,19 @@
        if (!FlowCardList.isEmpty()) {
            for (FlowCard flowCard : FlowCardList) {
                //查询每个序号的层数
                Integer layer = flowCardMapper.SelectLayer(productionId, flowCard.getOrderNumber());
                Integer layer = flowCardMapper.selectLayer(productionId, flowCard.getOrderNumber());
                //添加流程卡数据
                flowCardMapper.AddFlowCardMp(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getLandingSequence(), flowCard.getQuantity(), productionId, userName,layer);
                flowCardMapper.addFlowCardMp(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getLandingSequence(), flowCard.getQuantity(), productionId, userName,layer);
                //修改分架状态,将状态改为1
                flowCardMapper.UpdateFlowState(productionId, flowCard.getOrderNumber());
                flowCardMapper.updateFlowState(productionId, flowCard.getOrderNumber());
                //查询该订单未分架数量
                Integer FlowCount = flowCardMapper.SelectFlowCount(productionId);
                Integer FlowCount = flowCardMapper.selectFlowCount(productionId);
                if (FlowCount == 0) {
                    //修改订单表分架状态为2
                    flowCardMapper.UpdateProcessingCard(productionId, 2);
                    flowCardMapper.updateProcessingCard(productionId, 2);
                } else {
                    //修改订单表分架状态为1,未全部分架完成
                    flowCardMapper.UpdateProcessingCard(productionId, 1);
                    flowCardMapper.updateProcessingCard(productionId, 1);
                }
            }
            return true;
@@ -128,13 +130,13 @@
        }
    }
    public Map<String, Object> SelectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, FlowCard flowCard) {
    public Map<String, Object> selectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        if (state==2){//已排产
            map.put("data", flowCardMapper.SelectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard));
            map.put("data", flowCardMapper.selectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard));
        }else if (state==1){//未排产
            map.put("data", flowCardMapper.SelectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard));
            map.put("data", flowCardMapper.selectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard));
        }
north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
@@ -54,9 +54,9 @@
    }
    //带订单号查询
    public Map<String, Object> SelectSchedulingNotSv(String selectTime1, String selectTime2, String orderId, String processes, Integer state, ProductionScheduling productionScheduling) {
    public Map<String, Object> selectSchedulingNotSv(String selectTime1, String selectTime2, String orderId, String processes, Integer state, ProductionScheduling productionScheduling) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", productionSchedulingMapper.SelectSchedulingNotMp(selectTime1, selectTime2,orderId,processes, productionScheduling));
        map.put("data", productionSchedulingMapper.selectSchedulingNotMp(selectTime1, selectTime2,orderId,processes, productionScheduling));
        return map;
    }
@@ -94,11 +94,19 @@
    }
    public boolean DeleteSchedulingSv(Map<String, Object> object) throws Exception {
    public boolean deleteSchedulingSv(Map<String, Object> object) throws Exception {
        JSONObject objJson = new JSONObject(object);
        List<ProductionScheduling> Scheduling = JSONArray.parseArray(JSONObject.toJSONString(objJson.get("scheduling")), ProductionScheduling.class);
        productionSchedulingMapper.delete(new LambdaQueryWrapper<ProductionScheduling>().eq(ProductionScheduling::getSchedulingId, Scheduling.get(0).getId()));
        return true;
        if (!Scheduling.isEmpty()) {
            for (ProductionScheduling productionScheduling : Scheduling) {
                productionSchedulingMapper.deleteSchedulingMp(productionScheduling.getSchedulingId());
                // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId());
            }
            return true;
        }
        else {
            return false;
        }
    }
    public boolean ExamineSchedulingSv(Map<String, Object> object) {
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java
@@ -34,14 +34,14 @@
        return map;
    }
    public Map<String, Object> AddDateWork(String orderId, OrderDetail orderDetail) {
    public Map<String, Object> addDateWork(String orderId, OrderDetail orderDetail) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", workOrderMapper.addWordOrder(orderId, orderDetail));
        return map;
    }
    public Boolean AddOrderWorkSv(Map<String, Object> object) {
    public Boolean addOrderWorkSv(Map<String, Object> object) {
        String userName = "";
        if (object.get("userName") != null) {
            userName = object.get("userName").toString();
@@ -65,7 +65,7 @@
                    productIdVl = orderID + letters;
                    //查询生成的生产订单号是否存在
                    Integer workCount = workOrderMapper.SelectOrderNumber(productIdVl);
                    Integer workCount = workOrderMapper.selectOrderNumber(productIdVl);
                    if (workCount < 1 ) {
                        break;
                    }
@@ -73,16 +73,16 @@
                }
                //添加生产订单
                workOrderMapper.AddOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(), userName);
                workOrderMapper.addOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(), userName);
                Integer State = 2;
                Integer States = 1;
                //查询该订单未转生产订单的条数
                Integer NoWorkCount = workOrderMapper.SelectWorkCount(orderDetail.getOrderId());
                Integer NoWorkCount = workOrderMapper.selectWorkCount(orderDetail.getOrderId());
                if (NoWorkCount == 0) {
                    //条数为0修改转生产订单状态为2,否则为1
                    workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), State);
                    workOrderMapper.updateWorkType(orderDetail.getOrderId(), State);
                } else {
                    workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), States);
                    workOrderMapper.updateWorkType(orderDetail.getOrderId(), States);
                }
            }
@@ -93,17 +93,17 @@
    }
    public Boolean DeleteOrderWorkSv(String orderId, String productName) {
    public Boolean deleteOrderWorkSv(String orderId, String productName) {
        if (!orderId.isEmpty() && !productName.isEmpty()) {
            workOrderMapper.DeleteOrderWorkMp(orderId, productName);
            workOrderMapper.deleteOrderWorkMp(orderId, productName);
            Integer State = 0;
            Integer States = 1;
            Integer NoWorkCount = workOrderMapper.SelectWorkCount(orderId);
            Integer YesWorkCount = workOrderMapper.SelectYesWorkCount(orderId);
            Integer NoWorkCount = workOrderMapper.selectWorkCount(orderId);
            Integer YesWorkCount = workOrderMapper.selectYesWorkCount(orderId);
            if (NoWorkCount ==YesWorkCount) {
                workOrderMapper.UpdateWorkType(orderId, State);
                workOrderMapper.updateWorkType(orderId, State);
            } else {
                workOrderMapper.UpdateWorkType(orderId, States);
                workOrderMapper.updateWorkType(orderId, States);
            }
            return true;
        } else {
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -81,7 +81,38 @@
                    </if>
        group by a.process_Id;
        group by a.process_Id
        ORDER BY a.id desc
        limit #{offset},#{pageSize};
    </select>
    <select id="getPageTotal">
        select
        CEILING(count(a.process_Id)/#{pageSize}) as 'pageTotal',
        count(distinct a.process_Id) as 'total'
        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}
        <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>
        limit #{offset},#{pageSize};
    </select>
    <!--分架查询-->
@@ -132,7 +163,7 @@
    </select>
<!--    分架明细查询-->
    <select id="DetailsSelectMp" resultMap="flowCardMap">
    <select id="detailsSelectMp" resultMap="flowCardMap">
        select od.order_id,
        ogd.production_id,
        od.product_id,
@@ -159,7 +190,7 @@
    </select>
    <!--    更新分架状态-->
    <update id="UpdateDeleteState">
    <update id="updateDeleteState">
        update
            sd.order_glass_detail as ogd left join flow_card as fc
                on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number
@@ -169,14 +200,14 @@
    </update>
    <!--    删除流程卡-->
    <update id="DeleteFlowCardMp">
    <update id="deleteFlowCardMp">
        delete from flow_card as fc where fc.process_id=#{processId}
    </update>
    <!--    分架新增明细查询-->
    <!--resultMap="flowCardMap"-->
    <select id="SelectNoCardMp" >
    <select id="selectNoCardMp" >
        select
        od.order_number,
@@ -203,14 +234,14 @@
    </select>
    <!--修改排版状态-->
    <update id="UpdateLayoutStatusMp">
    <update id="updateLayoutStatusMp">
        update flow_card as fc
        set fc.layout_status=2
        where fc.process_id = #{processId}
    </update>
<!--    查询对应流程卡号排版状态-->
    <select id="SelectLayoutStatus">
    <select id="selectLayoutStatus">
        select fc.layout_status
        from flow_card as fc
        where fc.process_id = #{processId}
@@ -218,13 +249,13 @@
    </select>
<!--    查询报工表内是否有对应流程卡-->
    <select id="ReportingWorkCount">
    <select id="reportingWorkCount">
        select COUNT(rw.process_id)
        from reporting_work as rw
        where rw.process_id = #{processId}
    </select>
<!--    插入Flow_card表-->
    <insert id="AddFlowCardMp">
    <insert id="addFlowCardMp">
        insert into
            flow_card (
            order_id,
@@ -260,27 +291,27 @@
    </insert>
<!--    更新分架状态-->
    <update id="UpdateFlowState">
    <update id="updateFlowState">
        update sd.order_glass_detail as ogd
        set ogd.splitting_status=1
        where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber}
    </update>
<!--    查询未分架的条数-->
    <select id="SelectFlowCount">
    <select id="selectFlowCount">
        select COUNT(*)
        from sd.order_glass_detail as ogd
        where ogd.order_id = left(#{productionId},10)
          and ogd.splitting_status = 0
    </select>
<!--   修改订单表分架状态-->
    <update id="UpdateProcessingCard">
    <update id="updateProcessingCard">
        update sd.`order` as o
        set o.processing_card=#{state}
        where o.order_id=left(#{productionId},10)
    </update>
<!--    查询已排版数据-->
    <select id="SelectOkSchedulingMp">
    <select id="selectOkSchedulingMp">
        select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
               round(od.width*od.height*od.quantity/1000000,2),
               (od.quantity-IFNULL(ps.scheduling_quantity,0)),
@@ -294,7 +325,7 @@
    </select>
<!--    查询未排版数据-->
    <select id="SelectNoSchedulingMp">
    <select id="selectNoSchedulingMp">
    </select>
<!--    首次查询排版数据-->
@@ -312,7 +343,7 @@
    </select>
<!--   查询对应序号的层数-->
    <select id="SelectLayer">
    <select id="selectLayer">
        select COUNT(ogd.order_number)
        from sd.order_glass_detail as ogd
        where ogd.production_id = #{productionId}
north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
@@ -8,6 +8,7 @@
        <result column="scheduling_quantity" property="schedulingQuantity"/>
        <result column="order_number" property="orderNumber"/>
        <result column="scheduling_id" property="schedulingId"/>
        <result column="order_id" property="orderId"/>
        <!--接收其他外键实体类数据-->
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="project" property="project"/>
@@ -60,14 +61,13 @@
            left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where  ps.scheduling_id IS NOT NULL
           and od.create_time between #{selectTime1} and #{selectTime2}
          and position(#{processes} in ps.processes)
          and position(#{orderId} in ps.order_id)
    </select>
    <!--    查询已排产带订单编号的数据-->
    <select id="SelectSchedulingNotMp">
    <select id="selectSchedulingNotMp">
        select date(ps.scheduled_start_time) as scheduled_start_time,
        date(ps.plan_end_time) as plan_end_time,
        od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
@@ -108,14 +108,15 @@
    <select id="selectLastSchedulingMp">
        select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
               round(od.width*od.height*od.quantity/1000000,2) as area,
               (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity,
               round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea,
               IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity,
               round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea,
               (od.quantity-IFNULL(sum(ps.scheduling_quantity),0)) as pendingProductionQuantity,
               round(od.width*od.height*(od.quantity-IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as pendingProductionArea,
               IFNULL(sum(ps.scheduling_quantity),0) as productionScheduledQuantity,
               round(od.width*od.height*(IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as productionScheduledArea,
               od.product_name,od.shape
        from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
                                   left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0
        group by od.order_id,od.order_number
    </select>
    <select id="selectMaxId">
@@ -156,4 +157,8 @@
        update production_scheduling set review_status=1,reviewer=#{userName} where
        scheduling_id=#{schedulingId}
    </update>
    <delete id="deleteSchedulingMp">
        delete from production_scheduling where scheduling_id=#{schedulingId}
    </delete>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
@@ -132,13 +132,13 @@
        ;
    </select>
    <select id="SelectOrderNumber" >
    <select id="selectOrderNumber" >
        select ifnull(count(ogd.production_id),0)
        from sd.order_glass_detail as ogd
        where ogd.production_id = #{productIdVl}
    </select>
    <update id="AddOrderWorkMp" >
    <update id="addOrderWorkMp" >
        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,7 +152,7 @@
    </update>
<!--    删除工单-->
    <update id="DeleteOrderWorkMp">
    <update id="deleteOrderWorkMp">
        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
        set ogd.production_id=null,
@@ -162,20 +162,20 @@
          and od.product_name = #{productName}
    </update>
    <select id="SelectWorkCount">
    <select id="selectWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where ISNULL(production_id)
          and order_id = #{orderId}
    </select>
    <select id="SelectYesWorkCount">
    <select id="selectYesWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where  order_id = #{orderId}
    </select>
    <update id="UpdateWorkType">
    <update id="updateWorkType">
        update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId}
    </update>
</mapper>
north-glass-erp/target/classes/mapper/pp/FolwCard.xml
@@ -81,7 +81,38 @@
                    </if>
        group by a.process_Id;
        group by a.process_Id
        ORDER BY a.id desc
        limit #{offset},#{pageSize};
    </select>
    <select id="getPageTotal">
        select
        CEILING(count(a.process_Id)/#{pageSize}) as 'pageTotal',
        count(distinct a.process_Id) as 'total'
        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}
        <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>
        limit #{offset},#{pageSize};
    </select>
    <!--分架查询-->
@@ -132,7 +163,7 @@
    </select>
<!--    分架明细查询-->
    <select id="DetailsSelectMp" resultMap="flowCardMap">
    <select id="detailsSelectMp" resultMap="flowCardMap">
        select od.order_id,
        ogd.production_id,
        od.product_id,
@@ -159,7 +190,7 @@
    </select>
    <!--    更新分架状态-->
    <update id="UpdateDeleteState">
    <update id="updateDeleteState">
        update
            sd.order_glass_detail as ogd left join flow_card as fc
                on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number
@@ -169,14 +200,14 @@
    </update>
    <!--    删除流程卡-->
    <update id="DeleteFlowCardMp">
    <update id="deleteFlowCardMp">
        delete from flow_card as fc where fc.process_id=#{processId}
    </update>
    <!--    分架新增明细查询-->
    <!--resultMap="flowCardMap"-->
    <select id="SelectNoCardMp" >
    <select id="selectNoCardMp" >
        select
        od.order_number,
@@ -203,14 +234,14 @@
    </select>
    <!--修改排版状态-->
    <update id="UpdateLayoutStatusMp">
    <update id="updateLayoutStatusMp">
        update flow_card as fc
        set fc.layout_status=2
        where fc.process_id = #{processId}
    </update>
<!--    查询对应流程卡号排版状态-->
    <select id="SelectLayoutStatus">
    <select id="selectLayoutStatus">
        select fc.layout_status
        from flow_card as fc
        where fc.process_id = #{processId}
@@ -218,13 +249,13 @@
    </select>
<!--    查询报工表内是否有对应流程卡-->
    <select id="ReportingWorkCount">
    <select id="reportingWorkCount">
        select COUNT(rw.process_id)
        from reporting_work as rw
        where rw.process_id = #{processId}
    </select>
<!--    插入Flow_card表-->
    <insert id="AddFlowCardMp">
    <insert id="addFlowCardMp">
        insert into
            flow_card (
            order_id,
@@ -260,27 +291,27 @@
    </insert>
<!--    更新分架状态-->
    <update id="UpdateFlowState">
    <update id="updateFlowState">
        update sd.order_glass_detail as ogd
        set ogd.splitting_status=1
        where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber}
    </update>
<!--    查询未分架的条数-->
    <select id="SelectFlowCount">
    <select id="selectFlowCount">
        select COUNT(*)
        from sd.order_glass_detail as ogd
        where ogd.order_id = left(#{productionId},10)
          and ogd.splitting_status = 0
    </select>
<!--   修改订单表分架状态-->
    <update id="UpdateProcessingCard">
    <update id="updateProcessingCard">
        update sd.`order` as o
        set o.processing_card=#{state}
        where o.order_id=left(#{productionId},10)
    </update>
<!--    查询已排版数据-->
    <select id="SelectOkSchedulingMp">
    <select id="selectOkSchedulingMp">
        select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
               round(od.width*od.height*od.quantity/1000000,2),
               (od.quantity-IFNULL(ps.scheduling_quantity,0)),
@@ -294,7 +325,7 @@
    </select>
<!--    查询未排版数据-->
    <select id="SelectNoSchedulingMp">
    <select id="selectNoSchedulingMp">
    </select>
<!--    首次查询排版数据-->
@@ -312,7 +343,7 @@
    </select>
<!--   查询对应序号的层数-->
    <select id="SelectLayer">
    <select id="selectLayer">
        select COUNT(ogd.order_number)
        from sd.order_glass_detail as ogd
        where ogd.production_id = #{productionId}
north-glass-erp/target/classes/mapper/pp/ProductionScheduling.xml
@@ -8,6 +8,7 @@
        <result column="scheduling_quantity" property="schedulingQuantity"/>
        <result column="order_number" property="orderNumber"/>
        <result column="scheduling_id" property="schedulingId"/>
        <result column="order_id" property="orderId"/>
        <!--接收其他外键实体类数据-->
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="project" property="project"/>
@@ -60,14 +61,13 @@
            left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where  ps.scheduling_id IS NOT NULL
           and od.create_time between #{selectTime1} and #{selectTime2}
          and position(#{processes} in ps.processes)
          and position(#{orderId} in ps.order_id)
    </select>
    <!--    查询已排产带订单编号的数据-->
    <select id="SelectSchedulingNotMp">
    <select id="selectSchedulingNotMp">
        select date(ps.scheduled_start_time) as scheduled_start_time,
        date(ps.plan_end_time) as plan_end_time,
        od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
@@ -108,14 +108,15 @@
    <select id="selectLastSchedulingMp">
        select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
               round(od.width*od.height*od.quantity/1000000,2) as area,
               (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity,
               round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea,
               IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity,
               round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea,
               (od.quantity-IFNULL(sum(ps.scheduling_quantity),0)) as pendingProductionQuantity,
               round(od.width*od.height*(od.quantity-IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as pendingProductionArea,
               IFNULL(sum(ps.scheduling_quantity),0) as productionScheduledQuantity,
               round(od.width*od.height*(IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as productionScheduledArea,
               od.product_name,od.shape
        from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
                                   left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0
        group by od.order_id,od.order_number
    </select>
    <select id="selectMaxId">
@@ -156,4 +157,8 @@
        update production_scheduling set review_status=1,reviewer=#{userName} where
        scheduling_id=#{schedulingId}
    </update>
    <delete id="deleteSchedulingMp">
        delete from production_scheduling where scheduling_id=#{schedulingId}
    </delete>
</mapper>
north-glass-erp/target/classes/mapper/pp/WordOrder.xml
@@ -132,13 +132,13 @@
        ;
    </select>
    <select id="SelectOrderNumber" >
    <select id="selectOrderNumber" >
        select ifnull(count(ogd.production_id),0)
        from sd.order_glass_detail as ogd
        where ogd.production_id = #{productIdVl}
    </select>
    <update id="AddOrderWorkMp" >
    <update id="addOrderWorkMp" >
        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,7 +152,7 @@
    </update>
<!--    删除工单-->
    <update id="DeleteOrderWorkMp">
    <update id="deleteOrderWorkMp">
        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
        set ogd.production_id=null,
@@ -162,20 +162,20 @@
          and od.product_name = #{productName}
    </update>
    <select id="SelectWorkCount">
    <select id="selectWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where ISNULL(production_id)
          and order_id = #{orderId}
    </select>
    <select id="SelectYesWorkCount">
    <select id="selectYesWorkCount">
        select COUNT(distinct order_number)
        from order_glass_detail
        where  order_id = #{orderId}
    </select>
    <update id="UpdateWorkType">
    <update id="updateWorkType">
        update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId}
    </update>
</mapper>