Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | 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' |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }) |
| | | |
| | |
| | | } |
| | | |
| | | body { |
| | | font-weight: bolder; |
| | | overflow: hidden; |
| | | font-family: Arial, sans-serif; |
| | | font-size: 10px; |
| | | } |
| | | |
| | | #printButton { |
| | |
| | | font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; |
| | | */ |
| | | flex-wrap: wrap; |
| | | font-size: 12pt; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | |
| | | |
| | | .row3 { |
| | | text-align: center; |
| | | font-weight: bolder; |
| | | font-size: 22px; |
| | | /*display: flex; |
| | | justify-content:space-evenly;*/ |
| | | } |
| | | |
| | | .row3 label { |
| | | font-size: 22px; |
| | | margin-top: 28px; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | label { |
| | | font-weight: bolder; |
| | | /*font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;*/ |
| | | } |
| | | |
| | |
| | | |
| | | .contentRow .row1, .contentRow .row2 { |
| | | text-align: left; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | .printFlowCard_finished1 { |
| | | flex-wrap: wrap; |
| | | font-size: 8pt; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | const changeRowClass = ({ row, rowIndex, $rowIndex }) => { |
| | | return row?.rowClass |
| | | |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | <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" |
| | |
| | | color: #fff; |
| | | } |
| | | |
| | | |
| | | ::v-deep(.latter) { |
| | | //display: none; |
| | | } |
| | | </style> |
| | |
| | | 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 |
| | |
| | | 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); |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | 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; |
| | |
| | | this.flowCardMapper = flowCardMapper; |
| | | this.logService = logService; |
| | | this.logMapper = logMapper; |
| | | this.orderGlassDetailMapper = orderGlassDetailMapper; |
| | | } |
| | | |
| | | public Map<String, Object> AddSelectLastWorkSv(String processIdStr, String technologyStr, String process) { |
| | |
| | | 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 ); |
| | | } |
| | | |
| | | // 第一道工序(流程卡数+补片数量-完工数-次破数-返工未完成数-禁用数量) |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | this.sysErrorService = sysErrorService; |
| | | this.orderOtherMoneyMapper = orderOtherMoneyMapper; |
| | | this.productMapper = productMapper; |
| | | this.logService = logService; |
| | | } |
| | | |
| | | public boolean saveOrder(Map<String,Object> orderMap) throws Exception { |
| | |
| | | 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); |
| | | //将异常传入数据库 |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | limit 1) |
| | | </if> |
| | | |
| | | |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id=ogd.production_id |
| | |
| | | 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> |