chenlu
2024-06-13 7deda1014b2db5e75c926abc2246a324a245ae8f
修改排版出现的问题,添加形状字段判断
10个文件已修改
452 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue 170 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/ProductionScheduling.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/Report.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
@@ -29,16 +29,12 @@
      break
    }
    case  'setType': {
      alert('我接收到子组件传送的排版状态')
      break
    }
  }
}
//工序
const value = ref('切割')
const processVal = ref('切割')
//排产状态
@@ -54,10 +50,6 @@
  },
]
function padLeftZero(str) {
  return ('00' + str).substr(str.length)
}
//定义表单值
const form = reactive({
  date1: '',
@@ -70,25 +62,6 @@
})
//表尾求和
const sumNum = (list, field) => {
  let count = 0
  list.forEach(item => {
    count += Number(item[field])
  })
  return count.toFixed(2)
}
//定义滚动条高度
let scrollTop = ref(null)
let scrollHeight = ref(null)
let clientHeight = ref(null)
const scrollEvnt = (row) => {
  // 内容高度
  scrollTop.value = row.$event.target.scrollTop
  scrollHeight.value = row.$event.target.scrollHeight
  clientHeight.value = row.$event.target.clientHeight
}
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({
  order: {
@@ -137,7 +110,7 @@
form.date1 = getNowTime()
let startTime = form.date1[0]
let endTime = form.date1[1]
let selectProcesses = value.value
let selectProcesses = processVal.value
let inputVal = form.orderId
if (inputVal == '') {
  inputVal = null
@@ -166,7 +139,7 @@
const getWorkOrder = () => {
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  let selectProcesses = value.value
  let selectProcesses = processVal.value
  let selectState = stateValue.value
  let inputVal = form.orderId
  if (inputVal == '') {
@@ -175,24 +148,6 @@
  if (selectProcesses == '') {
    selectProcesses = null
  }
  // if (inputVal == null && selectState == 1) {
  //   //根据时间查询未排产数据
  //   request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}/${selectProcesses}/${inputVal}`, filterData.value).then((res) => {
  //
  //     if (res.code == 200) {
  //       pageTotal.value = res.data.total
  //       xGrid.value.loadData(res.data.data)
  //       gridOptions.loading = false
  //       //禁用删除、审核按钮
  //       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/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
    if (res.code == 200) {
@@ -202,48 +157,24 @@
      xGrid.value.loadData(res.data.data)
      console.log(res.data.data)
      gridOptions.loading = false
      //禁用删除、审核按钮
      gridOptions.toolbarConfig.buttons[0].disabled = true
      gridOptions.toolbarConfig.buttons[1].disabled = true
      //启用保存
      gridOptions.toolbarConfig.buttons[2].disabled = false
      if (selectState==1){
        //禁用删除、审核按钮
        gridOptions.toolbarConfig.buttons[0].disabled = true
        gridOptions.toolbarConfig.buttons[1].disabled = true
        //启用保存
        gridOptions.toolbarConfig.buttons[2].disabled = false
      }else{
        //禁用删除、审核按钮
        gridOptions.toolbarConfig.buttons[0].disabled = false
        gridOptions.toolbarConfig.buttons[1].disabled = false
        //启用保存
        gridOptions.toolbarConfig.buttons[2].disabled = false
      }
    } else {
      ElMessage.warning(res.msg)
    }
  })
  // } else if (inputVal == null && selectState == 2) {
  //   //根据时间查询已排产数据
  //   request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
  //     if (res.code == 200) {
  //       pageTotal.value = res.data.total
  //       xGrid.value.loadData(res.data.data)
  //       gridOptions.loading = false
  //       //启用删除、审核按钮
  //       gridOptions.toolbarConfig.buttons[0].disabled = false
  //       gridOptions.toolbarConfig.buttons[1].disabled = false
  //       //禁用保存
  //       gridOptions.toolbarConfig.buttons[2].disabled = true
  //     } else {
  //       ElMessage.warning(res.msg)
  //     }
  //   })
  // } else if (inputVal != null && selectState == 2) {
  //   //根据订单号查询已排产数据
  //   request.post(`/productionScheduling/selectSchedulingNot/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
  //     if (res.code == 200) {
  //       pageTotal.value = res.data.total
  //       xGrid.value.loadData(res.data.data)
  //       gridOptions.loading = false
  //       //启用删除、审核按钮
  //       gridOptions.toolbarConfig.buttons[0].disabled = false
  //       gridOptions.toolbarConfig.buttons[1].disabled = false
  //       //禁用保存
  //       gridOptions.toolbarConfig.buttons[2].disabled = true
  //     } else {
  //       ElMessage.warning(res.msg)
  //     }
  //   })
  // }
}
@@ -272,7 +203,7 @@
//获取选中时间
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  let selectProcesses = value.value
  let selectProcesses = processVal.value
  let selectState = stateValue.value
  let inputVal = form.orderId
  if (inputVal == '') {
@@ -281,7 +212,6 @@
  if (selectProcesses == '') {
    selectProcesses = null
  }
  request.post(`/productionScheduling/selectScheduling/1/${total.pageSize}/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
    if (res.code == 200) {
      total.dataTotal = res.data.total.total * 1
@@ -289,11 +219,6 @@
      pageNum.value = 1
      xGrid.value.loadData(res.data.data)
      gridOptions.loading = false
      //禁用删除、审核按钮
      gridOptions.toolbarConfig.buttons[0].disabled = true
      gridOptions.toolbarConfig.buttons[1].disabled = true
      //启用保存
      gridOptions.toolbarConfig.buttons[2].disabled = false
    } else {
      ElMessage.warning(res.msg)
    }
@@ -315,7 +240,7 @@
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
@@ -333,7 +258,6 @@
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
@@ -370,18 +294,18 @@
  },
  //表头参数
  columns: [
    {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
    {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80},
    {type: 'expand',fixed: "left",  slots: {content: 'content'}, width: 50},
    {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
    {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80},
    {
      field: 'scheduled_start_time',
      width: 120,
      editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}},
      field: 'scheduledStartTime',
      width: 130,
      editRender: {name: 'input', attrs: {placeholder: '', type: 'date'},},
      title: t('processCard.scheduledStartTime')
    },
    {
      field: 'plan_end_time',
      width: 120,
      field: 'planEndTime',
      width: 130,
      editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}},
      title: t('processCard.planEndTime')
    },
@@ -391,7 +315,7 @@
      title: t('order.orderId'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      width: 100,
      width: 110,
    },
    {
      field: 'order.customerName',
@@ -412,14 +336,14 @@
      title: t('order.OrderNum'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      width: 70,
      width: 100,
    },
    {
      field: 'technologyNumber',
      title: t('processCard.technologyNumber'),
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      width: 70,
      width: 100,
    },
    {
      field: 'orderGlassDetail.childWidth',
@@ -431,7 +355,7 @@
      title: t('order.height'),
      width: 60,
    },
    {field: 'orderDetail.quantity', title: t('processCard.orderQuantity'), width: 70},
    {field: 'orderDetail.quantity', title: t('processCard.orderQuantity'), width: 90},
    {field: 'orderGlassDetail.area', title: t('processCard.orderArea'), width: 90},
    {
      field: 'schedulingQuantity',
@@ -440,13 +364,13 @@
      title: t('processCard.productionSchedulingQuantity'),
      sortable: true
    },
    {field: 'pendingProductionQuantity', title: t('processCard.quantityToScheduled'), width: 120},
    {field: 'pendingProductionArea', title: t('processCard.areaToScheduled'), width: 120},
    {field: 'productionScheduledQuantity', title: t('processCard.plannedProductionQuantity'), width: 120},
    {field: 'productionScheduledArea', title: t('processCard.plannedProductionArea'), width: 120},
    {field: 'reviewStatus', title: t('processCard.reviewedState'), width: 140},
    {field: 'reviewer', title: t('processCard.reviewed'), width: 140},
    {field: 'orderGlassDetail.glassChild', title: t('order.product'), width: 140},
    {field: 'pendingProductionQuantity', title: t('processCard.quantityToScheduled'), width: 100},
    {field: 'pendingProductionArea', title: t('processCard.areaToScheduled'), width: 100},
    {field: 'productionScheduledQuantity', title: t('processCard.plannedProductionQuantity'), width: 100},
    {field: 'productionScheduledArea', title: t('processCard.plannedProductionArea'), width: 100},
    {field: 'reviewStatus', title: t('processCard.reviewedState'), width: 80},
    {field: 'reviewer', title: t('processCard.reviewed'), width: 80},
    {field: 'orderDetail.productName', title: t('order.product'), width: 140},
    {field: 'orderDetail.shape', title: t('order.shape'), width: 80},
    {field: 'notes', title: t('processCard.notes'), editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120},
    {field: 'schedulingId', title: t('processCard.schedulingId'), width: 120},
@@ -500,16 +424,16 @@
              return;
            }
            for (let i = 0; i < selectRecords.length; i++) {
              let start = selectRecords[i].scheduled_start_time
              let end = selectRecords[i].plan_end_time
              let number = selectRecords[i].scheduling_quantity
              let start = selectRecords[i].scheduledStartTime
              let end = selectRecords[i].planEndTime
              let number = selectRecords[i].schedulingQuantity
              //计划开始、结束时间,排产数量不能为空
              if (start == null || end == null || number == null) {
                ElMessage.warning("请填入对应的值再进行保存")
                return;
              }
            }
            let selectProcesses = value.value
            let selectProcesses = processVal.value
            if (selectProcesses == null || selectProcesses == "") {
              ElMessage.warning("请选择排产工序")
              return;
@@ -606,7 +530,7 @@
      switch (menu.code) {
        case 'copyChecked' : {
          let result = toolbarButtonClickEvent()
          if (result.cell === "scheduled_start_time" || result.cell === "plan_end_time") {
          if (result.cell === "scheduledStartTime" || result.cell === "planEndTime" || result.cell === "schedulingQuantity"){
            if (result) {
              const dataList = xGrid.value.getTableData().visibleData
              const val = dataList[result.start][result.cell]
@@ -622,7 +546,7 @@
        }
        case 'copyAll' : {
          let result = toolbarButtonClickEvent()
          if (result.cell === "scheduled_start_time" || result.cell === "plan_end_time") {
          if (result.cell === "scheduledStartTime" || result.cell === "planEndTime"|| result.cell === "schedulingQuantity") {
            if (result) {
              const dataList = xGrid.value.getTableData().visibleData
              const val = dataList[result.start][result.cell]
@@ -637,7 +561,7 @@
        }
        case 'clearChecked' : {
          let result = toolbarButtonClickEvent()
          if (result.cell === "scheduled_start_time" || result.cell === "plan_end_time") {
          if (result.cell === "scheduledStartTime" || result.cell === "planEndTime"|| result.cell === "schedulingQuantity") {
            if (result) {
              const dataList = xGrid.value.getTableData().visibleData
              dataList.forEach((item, index) => {
@@ -690,7 +614,7 @@
        &nbsp;&nbsp;
        <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 110px"></el-input>
        &nbsp;
        <el-select v-model="value" clearable default-value="default_city" style="width: 120px">
        <el-select v-model="processVal" clearable default-value="default_city" style="width: 120px">
          <el-option
              v-for="item in titleSelectJson['processType']"
              :key="item.id"
@@ -761,11 +685,7 @@
    </vxe-grid>
  </div>
  <div ref="cellArea" class="vxe-table--cell-area">
    <span class="vxe-table--cell-main-area"></span>
    <span class="vxe-table--cell-active-area"></span>
  </div>
</template>
<style scoped>
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java
@@ -37,35 +37,22 @@
    //点击查询排版数据
    @ApiOperation("点击查询排版数据接口")
    @SaCheckPermission("ProductionScheduling.search")
    @PostMapping  ("/selectScheduling/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
    @PostMapping  ("/selectScheduling/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{orderIds}/{processes}/{state}")
    public Result selectScheduling(
            @PathVariable Integer pageNum,
            @PathVariable Integer pageSize,
            @PathVariable String selectTime1,
            @PathVariable String selectTime2,
            @PathVariable String orderId,
            @PathVariable String orderIds,
            @PathVariable String processes,
            @PathVariable Integer state,
            @RequestBody ProductionScheduling productionScheduling){
        return Result.seccess(productionSchedulingService.selectSchedulingSv(pageNum, pageSize,selectTime1,selectTime2,orderId,processes,state,productionScheduling));
        return Result.seccess(productionSchedulingService.selectSchedulingSv(pageNum, pageSize,selectTime1,selectTime2,orderIds,processes,state,productionScheduling));
    }
    //点击查询排版数据(带订单号查询)
    @ApiOperation("根据条件查询排版数据接口")
    @SaCheckPermission("ProductionScheduling.search")
    @PostMapping  ("/selectSchedulingNot/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
    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));
    }
    //添加排产数据
    @ApiOperation("添加排产数据接口")
north-glass-erp/src/main/java/com/example/erp/entity/pp/ProductionScheduling.java
@@ -42,6 +42,7 @@
    private Double productionScheduledArea;
    private  String reviewer;
    //外键订单表
    private Order order;
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.PrintSetup;
import org.apache.ibatis.annotations.Mapper;
import java.sql.Date;
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java
@@ -12,13 +12,9 @@
public interface ProductionSchedulingMapper extends BaseMapper<ProductionScheduling> {
    List<Map<String,String>> selectOkSchedulingMp(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling);
    List<ProductionScheduling> selectOkSchedulingMp(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderIds, String processes, ProductionScheduling productionScheduling);
    List<ProductionScheduling> selectNoSchedulingMp(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling  productionScheduling);
    List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2,String processes,String orderId, ProductionScheduling productionScheduling);
    List<Map<String,String>> selectSchedulingNotMp(String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling);
    List<ProductionScheduling> selectNoSchedulingMp(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderIds, String processes, ProductionScheduling  productionScheduling);
    Integer selectMaxId();
@@ -32,5 +28,7 @@
    Map<String, Integer> getPageTotal(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling);
    Map<String, Integer> getOkPageTotal(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling);
//    Integer selectNumberMp(String orderId, String orderNumber, String processes);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -6,6 +6,7 @@
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.PrintSetup;
import com.example.erp.entity.pp.ProductionScheduling;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.entity.sd.OrderProcessDetail;
north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
@@ -22,12 +22,12 @@
    ProductionSchedulingMapper productionSchedulingMapper;
    //未排产查询
    public Map<String, Object> selectSchedulingSv(Integer pageNum, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, Integer state, ProductionScheduling productionScheduling ) {
    public Map<String, Object> selectSchedulingSv(Integer pageNum, Integer pageSize, String selectTime1, String selectTime2, String orderIds, String processes, Integer state, ProductionScheduling productionScheduling ) {
        Integer offset = (pageNum - 1) * pageSize;
        Map<String, Object> map = new HashMap<>();
        if("null".equals(orderId)){
            orderId="";
        if("null".equals(orderIds)){
            orderIds="";
        }
        if ("null".equals(processes)){
@@ -35,12 +35,14 @@
        }
        if (state==2){//已排产
            map.put("data", productionSchedulingMapper.selectOkSchedulingMp(offset, pageSize,selectTime1, selectTime2,orderId,processes, productionScheduling));
            map.put("data", productionSchedulingMapper.selectOkSchedulingMp(offset, pageSize,selectTime1, selectTime2,orderIds,processes, productionScheduling));
            map.put("total", productionSchedulingMapper.getOkPageTotal(offset, pageSize,selectTime1, selectTime2,orderIds,processes, productionScheduling));
        }else if (state==1){//未排产
            map.put("data", productionSchedulingMapper.selectNoSchedulingMp(offset, pageSize,selectTime1, selectTime2,orderId,processes, productionScheduling));
            map.put("data", productionSchedulingMapper.selectNoSchedulingMp(offset, pageSize,selectTime1, selectTime2,orderIds,processes, productionScheduling));
            map.put("total", productionSchedulingMapper.getPageTotal(offset, pageSize,selectTime1, selectTime2,orderIds,processes, productionScheduling));
        }
        map.put("total", productionSchedulingMapper.getPageTotal(offset, pageSize,selectTime1, selectTime2,orderId,processes, productionScheduling));
        return map;
    }
@@ -48,24 +50,11 @@
    //首次查询排产数据
    public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2,String processes,String orderId,ProductionScheduling productionScheduling ) {
        Map<String, Object> map = new HashMap<>();
        if("null".equals(orderId)){
            orderId="";
        }
        if ("null".equals(processes)){
            processes="";
        }
        map.put("data", productionSchedulingMapper.selectLastSchedulingMp(selectTime1, selectTime2,processes,orderId, productionScheduling));
        map.put("process", productionSchedulingMapper.selectProcess());
        return map;
    }
    //带订单号查询
    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));
        return map;
    }
    public Boolean addSchedulingSv(Map<String, Object> object) {
        String userName = "";
@@ -92,8 +81,8 @@
                //查询已排产工序数量
             // Integer num =  productionSchedulingMapper.selectNumberMp(productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),processes);
             productionSchedulingMapper.insertSelective(schedulingId,productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),productionScheduling.getTechnologyNumber(),processes,productionScheduling.getSchedulingQuantity(),productionScheduling.getScheduledStartTime(),productionScheduling.getPlanEndTime(),productionScheduling.getNotes());
                //System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getTechnologyNumber());
             productionSchedulingMapper.insertSelective(schedulingId,productionScheduling.getOrderGlassDetail().getOrderId(),productionScheduling.getOrderNumber(),productionScheduling.getTechnologyNumber(),processes,productionScheduling.getSchedulingQuantity(),productionScheduling.getScheduledStartTime(),productionScheduling.getPlanEndTime(),productionScheduling.getNotes());
               // System.out.println(productionScheduling.getOrderId()+"***"+productionScheduling.getOrderGlassDetail().getOrderId()+"--"+productionScheduling.getOrderDetail().getOrderId());
            }
            return true;
        }
north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
@@ -15,6 +15,9 @@
        <result column="productionScheduledQuantity" property="productionScheduledQuantity"/>
        <result column="productionScheduledArea" property="productionScheduledArea"/>
        <result column="review_status" property="reviewStatus"/>
        <result column="scheduled_start_time" property="scheduledStartTime"/>
        <result column="plan_end_time" property="planEndTime"/>
        <result column="reviewer" property="reviewer"/>
        <!--接收其他外键实体类数据-->
        <result column="project" property="order.project"/>
        <result column="customer_name" property="order.customerName"/>
@@ -42,76 +45,61 @@
    <!--    查询已排版数据-->
    <select id="selectOkSchedulingMp">
        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,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               ps.scheduling_quantity,
               (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(ps.scheduling_quantity, 0)                      as productionScheduledQuantity,
               round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000,
                     2)                                               as productionScheduledArea,
               IF(ps.review_status = 0, "未审核", "已审核")           as review_status,
               ps.reviewer,
               od.product_name,
               od.shape,
               ps.scheduling_id
    <select id="selectOkSchedulingMp" resultMap="productionSchedulingMap">
        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,
        ps.order_number,
        ps.technology_number,
        ogd.child_width,
        ogd.child_height,
        od.quantity,
        round(od.width * od.height * od.quantity / 1000000, 2) as area,
        ps.scheduling_quantity,
        (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(ps.scheduling_quantity, 0) as productionScheduledQuantity,
        round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000,
        2) as productionScheduledArea,
        IF(ps.review_status = 0, "未审核", "已审核") as review_status,
        ps.reviewer,
        od.product_name,
        if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape,
        ps.scheduling_id
        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
        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
        left join sd.order_glass_detail as ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number and
        ogd.technology_number=ps.technology_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)
        group by od.order_id, od.order_number
        and od.create_time between #{selectTime1} and #{selectTime2}
        and position(#{processes} in ps.processes)
        and position(#{orderIds} in ps.order_id)
        <if test="productionScheduling.orderId != null and productionScheduling.orderId != ''">
            and ogd.order_id regexp #{productionScheduling.orderId}
        </if>
        <if test="productionScheduling.order.customerName != null and productionScheduling.order.customerName != ''">
            and o.customer_name regexp #{productionScheduling.order.customerName}
        </if>
        <if test="productionScheduling.order.project != null and productionScheduling.order.project != ''">
            and o.project regexp #{productionScheduling.order.project}
        </if>
        <if test="productionScheduling.orderNumber != null and productionScheduling.orderNumber != ''">
            and ogd.order_number regexp #{productionScheduling.orderNumber}
        </if>
        <if test="productionScheduling.technologyNumber != null and productionScheduling.technologyNumber != ''">
            and ogd.technology_number regexp #{productionScheduling.technologyNumber}
        </if>
        group by ps.id
        order by ps.id desc
        limit #{offset},#{pageSize};
    </select>
    <!--    查询已排产的数据-->
    <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,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               ps.scheduling_quantity,
               (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as scheduling_quantity,
               round(od.width * od.height * (od.quantity - IFNULL(sum(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,
               IF(ps.review_status = 0, "未审核", "已审核")
                                                                      as review_status,
               ps.reviewer,
               od.product_name,
               od.shape,
               ps.scheduling_id
        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 (ps.scheduling_id IS NOT NULL)
          and position(#{processes} in ps.processes)
          and position(#{orderId} in ps.order_id)
        group by od.order_id, od.order_number
        order by ps.id desc
    </select>
    <!--    查询未排产数据-->
    <select id="selectNoSchedulingMp" resultMap="productionSchedulingMap">
        select ogd.order_id,
@@ -131,8 +119,8 @@
        IFNULL(ps.schedulingQuantity, 0) as productionScheduledQuantity,
        round(ogd.child_width * ogd.child_height * (IFNULL(ps.schedulingQuantity, 0)) / 1000000,
        2) as productionScheduledArea,
        ogd.glass_child,
        od.shape
        od.product_name,
        if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape
        from sd.order_glass_detail as ogd
        left join sd.order as o on ogd.order_id = o.order_id
@@ -152,7 +140,7 @@
        and od.create_time between #{selectTime1} and #{selectTime2}
        and opd.reporting_work_num_count = 0
        and position(#{orderId} in ogd.order_id)
        and position(#{orderIds} in ogd.order_id)
        -- and position("切割" in ps.processes)
        <if test="productionScheduling.orderId != null and productionScheduling.orderId != ''">
            and ogd.order_id regexp #{productionScheduling.orderId}
@@ -173,52 +161,7 @@
        order by ogd.order_id desc
        limit #{offset},#{pageSize};
    </select>
    <!--    首次查询排产数据-->
    <select id="selectLastSchedulingMp">
        select ogd.order_id,
               o.customer_name,
               o.project,
               ogd.order_number,
               ogd.technology_number,
               ogd.child_width,
               ogd.child_height,
               od.quantity,
               round(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as area,
               (od.quantity - IFNULL((ps.schedulingQuantity), 0))                   as scheduling_quantity,
               (od.quantity - IFNULL((ps.schedulingQuantity), 0))                   as pendingProductionQuantity,
               round(ogd.child_width * ogd.child_height * (od.quantity - IFNULL((ps.schedulingQuantity), 0)) / 1000000,
                     2)
                                                                                    as pendingProductionArea,
               IFNULL(ps.schedulingQuantity, 0)                                     as productionScheduledQuantity,
               round(ogd.child_width * ogd.child_height * (IFNULL(ps.schedulingQuantity, 0)) / 1000000,
                     2)                                                             as productionScheduledArea,
               ogd.glass_child,
               od.shape
        from sd.order_glass_detail as ogd
                 left join sd.order as o on ogd.order_id = o.order_id
                 left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number
                 left join sd.order_process_detail as opd
                           on opd.order_id = ogd.order_id and opd.order_number = ogd.order_number and
                              opd.technology_number = ogd.technology_number
                 left join
             (select order_id, order_number, technology_number, SUM(scheduling_quantity) as schedulingQuantity
              from production_scheduling
              where processes = #{processes}
              group by order_id, order_number, technology_number) as ps
             on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and
                ps.technology_number = ogd.technology_number
        where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0
          and od.create_time between #{selectTime1} and #{selectTime2}
          and opd.reporting_work_num_count = 0
          and position(#{orderId} in ogd.order_id)
--           and position("切割" in ps.processes)
        group by ogd.order_id, ogd.order_number, ogd.technology_number
        order by ogd.order_id desc
    </select>
    <select id="selectMaxId">
        select COUNT(ps.scheduling_id)
@@ -311,4 +254,36 @@
        order by ogd.order_id desc
        limit #{offset},#{pageSize};
    </select>
    <select id="getOkPageTotal">
        select CEILING(count(ps.id)/#{pageSize}) as 'pageTotal',
        count(distinct ps.id) as 'total'
        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
        left join sd.order_glass_detail as ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number and
        ogd.technology_number=ps.technology_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)
        <if test="productionScheduling.orderId != null and productionScheduling.orderId != ''">
            and ogd.order_id regexp #{productionScheduling.orderId}
        </if>
        <if test="productionScheduling.order.customerName != null and productionScheduling.order.customerName != ''">
            and o.customer_name regexp #{productionScheduling.order.customerName}
        </if>
        <if test="productionScheduling.order.project != null and productionScheduling.order.project != ''">
            and o.project regexp #{productionScheduling.order.project}
        </if>
        <if test="productionScheduling.orderNumber != null and productionScheduling.orderNumber != ''">
            and ogd.order_number regexp #{productionScheduling.orderNumber}
        </if>
        <if test="productionScheduling.technologyNumber != null and productionScheduling.technologyNumber != ''">
            and ogd.technology_number regexp #{productionScheduling.technologyNumber}
        </if>
        order by ps.id desc
        limit #{offset},#{pageSize};
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -225,7 +225,7 @@
               o.project,
               o.order_id,
               o.batch,
               od.shape,
               if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape,
               ogd.order_number,
               ogd.technology_number,
               ogd.process,
@@ -526,7 +526,7 @@
            ogd.child_height as childHeight,
            fc.quantity,
            round( ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2 ) as area,
            od.shape,
            if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape,
            od.remarks
        FROM
            sd.ORDER AS o
@@ -614,7 +614,7 @@
    <select id="productionScheduleMp">
        select
            a.order_number,
            a.shape,
            if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape,
            a.product_name,
            b.child_width,
            b.child_height,
@@ -967,7 +967,7 @@
               o.project,
               o.order_id,
               o.batch,
               od.shape,
               if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape,
               ogd.order_number,
               ogd.technology_number,
               ogd.process,
@@ -1180,7 +1180,7 @@
            rwd.order_number,
            MAX( ogd.child_width ) as width,
            MAX( ogd.child_height ) as height,
            od.shape,
        if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape,
            sum( pd.thickness ) as thickness,
            od.edging_type,
            rwd.completed_quantity,
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -125,7 +125,7 @@
            fc.quantity AS quantity_card,
            ogd.child_width,
            ogd.child_height,
            od.shape,
            if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape,
            fc.quantity -odpd.reporting_work_num -odpd.broken_num  as quantity,
            fc.quantity -odpd.reporting_work_num -odpd.broken_num  as completedQuantity,
            odpd.reporting_work_num as completed,
@@ -163,7 +163,7 @@
            fc.quantity AS quantity_card,
            ogd.child_width,
            ogd.child_height,
            od.shape,
        if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape,
            if((odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num ) &lt; 0,
                0,
        odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num) as quantity,
@@ -382,7 +382,7 @@
            c.quantity as quantity_card,
            d.child_width,
            d.child_height,
            e.shape,
            if(e.shape=1,'普形',if(e.shape=2,'异形','')) as shape,
            if(ifnull(a.completed_quantity+a.breakage_quantity,0)=0,
                c.quantity-ifnull(a.completed_quantity+a.breakage_quantity,0),
                ifnull(a.completed_quantity+a.breakage_quantity,0)) as 'quantity', -- 可报工数