Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
| | |
| | | <template #title> |
| | | <span style="font-weight: bold" v-show="showTitle"> |
| | | {{ row.orderId }} |
| | | {{ row.project?'--':'' }} |
| | | {{ row.customerName?'--':'' }} |
| | | {{ row.customerName}} |
| | | {{row.project?'--':'' }} |
| | | {{row.project}} |
| | | {{ row.batch?'--':'' }} |
| | | {{row.batch}} |
| | |
| | | <template #title> |
| | | <span style="font-weight: bold" v-show="showTitle"> |
| | | {{ row.orderId }} |
| | | {{ row.customerName?'--':'' }} |
| | | {{ row.customerName}} |
| | | {{ row.project?'--':'' }} |
| | | {{row.project}} |
| | | {{ row.batch?'--':'' }} |
| | |
| | | }, |
| | | }, |
| | | hideButton:'true',//æµç¨å¡æå°ç颿鮿¯å¦æ¾ç¤º |
| | | getSelectFlowCard:1,//æµç¨å¡æå°æ¥è¯¢æ¯å¦åå¹¶ 1åå¹¶2ä¸åå¹¶ |
| | | getSelectFlowCard:2,//æµç¨å¡æå°æ¥è¯¢æ¯å¦åå¹¶ 1åå¹¶2ä¸åå¹¶ |
| | | columnsLabel:2,//ä¸è¡ä¸¤åæåæ ç¾ 1æ°çä¸è¡ä¸¤åæåæ ç¾ï¼2å
¶å® |
| | | }, |
| | | |
| | |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | |
| | | :deep(.el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | {field: 'glass_child', title: t('reportingWorks.glassChild'),width:110,filters: [{data: ''}],slots: {filter: 'num1_filter'}, filterMethod: filterChanged}, |
| | | {field: 'reporting_work_id', title: t('reportingWorks.reportingWorkId'),width:120,filters: [{data: ''}],slots: {filter: 'num1_filter'}, filterMethod: filterChanged}, |
| | | {field: 'create_time', title: t('basicData.reportData'),width:120}, |
| | | { |
| | | field: 'print_num', |
| | | title: t('processCard.printStatus'), |
| | | width: 120 |
| | | }, |
| | | ],//表头æé® |
| | | |
| | | toolbarConfig: { |
| | |
| | | |
| | | // ç嬿å°å®æäºä»¶ |
| | | const printNumber = () =>{ |
| | | |
| | | selectRecordsData.value.printList=selectRecords |
| | | let printState=0 |
| | | request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => { |
| | | const $grid = xGrid.value |
| | | selectRecords = $grid.getCheckboxRecords() |
| | | request.post(`/Replenish/updatePrintNum`, selectRecords).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | } else { |
| | | |
| | |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContent" :icon="Printer" circle /> |
| | | <el-button v-print="printContent" :icon="Printer" circle @click="printNumber"/> |
| | | </template> |
| | | <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal" :printLike="printRow.like" |
| | | :mergeTechnologyNumber="printRow.mergeTechnologyNumber" |
| | |
| | | } |
| | | }) |
| | | // è®¡ç®æ»ä»· |
| | | product.totalPrice = details.reduce((sum, d) => sum + (d.materialPric || 0), 0) |
| | | product.totalPrice = details.reduce((sum, d) => sum + (d.materialPric || 0) , 0) |
| | | }) |
| | | dialogTableVisible.value = true |
| | | } |
| | |
| | | //åæ°ï¼ç¸åºçæ°æ®ï¼å®ä½ç±»ä¿¡æ¯ï¼ç¸åºçæ¹æ³ï¼æ°æ®è·åï¼ï¼çæçexcelåå |
| | | DownExcel.download(response, exportReplenishDTO.class, replenishService.exportReplenishSv(dates), "PatchLogAddDTO"); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹æå°æ¬¡æ°") |
| | | @PostMapping("/updatePrintNum") |
| | | public Result updatePrintNum( |
| | | @RequestBody List<Map<String, Object>> object |
| | | ) { |
| | | |
| | | return Result.success(replenishService.updatePrintNumSv(object)); |
| | | } |
| | | } |
| | |
| | | throw new ServiceException(Constants.Code_600, "ä¸å·¥åºå·²å®å·¥æ°éå°äºæ¬å·¥åºæ¥å·¥æ°éï¼è¯·æ£æ¥"); |
| | | } |
| | | } |
| | | @ApiOperation("mesæ¥å·¥æ¥å£æµè¯") |
| | | @PostMapping ("/mesReportingWork1") |
| | | @ApiOperation("mesæ¥å·¥æ¥å£Redis") |
| | | @PostMapping ("/mesReportingWorkRedis") |
| | | public Result mesReportingWorkSvToRedis(@RequestBody Map<String,Object> reportingWork) throws JsonProcessingException, InterruptedException { |
| | | return reportingWorkService.mesReportingWorkSvToRedis(reportingWork); |
| | | } |
| | |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | Integer selectProjectCount(String processId, String patchId, Integer technologyNumber); |
| | | |
| | | List<exportReplenishDTO> exportReplenishMp(List<LocalDate> dates); |
| | | |
| | | Boolean updatePrintNumMp(Integer id); |
| | | } |
| | | |
| | |
| | | |
| | | List<Map<String, String>> getOrderBomDataMp(String orderId); |
| | | |
| | | List<Map<String, String>> getBOMDetails(Integer productId); |
| | | List<Map<String, String>> getBOMDetails(Integer productId, String orderId); |
| | | |
| | | List<Map<String, String>> getOrderBomSumDataMp(String orderId); |
| | | |
| | |
| | | public class ScheduledTasks { |
| | | private final ReportingWorkService reportingWorkService; |
| | | |
| | | // @Scheduled( fixedRate = 2*60*1000) |
| | | // public void reportingWorkRedisToMysql() throws InterruptedException { |
| | | // reportingWorkService.redisToMysqlReportingWork(); |
| | | // } |
| | | @Scheduled( fixedRate = 2*60*1000) |
| | | public void reportingWorkRedisToMysql() throws InterruptedException { |
| | | reportingWorkService.redisToMysqlReportingWork(); |
| | | } |
| | | } |
| | |
| | | materialInventoryMapper.insertMaterialOutbound(materialOutbound, oddNumber); |
| | | log.setFunction("saveMaterialOutboundæ°å¢:"+oddNumber); |
| | | } |
| | | |
| | | //è·å对象éå循ç¯è¿è¡æ°å¢ä¿®æ¹ |
| | | |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | return "false1"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | public Object appGetStockList() { |
| | | ExecutorService executor = Executors.newFixedThreadPool(2); |
| | | AtomicReference<List<MaterialInventory>> materialInventoryList = new AtomicReference<>(new ArrayList<MaterialInventory>()); |
| | | executor.execute(() -> { |
| | | materialInventoryList.set(materialInventoryMapper.selectGetStockList()); |
| | | }); |
| | | List<Object> list = new ArrayList<>(); |
| | | executor.shutdown(); |
| | | //ExecutorService executor = Executors.newFixedThreadPool(2); |
| | | List<MaterialInventory> materialInventoryList = materialInventoryMapper.selectGetStockList(); |
| | | //executor.shutdown(); |
| | | |
| | | Map<String, Object> totalSum = new HashMap<>(); |
| | | |
| | | Integer inventoryQuantity = 0; |
| | | Integer availableQuantity = 0; |
| | | Double totalArea = 0.00; |
| | | for (MaterialInventory materialInventory : materialInventoryList.get()) { |
| | | for (MaterialInventory materialInventory : materialInventoryList) { |
| | | inventoryQuantity += materialInventory.getInventoryQuantity(); |
| | | availableQuantity += materialInventory.getAvailableQuantity(); |
| | | totalArea += materialInventory.getTotalArea(); |
| | |
| | | public List<exportReplenishDTO> exportReplenishSv(List<LocalDate> dates) { |
| | | return patchMapper.exportReplenishMp(dates); |
| | | } |
| | | |
| | | public Boolean updatePrintNumSv(List<Map<String, Object>> list) { |
| | | if (!list.isEmpty()){ |
| | | for (Map<String, Object> item : list) { |
| | | Integer id = (Integer) item.get("id"); |
| | | patchMapper.updatePrintNumMp(id); |
| | | } |
| | | return true; |
| | | }else { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | if (!orderDetailsList.isEmpty()) { |
| | | for (OrderDetail od : orderDetailsList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", bomDataMapper.getBOMDetails(od.getProductId())); |
| | | itemmap.put("data", bomDataMapper.getBOMDetails(od.getProductId(),od.getOrderId())); |
| | | list.add(itemmap); |
| | | |
| | | } |
| | |
| | | </select> |
| | | |
| | | <select id="selectReplenishPrintMp"> |
| | | select fc.id, |
| | | select pl.id, |
| | | fc.order_id, |
| | | fc.process_id, |
| | | o.customer_name, |
| | |
| | | pl.reporting_work_id, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | pl.patch_id, |
| | | date(pl.create_time) as create_time |
| | | date(pl.create_time) as create_time, |
| | | pl.print_num |
| | | |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | |
| | | pd.separation, |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number, |
| | | fc.merge as merge |
| | | fc.merge as merge, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | pd.separation, |
| | | #{compound} as technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | </where> |
| | | order by r.review_status,r.id desc |
| | | </select> |
| | | |
| | | <update id="updatePrintNumMp"> |
| | | update pp.patch_log set print_num=IFNULL(print_num,0)+1 where id=#{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | |
| | | <select id="getOrderBomDataMp"> |
| | | SELECT product_id,product_name,SUM(quantity) as quantity, |
| | | SUM(gross_area) as area,SUM(perimeter) as perimeter from sd.order_detail where order_id=#{orderId} |
| | | SUM(gross_area) as area,SUM(perimeter) as perimeter,order_id from sd.order_detail where order_id=#{orderId} |
| | | GROUP BY product_id |
| | | </select> |
| | | |
| | | <select id="getBOMDetails"> |
| | | select *,(consume*price) as materialPric from sd.bom_product as bp left join sd.bom_base as bb on bb.id=bp.base_id |
| | | where bp.product_id = #{productId} ORDER BY product_layer |
| | | select bp.*,bb.*,(consume*price) as materialPric,od.quantity from sd.bom_product as bp |
| | | left join sd.bom_base as bb on bb.id=bp.base_id |
| | | left join ( select order_id,product_id,SUM(quantity) as quantity from sd.order_detail GROUP BY order_id,product_id |
| | | ) as od on od.product_id = bp.product_id |
| | | where bp.product_id = #{productId} and od.order_id = #{orderId} ORDER BY product_layer |
| | | </select> |
| | | |
| | | <select id="getOrderBomSumDataMp"> |
| | |
| | | bb.type, |
| | | sum(bb.consume) as consume, |
| | | sum(bb.price) as price, |
| | | sum(bb.consume * bb.price) AS materialPrice |
| | | sum(bb.consume * bb.price) AS materialPrice, |
| | | od.quantity |
| | | FROM |
| | | sd.bom_product AS bp |
| | | LEFT JOIN sd.bom_base AS bb ON bb.id = bp.base_id |
| | | LEFT JOIN ( |
| | | select order_id,product_id from sd.order_detail GROUP BY product_id |
| | | select order_id,product_id,SUM(quantity) as quantity from sd.order_detail GROUP BY order_id,product_id |
| | | ) as od on od.product_id = bp.product_id |
| | | |
| | | WHERE od.order_id=#{orderId} |