廖井涛
2024-07-19 12f2fd73462da331478fabc7eaa79fc35b1a59b3
Merge branch 'master' of http://bore.pub:10439/r/ERP_override
10个文件已修改
121 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/TagStyle.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderGlassDetailMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderGlassDetailMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/TagStyle.vue
@@ -26,19 +26,38 @@
  productName:'order.product',
  edgingType:"order.edgingType",
  buildingNumber:'order.buildingNumber',
  icon:'order.icon',
  orderClassify:'order.orderClassify',
  packType:'order.packType',
  deliveryDate:'order.deliveryDate',
  batch:'order.batch',
  salesman:'order.salesman',
  alType:'order.alType',
  customerBatch:'order.customerBatch',
  contacts:'order.contacts',
  deliveryAddress:'order.deliveryAddress',
  processingNote:'order.processingNote',
  remarks:'product.msg.remarks',
  customerAbbreviation:'customer.customerAbbreviation'
  customerAbbreviation:'customer.customerAbbreviation',
  productAbbreviation:'product.msg.productAbbreviation',
  processId:'processCard.processId',
  createTime:'下单日期',
  orderNumber:'order.OrderNum',
  technologyNumber:'processCard.technologyNumber',
  process:'orderBasicData.process',
  color:'mainIngredient.films',
  figureNumber:'图号',
  colourCeramicGlaze:'彩釉图号',
  glassNumber:"reportingWorks.glassNumber",
  remarks1:'备注1',
  remarks2:'备注2',
  remarks3:'备注3',
  remarks4:'备注4',
  filmNumber:'膜号',
  bendRadius:'order.bendRadius'
})
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabel.vue
@@ -124,8 +124,9 @@
}
body {
  font-weight: bolder;
  overflow: hidden;
  font-family: Arial, sans-serif;
  font-size: 10px;
}
#printButton {
@@ -139,7 +140,6 @@
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
  */
  flex-wrap: wrap;
  font-size: 12pt;
  display: flex;
  flex-direction: column;
}
@@ -162,14 +162,11 @@
.row3 {
  text-align: center;
  font-weight: bolder;
  font-size: 22px;
  /*display: flex;
  justify-content:space-evenly;*/
}
.row3 label {
  font-size: 22px;
  margin-top: 28px;
}
@@ -181,7 +178,6 @@
}
label {
  font-weight: bolder;
  /*font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;*/
}
@@ -198,7 +194,6 @@
.contentRow .row1, .contentRow .row2 {
  text-align: left;
  font-weight: bolder;
}
@@ -220,7 +215,6 @@
.printFlowCard_finished1 {
  flex-wrap: wrap;
  font-size: 8pt;
  display: flex;
  flex-direction: column;
}
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -1202,6 +1202,10 @@
  }
}
const changeRowClass =  ({ row, rowIndex, $rowIndex }) => {
    return row?.rowClass
}
</script>
@@ -1371,8 +1375,9 @@
      <vxe-grid
          ref="xGrid"
          class="mytable-scrollbar"
          :row-class-name="changeRowClass"
          max-height="100%"
          height="400px"
          height="100%"
          size="small"
          v-bind="gridOptions"
          v-on="gridEvents"
@@ -1575,4 +1580,8 @@
  color: #fff;
}
::v-deep(.latter) {
  //display: none;
}
</style>
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -354,7 +354,9 @@
              title:titleUploadData.value,
              detail:$grid.getTableData().tableData,
              otherMoney:otherMoney.value,
              orderIdType:company.orderIdType
              orderIdType:company.orderIdType,
              creator:userStore.user.userName,
              creatorId:userStore.user.userId
            }
            const errorAreaList = $grid.getTableData().fullData.filter(
                item=>item.width*item.height/1000000 < errorArea.value*1
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderGlassDetailMapper.java
@@ -24,4 +24,6 @@
    List<Map<String,Object>> getOrderGlassDetailByProductId(String orderId, String glassChild,Long productId);
    List<OrderGlassDetail> getOrderGlassDetailByProductIdGlassChild(String orderId, Integer orderNumber);
    Integer getMinIdByGroup(String orderId, String orderNumber, String group);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -16,11 +16,13 @@
import com.example.erp.exception.ServiceException;
import com.example.erp.mapper.pp.*;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.mapper.sd.OrderGlassDetailMapper;
import com.example.erp.mapper.sd.OrderMapper;
import com.example.erp.mapper.sd.OrderProcessDetailMapper;
import com.example.erp.mapper.userInfo.LogMapper;
import com.example.erp.service.sd.OrderProcessDetailService;
import com.example.erp.service.userInfo.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -55,9 +57,10 @@
    LogService logService;
    final LogMapper logMapper;
    private final OrderGlassDetailMapper orderGlassDetailMapper;
    public ReportingWorkService(ReportingWorkMapper reportingWorkMapper, BasicDateProduceMapper basicDateProduceMapper, DamageDetailsMapper damageDetailsMapper, ReportingWorkDetailMapper reportingWorkDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, OrderProcessDetailService orderProcessDetailService, OrderMapper orderMapper, FlowCardMapper flowCardMapper,LogService logService,LogMapper logMapper) {
    public ReportingWorkService(ReportingWorkMapper reportingWorkMapper, BasicDateProduceMapper basicDateProduceMapper, DamageDetailsMapper damageDetailsMapper, ReportingWorkDetailMapper reportingWorkDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, OrderProcessDetailService orderProcessDetailService, OrderMapper orderMapper, FlowCardMapper flowCardMapper, LogService logService, LogMapper logMapper, OrderGlassDetailMapper orderGlassDetailMapper) {
        this.reportingWorkMapper = reportingWorkMapper;
        this.basicDateProduceMapper = basicDateProduceMapper;
        this.damageDetailsMapper = damageDetailsMapper;
@@ -68,6 +71,7 @@
        this.flowCardMapper = flowCardMapper;
        this.logService = logService;
        this.logMapper = logMapper;
        this.orderGlassDetailMapper = orderGlassDetailMapper;
    }
    public Map<String, Object> AddSelectLastWorkSv(String processIdStr, String technologyStr, String process) {
@@ -131,7 +135,23 @@
            map.put("Detail", reportingWorkMapper.SelectTechnologicalNumMp(processIdStr, technologyStr, process));
        } else {
            //不是第一道工序,查询报工数据
            map.put("Detail", reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process));
            List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process);
            if(process.equals("中空")){
                String orderId = processIdStr.substring(0,10);
                details.forEach( detail -> {
                    Integer glassId = orderGlassDetailMapper.
                                                getMinIdByGroup(orderId,
                                                    String.valueOf(detail.get("order_number")),
                                                    String.valueOf(detail.get("group")));
                    int listGlassId = Integer.parseInt(String.valueOf(detail.get("id")));
                    if(listGlassId  !=glassId){
                        detail.put("rowClass","latter");
                    }
                });
            }
            map.put("Detail",details );
        }
        // 第一道工序(流程卡数+补片数量-完工数-次破数-返工未完成数-禁用数量)
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -12,9 +12,11 @@
import com.example.erp.dto.sd.OrderDTO;
import com.example.erp.dto.sd.OrderDetailProductDTO;
import com.example.erp.entity.sd.*;
import com.example.erp.entity.userInfo.Log;
import com.example.erp.entity.userInfo.SysError;
import com.example.erp.exception.ServiceException;
import com.example.erp.mapper.sd.*;
import com.example.erp.service.userInfo.LogService;
import com.example.erp.service.userInfo.SysErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -36,9 +38,10 @@
    private final SysErrorService sysErrorService;
    private final OrderOtherMoneyMapper orderOtherMoneyMapper;
    private final ProductMapper productMapper;
    private final LogService logService;
    private final OrderProcessDetailMapper orderProcessDetailMapper;
    public OrderService(OrderMapper orderMapper, OrderDetailMapper orderDetailMapper, OrderGlassDetailMapper orderGlassDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, SysErrorService sysErrorService, OrderOtherMoneyMapper orderOtherMoneyMapper, ProductMapper productMapper) {
    public OrderService(OrderMapper orderMapper, OrderDetailMapper orderDetailMapper, OrderGlassDetailMapper orderGlassDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, SysErrorService sysErrorService, OrderOtherMoneyMapper orderOtherMoneyMapper, ProductMapper productMapper, LogService logService) {
        this.orderMapper = orderMapper;
        this.orderDetailMapper = orderDetailMapper;
        this.orderGlassDetailMapper = orderGlassDetailMapper;
@@ -46,6 +49,7 @@
        this.sysErrorService = sysErrorService;
        this.orderOtherMoneyMapper = orderOtherMoneyMapper;
        this.productMapper = productMapper;
        this.logService = logService;
    }
    public boolean saveOrder(Map<String,Object> orderMap) throws Exception {
@@ -63,11 +67,20 @@
        Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
        //判断传入id参数是否为空,未传入id为空插入订单表,传入更新表
        try{
            Log log = new Log();
            log.setOperator(orderJson.getString("creator"));
            log.setOperatorId(orderJson.getString("creatorId"));
            log.setContent(orderMap.toString());
            if(order.getOrderId() == null || order.getOrderId().isEmpty()){
                insertOrder(order,OrderDetails,orderOtherMoneyList,orderIdType);
                log.setFunction("saveOrder创建:"+order.getOrderId());
            }else {
                updateOrder(order,OrderDetails,orderOtherMoneyList);
                log.setFunction("saveOrder修改:"+order.getOrderId());
            }
            logService.saveLog(log);
        }catch (Exception e){
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
            //将异常传入数据库
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -736,13 +736,25 @@
               od.edging_type       as edgingType,
               p.remarks,
               c.customer_abbreviation as customerAbbreviation,
               od.other_columns
               p.product_abbreviation as productAbbreviation,
               fc.process_id as processId,
               o.create_time as createTime,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS glassNumber,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S02' )) AS figureNumber,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S03' )) AS colourCeramicGlaze,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S04' )) AS remarks1,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S05' )) AS remarks2,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S06' )) AS remarks3,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S07' )) AS remarks4,
               JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S08' )) AS remarks5,
                p.remarks as filmNumber
        from sd.order as o
                 left join sd.order_detail as od on o.order_id = od.order_id
                 left join flow_card as fc on o.order_id = fc.order_id and
                                              od.order_number = fc.order_number
                 left join sd.product as p on p.id=od.product_id
                 left join sd.customer as c on c.id = o.customer_id
        left join sd.product_detail as pd  on pd.prod_id=p.id and pd.sort_num=od.order_number
        where fc.process_id = #{processId}
          and fc.technology_number = #{technologyNumber}
        group by od.order_number, width, height
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -194,7 +194,8 @@
            odpd.broken_num as onceBroken,
            ogd.`group`,
            if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 判断是否已经完成,已经完成不序号和同序号数量相同才能提交
            od.other_columns
            od.other_columns,
            ogd.id
        FROM
            sd.order_detail AS od
@@ -210,6 +211,7 @@
                               limit 1)
        </if>
        LEFT JOIN flow_card AS fc
                ON fc.order_id = ogd.order_id
                and fc.production_id=ogd.production_id
north-glass-erp/src/main/resources/mapper/sd/OrderGlassDetailMapper.xml
@@ -189,4 +189,12 @@
          and  ogd.glass_child=#{glassChild}
    </select>
    <select id="getMinIdByGroup" >
        select min(id) from sd.order_glass_detail as a
        where a.order_id = #{orderId}
          and a.order_number = #{orderNumber}
        and a.`group` = #{group}
    </select>
</mapper>