Merge remote-tracking branch 'origin/dev_pro_河南鹤壁' into dev_鹤壁_强信宇_pro
# Conflicts:
# src/main/resources/application-xcdq.yml
# src/main/resources/application.yml
| | |
| | | !gradle/wrapper/gradle-wrapper.jar
|
| | | claude.md
|
| | | target/
|
| | | test/
|
| | | !.mvn/wrapper/maven-wrapper.jar
|
| | |
|
| | | ######################################################################
|
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # StockInRecord å表æºåå·å端èè°ææ¡£ |
| | | |
| | | æ´æ°æ¶é´ï¼2026-05-22 |
| | | éç¨æ¥å£ï¼`GET /stockInRecord/listPage` |
| | | |
| | | ## 1. åæ´è¯´æ |
| | | |
| | | æ¬æ¬¡å¯¹å
¥åºç®¡çå表æ¥å£å¢å è¿ååæ®µ `sourceOrderNo`ï¼æºåå·ï¼ï¼ç¨äºåææåºæ¯å±ç¤ºéè´æ¥æºåå·ã |
| | | |
| | | çææ¡ä»¶ï¼ |
| | | |
| | | - å½è¯·æ±åæ° `topParentProductId = 278` æ¶ï¼å端è¿å `sourceOrderNo`ã |
| | | - å
¶ä» `topParentProductId` åºæ¯ä¸ï¼è¯¥å段è¿å `null`ï¼æä¸å±ç¤ºï¼ã |
| | | |
| | | ## 2. åæ®µå®ä¹ |
| | | |
| | | æ°å¢åæ®µï¼ |
| | | |
| | | - `sourceOrderNo`ï¼`string`ï¼æºåå·ï¼éè´ååå·ï¼ã |
| | | |
| | | ## 3. åå¼è§å |
| | | |
| | | ä»
å¨ `topParentProductId = 278` æ¶æâæ¥æºâ计ç®ï¼ |
| | | |
| | | 1. æ¥æº = `éè´-å
¥åº`ï¼`recordType = 7`ï¼ |
| | | - å
æ `recordId` æ¥éè´äº§å表 `sales_ledger_product`ï¼`type=2`ï¼ï¼ |
| | | - åéè¿ `sales_ledger_product.sales_ledger_id` æ¥éè´å°è´¦è¡¨ `purchase_ledger`ï¼ |
| | | - è¿å `purchase_ledger.purchase_contract_number` ä½ä¸º `sourceOrderNo`ã |
| | | - å
¼å®¹å
åºï¼è¥æªå½ä¸éè´äº§åé¾è·¯ï¼åæ `recordId` ç´æ¥æ¥ `purchase_ledger.id` ååå·ã |
| | | |
| | | 2. æ¥æº = `éè´-è´¨æ£-åæ ¼å
¥åº`ï¼`recordType = 10`ï¼ |
| | | - å
æ `recordId` æ¥è´¨æ£è¡¨ `quality_inspect`ï¼ |
| | | - åéè¿ `quality_inspect.purchase_ledger_id` æ¥éè´å°è´¦è¡¨ `purchase_ledger`ï¼ |
| | | - è¿å `purchase_ledger.purchase_contract_number` ä½ä¸º `sourceOrderNo`ã |
| | | |
| | | ## 4. è¿åç¤ºä¾ |
| | | |
| | | ```json |
| | | { |
| | | "code": 200, |
| | | "msg": "æä½æå", |
| | | "data": { |
| | | "records": [ |
| | | { |
| | | "id": 1024, |
| | | "recordType": "7", |
| | | "productName": "éæ", |
| | | "model": "T2-30x3", |
| | | "sourceOrderNo": "CG-2026-00128" |
| | | }, |
| | | { |
| | | "id": 1025, |
| | | "recordType": "10", |
| | | "productName": "éæ", |
| | | "model": "T2-30x3", |
| | | "sourceOrderNo": "CG-2026-00131" |
| | | } |
| | | ], |
| | | "total": 2 |
| | | } |
| | | } |
| | | ``` |
| | | |
| | | ## 5. å端èè°å»ºè®® |
| | | |
| | | 1. åè¡¨åæ°å¢âæºåå·âï¼è¯»ååæ®µ `sourceOrderNo`ã |
| | | 2. 建议ä»
å¨ `topParentProductId = 278` ç页é¢/ç鿡件ä¸å±ç¤ºè¯¥åã |
| | | 3. å½ `sourceOrderNo` 为空æ¶å±ç¤º `--`ï¼é¿å
空ç½ã |
| | | |
| | | ## 6. å彿¸
å |
| | | |
| | | 1. `topParentProductId=278` + `recordType=7`ï¼åºè¿åéè´ååå·ã |
| | | 2. `topParentProductId=278` + `recordType=10`ï¼åºè¿åéè´ååå·ï¼ç»è´¨æ£é¾è·¯ï¼ã |
| | | 3. `topParentProductId!=278`ï¼`sourceOrderNo` åºä¸º `null` æå端ä¸å±ç¤ºã |
| | | 4. åæå段ï¼`productName/model/unit/createBy` çï¼ä¸åå½±åã |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # StockInRecord å表æºåå·å端èè°ææ¡£ï¼`topParentProductId=276`è¡¥å
ï¼ |
| | | |
| | | æ´æ°æ¶é´ï¼2026-05-22 |
| | | éç¨æ¥å£ï¼`GET /stockInRecord/listPage` |
| | | |
| | | ## 1. åæ´è¯´æ |
| | | |
| | | å¨å·²æ `sourceOrderNo` åºç¡ä¸ï¼æ°å¢ `topParentProductId = 276` çæºåå·æº¯æºé»è¾ï¼ |
| | | |
| | | - æ ¹æ®âæ¥æºï¼recordTypeï¼+ recordIdâæº¯æºï¼ |
| | | - ä¼å
è¿åéå®åå·ï¼éå®ååå·ï¼ï¼ |
| | | - è¥éå®åå·ä¸ºç©ºï¼ååéè¿åç产订åå·ï¼ |
| | | - ä¸èèèªå®ä¹å
¥åºï¼`recordType=0/9`ï¼ã |
| | | |
| | | ## 2. è¿ååæ®µ |
| | | |
| | | åæ®µæ æ°å¢ï¼ç»§ç»ä½¿ç¨ï¼ |
| | | |
| | | - `sourceOrderNo`ï¼`string`ï¼æºåå·ã |
| | | |
| | | ## 3. 276 åºæ¯åå¼è§å |
| | | |
| | | 请æ±åæ°æ»¡è¶³ `topParentProductId = 276` æ¶ï¼ |
| | | |
| | | 1. `recordType = 14/15`ï¼éå®éè´§-åæ ¼/ä¸åæ ¼å
¥åºï¼ |
| | | - `stock_in_record.record_id -> return_sale_product.id -> return_management.shipping_id -> shipping_info.sales_ledger_id -> sales_ledger.sales_contract_no` |
| | | - è¿åéå®ååå·ã |
| | | |
| | | 2. `recordType = 2/5`ï¼ç产æ¥å·¥-å
¥åº/æ¥åºï¼ |
| | | - `stock_in_record.record_id -> production_product_main.id -> production_operation_task.production_order_id -> production_order` |
| | | - å
å该ç产订åå
³èéå®ååå·ï¼ç±ç产计åå
³èéå®å°è´¦èåï¼ï¼ |
| | | - éå®ååå·ä¸ºç©ºæ¶ï¼è¿å `production_order.nps_no`ã |
| | | |
| | | 3. `recordType = 6`ï¼è´¨æ£-åæ ¼å
¥åºï¼ |
| | | - `stock_in_record.record_id -> quality_inspect.id -> quality_inspect.product_main_id -> production_product_main -> production_operation_task -> production_order` |
| | | - å
åéå®ååå·ï¼ç©ºååé `production_order.nps_no`ã |
| | | |
| | | 4. `recordType = 4/11`ï¼ä¸åæ ¼å¤ç-æ¥åº/è®©æ¥æ¾è¡ï¼ |
| | | - `stock_in_record.record_id -> quality_unqualified.id -> quality_unqualified.inspect_id -> quality_inspect -> production_product_main -> production_operation_task -> production_order` |
| | | - å
åéå®ååå·ï¼ç©ºååé `production_order.nps_no`ã |
| | | |
| | | 5. `recordType = 20/22`ï¼é¢æéæ/ç产éæ-åæ ¼å
¥åºï¼ |
| | | - `stock_in_record.record_id -> production_order_pick.id -> production_order` |
| | | - å
åéå®ååå·ï¼ç©ºååé `production_order.nps_no`ã |
| | | |
| | | 6. `recordType = 0/9`ï¼èªå®ä¹å
¥åºï¼ |
| | | - ä¸å䏿º¯æºï¼`sourceOrderNo = null`ã |
| | | |
| | | ## 4. å
¶ä»åºæ¯è¯´æ |
| | | |
| | | - `topParentProductId = 278` çéè´é¾è·¯æºåå·é»è¾ä¿æä¸åã |
| | | - å
¶ä» `topParentProductId` ä¸è§¦åæ¬æ¬¡ 276 è§åï¼`sourceOrderNo` 为空ã |
| | | |
| | | ## 5. å端èè°å»ºè®® |
| | | |
| | | 1. å¨ `topParentProductId=276` çåè¡¨åºæ¯å±ç¤ºâæºåå·âåï¼è¯»å `sourceOrderNo`ã |
| | | 2. 建议空å¼ç»ä¸å±ç¤º `--`ã |
| | | 3. ä¸éè¦æ°å¢è¯·æ±åæ°ï¼æ²¿ç¨ç°æ `/stockInRecord/listPage`ã |
| | | |
| | | ## 6. å彿¸
å |
| | | |
| | | 1. `topParentProductId=276` + `recordType=14/15`ï¼åºè¿åéå®ååå·ã |
| | | 2. `topParentProductId=276` + `recordType=2/5/6/4/11/20/22`ï¼ä¼å
éå®ååå·ï¼ç¼ºå¤±æ¶è¿åç产订åå·ã |
| | | 3. `topParentProductId=276` + `recordType=0/9`ï¼`sourceOrderNo` 为空ã |
| | | 4. `topParentProductId=278`ï¼ä»æéè´é¾è·¯è¿åéè´ååå·ã |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # éè´å
¥åºç¶æå端èè°ææ¡£ |
| | | æ´æ°æ¶é´ï¼2026-05-22 |
| | | éç¨çæ¬ï¼æ¬æ¬¡åç«¯åæ´å |
| | | |
| | | ## 1. åæ´èå´ |
| | | |
| | | 1. `GET /purchaseLedger/listPage` |
| | | - æ°å¢æ¥è¯¢æ¡ä»¶ï¼`stockInStatus`ï¼å
¥åºç¶æï¼ |
| | | - æ°å¢è¿ååæ®µï¼`stockInStatus`ï¼å
¥åºç¶æï¼ |
| | | 2. `GET /salesLedgerProduct/list` |
| | | - æ°å¢è¿ååæ®µï¼`stockInApprovalStatus`ï¼æ¯ä¸ªäº§åçå
¥åºå®¡æ ¸ç¶æï¼ |
| | | |
| | | --- |
| | | |
| | | ## 2. å
¥åºç¶ææä¸¾ï¼ä¸¤æ¥å£ä¸è´ï¼ |
| | | |
| | | - `å¾
å
¥åº` |
| | | - `å
¥åºä¸` |
| | | - `å®å
¨å
¥åº` |
| | | |
| | | 说æï¼å端çéå¼è¯·ç´æ¥ä½¿ç¨ä»¥ä¸ä¸ææä¸¾å¼ã |
| | | |
| | | --- |
| | | |
| | | ## 3. æ¥å£ä¸ï¼`GET /purchaseLedger/listPage` |
| | | |
| | | ### 3.1 æ°å¢è¯·æ±åæ° |
| | | |
| | | - `stockInStatus`ï¼`string`ï¼å¯é |
| | | å¯ä¼ å¼ï¼`å¾
å
¥åº` / `å
¥åºä¸` / `å®å
¨å
¥åº` |
| | | |
| | | ### 3.2 æ°å¢è¿ååæ®µ |
| | | |
| | | - `stockInStatus`ï¼`string`ï¼éè´å°è´¦ç»´åº¦å
¥åºç¶æ |
| | | |
| | | ### 3.3 ç¶æè®¡ç®è§åï¼éè´å°è´¦ç»´åº¦ï¼ |
| | | |
| | | 以该éè´å°è´¦ä¸ `sales_ledger_product.type = 2` çéè´äº§å为计ç®èå´ï¼ |
| | | |
| | | 1. å
¨é¨äº§åé½è¾¾å°âå®å
¨å
¥åºâ => å°è´¦ç¶æ `å®å
¨å
¥åº` |
| | | 2. è³å°æä¸ä¸ªäº§ååå¨âå®¡æ ¸éè¿å
¥åºâï¼ä½æªå
¨é¨å®å
¨å
¥åº => å°è´¦ç¶æ `å
¥åºä¸` |
| | | 3. 没æä»»ä½äº§ååå¨âå®¡æ ¸éè¿å
¥åºâ => å°è´¦ç¶æ `å¾
å
¥åº` |
| | | |
| | | âå®¡æ ¸éè¿å
¥åºâç»è®¡å£å¾ï¼`stock_in_record.approval_status = 1`ï¼å¹¶æä»¥ä¸æ¥æºæº¯æºï¼ |
| | | - `record_type = 7`ï¼éè´-å
¥åºï¼ï¼æéè´å°è´¦+产åå
³èç»è®¡ |
| | | - `record_type = 10`ï¼éè´-è´¨æ£-åæ ¼å
¥åºï¼ï¼éè¿ `quality_inspect` åæº¯å°éè´å°è´¦+产åç»è®¡ |
| | | |
| | | ### 3.4 è¿å示ä¾ï¼èéï¼ |
| | | |
| | | ```json |
| | | { |
| | | "code": 200, |
| | | "msg": "æä½æå", |
| | | "data": { |
| | | "records": [ |
| | | { |
| | | "id": 1201, |
| | | "purchaseContractNumber": "CG20260522001", |
| | | "supplierName": "XXä¾åºå", |
| | | "stockInStatus": "å
¥åºä¸" |
| | | } |
| | | ], |
| | | "total": 1 |
| | | } |
| | | } |
| | | ``` |
| | | |
| | | --- |
| | | |
| | | ## 4. æ¥å£äºï¼`GET /salesLedgerProduct/list` |
| | | |
| | | ### 4.1 æ°å¢è¿ååæ®µ |
| | | |
| | | - `stockInApprovalStatus`ï¼`string`ï¼å½å产åè¡çå
¥åºå®¡æ ¸ç¶æ |
| | | |
| | | ### 4.2 ç¶æè®¡ç®è§åï¼äº§åç»´åº¦ï¼ |
| | | |
| | | ä»
å½äº§å `type = 2`ï¼éè´äº§åï¼æ¶è®¡ç®å¹¶è¿åï¼ |
| | | |
| | | 1. å®¡æ ¸éè¿å
¥åºæ°é `<= 0` => `å¾
å
¥åº` |
| | | 2. å®¡æ ¸éè¿å
¥åºæ°é `>= 产åéè´æ°é` => `å®å
¨å
¥åº` |
| | | 3. å
¶ä»æ
åµ => `å
¥åºä¸` |
| | | |
| | | å
¶ä¸âå®¡æ ¸éè¿å
¥åºæ°éâç»è®¡åæ ·åºäºï¼ |
| | | - `stock_in_record.approval_status = 1` |
| | | - æ¥æº `record_type = 7 / 10` çæº¯æºå
³èé»è¾ |
| | | |
| | | `type != 2` ç产åï¼è¯¥å段è¿å `null`ã |
| | | |
| | | ### 4.3 è¿å示ä¾ï¼èéï¼ |
| | | |
| | | ```json |
| | | { |
| | | "code": 200, |
| | | "msg": "æä½æå", |
| | | "data": [ |
| | | { |
| | | "id": 5566, |
| | | "type": 2, |
| | | "productCategory": "éæ", |
| | | "specificationModel": "T2-30x3", |
| | | "quantity": 100, |
| | | "stockInApprovalStatus": "å¾
å
¥åº" |
| | | } |
| | | ] |
| | | } |
| | | ``` |
| | | |
| | | --- |
| | | |
| | | ## 5. å端æ¹é 建议 |
| | | |
| | | 1. éè´å°è´¦å表æ°å¢âå
¥åºç¶æâçé项ï¼å¼åºå®ï¼`å¾
å
¥åº/å
¥åºä¸/å®å
¨å
¥åº`ã |
| | | 2. éè´å°è´¦å表æ°å¢âå
¥åºç¶æâåï¼å±ç¤º `stockInStatus`ã |
| | | 3. éè´äº§åå表æ°å¢âå
¥åºå®¡æ ¸ç¶æâåï¼å±ç¤º `stockInApprovalStatus`ã |
| | | 4. 空å¼ï¼å¦ `type != 2`ï¼å»ºè®®å±ç¤ºä¸º `--`ã |
| | | |
| | | --- |
| | | |
| | | ## 6. èè°æ£æ¥æ¸
å |
| | | |
| | | 1. `/purchaseLedger/listPage` ä¸ä¼ `stockInStatus`ï¼åºæ£å¸¸è¿åå
¨é¨æ°æ®ï¼å¹¶å¸¦ `stockInStatus`ã |
| | | 2. `/purchaseLedger/listPage?stockInStatus=å¾
å
¥åº`ï¼ä»
è¿åå¾
å
¥åºå°è´¦ã |
| | | 3. `/purchaseLedger/listPage?stockInStatus=å
¥åºä¸`ï¼ä»
è¿åå
¥åºä¸å°è´¦ã |
| | | 4. `/purchaseLedger/listPage?stockInStatus=å®å
¨å
¥åº`ï¼ä»
è¿åå®å
¨å
¥åºå°è´¦ã |
| | | 5. `/salesLedgerProduct/list` å¨éè´äº§åï¼`type=2`ï¼ä¸è¿å `stockInApprovalStatus`ã |
| | | 6. `/salesLedgerProduct/list` å¨ééè´äº§åï¼`type!=2`ï¼ä¸ `stockInApprovalStatus` 为 `null`ã |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | ALTER TABLE approve_process |
| | | ADD COLUMN start_date_time datetime DEFAULT NULL COMMENT 'åºå·®å¼å§æ¶é´', |
| | | ADD COLUMN end_date_time datetime DEFAULT NULL COMMENT 'åºå·®ç»ææ¶é´'; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | alter table stock_in_record |
| | | add warn_num decimal(16, 4) null comment 'é¢è¦æ°é'; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | ALTER TABLE after_sales_service |
| | | ADD COLUMN rating DECIMAL(2, 1) COMMENT 'è¯å(1-5åï¼å¯ä¿ç1ä½å°æ°)' AFTER dis_date, |
| | | ADD COLUMN evaluation VARCHAR(1000) COMMENT 'è¯ä»·å
容æè¿°' AFTER rating; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | ALTER TABLE `after_sales_service` |
| | | ADD COLUMN `product_model_quantities` varchar(255) DEFAULT NULL COMMENT '产ååå·å¯¹åºå®åæ°é'; |
| | |
| | | @Excel(name = "å
³èé¨é¨") |
| | | private String deptName; |
| | | |
| | | @Schema(description = "è¯å") |
| | | @Excel(name = "è¯å") |
| | | private String rating; |
| | | |
| | | @Schema(description = "è¯ä»·å
容æè¿°") |
| | | @Excel(name = "è¯ä»·å
容æè¿°") |
| | | private String evaluation; |
| | | |
| | | } |
| | |
| | | @Schema(description = "产ååå·IDs") |
| | | private String productModelIds; |
| | | |
| | | @Schema(description = "产ååå·æ°é,éå·åé") |
| | | private String productModelQuantities; |
| | | |
| | | @Schema(description = "è¯å(1-5å)") |
| | | @Excel(name = "è¯å") |
| | | private BigDecimal rating; |
| | | |
| | | @Schema(description = "è¯ä»·å
容æè¿°") |
| | | @Excel(name = "è¯ä»·å
容æè¿°") |
| | | private String evaluation; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | |
| | | private final SysUserMapper sysUserMapper; |
| | | private final ISalesLedgerProductService salesLedgerProductService; |
| | | private final ISalesLedgerService salesLedgerService; |
| | | private final com.ruoyi.sales.mapper.ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | @Override |
| | | public IPage<AfterSalesServiceNewDto> listPage(Page page, AfterSalesServiceNewDto afterSalesService) { |
| | |
| | | SalesLedger byId = salesLedgerService.getById(afterSalesService.getSalesLedgerId()); |
| | | List<Long> collect = Arrays.stream(afterSalesService.getProductModelIds().split(",")).map(Long::valueOf).collect(Collectors.toList()); |
| | | List<SalesLedgerProduct> list = salesLedgerProductService.list(new QueryWrapper<SalesLedgerProduct>().lambda().in(SalesLedgerProduct::getId, collect)); |
| | | |
| | | if (StringUtils.isNotEmpty(afterSalesService.getProductModelQuantities())) { |
| | | String[] quantities = afterSalesService.getProductModelQuantities().split(","); |
| | | for (int i = 0; i < collect.size(); i++) { |
| | | Long productId = collect.get(i); |
| | | for (SalesLedgerProduct product : list) { |
| | | if (product.getId().equals(productId)) { |
| | | if (i < quantities.length && StringUtils.isNotEmpty(quantities[i])) { |
| | | product.setQuantity(new java.math.BigDecimal(quantities[i])); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | for (SalesLedgerProduct product : list) { |
| | | com.ruoyi.sales.pojo.ShippingInfo shippingInfo = shippingInfoMapper.selectOne( |
| | | new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<com.ruoyi.sales.pojo.ShippingInfo>() |
| | | .eq(com.ruoyi.sales.pojo.ShippingInfo::getSalesLedgerProductId, product.getId()) |
| | | .orderByDesc(com.ruoyi.sales.pojo.ShippingInfo::getCreateTime) |
| | | .last("limit 1") |
| | | ); |
| | | if (shippingInfo != null) { |
| | | product.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | product.setShippingDate(shippingInfo.getShippingDate()); |
| | | product.setShippingStatus(shippingInfo.getStatus()); |
| | | product.setExpressCompany(shippingInfo.getExpressCompany()); |
| | | product.setExpressNumber(shippingInfo.getExpressNumber()); |
| | | } |
| | | } |
| | | |
| | | AfterSalesServiceNewDto afterSalesServiceNewDto = new AfterSalesServiceNewDto(); |
| | | BeanUtils.copyProperties(afterSalesService, afterSalesServiceNewDto); |
| | | SalesLedgerDto salesLedgerDto = new SalesLedgerDto(); |
| | |
| | | import com.ruoyi.ai.store.MongoChatMemoryStore; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "è´¢å¡æºè½ä½å¯¹è¯") |
| | | @Log(title = "è´¢å¡æºè½ä½å¯¹è¯", businessType = BusinessType.OTHER) |
| | | @PostMapping(value = "/chat", produces = "text/stream;charset=utf-8") |
| | | public Flux<String> chat(@RequestBody ChatForm chatForm) { |
| | | if (!StringUtils.hasText(chatForm.getMemoryId())) { |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤è´¢å¡æºè½ä½ä¼è¯") |
| | | @Log(title = "å é¤è´¢å¡æºè½ä½ä¼è¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/history/{memoryId}") |
| | | public AjaxResult deleteSession(@PathVariable String memoryId) { |
| | | aiSessionUserContext.remove(memoryId); |
| | |
| | | import com.ruoyi.ai.store.MongoChatMemoryStore; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å¶é 对è¯") |
| | | @Log(title = "å¶é æºè½ä½å¯¹è¯", businessType = BusinessType.OTHER) |
| | | @PostMapping(value = "/chat", produces = "text/stream;charset=utf-8") |
| | | public Flux<String> chat(@RequestBody ChatForm chatForm) { |
| | | if (!StringUtils.hasText(chatForm.getMemoryId())) { |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤å¶é ä¼è¯") |
| | | @Log(title = "å é¤å¶é æºè½ä½ä¼è¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/history/{memoryId}") |
| | | public AjaxResult deleteSession(@PathVariable String memoryId) { |
| | | aiSessionUserContext.remove(memoryId); |
| | |
| | | import com.ruoyi.ai.bean.PurchaseAiConfirmRequest; |
| | | import com.ruoyi.ai.service.PurchaseAiService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "éè´å¯¹è¯") |
| | | @Log(title = "éè´æºè½ä½å¯¹è¯", businessType = BusinessType.OTHER) |
| | | @PostMapping(value = "/chat", produces = "text/stream;charset=utf-8") |
| | | public Flux<String> chat(@RequestBody ChatForm chatForm) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "éè´å¤æä»¶åæ") |
| | | @Log(title = "éè´å¤æä»¶åæ", businessType = BusinessType.OTHER) |
| | | @PostMapping(value = "/analyze-files", consumes = "multipart/form-data", produces = "text/stream;charset=utf-8") |
| | | public Flux<String> analyzeFiles(@RequestParam("files") MultipartFile[] files, |
| | | @RequestParam(value = "message", required = false) String message, |
| | |
| | | } |
| | | |
| | | @Operation(summary = "éè´å¤æä»¶åæç¡®è®¤å¤ç") |
| | | @Log(title = "éè´å¤æä»¶åæç¡®è®¤", businessType = BusinessType.OTHER) |
| | | @PostMapping("/analyze-files/confirm") |
| | | public AjaxResult confirmAnalyzeResult(@RequestBody PurchaseAiConfirmRequest request) { |
| | | return purchaseAiService.confirmAnalyzeResult(request); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤éè´ä¼è¯") |
| | | @Log(title = "å é¤éè´æºè½ä½ä¼è¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/history/{memoryId}") |
| | | public AjaxResult deleteSession(@PathVariable String memoryId) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | |
| | | import com.ruoyi.ai.store.MongoChatMemoryStore; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "éå®å©æå¯¹è¯") |
| | | @Log(title = "é宿ºè½ä½å¯¹è¯", businessType = BusinessType.OTHER) |
| | | @PostMapping(value = "/chat", produces = "text/stream;charset=utf-8") |
| | | public Flux<String> chat(@RequestBody ChatForm chatForm) { |
| | | if (!StringUtils.hasText(chatForm.getMemoryId())) { |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤éå®å©æä¼è¯") |
| | | @Log(title = "å é¤é宿ºè½ä½ä¼è¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/history/{memoryId}") |
| | | public AjaxResult deleteSession(@PathVariable String memoryId) { |
| | | aiSessionUserContext.remove(memoryId); |
| | |
| | | import com.ruoyi.ai.store.MongoChatMemoryStore; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "对è¯") |
| | | @Log(title = "åååå
¬å©æå¯¹è¯", businessType = BusinessType.OTHER) |
| | | @PostMapping(value = "/chat", produces = "text/stream;charset=utf-8") |
| | | public Flux<String> chat(@RequestBody ChatForm chatForm) { |
| | | if (!StringUtils.hasText(chatForm.getMemoryId())) { |
| | |
| | | } |
| | | |
| | | @Operation(summary = "ä¸ä¼ æä»¶åæ") |
| | | @Log(title = "ä¸ä¼ æä»¶åæ", businessType = BusinessType.OTHER) |
| | | @PostMapping(value = "/analyze-file", consumes = "multipart/form-data", produces = "text/stream;charset=utf-8") |
| | | public Flux<String> analyzeFile(@RequestParam("file") MultipartFile file, |
| | | @RequestParam(value = "message", required = false) String message, |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤ä¼è¯") |
| | | @Log(title = "å é¤åååå
¬å©æä¼è¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/history/{memoryId}") |
| | | public AjaxResult deleteSession(@PathVariable String memoryId) { |
| | | aiSessionUserContext.remove(memoryId); |
| | |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date endDate; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "åºå·®å¼å§æ¶é´") |
| | | private LocalDateTime startDateTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "åºå·®ç»ææ¶é´") |
| | | private LocalDateTime endDateTime; |
| | | |
| | | private BigDecimal price; |
| | | |
| | | private String location; |
| | |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date endDate; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "åºå·®å¼å§æ¶é´") |
| | | private LocalDateTime startDateTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "åºå·®ç»ææ¶é´") |
| | | private LocalDateTime endDateTime; |
| | | |
| | | private BigDecimal price; |
| | | |
| | | private String location; |
| | |
| | | |
| | | import com.ruoyi.approve.pojo.ApproveNode; |
| | | import com.ruoyi.approve.service.IApproveNodeService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | * @param approveNode |
| | | * @return |
| | | */ |
| | | @Log(title = "审æ¹èç¹", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateApproveNode") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Operation(summary = "审æ¹èç¹") |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Log(title = "åå§å审æ¹èç¹", businessType = BusinessType.INSERT) |
| | | @PostMapping("/init") |
| | | public AjaxResult init(String id) { |
| | | approveNodeService.initApproveNodes("",id,1L); |
| | |
| | | |
| | | import com.ruoyi.approve.pojo.ApproveProcessConfigNode; |
| | | import com.ruoyi.approve.service.ApproveProcessConfigNodeService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation("æ·»å 审æ¹èç¹") |
| | | @Log(title = "å®¡æ¹æµç¨èç¹", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R addApproveProcessConfigNodes(@RequestBody List<ApproveProcessConfigNode> approveProcessConfigNodes) { |
| | | return R.ok(approveProcessConfigNodeService.addApproveProcessConfigNodes(approveProcessConfigNodes)); |
| | |
| | | import com.ruoyi.approve.bean.vo.ApproveProcessVO; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | |
| | | * @param approveProcessVO |
| | | * @return |
| | | */ |
| | | @Log(title = "æ·»å 审æ¹", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Operation(summary = "æ·»å 审æ¹") |
| | |
| | | * @param approveGetAndUpdateVo |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°å®¡æ¹", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Operation(summary = "æ´æ°å®¡æ¹") |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å®¡æ¹", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteIds") |
| | | @Operation(summary = "å é¤å®¡æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å
¬åºç®¡ç导åº") |
| | | @Log(title = "å
¬åºç®¡ç导åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "请å管ç导åº") |
| | | @Log(title = "请å管ç导åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportTwo") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "åºå·®ç®¡ç导åº") |
| | | @Log(title = "åºå·®ç®¡ç导åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportThree") |
| | | public void exportThree(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ¥é管ç导åº") |
| | | @Log(title = "æ¥é管ç导åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportFour") |
| | | public void exportFour(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "éè´ç³è¯·å¯¼åº") |
| | | @Log(title = "éè´ç³è¯·å¯¼åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportFive") |
| | | public void exportFive(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "åå审æ¹å¯¼åº") |
| | | @Log(title = "åå审æ¹å¯¼åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportZero") |
| | | public void exportZero(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å±é©ä½ä¸å®¡æ¹å¯¼åº") |
| | | @Log(title = "å±é©ä½ä¸å®¡æ¹å¯¼åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportEight") |
| | | public void exportEight(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | import com.ruoyi.approve.mapper.WorkingHoursSettingMapper; |
| | | import com.ruoyi.approve.pojo.*; |
| | | import com.ruoyi.approve.service.HolidaySettingsService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * 墿·» |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»åæè®¾ç½®", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody HolidaySettings holidaySettings){ |
| | | return AjaxResult.success(holidaySettingsService.save(holidaySettings)); |
| | |
| | | * æ´æ° |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°åæè®¾ç½®", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody HolidaySettings holidaySettings){ |
| | | return AjaxResult.success(holidaySettingsService.updateById(holidaySettings)); |
| | |
| | | * å é¤ |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤åæè®¾ç½®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | * 墿·»å¹´åè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»å¹´åè§å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addAnnualLeaveSetting") |
| | | public AjaxResult addAnnualLeaveSetting(@RequestBody AnnualLeaveSetting annualLeaveSetting){ |
| | | return AjaxResult.success(annualLeaveSettingMapper.insert(annualLeaveSetting)); |
| | |
| | | * æ´æ°å¹´åè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°å¹´åè§å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateAnnualLeaveSetting") |
| | | public AjaxResult updateAnnualLeaveSetting(@RequestBody AnnualLeaveSetting annualLeaveSetting){ |
| | | return AjaxResult.success(annualLeaveSettingMapper.updateById(annualLeaveSetting)); |
| | |
| | | * å é¤å¹´åè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å¹´åè§å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteAnnualLeaveSetting") |
| | | public AjaxResult deleteAnnualLeaveSetting(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | * 墿·»å çè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»å çè§å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOvertimeSetting") |
| | | public AjaxResult addOvertimeSetting(@RequestBody OvertimeSetting overtimeSetting){ |
| | | return AjaxResult.success(overtimeSettingMapper.insert(overtimeSetting)); |
| | |
| | | * æ´æ°å çè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°å çè§å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateOvertimeSetting") |
| | | public AjaxResult updateOvertimeSetting(@RequestBody OvertimeSetting overtimeSetting){ |
| | | return AjaxResult.success(overtimeSettingMapper.updateById(overtimeSetting)); |
| | |
| | | * å é¤å çè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å çè§å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteOvertimeSetting") |
| | | public AjaxResult deleteOvertimeSetting(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | * 墿·»çå¶è§å |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»çå¶è§å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addWorkingHoursSetting") |
| | | public AjaxResult addWorkingHoursSetting(@RequestBody WorkingHoursSetting workingHoursSetting){ |
| | | return AjaxResult.success(workingHoursSettingMapper.insert(workingHoursSetting)); |
| | |
| | | * æ´æ°çå¶è§å |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°çå¶è§å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateWorkingHoursSetting") |
| | | public AjaxResult updateWorkingHoursSetting(@RequestBody WorkingHoursSetting workingHoursSetting){ |
| | | return AjaxResult.success(workingHoursSettingMapper.updateById(workingHoursSetting)); |
| | |
| | | * å é¤çå¶è§å |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤çå¶è§å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteWorkingHoursSetting") |
| | | public AjaxResult deleteWorkingHoursSetting(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | import com.ruoyi.approve.pojo.KnowledgeBase; |
| | | import com.ruoyi.approve.service.KnowledgeBaseService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | * 墿·» |
| | | * @return |
| | | */ |
| | | @Log(title = "ç¥è¯åº", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody KnowledgeBase knowledgeBase){ |
| | | return AjaxResult.success(knowledgeBaseService.save(knowledgeBase)); |
| | |
| | | * æ´æ° |
| | | * @return |
| | | */ |
| | | @Log(title = "ç¥è¯åº", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody KnowledgeBase knowledgeBase){ |
| | | return AjaxResult.success(knowledgeBaseService.updateById(knowledgeBase)); |
| | |
| | | * å é¤ |
| | | * @return |
| | | */ |
| | | @Log(title = "ç¥è¯åº", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(knowledgeBaseService.removeByIds(ids)); |
| | | } |
| | | |
| | | @Log(title = "ç¥è¯åº", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "ç¥è¯åºç®¡ç导åº") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | import com.ruoyi.approve.pojo.NotificationManagement; |
| | | import com.ruoyi.approve.pojo.OnlineMeeting; |
| | | import com.ruoyi.approve.service.NotificationManagementService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * 墿·» |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»éç¥ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody NotificationManagement notificationManagement){ |
| | | return AjaxResult.success(notificationManagementService.save(notificationManagement)); |
| | |
| | | * æ´æ° |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°éç¥ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody NotificationManagement notificationManagement){ |
| | | return AjaxResult.success(notificationManagementService.updateById(notificationManagement)); |
| | |
| | | * å é¤ |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤éç¥ç®¡ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | * @param onlineMeeting |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢çº¿ä¸ä¼è®®", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOnlineMeeting") |
| | | public AjaxResult addOnlineMeeting(@RequestBody OnlineMeeting onlineMeeting){ |
| | | return AjaxResult.success(onlineMeetingMapper.insert(onlineMeeting)); |
| | |
| | | *æ°å¢æä»¶å
񄧮 |
| | | * |
| | | */ |
| | | @Log(title = "æ°å¢æä»¶å
񄧮", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addFileSharing") |
| | | public AjaxResult addFileSharing(@RequestBody FileSharing fileSharing){ |
| | | return AjaxResult.success(fileSharingMapper.insert(fileSharing)); |
| | |
| | | import com.ruoyi.approve.pojo.RpaProcessAutomation; |
| | | import com.ruoyi.approve.service.RpaProcessAutomationService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | * 墿·» |
| | | * @return |
| | | */ |
| | | @Log(title = "RPAæµç¨èªå¨å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody RpaProcessAutomation rpaProcessAutomation){ |
| | | return AjaxResult.success(rpaProcessAutomationService.save(rpaProcessAutomation)); |
| | |
| | | * æ´æ° |
| | | * @return |
| | | */ |
| | | @Log(title = "RPAæµç¨èªå¨å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody RpaProcessAutomation rpaProcessAutomation){ |
| | | return AjaxResult.success(rpaProcessAutomationService.updateById(rpaProcessAutomation)); |
| | |
| | | * å é¤ |
| | | * @return |
| | | */ |
| | | @Log(title = "RPAæµç¨èªå¨å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(rpaProcessAutomationService.removeByIds(ids)); |
| | | } |
| | | |
| | | @Log(title = "RPAæµç¨èªå¨å", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "RPAæµç¨èªå¨å导åº") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date endDate; |
| | | |
| | | @Excel(name = "åºå·®å¼å§æ¶é´", dateFormat = "yyyy-MM-dd HH:mm", width = 30) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "åºå·®å¼å§æ¶é´") |
| | | private LocalDateTime startDateTime; |
| | | |
| | | @Excel(name = "åºå·®ç»ææ¶é´", dateFormat = "yyyy-MM-dd HH:mm", width = 30) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "åºå·®ç»ææ¶é´") |
| | | private LocalDateTime endDateTime; |
| | | |
| | | private BigDecimal price; |
| | | |
| | | private String location; |
| | |
| | | approveProcess.setPrice(approveProcessVO.getPrice()); |
| | | approveProcess.setStartDate(approveProcessVO.getStartDate()); |
| | | approveProcess.setEndDate(approveProcessVO.getEndDate()); |
| | | approveProcess.setStartDateTime(approveProcessVO.getStartDateTime()); |
| | | approveProcess.setEndDateTime(approveProcessVO.getEndDateTime()); |
| | | approveProcess.setApproveStatus(0); |
| | | approveProcess.setApproveDelete(0); |
| | | approveProcess.setApproveType(approveProcessVO.getApproveType()); |
| | |
| | | |
| | | import com.ruoyi.basic.dto.StorageAttachmentDTO; |
| | | import com.ruoyi.basic.service.StorageAttachmentService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | * @param ids æä»¶idå表 |
| | | * @return å é¤ç»æ |
| | | */ |
| | | @Log(title = "åå¨éä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤éç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯") |
| | | public R batchDelete(@RequestBody List<Long> ids) { |
| | |
| | | /** |
| | | * ä¿åéç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯ |
| | | */ |
| | | @Log(title = "åå¨éä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "ä¿åéç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯") |
| | | public R add(@RequestBody StorageAttachmentDTO storageAttachmentDTO) { |
| | |
| | | * @param supplierManage |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¾åºå管ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SupplierManage supplierManage) { |
| | | supplierService.saveSupplier(supplierManage); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¾åºå管ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delSupplier(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | * @param supplierManage |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¾åºå管ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody SupplierManage supplierManage) { |
| | | supplierService.supplierUpdate(supplierManage); |
| | |
| | | * @param response |
| | | * @param supplierManageDto |
| | | */ |
| | | @Log(title = "ä¾åºå管ç", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void supplierExport(HttpServletResponse response,SupplierManageDto supplierManageDto) { |
| | | supplierService.supplierExport(response, supplierManageDto); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.SupplierManageFile; |
| | | import com.ruoyi.basic.service.SupplierManageFileService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * @param supplierManageFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢ä¾åºåéä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SupplierManageFile supplierManageFile) { |
| | | return AjaxResult.success(supplierManageFileService.save(supplierManageFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤ä¾åºåéä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delSupplierManageFile(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagement; |
| | | import com.ruoyi.collaborativeApproval.service.DutyPlanService; |
| | | import com.ruoyi.common.utils.excel.ExcelUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | return AjaxResult.success(dutyPlanService.getNum()); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢å¼ç计å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public AjaxResult add(@RequestBody DutyPlan dutyPlan){ |
| | | return AjaxResult.success(dutyPlanService.save(dutyPlan)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹å¼ç计å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody DutyPlan dutyPlan){ |
| | | return AjaxResult.success(dutyPlanService.updateById(dutyPlan)); |
| | | } |
| | | |
| | | @Log(title = "å é¤å¼ç计å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | |
| | | } |
| | | return AjaxResult.success(dutyPlanService.removeBatchByIds(ids)); |
| | | } |
| | | @Log(title = "导åºå¼ç计å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @Operation(summary = "导åº") |
| | | public void exportData(HttpServletResponse response, DutyPlanDTO dutyPlanDTO){ |
| | |
| | | import com.ruoyi.collaborativeApproval.vo.SearchMeetingRoomVo; |
| | | import com.ruoyi.collaborativeApproval.vo.SearchMeetingUseVo; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return R.ok(meetingService.getMeetingRoomList(vo)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢ä¼è®®å®¤", businessType = BusinessType.INSERT) |
| | | @PostMapping("/saveRoom") |
| | | public R saveRoom(@RequestBody MeetingRoom meetingRoom) { |
| | | meetingService.saveMeetRoom(meetingRoom); |
| | |
| | | return R.ok(meetingService.findMeetRoomById(id)); |
| | | } |
| | | |
| | | @Log(title = "å é¤ä¼è®®å®¤", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delRoom/{id}") |
| | | public R deleteRoom(@PathVariable Long id) { |
| | | meetingService.deleteMeetingRoom(id); |
| | |
| | | return R.ok(meetingService.getMeetingDraftList(vo)); |
| | | } |
| | | |
| | | @Log(title = "ä¿åä¼è®®è稿", businessType = BusinessType.INSERT) |
| | | @PostMapping("/saveDraft") |
| | | public R saveMeetingDraft(@RequestBody MeetDraft meetDraft) { |
| | | meetingService.saveMeetDraft(meetDraft); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Log(title = "å é¤ä¼è®®è稿", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delDraft/{id}") |
| | | public R deleteMeetingDraft(@PathVariable Long id) { |
| | | meetingService.deleteMeetingDraft(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢ä¼è®®ç³è¯·", businessType = BusinessType.INSERT) |
| | | @PostMapping("/saveMeetingApplication") |
| | | public R saveMeetApplication(@RequestBody MeetApplication meetApplication) { |
| | | return meetingService.saveMeetApplication(meetApplication); |
| | |
| | | return R.ok(meetingService.getMeetingMinutesById(id)); |
| | | } |
| | | |
| | | @Log(title = "ä¿åä¼è®®çºªè¦", businessType = BusinessType.INSERT) |
| | | @PostMapping("/saveMeetingMinutes") |
| | | public R saveMeetingMinutes(@RequestBody MeetingMinutes meetingMinutes) { |
| | | meetingService.saveMeetingMinutes(meetingMinutes); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "ä¼è®®å®¤è®¾ç½®å¯¼åº") |
| | | @Log(title = "导åºä¼è®®å®¤è®¾ç½®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | List<MeetingRoom> accountExpenses = meetingService.list(); |
| | |
| | | private final MeetDraftMapper meetDraftMapper; |
| | | |
| | | @Operation(summary = "ä¼è®®è稿导åº") |
| | | @Log(title = "导åºä¼è®®è稿", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<MeetDraft> accountExpenses = meetDraftMapper.selectList(new LambdaQueryWrapper<MeetDraft>()); |
| | |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.collaborativeApproval.pojo.NoticeType; |
| | | import com.ruoyi.collaborativeApproval.service.NoticeTypeService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @param noticeType |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢å
¬åç±»å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody NoticeType noticeType) { |
| | | return AjaxResult.success(noticeTypeService.saveOrUpdate(noticeType)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å
¬åç±»å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delNoticeType(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | import com.ruoyi.collaborativeApproval.pojo.SealApplicationManagement; |
| | | import com.ruoyi.collaborativeApproval.service.RulesRegulationsManagementService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(rulesRegulationsManagementService.listPage(page, rulesRegulationsManagement)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è§ç« å¶åº¦", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public AjaxResult add(@RequestBody RulesRegulationsManagement rulesRegulationsManagement){ |
| | |
| | | return AjaxResult.success(rulesRegulationsManagement.getId()); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹è§ç« å¶åº¦", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody RulesRegulationsManagement rulesRegulationsManagement){ |
| | | return AjaxResult.success(rulesRegulationsManagementService.updateById(rulesRegulationsManagement)); |
| | | } |
| | | |
| | | @Log(title = "å é¤è§ç« å¶åº¦", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤") |
| | | public AjaxResult delete(@PathVariable("ids") List<Long> ids){ |
| | |
| | | return AjaxResult.success(rulesRegulationsManagementService.removeBatchByIds(ids)); |
| | | } |
| | | //è§åæ¥çæ¶æ°å¢é
è¯»ç¶æ |
| | | @Log(title = "æ°å¢é
è¯»ç¶æ", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addReadingStatus") |
| | | @Operation(summary = "æ°å¢é
è¯»ç¶æ") |
| | | public AjaxResult addReadingStatus(@RequestBody ReadingStatus readingStatus){ |
| | | return AjaxResult.success(readingStatusMapper.insert(readingStatus)); |
| | | } |
| | | @Log(title = "ä¿®æ¹é
è¯»ç¶æ", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateReadingStatus") |
| | | @Operation(summary = "ä¿®æ¹é
è¯»ç¶æ") |
| | | public AjaxResult updateReadingStatus(@RequestBody ReadingStatus readingStatus){ |
| | |
| | | } |
| | | |
| | | @Operation(summary = "è§ç« å¶åº¦ç®¡ç导åº") |
| | | @Log(title = "导åºè§ç« å¶åº¦", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | List<RulesRegulationsManagement> accountExpenses = rulesRegulationsManagementService.list(); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile; |
| | | import com.ruoyi.collaborativeApproval.service.RulesRegulationsManagementFileService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | | import com.ruoyi.quality.service.IQualityInspectFileService; |
| | |
| | | * @param rulesRegulationsManagementFile |
| | | * @return |
| | | */ |
| | | @Log(title = "è§ç« å¶åº¦æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody RulesRegulationsManagementFile rulesRegulationsManagementFile) { |
| | | return AjaxResult.success(rulesRegulationsManagementFileService.save(rulesRegulationsManagementFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "è§ç« å¶åº¦æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | import com.ruoyi.collaborativeApproval.service.SealApplicationManagementService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.service.ISysNoticeService; |
| | |
| | | return AjaxResult.success(sealApplicationManagementService.listPage(page,sealApplicationManagement)); |
| | | } |
| | | |
| | | @Log(title = "ç¨ç« ç³è¯·", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public AjaxResult add(@RequestBody SealApplicationManagementDTO sealApplicationManagement){ |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "ç¨ç« ç³è¯·", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody SealApplicationManagementDTO sealApplicationManagement){ |
| | |
| | | return AjaxResult.success(sealApplicationManagementService.updateById(sealApplicationManagement)); |
| | | } |
| | | |
| | | @Log(title = "ç¨ç« ç³è¯·", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤") |
| | | public AjaxResult delete(@PathVariable("ids") List<Long> ids){ |
| | |
| | | return AjaxResult.success(sealApplicationManagementService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | @Log(title = "ç¨ç« ç³è¯·", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "ç¨å°ç³è¯·ç®¡ç导åº") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | import com.ruoyi.collaborativeApproval.dto.StaffContactsPersonalDTO; |
| | | import com.ruoyi.collaborativeApproval.pojo.StaffContactsPersonal; |
| | | import com.ruoyi.collaborativeApproval.service.StaffContactsPersonalService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | return AjaxResult.success(staffContactsPersonalService.listPage(page, staffContactsPersonalDTO)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢åå·¥é讯å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public AjaxResult add(@RequestBody StaffContactsPersonal staffContactsPersonal) { |
| | | return AjaxResult.success(staffContactsPersonalService.save(staffContactsPersonal)); |
| | | } |
| | | |
| | | @Log(title = "å é¤åå·¥é讯å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete/{id}") |
| | | @Operation(summary = "å é¤") |
| | | public AjaxResult delete(@PathVariable("id") Long id) { |
| | |
| | | import com.ruoyi.device.dto.DeviceDefectRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceDefectRecord; |
| | | import com.ruoyi.device.service.DeviceDefectRecordService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(deviceDefectRecordService.listPage(new Page<>(1,-1),deviceDefectRecordDto)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è®¾å¤ç¼ºé·è®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ·»å 设å¤ç¼ºé·è®°å½") |
| | | public AjaxResult add(@RequestBody DeviceDefectRecord deviceDefectRecord) { |
| | | return AjaxResult.success(deviceDefectRecordService.add(deviceDefectRecord)); |
| | | } |
| | | @Log(title = "ä¿®æ¹è®¾å¤ç¼ºé·è®°å½", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤ç¼ºé·è®°å½") |
| | | public AjaxResult update(@RequestBody DeviceDefectRecord deviceDefectRecord) { |
| | | return AjaxResult.success(deviceDefectRecordService.updateByDDR(deviceDefectRecord)); |
| | | } |
| | | @Log(title = "å é¤è®¾å¤ç¼ºé·è®°å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤è®¾å¤ç¼ºé·è®°å½") |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Anonymous; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | private DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | |
| | | |
| | | |
| | | @Operation(summary = "设å¤å°è´¦å表") |
| | | @GetMapping("/page") |
| | | public AjaxResult page(Page page , DeviceLedgerDto deviceLedger) { |
| | | return AjaxResult.success(deviceLedgerService.queryPage(page,deviceLedger)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è®¾å¤å°è´¦", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | @Operation(summary = "æ·»å 设å¤å°è´¦") |
| | | public AjaxResult add(@RequestBody DeviceLedger deviceLedger) { |
| | | |
| | | return deviceLedgerService.saveDeviceLedger(deviceLedger); |
| | | public AjaxResult add(@RequestBody DeviceLedgerDto deviceLedgerDto) { |
| | | return deviceLedgerService.saveDeviceLedger(deviceLedgerDto); |
| | | } |
| | | |
| | | @Operation(summary = "æ ¹æ®idæ¥è¯¢è®¾å¤å°è´¦") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult detail(@PathVariable Long id) { |
| | | return AjaxResult.success(deviceLedgerService.getById(id)); |
| | | DeviceLedgerDto deviceLedgerDto = deviceLedgerService.getDeviceLedgerDetail(id); |
| | | return AjaxResult.success(deviceLedgerDto); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹è®¾å¤å°è´¦", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤å°è´¦") |
| | | public AjaxResult update(@RequestBody DeviceLedger deviceLedger) { |
| | | return deviceLedgerService.updateDeviceLedger(deviceLedger); |
| | | public AjaxResult update(@RequestBody DeviceLedgerDto deviceLedgerDto) { |
| | | return deviceLedgerService.updateDeviceLedger(deviceLedgerDto); |
| | | } |
| | | |
| | | @Log(title = "å é¤è®¾å¤å°è´¦", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @Operation(summary = "å é¤è®¾å¤å°è´¦") |
| | | public AjaxResult delete(@PathVariable("ids") ArrayList<Long> ids) { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "导åºè®¾å¤å°è´¦", businessType = BusinessType.EXPORT) |
| | | @PostMapping("export") |
| | | @Operation(summary = "导åºè®¾å¤å°è´¦") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | deviceLedgerService.export(response, ids); |
| | | } |
| | | |
| | | @Log(title = "ä¸è½½è®¾å¤å°è´¦æ¨¡æ¿", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "ä¸è½½æ¨¡æ¿") |
| | | @PostMapping("/downloadTemplate") |
| | | public void downloadTemplate(HttpServletResponse response) { |
| | |
| | | util.importTemplateExcel(response, "设å¤å¯¼å
¥æ¨¡æ¿"); |
| | | } |
| | | |
| | | @Log(title = "导å
¥è®¾å¤å°è´¦", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/import") |
| | | @Operation(summary = "导å
¥è®¾å¤å°è´¦") |
| | | public AjaxResult importData(MultipartFile file) throws IOException { |
| | |
| | | public AjaxResult scanDevice(Long id) { |
| | | List<DeviceMaintenance> list = deviceMaintenanceMapper.list1(id); |
| | | DeviceLedger deviceLedger = deviceLedgerMapper.selectById1(id); |
| | | if (list.size()>0){ |
| | | deviceLedger.setUpdateTime(list.get(0).getMaintenanceActuallyTime());//æåç»´æ¤æ¶é´ |
| | | if (!list.isEmpty()) { |
| | | deviceLedger.setUpdateTime(list.getFirst().getMaintenanceActuallyTime());//æåç»´æ¤æ¶é´ |
| | | } |
| | | deviceLedger.setCreateTime(deviceLedger.getUpdateTime().plusMonths(1));//䏿¬¡ç»´æ¤æ¶é´ |
| | | return AjaxResult.success(deviceLedger); |
| | |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.device.service.IDeviceMaintenanceService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(deviceMaintenanceService.queryPage(page,deviceMaintenanceDto)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è®¾å¤ä¿å
»", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | @Operation(summary = "æ·»å 设å¤ä¿å
»") |
| | | public AjaxResult add(@RequestBody DeviceMaintenanceDto deviceMaintenance) { |
| | |
| | | return AjaxResult.success(deviceMaintenanceService.detailById(id)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹è®¾å¤ä¿å
»", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤ä¿å
»") |
| | | public AjaxResult update(@RequestBody DeviceMaintenanceDto deviceMaintenance) { |
| | |
| | | return deviceMaintenanceService.updateDeviceDeviceMaintenance(deviceMaintenance); |
| | | } |
| | | |
| | | @Log(title = "æ§è¡è®¾å¤ä¿å
»", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("maintenance") |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤ä¿å
»") |
| | | public AjaxResult maintenance(@RequestBody DeviceMaintenanceDto deviceMaintenance) { |
| | |
| | | } |
| | | |
| | | |
| | | @Log(title = "å é¤è®¾å¤ä¿å
»", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @Operation(summary = "å é¤è®¾å¤ä¿å
»") |
| | | public AjaxResult delete(@PathVariable("ids") Long[] ids) { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "导åºè®¾å¤ä¿å
»", businessType = BusinessType.EXPORT) |
| | | @PostMapping("export") |
| | | @Operation(summary = "导åºè®¾å¤ä¿å
»") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.pojo.DeviceMaintenanceFile; |
| | | import com.ruoyi.device.service.DeviceMaintenanceFileService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | * @param deviceMaintenanceFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢è®¾å¤ä¿å
»éä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody DeviceMaintenanceFile deviceMaintenanceFile) { |
| | | return AjaxResult.success(deviceMaintenanceFileService.save(deviceMaintenanceFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤è®¾å¤ä¿å
»éä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | import com.ruoyi.device.dto.DeviceRepairDto; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.device.service.IDeviceRepairService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(deviceRepairService.queryPage(page,deviceRepairDto)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è®¾å¤æ¥ä¿®", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | @Operation(summary = "æ·»å è®¾å¤æ¥ä¿®") |
| | | public AjaxResult add( @RequestBody DeviceRepairDto deviceRepairDto) { |
| | |
| | | return AjaxResult.success(deviceRepairService.detailById(id)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹è®¾å¤æ¥ä¿®", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤æ¥ä¿®") |
| | | public AjaxResult update( @RequestBody DeviceRepairDto deviceRepairDto) { |
| | | return deviceRepairService.updateDeviceRepair(deviceRepairDto); |
| | | } |
| | | |
| | | @Log(title = "设å¤ç»´ä¿®", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("/repair") |
| | | @Operation(summary = "设å¤ç»´ä¿®") |
| | | public AjaxResult repair( @RequestBody DeviceRepairDto deviceRepairDto) { |
| | | return deviceRepairService.confirmRepair(deviceRepairDto); |
| | | } |
| | | |
| | | @Log(title = "è®¾å¤æ¥ä¿®éªæ¶", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("/acceptance") |
| | | @Operation(summary = "è®¾å¤æ¥ä¿®éªæ¶å®¡æ¹") |
| | | public AjaxResult acceptance(@RequestBody DeviceRepairDto deviceRepairDto) { |
| | | return deviceRepairService.approveRepairAcceptance(deviceRepairDto); |
| | | } |
| | | |
| | | @Log(title = "å é¤è®¾å¤æ¥ä¿®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @Operation(summary = "å é¤è®¾å¤æ¥ä¿®") |
| | | public AjaxResult delete(@PathVariable("ids") Long[] ids) { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "导åºè®¾å¤æ¥ä¿®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("export") |
| | | @Operation(summary = "导åºè®¾å¤æ¥ä¿®") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import com.ruoyi.basic.dto.StorageBlobDTO; |
| | | import com.ruoyi.basic.dto.StorageBlobVO; |
| | | |
| | | /** |
| | | * 设å¤å°è´¦å®ä½ç±» |
| | |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * 设å¤éä»¶(ç¨äºæ¥æ¶) |
| | | */ |
| | | @TableField(exist = false) |
| | | @Schema(description = "设å¤éä»¶æ¥æ¶å表") |
| | | private List<StorageBlobDTO> storageBlobDTOs; |
| | | |
| | | /** |
| | | * 设å¤éä»¶(ç¨äºè¿å) |
| | | */ |
| | | @TableField(exist = false) |
| | | @Schema(description = "设å¤éä»¶å±ç¤ºå表") |
| | | private List<StorageBlobVO> storageBlobVOs; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | private String unit; |
| | |
| | | @Schema(description = "æåæ§è¡æ¶é´") |
| | | private LocalDateTime lastExecutionTime; |
| | | |
| | | @Schema(description = "æ¯å¦æ¿æ´»") |
| | | private boolean isActive; |
| | | @Schema(description = "æ¯å¦æ¿æ´», 1=å¯ç¨, 0=åç¨") |
| | | private Integer isActive; |
| | | |
| | | @Schema(description = "夿³¨") |
| | | @Excel(name = "夿³¨") |
| | |
| | | public interface IDeviceLedgerService extends IService<DeviceLedger> { |
| | | IPage<DeviceLedgerDto> queryPage(Page page, DeviceLedgerDto deviceLedger); |
| | | |
| | | AjaxResult saveDeviceLedger(DeviceLedger deviceLedger); |
| | | AjaxResult saveDeviceLedger(DeviceLedgerDto deviceLedgerDto); |
| | | |
| | | AjaxResult updateDeviceLedger(DeviceLedger deviceLedger); |
| | | AjaxResult updateDeviceLedger(DeviceLedgerDto deviceLedgerDto); |
| | | |
| | | DeviceLedgerDto getDeviceLedgerDetail(Long id); |
| | | |
| | | void export(HttpServletResponse response, Long[] ids); |
| | | |
| | |
| | | import com.ruoyi.device.execl.DeviceLedgerExeclDto; |
| | | import com.ruoyi.device.mapper.DeviceLedgerMapper; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | | import com.ruoyi.basic.dto.StorageAttachmentDTO; |
| | | import com.ruoyi.basic.enums.RecordTypeEnum; |
| | | import com.ruoyi.basic.service.StorageAttachmentService; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | |
| | | |
| | | private final DeviceLedgerMapper deviceLedgerMapper; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final StorageAttachmentService storageAttachmentService; |
| | | |
| | | @Override |
| | | public IPage<DeviceLedgerDto> queryPage(Page page, DeviceLedgerDto deviceLedger) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult saveDeviceLedger(DeviceLedger deviceLedger) { |
| | | public AjaxResult saveDeviceLedger(DeviceLedgerDto deviceLedgerDto) { |
| | | LambdaQueryWrapper<DeviceLedger> deviceLedgerLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | deviceLedgerLambdaQueryWrapper.eq(DeviceLedger::getDeviceName,deviceLedger.getDeviceName()); |
| | | deviceLedgerLambdaQueryWrapper.eq(DeviceLedger::getDeviceName,deviceLedgerDto.getDeviceName()); |
| | | if (this.count(deviceLedgerLambdaQueryWrapper) > 0) { |
| | | return AjaxResult.error("设å¤åç§°å·²åå¨"); |
| | | } |
| | | DeviceLedger deviceLedger = new DeviceLedger(); |
| | | BeanUtils.copyProperties(deviceLedgerDto, deviceLedger); |
| | | boolean save = this.save(deviceLedger); |
| | | if (save){ |
| | | if (deviceLedgerDto.getStorageBlobDTOs() != null) { |
| | | StorageAttachmentDTO attachmentDTO = new StorageAttachmentDTO(); |
| | | attachmentDTO.setApplication("image"); |
| | | attachmentDTO.setRecordType(RecordTypeEnum.DEVICE_LEDGER.getType()); |
| | | attachmentDTO.setRecordId(deviceLedger.getId()); |
| | | attachmentDTO.setStorageBlobDTOs(deviceLedgerDto.getStorageBlobDTOs()); |
| | | storageAttachmentService.saveStorageAttachment(attachmentDTO); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult updateDeviceLedger(DeviceLedger deviceLedger) { |
| | | public AjaxResult updateDeviceLedger(DeviceLedgerDto deviceLedgerDto) { |
| | | DeviceLedger deviceLedger = new DeviceLedger(); |
| | | BeanUtils.copyProperties(deviceLedgerDto, deviceLedger); |
| | | if (this.updateById(deviceLedger)) { |
| | | if (deviceLedgerDto.getStorageBlobDTOs() != null) { |
| | | StorageAttachmentDTO attachmentDTO = new StorageAttachmentDTO(); |
| | | attachmentDTO.setApplication("image"); |
| | | attachmentDTO.setRecordType(RecordTypeEnum.DEVICE_LEDGER.getType()); |
| | | attachmentDTO.setRecordId(deviceLedger.getId()); |
| | | attachmentDTO.setStorageBlobDTOs(deviceLedgerDto.getStorageBlobDTOs()); |
| | | storageAttachmentService.saveStorageAttachment(attachmentDTO); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | @Override |
| | | public DeviceLedgerDto getDeviceLedgerDetail(Long id) { |
| | | DeviceLedger deviceLedger = this.getById(id); |
| | | if (deviceLedger != null) { |
| | | DeviceLedgerDto deviceLedgerDto = new DeviceLedgerDto(); |
| | | BeanUtils.copyProperties(deviceLedger, deviceLedgerDto); |
| | | StorageAttachmentDTO dto = new StorageAttachmentDTO(); |
| | | dto.setRecordType(RecordTypeEnum.DEVICE_LEDGER.getType()); |
| | | dto.setRecordId(id); |
| | | dto.setApplication("image"); |
| | | deviceLedgerDto.setStorageBlobVOs(storageAttachmentService.list(dto)); |
| | | return deviceLedgerDto; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | |
| | | util.exportExcel(response, deviceLedgerExeclDtos, "设å¤å°è´¦å¯¼åº"); |
| | | }else { |
| | | ArrayList<Long> arrayList = new ArrayList<>(); |
| | | Arrays.stream(ids).map(id -> { |
| | | return arrayList.add( id); |
| | | }); |
| | | Arrays.stream(ids).map(arrayList::add); |
| | | List<DeviceLedger> supplierManageList = deviceLedgerMapper.selectBatchIds(arrayList); |
| | | ArrayList<DeviceLedgerExeclDto> deviceLedgerExeclDtos = new ArrayList<>(); |
| | | supplierManageList.stream().forEach(deviceLedger -> { |
| | |
| | | private final Scheduler scheduler; |
| | | |
| | | /** |
| | | * æ·»å æ°ä»»å¡å°è°åº¦å¨ |
| | | * æ·»å ææ´æ°ä»»å¡å°è°åº¦å¨ |
| | | */ |
| | | public void scheduleMaintenanceTask(MaintenanceTask task){ |
| | | try { |
| | | JobDetail jobDetail = buildJobDetail(task); |
| | | Trigger trigger = buildJobTrigger(task, jobDetail); |
| | | scheduler.scheduleJob(jobDetail, trigger); |
| | | |
| | | // æ£æ¥è§¦å卿¯å¦å·²åå¨ |
| | | TriggerKey triggerKey = trigger.getKey(); |
| | | Trigger existingTrigger = scheduler.getTrigger(triggerKey); |
| | | |
| | | if (existingTrigger != null) { |
| | | // 触åå¨å·²åå¨ï¼æ´æ°å® |
| | | scheduler.rescheduleJob(triggerKey, trigger); |
| | | } else { |
| | | // 触åå¨ä¸åå¨ï¼å
ç¡®ä¿ Job åå¨ï¼ç¶åè°åº¦è§¦åå¨ |
| | | scheduler.addJob(jobDetail, true); |
| | | scheduler.scheduleJob(trigger); |
| | | } |
| | | }catch (SchedulerException e){ |
| | | log.error("SchedulerException scheduleMaintenanceTask ERROR",e); |
| | | throw new RuntimeException(e); |
| | |
| | | try{ |
| | | TriggerKey triggerKey = new TriggerKey("triggerMaintenanceTask_" + task.getId()); |
| | | |
| | | // è·åç°æè§¦åå¨å¹¶è½¬æ¢ä¸º CronTrigger |
| | | // è·åç°æè§¦åå¨ |
| | | Trigger oldTrigger = scheduler.getTrigger(triggerKey); |
| | | |
| | | // æå»ºæ°ç JobDetail å Trigger |
| | | JobDetail jobDetail = buildJobDetail(task); |
| | | Trigger newTrigger = buildJobTrigger(task, jobDetail); |
| | | |
| | | if (oldTrigger == null) { |
| | | // 触åå¨ä¸åå¨ï¼è¯´æä»»å¡ä¹å被å é¤è¿ |
| | | // å
ç¡®ä¿ Job åå¨ï¼ç¶åè°åº¦è§¦åå¨ |
| | | scheduler.addJob(jobDetail, true); |
| | | scheduler.scheduleJob(newTrigger); |
| | | return; |
| | | } |
| | | |
| | | // 触åå¨åå¨ï¼ç´æ¥æ´æ° |
| | | if (!(oldTrigger instanceof CronTrigger)) { |
| | | throw new SchedulerException("Existing trigger is not a CronTrigger"); |
| | | } |
| | | |
| | | // 3. æå»ºCronTriggerï¼ç¡®ä¿æä¹
åé
ç½® |
| | | CronTrigger newTrigger = TriggerBuilder.newTrigger() |
| | | .withIdentity(triggerKey) // å¯ä¸æ è¯ï¼ç¨äºæä¹
ååå¨ |
| | | .withDescription(task.getTaskName() + "_TRIGGER") // 触åå¨æè¿° |
| | | .forJob(oldTrigger.getJobKey()) // å
³è对åºçJob |
| | | // æå»ºæ°ç CronTrigger |
| | | CronTrigger cronTrigger = TriggerBuilder.newTrigger() |
| | | .withIdentity(triggerKey) |
| | | .withDescription(task.getTaskName() + "_TRIGGER") |
| | | .forJob(oldTrigger.getJobKey()) |
| | | .withSchedule(CronScheduleBuilder |
| | | .cronSchedule(convertToCronExpression(task)) // éè¿æ§è¡æ¶ççç¥ï¼æ ¹æ®ä¸å¡è°æ´ï¼ |
| | | .cronSchedule(convertToCronExpression(task)) |
| | | .withMisfireHandlingInstructionDoNothing() |
| | | ) |
| | | // 4. 设置å¼å§æ¶é´ï¼è¥ä¸ºnullåç«å³çæï¼ |
| | | .startAt(task.getNextExecutionTime() != null |
| | | ? Date.from(task.getNextExecutionTime().atZone(ZoneId.systemDefault()).toInstant()) |
| | | : new Date()) |
| | | .build(); |
| | | scheduler.rescheduleJob(triggerKey, newTrigger); |
| | | |
| | | scheduler.rescheduleJob(triggerKey, cronTrigger); |
| | | }catch (SchedulerException e){ |
| | | log.error("SchedulerException rescheduleMaintenanceTask ERROR",e); |
| | | throw new RuntimeException(e); |
| | |
| | | public void unscheduleMaintenanceTask(Long taskId){ |
| | | try { |
| | | JobKey jobKey = new JobKey("MaintenanceTask_" + taskId); |
| | | // å é¤ Job ä¼èªå¨å é¤å
³èç Trigger |
| | | scheduler.deleteJob(jobKey); |
| | | }catch (SchedulerException e){ |
| | | log.error("SchedulerException unscheduleMaintenanceTask ERROR",e); |
| | |
| | | |
| | | @Override |
| | | public AjaxResult add(MaintenanceTask maintenanceTask) { |
| | | maintenanceTask.setActive(true); |
| | | // 计ç®é¦æ¬¡æ§è¡æ¶é´ |
| | | TimingTask task = new TimingTask(); |
| | | task.setFrequencyType(maintenanceTask.getFrequencyType()); |
| | |
| | | maintenanceTask.setNextExecutionTime(firstExecutionTime); |
| | | int insert = maintenanceTaskMapper.insert(maintenanceTask); |
| | | if (insert > 0) { |
| | | // åªæå½ isActive 为 1 æ¶ææ·»å å°å®æ¶ä»»å¡è°åº¦å¨ |
| | | if (maintenanceTask.getIsActive() != null && maintenanceTask.getIsActive() == 1) { |
| | | maintenanceTaskScheduler.scheduleMaintenanceTask(maintenanceTask); |
| | | } |
| | | } |
| | | return AjaxResult.success("æ·»å æå"); |
| | | } |
| | |
| | | if (maintenanceTask1 == null) { |
| | | return AjaxResult.warn("æ²¡ææ¤æ°æ®"); |
| | | } |
| | | |
| | | // ä¿åæ§ç isActive ç¶æ |
| | | Integer oldIsActive = maintenanceTask1.getIsActive(); |
| | | Integer newIsActive = maintenanceTask.getIsActive(); |
| | | |
| | | BeanUtils.copyProperties(maintenanceTask, maintenanceTask1); |
| | | int update = maintenanceTaskMapper.updateById(maintenanceTask1); |
| | | if (update > 0) { |
| | | // å¤ç isActive ç¶æåå |
| | | if (newIsActive != null && newIsActive == 1) { |
| | | // æ°ç¶æä¸ºå¯ç¨ï¼æ·»å å°å®æ¶ä»»å¡è°åº¦å¨ |
| | | if (oldIsActive == null || oldIsActive != 1) { |
| | | // 仿ªå¯ç¨å为å¯ç¨ï¼æ·»å å°è°åº¦å¨ |
| | | maintenanceTaskScheduler.scheduleMaintenanceTask(maintenanceTask1); |
| | | } else { |
| | | // å·²ç»å¯ç¨ï¼æ´æ°è°åº¦å¨ä¸çä»»å¡ |
| | | maintenanceTaskScheduler.rescheduleMaintenanceTask(maintenanceTask1); |
| | | } |
| | | } else { |
| | | // æ°ç¶æä¸ºåç¨ï¼ä»å®æ¶ä»»å¡è°åº¦å¨ä¸ç§»é¤ |
| | | if (oldIsActive != null && oldIsActive == 1) { |
| | | maintenanceTaskScheduler.unscheduleMaintenanceTask(maintenanceTask1.getId()); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success("æ´æ°æå"); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult delete(List<Long> ids) { |
| | | // å
ä»å®æ¶ä»»å¡è°åº¦å¨ä¸ç§»é¤ææå¾
å é¤çä»»å¡ |
| | | ids.forEach(id -> { |
| | | try { |
| | | maintenanceTaskScheduler.unscheduleMaintenanceTask(id); |
| | | } catch (Exception e) { |
| | | log.error("å é¤å®æ¶ä»»å¡è°åº¦å¤±è´¥, id: {}", id, e); |
| | | } |
| | | }); |
| | | |
| | | // å仿°æ®åºä¸å é¤è®°å½ |
| | | int delete = maintenanceTaskMapper.deleteBatchIds(ids); |
| | | if (delete > 0) { |
| | | ids.forEach(id -> { |
| | | maintenanceTaskScheduler.unscheduleMaintenanceTask(id); |
| | | }); |
| | | } |
| | | return AjaxResult.success("å 餿å"); |
| | | } |
| | | return AjaxResult.error("å é¤å¤±è´¥"); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.inspectiontask.dto.InspectionTaskDto; |
| | |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | @PostMapping("/export") |
| | | @Log(title = "æ£éªä»»å¡", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "导åºå®æ¶ä»»å¡è®°å½") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | Page page = new Page<>(-1, -1); |
| | | InspectionTaskDto timingTask = new InspectionTaskDto(); |
| | |
| | | /** |
| | | * å·¡æ£ä»»å¡è¡¨æ°å¢ä¿®æ¹ |
| | | */ |
| | | @PostMapping("/addOrEditInspectionTask") |
| | | @Log(title = "æ£éªä»»å¡", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "å·¡æ£ä»»å¡è¡¨æ°å¢ä¿®æ¹") |
| | | @PostMapping("/addOrEditInspectionTask") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addOrEditInspectionTask(@RequestBody InspectionTaskDto inspectionTaskDto) { |
| | | return R.ok(inspectionTaskService.addOrEditInspectionTask(inspectionTaskDto)); |
| | |
| | | /** |
| | | * å·¡æ£ä»»å¡è¡¨å é¤ |
| | | */ |
| | | @DeleteMapping("/delInspectionTask") |
| | | @Log(title = "æ£éªä»»å¡", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å·¡æ£ä»»å¡è¡¨å é¤") |
| | | @DeleteMapping("/delInspectionTask") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R remove(@RequestBody Long[] ids) { |
| | | return R.ok(inspectionTaskService.delByIds(ids)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.inspectiontask.dto.QrCodeDto; |
| | |
| | | /** |
| | | * äºç»´ç 管ç表æ°å¢ä¿®æ¹ |
| | | */ |
| | | @PostMapping("/addOrEditQrCode") |
| | | @Log(title = "äºç»´ç ", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "äºç»´ç 管ç表æ°å¢ä¿®æ¹") |
| | | @PostMapping("/addOrEditQrCode") |
| | | public R<Long> addOrEditQrCode(@RequestBody QrCodeDto qrCodeDto) { |
| | | return R.ok(qrCodeService.addOrEditQrCode(qrCodeDto)); |
| | | } |
| | |
| | | /** |
| | | * äºç»´ç 管ç表å é¤ |
| | | */ |
| | | @DeleteMapping("/delQrCode") |
| | | @Log(title = "äºç»´ç ", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "äºç»´ç 管ç表å é¤") |
| | | @DeleteMapping("/delQrCode") |
| | | public R remove(@RequestBody Long[] ids) { |
| | | return R.ok(qrCodeService.delByIds(ids)); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.inspectiontask.dto.QrCodeScanRecordDto; |
| | |
| | | /** |
| | | * äºç»´ç æ«ç è®°å½è¡¨æ°å¢ä¿®æ¹ |
| | | */ |
| | | @PostMapping("/addOrEditQrCodeRecord") |
| | | @Log(title = "äºç»´ç æ«æè®°å½", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "äºç»´ç æ«ç è®°å½è¡¨æ°å¢ä¿®æ¹") |
| | | @PostMapping("/addOrEditQrCodeRecord") |
| | | public R addOrEditQrCodeRecord(@RequestBody QrCodeScanRecordDto qrCodeScanRecordDto) { |
| | | return R.ok(qrCodeScanRecordService.addOrEditQrCodeRecord(qrCodeScanRecordDto)); |
| | | } |
| | |
| | | /** |
| | | * äºç»´ç æ«ç è®°å½è¡¨å é¤ |
| | | */ |
| | | @DeleteMapping("/delSalesRecord") |
| | | @Log(title = "äºç»´ç æ«æè®°å½", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "äºç»´ç æ«ç è®°å½è¡¨å é¤") |
| | | @DeleteMapping("/delSalesRecord") |
| | | public R remove(@RequestBody Long[] ids) { |
| | | return R.ok(qrCodeScanRecordService.delByIds(ids)); |
| | | } |
| | |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @Operation(summary = "导åºå®æ¶ä»»å¡") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | /** |
| | | * 宿¶å·¡æ£ä»»å¡è¡¨æ°å¢ä¿®æ¹ |
| | | */ |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOrEditTimingTask") |
| | | @Operation(summary = "æ°å¢ä¿®æ¹å®æ¶ä»»å¡") |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.INSERT) |
| | | public R addOrEditTimingTask(@RequestBody TimingTaskDto timingTaskDto) throws SchedulerException { |
| | | return R.ok(timingTaskService.addOrEditTimingTask(timingTaskDto)); |
| | | } |
| | |
| | | /** |
| | | * 宿¶å·¡æ£ä»»å¡è¡¨å é¤ |
| | | */ |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delTimingTask") |
| | | @Operation(summary = "å é¤å®æ¶ä»»å¡") |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.DELETE) |
| | | public R remove(@RequestBody Long[] ids) { |
| | | return R.ok(timingTaskService.delByIds(ids)); |
| | | } |
| | |
| | | |
| | | // è·åç°æè§¦åå¨å¹¶è½¬æ¢ä¸º CronTrigger |
| | | Trigger oldTrigger = scheduler.getTrigger(triggerKey); |
| | | if (oldTrigger == null) { |
| | | JobKey jobKey = new JobKey("timingTask_" + task.getId()); |
| | | JobDetail jobDetail = scheduler.getJobDetail(jobKey); |
| | | if (jobDetail != null) { |
| | | Trigger trigger = buildJobTrigger(task, jobDetail); |
| | | scheduler.scheduleJob(trigger); |
| | | } else { |
| | | scheduleTimingTask(task); |
| | | } |
| | | return; |
| | | } |
| | | if (!(oldTrigger instanceof CronTrigger)) { |
| | | throw new SchedulerException("Existing trigger is not a CronTrigger"); |
| | | } |
| | |
| | | |
| | | // 使ç¨switchç¡®ä¿æ¡ä»¶äºæ¥ |
| | | String frequencyType = task.getFrequencyType().toUpperCase(); // ç»ä¸è½¬ä¸ºå¤§åæ¯è¾ |
| | | switch (frequencyType) { |
| | | case "DAILY": |
| | | return convertDailyToCron(task.getFrequencyDetail()); |
| | | case "WEEKLY": |
| | | return convertWeeklyToCron(task.getFrequencyDetail()); |
| | | case "MONTHLY": |
| | | return convertMonthlyToCron(task.getFrequencyDetail()); |
| | | case "QUARTERLY": |
| | | return convertQuarterlyToCron(task.getFrequencyDetail()); |
| | | default: |
| | | throw new IllegalArgumentException("䏿¯æçé¢çç±»å: " + task.getFrequencyType()); |
| | | } |
| | | return switch (frequencyType) { |
| | | case "DAILY" -> convertDailyToCron(task.getFrequencyDetail()); |
| | | case "WEEKLY" -> convertWeeklyToCron(task.getFrequencyDetail()); |
| | | case "MONTHLY" -> convertMonthlyToCron(task.getFrequencyDetail()); |
| | | case "QUARTERLY" -> convertQuarterlyToCron(task.getFrequencyDetail()); |
| | | default -> throw new IllegalArgumentException("䏿¯æçé¢çç±»å: " + task.getFrequencyType()); |
| | | }; |
| | | } |
| | | |
| | | // æ¯æ¥ä»»å¡è½¬æ¢ |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.measuringinstrumentledger.dto.SparePartsRequisitionRecordDto; |
| | | import com.ruoyi.measuringinstrumentledger.service.SparePartsRequisitionRecordService; |
| | |
| | | |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "å¤ä»¶åç±»-å页æ¥è¯¢") |
| | | @Log(title = "å¤ä»¶é¢ç¨è®°å½-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, SparePartsRequisitionRecordDto sparePartsRequisitionRecordDto){ |
| | | IPage<SparePartsRequisitionRecordDto> listPage = sparePartsRequisitionRecordService.listPage(page, sparePartsRequisitionRecordDto); |
| | | return AjaxResult.success(listPage); |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @Operation(summary = "åå
¬ç©èµ-æ·»å ") |
| | | @Log(title = "åå
¬ç©èµ-æ·»å ", businessType = BusinessType.INSERT) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody OfficeSupplies officeSupplies) { |
| | | // æç
§å½åæ¶é´yyyyMMdd + å½å¤©æ°å¢æ°é + 1çæç¼å· |
| | |
| | | |
| | | @PostMapping("/update") |
| | | @Operation(summary = "åå
¬ç©èµ-ä¿®æ¹") |
| | | @Log(title = "åå
¬ç©èµ-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult update(@RequestBody OfficeSupplies officeSupplies) { |
| | | return officeSuppliesService.updateById(officeSupplies) ? success() : error(); |
| | |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "åå
¬ç©èµ-å é¤") |
| | | @Log(title = "åå
¬ç©èµ-å é¤", businessType = BusinessType.DELETE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.other.dto.PdaVersionDTO; |
| | | import com.ruoyi.other.pojo.PdaVersion; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ·»å çæ¬") |
| | | @Log(title = "PDAçæ¬-æ·»å ", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody PdaVersionDTO pdaVersion) { |
| | | return R.ok(pdaVersionService.add(pdaVersion)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.pojo.GasTankWarning; |
| | | import com.ruoyi.procurementrecord.service.GasTankWarningService; |
| | |
| | | return AjaxResult.success(gasTankWarningService.listPage(page, gasTankWarning)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢æ°ç¶é¢è¦", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody GasTankWarning gasTankWarning) { |
| | | return AjaxResult.success(gasTankWarningService.save(gasTankWarning)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹æ°ç¶é¢è¦", businessType = BusinessType.UPDATE) |
| | | @PostMapping("update") |
| | | public AjaxResult update(@RequestBody GasTankWarning gasTankWarning) { |
| | | return AjaxResult.success(gasTankWarningService.updateById(gasTankWarning)); |
| | | } |
| | | |
| | | @Log(title = "å 餿°ç¶é¢è¦", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(gasTankWarningService.removeByIds(ids)); |
| | | } |
| | | |
| | | //å¯¼åº |
| | | @Log(title = "å¯¼åºæ°ç¶é¢è¦", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, @RequestParam(name = "ids", required = false) List<Long> ids) { |
| | | gasTankWarningService.export(response, ids); |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.pojo.InboundManagement; |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢å°è´§ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "å°è´§ç®¡ç-æ·»å ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹å°è´§ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "å°è´§ç®¡ç-ä¿®æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "å é¤å°è´§ç®¡ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "å°è´§ç®¡ç-å é¤") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | package com.ruoyi.procurementrecord.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementExceptionRecordMapper; |
| | |
| | | |
| | | private ProcurementExceptionRecordMapper procurementExceptionRecordMapper; |
| | | |
| | | @Log(title = "æ°å¢éè´å¼å¸¸è®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Transactional |
| | | public AjaxResult add(@RequestBody ProcurementExceptionRecord procurementExceptionRecord) { |
| | | return AjaxResult.success(procurementExceptionRecordMapper.insert(procurementExceptionRecord)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹éè´å¼å¸¸è®°å½", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Transactional |
| | | public AjaxResult updatePro(@RequestBody ProcurementExceptionRecord procurementExceptionRecord) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPlan; |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢éè´è®¡å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "éè´è®¡å-æ·»å ") |
| | | public AjaxResult add(@RequestBody ProcurementPlan procurementPlan){ |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹éè´è®¡å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "éè´è®¡å-ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody ProcurementPlan procurementPlan){ |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "å é¤éè´è®¡å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "éè´è®¡å-å é¤") |
| | | public AjaxResult del(@RequestBody List<Long> ids){ |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @Log(title = "导åºéè´è®¡å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | procurementPlanService.export(response); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPriceManagement; |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢éè´ä»·æ ¼ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "éè´ä»·æ ¼ç®¡ç-æ·»å ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹éè´ä»·æ ¼ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "éè´ä»·æ ¼ç®¡ç-ä¿®æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "å é¤éè´ä»·æ ¼ç®¡ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "éè´ä»·æ ¼ç®¡ç-å é¤") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @Log(title = "导åºéè´ä»·æ ¼ç®¡ç", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | procurementPriceManagementService.export(response); |
| | |
| | | import com.ruoyi.account.pojo.AccountStatementDetails; |
| | | import com.ruoyi.account.service.AccountStatementDetailsService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.bean.dto.ReturnManagementDto; |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢éå®éè´§", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "éå®éè´§-æ·»å ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return returnManagementService.addReturnManagementDto(returnManagementDto) ? success() : error(); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹éå®éè´§", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "éå®éè´§-ä¿®æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | } |
| | | |
| | | |
| | | @Log(title = "å é¤éå®éè´§", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "éå®éè´§-å é¤") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | package com.ruoyi.procurementrecord.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionBomStructureDto; |
| | | import com.ruoyi.production.bean.vo.ProductionBomStructureVo; |
| | |
| | | return R.ok(productionBomStructureService.listByBomId(bomId)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢æä¿®æ¹BOMç»æ", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/addOrUpdateBomStructs") |
| | | @Operation(summary = "æ°å¢æä¿®æ¹BOMç»æ") |
| | | public R addProductionBomStructure(@RequestBody ProductionBomStructureDto productionBomStructureDto) { |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionOperationTaskDto; |
| | |
| | | return R.ok(productionOperationTaskService.getProductionOperationTaskInfo(id)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢å·¥å", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @Operation(summary = "æ°å¢å·¥å") |
| | | public R<Boolean> add(@RequestBody ProductionOperationTask productionOperationTask) { |
| | | return R.ok(productionOperationTaskService.saveProductionOperationTask(productionOperationTask)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹å·¥å", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @Operation(summary = "ä¿®æ¹å·¥å") |
| | | public R<Boolean> edit(@RequestBody ProductionOperationTask productionOperationTask) { |
| | | return R.ok(productionOperationTaskService.saveProductionOperationTask(productionOperationTask)); |
| | | } |
| | | |
| | | @Log(title = "å é¤å·¥å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤å·¥å") |
| | | public R<Boolean> remove(@RequestBody List<Long> ids) { |
| | | return R.ok(productionOperationTaskService.removeProductionOperationTask(ids)); |
| | | } |
| | | |
| | | @Log(title = "产å工忴æ°", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "产å工忴æ°") |
| | | @PostMapping("/updateProductWorkOrder") |
| | | public R updateProductWorkOrder(@RequestBody ProductionOperationTaskDto dto) { |
| | | return R.ok(productionOperationTaskService.updateProductWorkOrder(dto)); |
| | | } |
| | | |
| | | @Log(title = "ææ´¾æ¥å·¥äºº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ææ´¾æ¥å·¥äºº") |
| | | @PostMapping("/assign") |
| | | public R<Boolean> assign(@RequestBody ProductionOperationTaskDto dto) { |
| | | return R.ok(productionOperationTaskService.assign(dto)); |
| | | } |
| | | |
| | | @Log(title = "å·¥åæµè½¬å¡ä¸è½½", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/down") |
| | | @Operation(summary = "å·¥åæµè½¬å¡ä¸è½½") |
| | | public void down(HttpServletResponse response, @RequestBody ProductionOperationTaskDto dto) { |
| | |
| | | return R.ok(productionOrderService.getProductionOrderInfo(id)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOrder") |
| | | @Operation(summary = "æ°å¢ç产订å", description = "æ°å¢ä¸ååªæ¯æ1ç§æ¹å¼ï¼ç产计åçæï¼ä¼ productionPlanIdsï¼ç³»ç»èªå¨æ±æ»è®¡åå¾å°äº§åè§æ ¼åæ°éï¼" |
| | | + "technologyRoutingId 为空æ¶ä¼èªå¨å¹é
该产åè§æ ¼ææ°å·¥èºè·¯çº¿ï¼quantity æç»å¿
é¡»å¤§äº 0ã") |
| | |
| | | return R.ok(productionOrderService.saveProductionOrder(productionOrder)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ç»å®å·¥èºè·¯çº¿") |
| | | @PostMapping("/bindingRoute") |
| | | public R bindingRoute(@RequestBody ProductionOrderDto productionOrderDto) { |
| | | return R.ok(productionOrderService.bindingRoute(productionOrderDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/syncSnapshot/{id}") |
| | | @Operation(summary = "忥ç产订åå·¥èº/BOMå¿«ç
§") |
| | | public R<Integer> syncSnapshot(@PathVariable Long id) { |
| | | return R.ok(productionOrderService.syncProductionOrderSnapshot(id)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤ç产订å") |
| | | public R<Boolean> remove(@RequestBody List<Long> ids) { |
| | |
| | | return R.ok(productionOrderService.getWorkOrderReportInspectDetail(productionOrderDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "æ´æ°è®¢åç¶æ") |
| | | @PostMapping("/updateOrder") |
| | | public R updateOrder(@RequestBody ProductionOrderDto productionOrderDto) { |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionOrderPickDto; |
| | | import com.ruoyi.production.bean.vo.ProductionOrderPickVo; |
| | |
| | | |
| | | private final ProductionOrderPickService productionOrderPickService; |
| | | |
| | | @Log(title = "颿ä¿åå°çº¿è¾¹ä»", businessType = BusinessType.INSERT) |
| | | @PostMapping("/savePick") |
| | | @Operation(summary = "颿ä¿åå°çº¿è¾¹ä»") |
| | | public R<Boolean> savePick(@RequestBody ProductionOrderPickDto dto) { |
| | | return R.ok(productionOrderPickService.savePick(dto)); |
| | | } |
| | | |
| | | @Log(title = "忴颿", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updatePick") |
| | | @Operation(summary = "忴颿") |
| | | public R<Boolean> updatePick(@RequestBody ProductionOrderPickDto dto) { |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.pojo.ProductionOrderRoutingOperation; |
| | | import com.ruoyi.production.service.ProductionOrderRoutingOperationService; |
| | |
| | | return R.ok(productionOrderRoutingService.listMain(orderId)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºè·¯ç±", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addRouteItem") |
| | | @Operation(summary = "æ°å¢ç产订åçå·¥èºè·¯çº¿è¯¦æ
") |
| | | public R addRouteItem(@RequestBody ProductionOrderRoutingOperation productionOrderRoutingOperation) { |
| | | return productionOrderRoutingOperationService.addRouteItem(productionOrderRoutingOperation); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºè·¯ç±", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateRouteItem") |
| | | @Operation(summary = "ä¿®æ¹ç产订åçå·¥èºè·¯çº¿è¯¦æ
") |
| | | public R updateRouteItem(@RequestBody ProductionOrderRoutingOperation productionOrderRoutingOperation) { |
| | | return R.ok(productionOrderRoutingOperationService.updateRouteItem(productionOrderRoutingOperation)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºè·¯ç±", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteRouteItem/{id}") |
| | | @Operation(summary = "å é¤ç产工èºè·¯çº¿") |
| | | public R deleteRouteItem(@PathVariable("id") Long id) { |
| | | return productionOrderRoutingOperationService.deleteRouteItem(id); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºè·¯ç±", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/sortRouteItem") |
| | | @Operation(summary = "æåº") |
| | | public R sortRouteItem(@RequestBody ProductionOrderRoutingOperation productionOrderRoutingOperation) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionOrderRoutingOperationParamDto; |
| | | import com.ruoyi.production.bean.vo.ProductionOrderRoutingOperationParamVo; |
| | |
| | | return R.ok(productionOrderRoutingOperationParamService.getProductionOrderRoutingOperationParamInfo(id)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºåæ°", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @Operation(summary = "æ°å¢ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | public R<Boolean> add(@RequestBody ProductionOrderRoutingOperationParam item) { |
| | | return R.ok(productionOrderRoutingOperationParamService.saveProductionOrderRoutingOperationParam(item)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºåæ°", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @Operation(summary = "ä¿®æ¹ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | public R<Boolean> edit(@RequestBody ProductionOrderRoutingOperationParam item) { |
| | | return R.ok(productionOrderRoutingOperationParamService.updateById(item)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºåæ°", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{id}") |
| | | @Operation(summary = "å é¤ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | public R<Boolean> remove(@PathVariable("id") Long id) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionProductMainDto; |
| | | import com.ruoyi.production.service.ProductionProductMainService; |
| | |
| | | * @param productionProductMainDto |
| | | * @return |
| | | */ |
| | | @Log(title = "ç产产å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addProductMain") |
| | | @PreAuthorize("@ss.hasPermi('productionProductMain:add')") |
| | | public R addProductMain(@RequestBody ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.addProductMain(productionProductMainDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产产å", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @Operation(summary = "æ°å¢ç产æ¥å·¥") |
| | | public R add(@RequestBody ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.saveProductionProductMain(productionProductMainDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产产å", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @Operation(summary = "ä¿®æ¹ç产æ¥å·¥") |
| | | public R edit(@RequestBody ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.saveProductionProductMain(productionProductMainDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产产å", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å 餿¥å·¥") |
| | | @DeleteMapping("/delete") |
| | | public R delete(@RequestBody ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.removeProductMain(productionProductMainDto.getId())); |
| | | } |
| | | |
| | | @Log(title = "ç产产å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{id}") |
| | | @Operation(summary = "å é¤ç产æ¥å·¥") |
| | | public R remove(@PathVariable("id") Long id) { |
| | |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | @Log(title = "ç产产å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ProductionProductMainDto productionProductMainDto) { |
| | | List<ProductionProductMainDto> list; |
| | |
| | | import com.ruoyi.basic.service.StorageBlobService;
|
| | | import com.ruoyi.basic.utils.FileUtil;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Anonymous;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
| | | import com.ruoyi.framework.web.domain.R;
|
| | | import io.swagger.v3.oas.annotations.Operation;
|
| | | import io.swagger.v3.oas.annotations.tags.Tag;
|
| | |
| | | private final StorageBlobService storageBlobService;
|
| | | private final FileUtil fileUtil;
|
| | |
|
| | | @Log(title = "éç¨æä»¶ä¸ä¼ ", businessType = BusinessType.INSERT)
|
| | | @PostMapping({"/upload"})
|
| | | @Operation(summary = "æä»¶ä¸ä¼ ")
|
| | | public R upload(@RequestParam("files") List<MultipartFile> files) {
|
| | |
| | | * å
Œ
±æä»¶ä¸ä¼
|
| | | * æ¤æ¥å£ä¸ä¼ çæä»¶æ°¸ä¹
ææï¼æ
ç¨
|
| | | */
|
| | | @Log(title = "å
Œ
±æä»¶ä¸ä¼ ", businessType = BusinessType.INSERT)
|
| | | @PostMapping({"/public/upload"})
|
| | | @Operation(summary = "æä»¶ä¸ä¼ ")
|
| | | public R publicUpload(@RequestParam("files") List<MultipartFile> files) {
|
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Log(title = "æµè¯æ¥å£æ°å¢ç¨æ·", businessType = BusinessType.INSERT)
|
| | | @Operation(summary = "æ°å¢ç¨æ·")
|
| | | @Parameters({ |
| | | @Parameter(name = "userId", description = "ç¨æ·id"), |
| | |
| | | return R.ok();
|
| | | }
|
| | |
|
| | | @Log(title = "æµè¯æ¥å£æ´æ°ç¨æ·", businessType = BusinessType.UPDATE)
|
| | | @Operation(summary = "æ´æ°ç¨æ·")
|
| | | @PutMapping("/update")
|
| | | public R<String> update(@RequestBody UserEntity user)
|
| | |
| | | return R.ok();
|
| | | }
|
| | |
|
| | | @Log(title = "æµè¯æ¥å£å é¤ç¨æ·", businessType = BusinessType.DELETE)
|
| | | @Operation(summary = "å é¤ç¨æ·ä¿¡æ¯")
|
| | | @Parameter(name = "userId", description = "ç¨æ·ID", required = true) |
| | | @DeleteMapping("/{userId}") |
| | |
| | | package com.ruoyi.projectManagement.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.projectManagement.dto.InfoStageDto; |
| | | import com.ruoyi.projectManagement.dto.UpdateStateInfo; |
| | |
| | | |
| | | @PostMapping("/save") |
| | | @Operation(summary = "ä¿å") |
| | | @Log(title = "项ç®ä¿¡æ¯-ä¿å", businessType = BusinessType.INSERT) |
| | | public AjaxResult save(@RequestBody @Valid SaveInfoVo saveInfoVo) { |
| | | infoService.save(saveInfoVo); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/updateStatus") |
| | | @Operation(summary = "ä¿®æ¹ç¶æ") |
| | | @Log(title = "项ç®ä¿¡æ¯-ä¿®æ¹ç¶æ", businessType = BusinessType.UPDATE) |
| | | public AjaxResult updateStatus(@RequestBody @Valid UpdateStateInfo updateStateInfo){ |
| | | infoService.updateStatus(updateStateInfo); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/delete/{id}") |
| | | @Operation(summary = "å é¤") |
| | | @Log(title = "项ç®ä¿¡æ¯-å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | | infoService.deleteInfo(id); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/saveStage") |
| | | @Operation(summary = "ä¿åé¶æ®µ") |
| | | @Log(title = "项ç®ä¿¡æ¯-ä¿åé¶æ®µ", businessType = BusinessType.INSERT) |
| | | public AjaxResult saveStage(@RequestBody @Valid SaveInfoStageVo dto) { |
| | | infoStageHandleService.save(dto); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/deleteStage/{id}") |
| | | @Operation(summary = "å é¤é¶æ®µ") |
| | | @Log(title = "项ç®ä¿¡æ¯-å é¤é¶æ®µ", businessType = BusinessType.DELETE) |
| | | public AjaxResult deleteStage(@PathVariable Long id) { |
| | | infoStageHandleService.deleteById(id); |
| | | return AjaxResult.success(); |
| | |
| | | package com.ruoyi.projectManagement.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.projectManagement.service.PlanService; |
| | | import com.ruoyi.projectManagement.vo.SavePlanNodeVo; |
| | |
| | | |
| | | @PostMapping("/save") |
| | | @Operation(summary = "ä¿å") |
| | | @Log(title = "项ç®è®¡å-ä¿å", businessType = BusinessType.INSERT) |
| | | public AjaxResult save(@RequestBody @Valid SavePlanVo savePlanVo) { |
| | | planService.savePlan(savePlanVo); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/delete/{id}") |
| | | @Operation(summary = "å é¤") |
| | | @Log(title = "项ç®è®¡å-å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | | planService.deletePlan(id); |
| | | return AjaxResult.success(); |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.projectManagement.dto.RoleDto; |
| | | import com.ruoyi.projectManagement.mapper.RolesMapper; |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | @Log(title = "项ç®è§è²-æ°å¢", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody RoleDto roleDto) { |
| | | if (roleDto.getIsDefaultNo()) { |
| | | roleDto.setNo(OrderUtils.countTodayByCreateTime(rolesMapper, "XMJS","no")); |
| | |
| | | |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹") |
| | | @Log(title = "项ç®è§è²-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody Roles roles) { |
| | | return AjaxResult.success(rolesservice.updateById(roles)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤") |
| | | @Log(title = "项ç®è§è²-å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(rolesservice.removeBatchByIds(ids)); |
| | |
| | | /** |
| | | * ä¿®æ¹éè´å°è´¦å®¡æ¹ç¶æ |
| | | */ |
| | | @Log(title = "éè´å°è´¦", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateApprovalStatus") |
| | | public AjaxResult addOrEditPurchase(@RequestBody PurchaseLedger purchaseLedger){ |
| | | return toAjax(purchaseLedgerService.updateById(purchaseLedger)); |
| | |
| | | return AjaxResult.success(purchaseReturnOrdersService.getPurchaseReturnOrderDtoById(id)); |
| | | } |
| | | |
| | | @Log(title = "éè´éè´§å", businessType = BusinessType.DELETE) |
| | | @PostMapping("/deleteById/{id}") |
| | | public AjaxResult deleteById(@PathVariable Long id) { |
| | | //å¦æè¯¥éè´éè´§å·²ç»çæå¯¹è´¦ååæ æ³å é¤ |
| | |
| | | |
| | | private String entryDateStart; |
| | | private String entryDateEnd; |
| | | @Schema(description = "å
¥åºç¶æ") |
| | | private String stockInStatus; |
| | | |
| | | private Long id; |
| | | |
| | |
| | | |
| | | @Override |
| | | public IPage<PurchaseLedgerDto> selectPurchaseLedgerListPage(IPage ipage, PurchaseLedgerDto purchaseLedger) { |
| | | IPage<PurchaseLedgerDto> purchaseLedgerDtoIPage = purchaseLedgerMapper.selectPurchaseLedgerListPage(ipage, purchaseLedger); |
| | | purchaseLedgerDtoIPage.getRecords().forEach(purchaseLedgerDto -> { |
| | | List<CommonFile> commonFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>().eq(CommonFile::getCommonId, purchaseLedgerDto.getId()).eq(CommonFile::getType, FileNameType.PURCHASE.getValue())); |
| | | purchaseLedgerDto.setSalesLedgerFiles(commonFiles); |
| | | }); |
| | | return purchaseLedgerDtoIPage; |
| | | return purchaseLedgerMapper.selectPurchaseLedgerListPage(ipage, purchaseLedger); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Schema(description = "ååéé¢") |
| | | private BigDecimal contractAmount; |
| | | |
| | | @Schema(description = "仿¬¾éé¢") |
| | | private BigDecimal paymentAmount; |
| | | @Schema(description = "å·²å
¥åºéé¢") |
| | | private BigDecimal shippedAmount; |
| | | |
| | | @Schema(description = "åºä»éé¢") |
| | | private BigDecimal payableAmount; |
| | | @Schema(description = "æªå
¥åºéé¢") |
| | | private BigDecimal unshippedAmount; |
| | | |
| | | } |
| | |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "ååæ»éé¢") |
| | | //该ä¾åºåéè´åå累计éé¢ |
| | | private BigDecimal contractAmounts; |
| | | |
| | | @Schema(description = "仿¬¾éé¢") |
| | | //该ä¾åºåéè´ä»æ¬¾ç´¯è®¡éé¢ |
| | | private BigDecimal paymentAmount; |
| | | @Schema(description = "å·²å
¥åºéé¢") |
| | | private BigDecimal shippedAmount; |
| | | |
| | | @Schema(description = "åºä»éé¢") |
| | | //该ä¾åºåéè´åºä»ç´¯è®¡éé¢=è´¢å¡(å
¥åº-éè´§) |
| | | private BigDecimal payableAmount; |
| | | @Schema(description = "æªå
¥åºéé¢") |
| | | private BigDecimal unshippedAmount; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | | import com.ruoyi.quality.pojo.QualityInspectParam; |
| | |
| | | * @param qualityInspectFile |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¸ä¼ è´¨æ£æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody QualityInspectFile qualityInspectFile) { |
| | | return AjaxResult.success(qualityInspectFileService.save(qualityInspectFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤è´¨æ£æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | @Schema(description = "å
³èæ£æµæ å主表id") |
| | | private Long testStandardId; |
| | | |
| | | /** |
| | | * åæ ¼ç |
| | | */ |
| | | @TableField(exist = false) |
| | | @Excel(name = "åæ ¼ç(%)") |
| | | private BigDecimal passRate; |
| | | |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | |
| | | public int submit(QualityInspect inspect) { |
| | | QualityInspect qualityInspect = qualityInspectMapper.selectById(inspect.getId()); |
| | | |
| | | //æäº¤åå¿
须夿æ¯å¦åæ ¼ |
| | | if (ObjectUtils.isNull(qualityInspect.getCheckResult())) { |
| | | throw new ServiceException("请å
夿æ¯å¦åæ ¼"); |
| | | } |
| | | |
| | | //æäº¤åå¿
须夿æ¯å¦åæ ¼ï¼éè¿åæ ¼æ°éåä¸åæ ¼æ°éæ¥å¤æï¼ |
| | | if (ObjectUtils.isNull(qualityInspect.getQualifiedQuantity())) { |
| | | throw new ServiceException("åæ ¼æ°éä¸è½ä¸ºç©º"); |
| | | } |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeAccident; |
| | | import com.ruoyi.safe.service.SafeAccidentService; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢äºæ
䏿¥è®°å½") |
| | | @Log(title = "å®å
¨äºæ
", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeAccident safeAccident) { |
| | | return R.ok(safeAccidentService.save(safeAccident)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹äºæ
䏿¥è®°å½") |
| | | @Log(title = "å®å
¨äºæ
", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeAccident safeAccident) { |
| | | return R.ok(safeAccidentService.updateById(safeAccident)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤äºæ
䏿¥è®°å½") |
| | | @Log(title = "å®å
¨äºæ
", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeAccident(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeAccidentService.removeBatchByIds(ids)); |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeCertification; |
| | | import com.ruoyi.safe.service.SafeCertificationService; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢å®å
¨è§ç¨ä¸èµè´¨ç®¡ç") |
| | | @Log(title = "å®å
¨è¯ä¹¦", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeCertification safeCertification) { |
| | | return R.ok(safeCertificationService.save(safeCertification)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹å®å
¨è§ç¨ä¸èµè´¨ç®¡ç") |
| | | @Log(title = "å®å
¨è¯ä¹¦", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeCertification safeCertification) { |
| | | return R.ok(safeCertificationService.updateById(safeCertification)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤å®å
¨è§ç¨ä¸èµè´¨ç®¡ç") |
| | | @Log(title = "å®å
¨è¯ä¹¦", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeCertification(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeCertificationService.removeBatchByIds(ids)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeCertificationFile; |
| | | import com.ruoyi.safe.service.SafeCertificationFileService; |
| | |
| | | * @param safeCertificationFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢å®å
¨è¯ä¹¦æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public R add(@RequestBody SafeCertificationFile safeCertificationFile) { |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å®å
¨è¯ä¹¦æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "å é¤") |
| | | public R delSafeCertificationFile(@RequestBody List<Integer> ids) { |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeContingencyPlan; |
| | | import com.ruoyi.safe.service.SafeContingencyPlanService; |
| | |
| | | return R.ok(safeContingencyPlanService.pageSafeContingencyPlan(page, safeContingencyPlan)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢åºæ¥é¢æ¡", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢åºæ¥é¢æ¡æ¥é
") |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeContingencyPlan safeContingencyPlan) { |
| | | return R.ok(safeContingencyPlanService.save(safeContingencyPlan)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹åºæ¥é¢æ¡", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹åºæ¥é¢æ¡æ¥é
") |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeContingencyPlan safeContingencyPlan) { |
| | | return R.ok(safeContingencyPlanService.updateById(safeContingencyPlan)); |
| | | } |
| | | |
| | | @Log(title = "å é¤åºæ¥é¢æ¡", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å é¤åºæ¥é¢æ¡æ¥é
") |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeCertification(@RequestBody List<Integer> ids) { |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeHazard; |
| | | import com.ruoyi.safe.service.SafeHazardService; |
| | |
| | | return R.ok(safeHazardService.pageSafeHazard(page, safeHazard)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢å±é©æº", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢å±é©æºå°è´¦") |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeHazard safeHazard) { |
| | | return R.ok(safeHazardService.save(safeHazard)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹å±é©æº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹å±é©æºå°è´¦") |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeHazard safeHazard) { |
| | | return R.ok(safeHazardService.updateById(safeHazard)); |
| | | } |
| | | |
| | | @Log(title = "å é¤å±é©æº", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å é¤å±é©æºå°è´¦") |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeHazard(@RequestBody List<Integer> ids) { |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.dto.SafeHazardRecordDto; |
| | | import com.ruoyi.safe.pojo.SafeHazardRecord; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "é¢ç¨") |
| | | @Log(title = "å±é©æºè®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("/borrow") |
| | | public R borrow(@RequestBody SafeHazardRecord safeHazardRecord) { |
| | | return R.ok(safeHazardRecordService.borrow(safeHazardRecord)); |
| | | } |
| | | |
| | | @Operation(summary = "å½è¿") |
| | | @Log(title = "å±é©æºè®°å½", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/return") |
| | | public R returnSafeHazardRecord(@RequestBody SafeHazardRecord safeHazardRecord) { |
| | | return R.ok(safeHazardRecordService.returnSafeHazardRecord(safeHazardRecord)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤") |
| | | @Log(title = "å±é©æºè®°å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeHazardRecord(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeHazardRecordService.delSafeHazardRecord(ids)); |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.dto.SafeHiddenDto; |
| | | import com.ruoyi.safe.pojo.SafeHidden; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢éæ£ææ¥") |
| | | @Log(title = "å®å
¨éæ£", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeHidden safeHidden) { |
| | | return R.ok(safeHiddenService.add(safeHidden)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹éæ£ææ¥(æ´æ¹/éªæ¶)") |
| | | @Log(title = "å®å
¨éæ£", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeHidden safeHidden) { |
| | | return R.ok(safeHiddenService.updateById(safeHidden)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤éæ£ææ¥") |
| | | @Log(title = "å®å
¨éæ£", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeHidden(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeHiddenService.delSafeHidden(ids)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeHiddenFile; |
| | | import com.ruoyi.safe.service.SafeHiddenFileService; |
| | |
| | | * @param safeHiddenFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢éæ£æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public R add(@RequestBody SafeHiddenFile safeHiddenFile) { |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤éæ£æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "å é¤") |
| | | public R delSafeHiddenFile(@RequestBody List<Integer> ids) { |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.dto.SafeTrainingDto; |
| | | import com.ruoyi.safe.pojo.SafeTraining; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢/ç¼è¾å®å
¨å¹è®èæ ¸") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | public R addOrUpdate(@RequestBody SafeTraining safeTraining) { |
| | | return R.ok(safeTrainingService.addOrUpdate(safeTraining)); |
| | | } |
| | | |
| | | @Operation(summary = "ç¾å°") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.INSERT) |
| | | @PostMapping ("/sign") |
| | | public R sign(@RequestBody SafeTrainingDetails safeTrainingDetails) { |
| | | return R.ok(safeTrainingDetailsService.save(safeTrainingDetails)); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "ç»ææç»ä¿å") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("/saveSafeTraining") |
| | | public R saveSafeTraining(@RequestBody SafeTrainingDto safeTrainingDto) { |
| | | return R.ok(safeTrainingService.saveSafeTraining(safeTrainingDto)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤å®å
¨å¹è®èæ ¸") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeTraining(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeTrainingService.delSafeTraining(ids)); |
| | | } |
| | | |
| | | @Operation(summary = "导åº") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.EXPORT) |
| | | @PostMapping ("/export") |
| | | public void export(HttpServletResponse response, @RequestBody SafeTraining safeTraining) { |
| | | safeTrainingService.export(response,safeTraining.getId()); |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeTrainingDetails; |
| | | import com.ruoyi.safe.service.SafeTrainingDetailsService; |
| | |
| | | return R.ok(safeTrainingDetailsService.pageDetails(page, safeTrainingDetails)); |
| | | } |
| | | |
| | | @Log(title = "导åºå¹è®è¯¦æ
", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "导åº") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, @RequestBody SafeTrainingDetails safeTrainingDetails) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeHiddenFile; |
| | | import com.ruoyi.safe.pojo.SafeTrainingFile; |
| | |
| | | * @param safeHiddenFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢å¹è®æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public R add(@RequestBody SafeTrainingFile safeHiddenFile) { |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å¹è®æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "å é¤") |
| | | public R delSafeHiddenFile(@RequestBody List<Integer> ids) { |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.mapper.PaymentShippingMapper; |
| | |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | | @Log(title = "仿¬¾åè´§", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ·»å æ¯ä»ä¸åè´§ä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return save ? success() : error(); |
| | | } |
| | | |
| | | @Log(title = "仿¬¾åè´§", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹æ¯ä»ä¸åè´§ä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return update ? success() : error(); |
| | | } |
| | | |
| | | @Log(title = "仿¬¾åè´§", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å 餿¯ä»ä¸åè´§ä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.dto.SalesQuotationDto; |
| | | import com.ruoyi.sales.service.SalesQuotationService; |
| | |
| | | } |
| | | |
| | | |
| | | @Log(title = "é宿¥ä»·", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | Page page = new Page(-1,-1); |
| | |
| | | } |
| | | |
| | | |
| | | @Log(title = "é宿¥ä»·", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SalesQuotationDto salesQuotationDto) { |
| | | return AjaxResult.success(salesQuotationService.add(salesQuotationDto)); |
| | | } |
| | | @Log(title = "é宿¥ä»·", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody SalesQuotationDto salesQuotationDto) { |
| | | return AjaxResult.success(salesQuotationService.edit(salesQuotationDto)); |
| | | } |
| | | @Log(title = "é宿¥ä»·", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody Long id) { |
| | | return AjaxResult.success(salesQuotationService.delete(id)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.pojo.SalespersonManagement; |
| | |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | | @Log(title = "ä¸å¡å管ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ·»å ä¸å¡åä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return save ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¸å¡å管ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹ä¸å¡åä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return update ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¸å¡å管ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤ä¸å¡åä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | /** |
| | | * 导åºåè´§ä¿¡æ¯ç®¡ç |
| | | */ |
| | | @Log(title = "åè´§ä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @Operation(summary = "导åºåè´§ä¿¡æ¯") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | /** |
| | | * 产åç¶æ |
| | | */ |
| | | @TableField(exist = false) |
| | | @Schema(description = "å
¥åºå®¡æ ¸ç¶æ") |
| | | private String stockInApprovalStatus; |
| | | |
| | | // @TableField(exist = false) |
| | | @Schema(description = "产åç¶æï¼1-å
è¶³") |
| | | private Integer approveStatus; |
| | |
| | | // åè´§æ°é |
| | | long count = shippingInfoMapper.selectCount(new LambdaQueryWrapper<ShippingInfo>() |
| | | .in(ShippingInfo::getSalesLedgerProductId, salesLedgerProducts.stream().map(SalesLedgerProduct::getId).collect(Collectors.toList())) |
| | | .eq(ShippingInfo::getStatus,"å·²åè´§")); |
| | | .eq(ShippingInfo::getStatus,"å®¡æ ¸éè¿")); |
| | | map.put("shipRate", String.format("%.2f", count * 100.0 / salesLedgerProducts.size()) + "%"); |
| | | return AjaxResult.success(map); |
| | | } |
| | |
| | | .orderByDesc(ShippingInfo::getCreateTime) |
| | | .last("limit 1")); |
| | | if (shippingInfo != null) { |
| | | product.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | product.setShippingDate(shippingInfo.getShippingDate()); |
| | | product.setShippingStatus(shippingInfo.getStatus()); |
| | | product.setExpressCompany(shippingInfo.getExpressCompany()); |
| | | product.setExpressNumber(shippingInfo.getExpressNumber()); |
| | | } |
| | | } |
| | | |
| | |
| | | .eq(ShippingInfo::getSalesLedgerProductId, product.getId()) |
| | | .orderByDesc(ShippingInfo::getCreateTime) |
| | | .last("limit 1")); |
| | | if (shippingInfo != null) { |
| | | product.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | product.setShippingDate(shippingInfo.getShippingDate()); |
| | | if (shippingInfo != null) { |
| | | product.setShippingStatus(shippingInfo.getStatus()); |
| | | product.setExpressCompany(shippingInfo.getExpressCompany()); |
| | | product.setExpressNumber(shippingInfo.getExpressNumber()); |
| | | } |
| | | } |
| | | // è¿æ»¤åªä¿çåè´§è®°å½ |
| | | products = products.stream().filter(product -> "å·²åè´§".equals(product.getShippingStatus())).collect(Collectors.toList()); |
| | | products = products.stream().filter(product -> "å®¡æ ¸éè¿".equals(product.getShippingStatus())).collect(Collectors.toList()); |
| | | if (!products.isEmpty()) { |
| | | salesLedger.setHasChildren(true); |
| | | salesLedger.setProductData(products); |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean delete(List<Long> ids) { |
| | | List<ShippingInfo> shippingInfos = shippingInfoMapper.selectList(new LambdaQueryWrapper<ShippingInfo>() |
| | | .in(ShippingInfo::getId, ids)); |
| | | if (CollectionUtils.isEmpty(shippingInfos)) return false; |
| | | // åªæå¾
å®¡æ ¸ç¶ææè½å é¤ |
| | | boolean allPending = shippingInfos.stream().allMatch(s -> "å¾
å®¡æ ¸".equals(s.getStatus())); |
| | | if (!allPending) throw new RuntimeException("åªæå¾
å®¡æ ¸ç¶ææè½å é¤"); |
| | | // å é¤éä»¶ |
| | | commonFileService.deleteByBusinessIds(ids, FileNameType.SHIP.getValue()); |
| | | // å é¤åè´§å®¡æ¹ |
| | |
| | | @Schema(description = "ååéé¢") |
| | | private BigDecimal contractAmount; |
| | | |
| | | @Schema(description = "æ¶æ¬¾éé¢") |
| | | private BigDecimal receiptPaymentAmount; |
| | | @Schema(description = "å·²åºåºéé¢") |
| | | private BigDecimal shippedAmount; |
| | | |
| | | @Schema(description = "åºæ¶éé¢") |
| | | private BigDecimal receiptableAmount; |
| | | @Schema(description = "æªåºåºéé¢") |
| | | private BigDecimal unshippedAmount; |
| | | |
| | | } |
| | |
| | | private String customerName; |
| | | |
| | | @Schema(description = "ååæ»éé¢") |
| | | //该客æ·éå®åå累计éé¢ |
| | | private BigDecimal contractAmounts; |
| | | |
| | | @Schema(description = "æ¶æ¬¾éé¢") |
| | | //该客æ·é宿¶æ¬¾ç´¯è®¡éé¢ |
| | | private BigDecimal receiptPaymentAmount; |
| | | @Schema(description = "å·²åºåºéé¢") |
| | | private BigDecimal shippedAmount; |
| | | |
| | | @Schema(description = "åºæ¶éé¢") |
| | | //该客æ·éå®åºæ¶ç´¯è®¡éé¢=è´¢å¡(åºåº-éè´§) |
| | | private BigDecimal receiptableAmount; |
| | | @Schema(description = "æªåºåºéé¢") |
| | | private BigDecimal unshippedAmount; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.pojo.HolidayApplication; |
| | | import com.ruoyi.staff.service.HolidayApplicationService; |
| | |
| | | /** |
| | | * æ°å¢è¯·åç³è¯· |
| | | */ |
| | | @Log(title = "æ°å¢è¯·åç³è¯·", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody HolidayApplication holidayApplication){ |
| | | return AjaxResult.success(holidayApplicationService.save(holidayApplication)); |
| | |
| | | /** |
| | | * ä¿®æ¹è¯·åç³è¯· |
| | | */ |
| | | @Log(title = "ä¿®æ¹è¯·åç³è¯·", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody HolidayApplication holidayApplication){ |
| | | return AjaxResult.success(holidayApplicationService.updateById(holidayApplication)); |
| | |
| | | /** |
| | | * å é¤è¯·åç³è¯· |
| | | */ |
| | | @Log(title = "å é¤è¯·åç³è¯·", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete/{id}") |
| | | public AjaxResult delete(@PathVariable("id") Long id){ |
| | | return AjaxResult.success(holidayApplicationService.removeById(id)); |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | | import com.ruoyi.staff.service.PersonalAttendanceLocationConfigService; |
| | |
| | | private final PersonalAttendanceLocationConfigService personalAttendanceLocationConfigService; |
| | | |
| | | @Operation(summary = "æ°å¢/ä¿®æ¹äººåæå¡è§åé
ç½®") |
| | | @Log(title = "æ°å¢/ä¿®æ¹äººåæå¡è§åé
ç½®", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody PersonalAttendanceLocationConfig personalAttendanceLocationConfig){ |
| | | |
| | |
| | | |
| | | |
| | | @Operation(summary = "å é¤äººåæå¡è§åé
ç½®") |
| | | @Log(title = "å é¤äººåæå¡è§åé
ç½®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public R del(@RequestBody List<Integer> ids) { |
| | | return R.ok(personalAttendanceLocationConfigService.removeBatchByIds(ids)); |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.PersonalAttendanceRecordsDto; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceRecords; |
| | |
| | | @Resource |
| | | private PersonalAttendanceRecordsService personalAttendanceRecordsService; |
| | | |
| | | @Log(title = "个人èå¤è®°å½", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢æå¡ç¾å°") |
| | | @PostMapping("") |
| | | public AjaxResult add(@RequestBody PersonalAttendanceRecordsDto personalAttendanceRecordsDto){ |
| | |
| | | return AjaxResult.success(personalAttendanceRecordsService.todayInfo(personalAttendanceRecordsDto)); |
| | | } |
| | | |
| | | @Log(title = "个人èå¤è®°å½", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "å¯¼åºæå¡ç¾å°") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, PersonalAttendanceRecordsDto personalAttendanceRecordsDto) { |
| | |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.staff.dto.PerformanceShiftAddDto; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | |
| | | private PersonalShiftService personalShiftService; |
| | | |
| | | @Operation(summary = "人åæç") |
| | | @Log(title = "æ°å¢äººåæç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody PerformanceShiftAddDto performanceShiftAddDto){ |
| | | return R.ok(personalShiftService.performanceShiftAdd(performanceShiftAddDto)); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "çæ¬¡ç¶æä¿®æ¹") |
| | | @Log(title = "ä¿®æ¹çæ¬¡ç¶æ", businessType = BusinessType.UPDATE) |
| | | @PostMapping("update") |
| | | public R performanceShiftUpdate(@RequestBody PersonalShift personalShift) { |
| | | personalShiftService.performanceShiftUpdate(personalShift); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "导åº") |
| | | @Log(title = "导åºäººåæç", businessType = BusinessType.EXPORT) |
| | | @GetMapping("export") |
| | | public void exportToExcel(@NotNull(message = "æ¶é´ä¸è½ä¸ºç©ºï¼") String time, String userName, Integer sysDeptId, Boolean isMonth, HttpServletResponse response) throws Exception { |
| | | ServletOutputStream out = response.getOutputStream(); |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.StaffLeaveDto; |
| | | import com.ruoyi.staff.service.StaffLeaveService; |
| | |
| | | * @param staffLeaveDto |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢ç¦»èè®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("") |
| | | public AjaxResult add(@RequestBody StaffLeaveDto staffLeaveDto) { |
| | | return AjaxResult.success(staffLeaveService.add(staffLeaveDto)); |
| | |
| | | * @param staffLeaveDto |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¿®æ¹ç¦»èè®°å½", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/{id}") |
| | | public AjaxResult update(@PathVariable("id") Long id, @RequestBody StaffLeaveDto staffLeaveDto) { |
| | | return AjaxResult.success(staffLeaveService.update(id, staffLeaveDto)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤ç¦»èè®°å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult del(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | * 离èå¯¼åº |
| | | * @param staffLeaveDto |
| | | */ |
| | | @Log(title = "导åºç¦»èè®°å½", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, StaffLeaveDto staffLeaveDto) { |
| | | staffLeaveService.export(response, staffLeaveDto); |
| | |
| | | * @param staffOnJob |
| | | * @return |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.INSERT) |
| | | @PostMapping("") |
| | | public AjaxResult add(@RequestBody StaffOnJobDto staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.add(staffOnJob)); |
| | |
| | | * @param staffOnJobDto |
| | | * @return |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/{id}") |
| | | public AjaxResult update(@PathVariable("id") Long id, @RequestBody StaffOnJobDto staffOnJobDto) { |
| | | return AjaxResult.success(staffOnJobService.update(id, staffOnJobDto)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delStaffOnJobs(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | * @param staffContract |
| | | * @return |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/renewContract/{id}") |
| | | public AjaxResult renewContract(@PathVariable Long id, @RequestBody StaffContract staffContract) { |
| | | return AjaxResult.success(staffOnJobService.renewContract(id, staffContract)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¸è½½æ¨¡æ¿") |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/downloadTemplate") |
| | | public void downloadTemplate(HttpServletResponse response) { |
| | | ExcelUtil<StaffOnJobExcelDto> util = new ExcelUtil<>(StaffOnJobExcelDto.class); |
| | |
| | | * @param response |
| | | * @param staffOnJob |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void staffOnJobExport(HttpServletResponse response,StaffOnJob staffOnJob) { |
| | | staffOnJobService.staffOnJobExport(response, staffOnJob); |
| | |
| | | * @param response |
| | | * @param staffOnJob |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportCopy") |
| | | @Operation(summary = "word模æ¿ååå¨èå工导åº") |
| | | public AjaxResult exportCopy(HttpServletResponse response,@RequestBody StaffOnJob staffOnJob) throws Exception{ |
| | |
| | | return AjaxResult.success(staffSchedulingService.listPage(vo)); |
| | | } |
| | | |
| | | @Log(title = "åå·¥æç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/save") |
| | | public AjaxResult save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){ |
| | | staffSchedulingService.saveStaffScheduling(saveStaffSchedulingDto); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "åå·¥æç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delByIds") |
| | | public AjaxResult delByIds(@RequestBody List<Integer> ids){ |
| | | staffSchedulingService.removeByIds(ids); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "åå·¥æç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del/{id}") |
| | | public AjaxResult del(@PathVariable("id") Integer id){ |
| | | staffSchedulingService.removeById(id); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.dto.StockUninventoryDto; |
| | |
| | | |
| | | @PostMapping("/addstockUninventory") |
| | | @Operation(summary = "æ°å¢åºå") |
| | | @Log(title = "æ°å¢ä¸åæ ¼åºå", businessType = BusinessType.INSERT) |
| | | public R addstockUninventory(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_IN.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | |
| | | |
| | | @PostMapping("/subtractstockUninventory") |
| | | @Operation(summary = "æ£ååºå") |
| | | @Log(title = "æ£åä¸åæ ¼åºå", businessType = BusinessType.UPDATE) |
| | | public R subtractstockUninventory(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockOutQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_OUT.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | |
| | | |
| | | @PostMapping("/addStockInRecordOnly") |
| | | @Operation(summary = "æ°å¢å
¥åºè®°å½ï¼ä»
å建记å½ï¼ä¸è°æ´åºåï¼") |
| | | @Log(title = "æ°å¢ä¸åæ ¼åºåå
¥åºè®°å½", businessType = BusinessType.INSERT) |
| | | public R addStockInRecordOnly(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_IN.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | |
| | | |
| | | @PostMapping("/addStockOutRecordOnly") |
| | | @Operation(summary = "æ°å¢åºåºè®°å½ï¼ä»
å建记å½ï¼ä¸è°æ´åºåï¼") |
| | | @Log(title = "æ°å¢ä¸åæ ¼åºååºåºè®°å½", businessType = BusinessType.INSERT) |
| | | public R addStockOutRecordOnly(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockOutQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_OUT.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | |
| | | |
| | | @PostMapping("/exportStockUninventory") |
| | | @Operation(summary = "导åºåºå") |
| | | @Log(title = "导åºä¸åæ ¼åºå", businessType = BusinessType.EXPORT) |
| | | public void exportStockUninventory(HttpServletResponse response, StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryService.exportStockUninventory(response,stockUninventoryDto); |
| | | } |
| | |
| | | |
| | | @PostMapping("/frozenStock") |
| | | @Operation(summary = "å»ç»åºå") |
| | | @Log(title = "å»ç»ä¸åæ ¼åºå", businessType = BusinessType.UPDATE) |
| | | public R frozenStock(@RequestBody StockInventoryDto stockInventoryDto) { |
| | | return R.ok(stockUninventoryService.frozenStock(stockInventoryDto)); |
| | | } |
| | | |
| | | @PostMapping("/thawStock") |
| | | @Operation(summary = "è§£å»åºå") |
| | | @Log(title = "è§£å»ä¸åæ ¼åºå", businessType = BusinessType.UPDATE) |
| | | public R thawStock(@RequestBody StockInventoryDto stockInventoryDto) { |
| | | return R.ok(stockUninventoryService.thawStock(stockInventoryDto)); |
| | | } |
| | |
| | | @Schema(description = "è®°å½IDå表") |
| | | private List<Long> ids; |
| | | |
| | | @Schema(description = "æºåå·") |
| | | private String sourceOrderNo; |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serial; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("stock_in_record") |
| | | @Schema(name = "å
¥åºç®¡ç") |
| | | public class StockInRecord { |
| | | public class StockInRecord implements Serializable { |
| | | |
| | | @Serial |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * åºå· |
| | |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | |
| | | @Schema(description = "é¢è¦æ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal warnNum; |
| | | |
| | | @Schema(description = "ç±»å 0åæ ¼å
¥åº 1ä¸åæ ¼å
¥åº") |
| | | private String type; |
| | | |
| | |
| | | throw new BaseException("该å
¥åºè®°å½ä¸åå¨,æ æ³æ´æ°!!!"); |
| | | } |
| | | |
| | | // è®°å½ä¿®æ¹åç batch_no |
| | | String oldBatchNo = stockInRecord.getBatchNo(); |
| | | String newBatchNo = stockInRecordDto.getBatchNo(); |
| | | |
| | | String[] ignoreProperties = {"id", "inbound_batches"};//æé¤id屿§ |
| | | BeanUtils.copyProperties(stockInRecordDto, stockInRecord, ignoreProperties); |
| | | return stockInRecordMapper.updateById(stockInRecord); |
| | | int result = stockInRecordMapper.updateById(stockInRecord); |
| | | |
| | | // 妿 batch_no åçååï¼éè¦åæ¥æ´æ°å
³è表 |
| | | if (newBatchNo != null && !newBatchNo.equals(oldBatchNo)) { |
| | | updateRelatedBatchNo(stockInRecord, oldBatchNo, newBatchNo); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * åæ¥æ´æ°å
³è表ç batch_no |
| | | * @param stockInRecord å
¥åºè®°å½ |
| | | * @param oldBatchNo ä¿®æ¹åçæ¹å· |
| | | * @param newBatchNo ä¿®æ¹åçæ¹å· |
| | | */ |
| | | private void updateRelatedBatchNo(StockInRecord stockInRecord, String oldBatchNo, String newBatchNo) { |
| | | // 1. æ´æ° stock_inventory 表ï¼åæ ¼åºåï¼ |
| | | LambdaQueryWrapper<StockInventory> inventoryEq = new LambdaQueryWrapper<StockInventory>() |
| | | .eq(StockInventory::getProductModelId, stockInRecord.getProductModelId()); |
| | | if (StringUtils.isEmpty(oldBatchNo)) { |
| | | inventoryEq.isNull(StockInventory::getBatchNo); |
| | | } else { |
| | | inventoryEq.eq(StockInventory::getBatchNo, oldBatchNo); |
| | | } |
| | | StockInventory stockInventory = stockInventoryMapper.selectOne(inventoryEq); |
| | | if (stockInventory != null) { |
| | | stockInventory.setBatchNo(newBatchNo); |
| | | stockInventoryMapper.updateById(stockInventory); |
| | | } |
| | | |
| | | // 2. æ´æ° stock_uninventory 表ï¼ä¸åæ ¼åºåï¼ |
| | | LambdaQueryWrapper<StockUninventory> uninventoryEq = new LambdaQueryWrapper<StockUninventory>() |
| | | .eq(StockUninventory::getProductModelId, stockInRecord.getProductModelId()); |
| | | if (StringUtils.isEmpty(oldBatchNo)) { |
| | | uninventoryEq.isNull(StockUninventory::getBatchNo); |
| | | } else { |
| | | uninventoryEq.eq(StockUninventory::getBatchNo, oldBatchNo); |
| | | } |
| | | StockUninventory stockUninventory = stockUninventoryMapper.selectOne(uninventoryEq); |
| | | if (stockUninventory != null) { |
| | | stockUninventory.setBatchNo(newBatchNo); |
| | | stockUninventoryMapper.updateById(stockUninventory); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | stockInventoryDto.setBatchNo(stockInRecord.getBatchNo()); |
| | | stockInventoryDto.setQualitity(stockInRecord.getStockInNum()); |
| | | stockInventoryDto.setRemark(stockInRecord.getRemark()); |
| | | stockInventoryDto.setWarnNum(stockInRecord.getWarnNum()); |
| | | if (stockInventory == null) { |
| | | stockInventoryMapper.insert(new StockInventory() {{ |
| | | setProductModelId(stockInRecord.getProductModelId()); |
| | | setQualitity(stockInRecord.getStockInNum()); |
| | | setWarnNum(stockInRecord.getWarnNum()); |
| | | setBatchNo(stockInRecord.getBatchNo()); |
| | | setRemark(stockInRecord.getRemark()); |
| | | setVersion(1); |
| | |
| | | stockInRecordDto.setStockInNum(stockInventoryDto.getQualitity()); |
| | | stockInRecordDto.setBatchNo(batchNo); |
| | | stockInRecordDto.setProductModelId(stockInventoryDto.getProductModelId()); |
| | | stockInRecordDto.setWarnNum(stockInventoryDto.getWarnNum()); |
| | | stockInRecordDto.setType("0"); |
| | | stockInRecordDto.setRemark(stockInventoryDto.getRemark()); |
| | | stockInRecordService.add(stockInRecordDto); |
| | |
| | | package com.ruoyi.technology.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.technology.bean.dto.TechnologyBomStructureDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyBomStructureVo; |
| | |
| | | |
| | | @PostMapping |
| | | @Operation(summary = "æ°å¢æä¿®æ¹BOMç»æ") |
| | | @Log(title = "æ°å¢æä¿®æ¹BOMç»æ", businessType = BusinessType.INSERT) |
| | | public R addOrUpdate(@RequestBody TechnologyBomStructureDto technologyBomStructureDto) { |
| | | return R.ok(technologyBomStructureService.addTechnologyBomStructure(technologyBomStructureDto)); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyRoutingVo; |
| | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿ã |
| | | */ |
| | | @PostMapping("/addTechRoute") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢å·¥èºè·¯çº¿") |
| | | @PostMapping("/addTechRoute") |
| | | public R add(@RequestBody TechnologyRouting technologyRouting) { |
| | | return R.ok(technologyRoutingService.saveTechnologyRouting(technologyRouting)); |
| | | } |
| | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿ã |
| | | */ |
| | | @PutMapping("/editTechRoute") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹å·¥èºè·¯çº¿") |
| | | @PutMapping("/editTechRoute") |
| | | public R edit(@RequestBody TechnologyRouting technologyRouting) { |
| | | return R.ok(technologyRoutingService.updateTechnologyRouting(technologyRouting)); |
| | | } |
| | |
| | | /** |
| | | * æ¹éå é¤å·¥èºè·¯çº¿ã |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å é¤å·¥èºè·¯çº¿") |
| | | @DeleteMapping("/delete") |
| | | public R remove(@RequestBody List<Long> ids) { |
| | | return R.ok(technologyRoutingService.removeTechnologyRouting(ids)); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingOperationDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyRoutingOperationVo; |
| | |
| | | return R.ok(technologyRoutingOperationService.getTechnologyRoutingOperationInfo(id)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "å·¥èºè·¯çº¿å·¥åº", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢å·¥èºè·¯çº¿å·¥åº") |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody TechnologyRoutingOperation technologyRoutingOperation) { |
| | | return R.ok(technologyRoutingOperationService.saveTechnologyRoutingOperation(technologyRoutingOperation)); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log(title = "å·¥èºè·¯çº¿å·¥åº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹å·¥èºè·¯çº¿å·¥åº") |
| | | @PutMapping |
| | | public R edit(@RequestBody TechnologyRoutingOperation technologyRoutingOperation) { |
| | | return R.ok(technologyRoutingOperationService.updateById(technologyRoutingOperation)); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @Log(title = "å·¥èºè·¯çº¿å·¥åº", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å é¤å·¥èºè·¯çº¿å·¥åº") |
| | | @DeleteMapping("/{id}") |
| | | public R remove(@PathVariable("id") Long id) { |
| | | return R.ok(technologyRoutingOperationService.removeTechnologyRoutingOperation(id)); |
| | | } |
| | | |
| | | @PostMapping ("/sort") |
| | | @Log(title = "å·¥èºè·¯çº¿å·¥åº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "æåºå·¥èºè·¯çº¿å·¥åº") |
| | | @PostMapping ("/sort") |
| | | public R sort(@RequestBody TechnologyRoutingOperation technologyRoutingOperation) { |
| | | return R.ok(technologyRoutingOperationService.sort(technologyRoutingOperation)); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingOperationParamDto; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingOperationParamSyncDto; |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | @Log(title = "æ°å¢å·¥èºè·¯çº¿å·¥åºåæ°", businessType = BusinessType.INSERT) |
| | | public R<Boolean> add(@RequestBody TechnologyRoutingOperationParam technologyRoutingOperationParam) { |
| | | return R.ok(technologyRoutingOperationParamService.saveTechnologyRoutingOperationParam(technologyRoutingOperationParam)); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Operation(summary = "ä¿®æ¹ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | @Log(title = "ä¿®æ¹å·¥èºè·¯çº¿å·¥åºåæ°", businessType = BusinessType.UPDATE) |
| | | public R<Boolean> edit(@RequestBody TechnologyRoutingOperationParam technologyRoutingOperationParam) { |
| | | return R.ok(technologyRoutingOperationParamService.saveTechnologyRoutingOperationParam(technologyRoutingOperationParam)); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @Operation(summary = "å é¤ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | @Log(title = "å é¤å·¥èºè·¯çº¿å·¥åºåæ°", businessType = BusinessType.DELETE) |
| | | public R<Boolean> remove(@PathVariable("id") Long id) { |
| | | return R.ok(technologyRoutingOperationParamService.removeTechnologyRoutingOperationParam(id)); |
| | | } |
| | | |
| | | @PostMapping("/sync") |
| | | @Operation(summary = "æå·¥èºè·¯çº¿å·¥åºåæ¥å·¥åºåæ°") |
| | | @Log(title = "忥工èºè·¯çº¿å·¥åºåæ°", businessType = BusinessType.UPDATE) |
| | | public R<Integer> sync(@RequestBody TechnologyRoutingOperationParamSyncDto syncDto) { |
| | | return R.ok(technologyRoutingOperationParamService.syncTechnologyRoutingOperationParam(syncDto)); |
| | | } |
| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.pojo.DocumentationFile; |
| | | import com.ruoyi.warehouse.service.DocumentationFileService; |
| | |
| | | * @param documentationFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢ææ¡£æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody DocumentationFile documentationFile) { |
| | | return AjaxResult.success(documentationFileService.save(documentationFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤ææ¡£æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delDocumentationFile(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | <result property="tenantId" column="tenant_id" /> |
| | | <result property="approveType" column="approve_type" /> |
| | | <result property="approveRemark" column="approve_remark" /> |
| | | <result property="startDateTime" column="start_date_time" /> |
| | | <result property="endDateTime" column="end_date_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,approve_id,approve_user,approve_dept_id,approve_dept_name,approve_user_ids, |
| | | approve_user_names,approve_reason,approve_time,approve_over_time,approve_status, |
| | | approve_delete,tenant_id,approve_type,approve_remark |
| | | approve_delete,tenant_id,approve_type,approve_remark,start_date_time,end_date_time |
| | | </sql> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.approve.vo.ApproveProcessVo"> |
| | | select * from approve_process where approve_delete = 0 |
| | | <if test="req.approveId != null and req.approveId != ''"> |
| | | and approve_id like concat('%',#{req.approveId},'%') |
| | | </if> |
| | | <if test="req.approveStatus != null or req.approveStatus == 0"> |
| | | <if test="req.approveStatus != null"> |
| | | and approve_status = #{req.approveStatus} |
| | | </if> |
| | | <if test="req.approveType != null "> |
| | | and approve_type = #{req.approveType} |
| | | </if> |
| | | order by approve_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <select id="listPage" resultType="com.ruoyi.basic.vo.CustomerVo"> |
| | | select |
| | | c.*, |
| | | u.user_name usage_user_name, |
| | | u.nick_name as usage_user_name, |
| | | ( |
| | | select group_concat(u2.user_name separator ', ') |
| | | select group_concat(u2.nick_name separator ', ') |
| | | from customer_user cu |
| | | left join sys_user u2 on cu.user_id = u2.user_id |
| | | where cu.customer_id = c.id |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="customewTransactions" resultType="com.ruoyi.sales.vo.CustomerTransactionsVo"> |
| | | select T1.customer_id, |
| | | c.customer_name, |
| | | T1.contractAmounts, |
| | | IFNULL(T2.receiptPaymentAmount, 0) AS receiptPaymentAmount, |
| | | IFNULL(T3.outboundAmount, 0) - IFNULL(T4.returnAmount, 0) AS receiptableAmount |
| | | IFNULL(T3.outboundAmount, 0) AS shippedAmount, |
| | | GREATEST(T1.contractAmounts - IFNULL(T3.outboundAmount, 0), 0) AS unshippedAmount |
| | | from (select customer_id, sum(contract_amount) as contractAmounts from sales_ledger group by customer_id) T1 |
| | | left join (select customer_id, sum(collection_amount) as receiptPaymentAmount from account_sales_collection group by customer_id) T2 on T1.customer_id = T2.customer_id |
| | | left join ( |
| | | SELECT |
| | | sl.customer_id, |
| | |
| | | and slp.type = 1 |
| | | group by sl.customer_id |
| | | ) T3 on T3.customer_id=T1.customer_id |
| | | left join ( |
| | | select |
| | | sl.customer_id, |
| | | sum(rm.refund_amount) as returnAmount |
| | | from return_management rm |
| | | left join shipping_info si on rm.shipping_id = si.id |
| | | left join sales_ledger sl on si.sales_ledger_id = sl.id |
| | | where rm.status=1 |
| | | group by sl.customer_id |
| | | ) T4 on T4.customer_id=T1.customer_id |
| | | left join customer c on T1.customer_id = c.id |
| | | <where> |
| | | <if test="customerName!=null and customerName!=''"> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="customewTransactionsDetails" |
| | | resultType="com.ruoyi.sales.vo.CustomerTransactionsDetailsVo"> |
| | | select sl.id salesLedgerId, |
| | | sl.sales_contract_no, |
| | | sl.execution_date, |
| | | sl.contract_amount, |
| | | IFNULL(T1.receiptPaymentAmount, 0) AS receiptPaymentAmount, |
| | | IFNULL(T2.outboundAmount, 0) - IFNULL(T3.returnAmount, 0) AS receiptableAmount |
| | | IFNULL(T2.outboundAmount, 0) AS shippedAmount, |
| | | GREATEST(sl.contract_amount - IFNULL(T2.outboundAmount, 0), 0) AS unshippedAmount |
| | | from sales_ledger sl |
| | | left join ( |
| | | select |
| | | sl.id, |
| | | sum(ascc.collection_amount) as receiptPaymentAmount |
| | | from account_sales_collection ascc |
| | | left join stock_out_record sor on FIND_IN_SET(sor.id, ascc.stock_out_record_ids) > 0 |
| | | left join shipping_info s on sor.record_id = s.id |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | | WHERE sor.record_type='13' |
| | | and sor.approval_status=1 |
| | | group by sl.id |
| | | )T1 on T1.id = sl.id |
| | | left join ( |
| | | SELECT |
| | | sl.id, |
| | |
| | | and slp.type = 1 |
| | | group by sl.id |
| | | )T2 on T2.id = sl.id |
| | | left join ( |
| | | select sl.id, |
| | | sum(rm.refund_amount) as returnAmount |
| | | from return_management rm |
| | | left join shipping_info si on rm.shipping_id = si.id |
| | | left join sales_ledger sl on si.sales_ledger_id = sl.id |
| | | where rm.status=1 |
| | | group by sl.id |
| | | )T3 on T3.id = sl.id |
| | | where sl.customer_id = #{customerId} |
| | | </select> |
| | | </mapper> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="supplierTransactions" resultType="com.ruoyi.purchase.vo.SupplierTransactionsVo"> |
| | | select T1.supplier_id, |
| | | SELECT T1.supplier_id, |
| | | sm.supplier_name, |
| | | T1.contractAmounts, |
| | | IFNULL(T2.paymentAmount, 0) AS paymentAmount, |
| | | IFNULL(T3.InboundAmount, 0) - IFNULL(T4.returnAmount, 0) AS payableAmount |
| | | from (select supplier_id, sum(contract_amount) as contractAmounts from purchase_ledger group by supplier_id) T1 |
| | | left join (select supplier_id, sum(payment_amount) as paymentAmount from account_purchase_payment group by supplier_id) T2 on T1.supplier_id = T2.supplier_id |
| | | left join ( |
| | | SELECT |
| | | pl.supplier_id, |
| | | sum(sir.stock_in_num * slp.tax_inclusive_unit_price) AS InboundAmount |
| | | IFNULL(T3.InboundAmount, 0) AS shippedAmount, |
| | | T1.contractAmounts - IFNULL(T3.InboundAmount, 0) AS unshippedAmount |
| | | FROM (SELECT supplier_id, SUM(contract_amount) AS contractAmounts FROM purchase_ledger GROUP BY supplier_id) T1 |
| | | LEFT JOIN ( |
| | | SELECT t.supplier_id, |
| | | SUM(t.inbound_amount) AS InboundAmount |
| | | FROM ( |
| | | SELECT sir.stock_in_num * slp.tax_inclusive_unit_price AS inbound_amount, pl.supplier_id |
| | | FROM stock_in_record sir |
| | | -- 10 ç±»åæå
³èè´¨æ£è¡¨ |
| | | LEFT JOIN quality_inspect qi ON sir.record_type = 10 AND sir.record_id = qi.id |
| | | -- 卿å
³èéè´ï¼èªå¨éé
7 å 10ï¼ |
| | | LEFT JOIN purchase_ledger pl |
| | | ON pl.id = IF(sir.record_type = 7, sir.record_id, qi.purchase_ledger_id) |
| | | -- 产åå
³èä¸å¨ |
| | | LEFT JOIN sales_ledger_product slp ON pl.id = slp.sales_ledger_id |
| | | -- æ¡ä»¶ |
| | | WHERE sir.approval_status = 1 AND slp.type = 2 |
| | | AND sir.record_type IN ('7','10') |
| | | group by pl.supplier_id |
| | | ) T3 on T3.supplier_id=T1.supplier_id |
| | | left join ( |
| | | select |
| | | supplier_id, |
| | | sum(total_amount) as returnAmount |
| | | from purchase_return_orders pro |
| | | group by supplier_id |
| | | ) T4 on T4.supplier_id=T1.supplier_id |
| | | left join supplier_manage sm on T1.supplier_id = sm.id |
| | | INNER JOIN sales_ledger_product slp ON slp.id = sir.record_id |
| | | INNER JOIN purchase_ledger pl ON pl.id = slp.sales_ledger_id |
| | | WHERE sir.approval_status = 1 AND sir.record_type = 7 AND slp.type = 2 |
| | | UNION ALL |
| | | SELECT sir.stock_in_num * slp.tax_inclusive_unit_price AS inbound_amount, pl.supplier_id |
| | | FROM stock_in_record sir |
| | | INNER JOIN quality_inspect qi ON qi.id = sir.record_id |
| | | INNER JOIN purchase_ledger pl ON pl.id = qi.purchase_ledger_id |
| | | INNER JOIN sales_ledger_product slp ON slp.sales_ledger_id = pl.id AND slp.product_model_id = sir.product_model_id |
| | | WHERE sir.approval_status = 1 AND sir.record_type = 10 AND slp.type = 2 |
| | | ) t |
| | | GROUP BY t.supplier_id |
| | | ) T3 ON T3.supplier_id = T1.supplier_id |
| | | LEFT JOIN supplier_manage sm ON T1.supplier_id = sm.id |
| | | <where> |
| | | <if test="supplierName!=null and supplierName!=''"> |
| | | AND sm.supplier_name LIKE CONCAT('%',#{supplierName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="supplierTransactionsDetails" |
| | | resultType="com.ruoyi.purchase.vo.SupplierTransactionsDetailsVo"> |
| | | select pl.id purchaseLedgerId, |
| | | SELECT pl.id purchaseLedgerId, |
| | | pl.purchase_contract_number, |
| | | pl.execution_date, |
| | | pl.contract_amount, |
| | | IFNULL(T1.paymentAmount, 0) AS paymentAmount, |
| | | IFNULL(T2.InboundAmount, 0) - IFNULL(T3.returnAmount, 0) AS payableAmount |
| | | from purchase_ledger pl |
| | | left join ( |
| | | select |
| | | pl.id, |
| | | sum(app.payment_amount) as paymentAmount |
| | | from account_purchase_payment app |
| | | left join account_payment_application apa on app.account_payment_application_id = apa.id |
| | | left join stock_in_record sir on FIND_IN_SET(sir.id, apa.stock_in_record_ids) > 0 |
| | | -- 10 ç±»åæå
³èè´¨æ£è¡¨ |
| | | LEFT JOIN quality_inspect qi ON sir.record_type = 10 AND sir.record_id = qi.id |
| | | -- 卿å
³èéè´ï¼èªå¨éé
7 å 10ï¼ |
| | | LEFT JOIN purchase_ledger pl |
| | | ON pl.id = IF(sir.record_type = 7, sir.record_id, qi.purchase_ledger_id) |
| | | WHERE sir.approval_status = 1 |
| | | AND sir.record_type IN ('7','10') |
| | | group by pl.id |
| | | )T1 on T1.id = pl.id |
| | | left join ( |
| | | SELECT |
| | | pl.id, |
| | | sum(sir.stock_in_num * slp.tax_inclusive_unit_price) AS InboundAmount |
| | | IFNULL(T2.InboundAmount, 0) AS shippedAmount, |
| | | pl.contract_amount - IFNULL(T2.InboundAmount, 0) AS unshippedAmount |
| | | FROM purchase_ledger pl |
| | | LEFT JOIN ( |
| | | SELECT t.sales_ledger_id, |
| | | SUM(t.inbound_amount) AS InboundAmount |
| | | FROM ( |
| | | SELECT sir.stock_in_num * slp.tax_inclusive_unit_price AS inbound_amount, slp.sales_ledger_id |
| | | FROM stock_in_record sir |
| | | -- 10 ç±»åæå
³èè´¨æ£è¡¨ |
| | | LEFT JOIN quality_inspect qi ON sir.record_type = 10 AND sir.record_id = qi.id |
| | | -- 卿å
³èéè´ï¼èªå¨éé
7 å 10ï¼ |
| | | LEFT JOIN purchase_ledger pl |
| | | ON pl.id = IF(sir.record_type = 7, sir.record_id, qi.purchase_ledger_id) |
| | | -- 产åå
³èä¸å¨ |
| | | LEFT JOIN sales_ledger_product slp ON pl.id = slp.sales_ledger_id |
| | | -- æ¡ä»¶ |
| | | WHERE sir.approval_status = 1 AND slp.type = 2 |
| | | AND sir.record_type IN ('7','10') |
| | | group by pl.id |
| | | )T2 on T2.id = pl.id |
| | | left join ( |
| | | select pl.id, |
| | | sum(pro.total_amount) as returnAmount |
| | | from purchase_return_orders pro |
| | | left join purchase_ledger pl on pro.purchase_ledger_id = pl.id |
| | | group by pl.id |
| | | )T3 on T3.id = pl.id |
| | | where pl.supplier_id = #{supplierId} |
| | | INNER JOIN sales_ledger_product slp ON slp.id = sir.record_id |
| | | WHERE sir.approval_status = 1 AND sir.record_type = 7 AND slp.type = 2 |
| | | UNION ALL |
| | | SELECT sir.stock_in_num * slp.tax_inclusive_unit_price AS inbound_amount, slp.sales_ledger_id |
| | | FROM stock_in_record sir |
| | | INNER JOIN quality_inspect qi ON qi.id = sir.record_id |
| | | INNER JOIN purchase_ledger pl2 ON pl2.id = qi.purchase_ledger_id |
| | | INNER JOIN sales_ledger_product slp ON slp.sales_ledger_id = pl2.id AND slp.product_model_id = sir.product_model_id |
| | | WHERE sir.approval_status = 1 AND sir.record_type = 10 AND slp.type = 2 |
| | | ) t |
| | | GROUP BY t.sales_ledger_id |
| | | ) T2 ON T2.sales_ledger_id = pl.id |
| | | WHERE pl.supplier_id = #{supplierId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | left join device_ledger dl on dm.device_ledger_id = dl.id |
| | | left join sys_user su on dm.create_user = su.user_id |
| | | <where> |
| | | 1 = 1 |
| | | <if test="deviceMaintenanceDto.deviceName != null"> |
| | | <if test="deviceMaintenanceDto.deviceName != null and deviceMaintenanceDto.deviceName != ''"> |
| | | and dl.device_name like concat('%',#{deviceMaintenanceDto.deviceName},'%') |
| | | </if> |
| | | <if test="deviceMaintenanceDto.deviceModel != null"> |
| | | <if test="deviceMaintenanceDto.deviceModel != null and deviceMaintenanceDto.deviceModel != ''"> |
| | | and dl.device_model like concat('%',#{deviceMaintenanceDto.deviceModel},'%') |
| | | </if> |
| | | <if test="deviceMaintenanceDto.status != null"> |
| | | and dm.status = #{deviceMaintenanceDto.status} |
| | | </if> |
| | | <if test="deviceMaintenanceDto.maintenanceActuallyName != null"> |
| | | <if test="deviceMaintenanceDto.maintenanceActuallyName != null and deviceMaintenanceDto.maintenanceActuallyName != ''"> |
| | | and dm.maintenance_actually_name like concat('%',#{deviceMaintenanceDto.maintenanceActuallyName},'%') |
| | | </if> |
| | | <if test="deviceMaintenanceDto.maintenancePlanTime != null"> |
| | | and dm.maintenance_plan_time like concat('%',#{deviceMaintenanceDto.maintenancePlanTime},'%') |
| | | and dm.maintenance_plan_time = #{deviceMaintenanceDto.maintenancePlanTime} |
| | | </if> |
| | | <if test="deviceMaintenanceDto.maintenanceActuallyTime != null"> |
| | | and dm.maintenance_actually_time like concat('%',#{deviceMaintenanceDto.maintenanceActuallyTime},'%') |
| | | </if> |
| | | <if test="deviceMaintenanceDto.maintenanceActuallyTime != null"> |
| | | and dm.maintenance_actually_time >= str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, '%Y-%m-%d') |
| | | and dm.maintenance_actually_time < date_add(str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, '%Y-%m-%d'), interval 1 day) |
| | | and dm.maintenance_actually_time >= str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, |
| | | '%Y-%m-%d') |
| | | and dm.maintenance_actually_time < |
| | | date_add(str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, '%Y-%m-%d'), interval 1 day) |
| | | </if> |
| | | </where> |
| | | order by |
| | | <!-- å¾
ä¿å
»(0)ä¼å
æå¨ä¸é¢ï¼å·²å®ç»(1)å¨ä¸é¢ --> |
| | | dm.status asc, |
| | | case |
| | | <!-- å½ç¶ææ¯ 0ï¼å¾
ä¿å
»ï¼æ¶ï¼æè®¡åæ¶é´ååºï¼å³æ¶é´æè¿çåå卿ä¸é¢ --> |
| | | when dm.status = 0 then dm.maintenance_plan_time |
| | | end asc, |
| | | case |
| | | <!-- å½ç¶ææ¯ 1ï¼å·²å®ç»ï¼æ¶ï¼æå®é
ä¿å
»æ¶é´éåºï¼æè¿åä¿å
»å®çååå¨å·²å®ç»éææå --> |
| | | when dm.status = 1 then dm.maintenance_actually_time |
| | | end desc |
| | | </select> |
| | | |
| | | <select id="detailById" resultType="com.ruoyi.device.vo.DeviceMaintenanceVo"> |
| | | select dm.id, |
| | | dm.device_ledger_id, |
| | |
| | | <if test="endDateTime != null"> |
| | | and ppo.create_time <= #{endDateTime} |
| | | </if> |
| | | <if test="userId != null"> |
| | | and ppm.create_user = #{userId} |
| | | </if> |
| | | <!-- <if test="userId != null">--> |
| | | <!-- and ppm.create_user = #{userId}--> |
| | | <!-- </if>--> |
| | | <if test="processIds != null and processIds.size() > 0"> |
| | | and poro.technology_operation_id in |
| | | <foreach collection="processIds" item="id" open="(" separator="," close=")"> |
| | |
| | | <include refid="ProductionOrderVoColumns" /> |
| | | <include refid="ProductionOrderVoFrom" /> |
| | | <include refid="ProductionOrderWhere" /> |
| | | order by po.id desc |
| | | order by po.nps_no desc |
| | | </select> |
| | | |
| | | <select id="listProductionOrder" resultMap="ProductionOrderVoResultMap"> |
| | |
| | | </if> |
| | | </if> |
| | | </where> |
| | | ORDER BY COALESCE(pp.id) DESC |
| | | ORDER BY pp.mps_no DESC |
| | | </select> |
| | | |
| | | <select id="selectWithMaterialByIds" resultType="com.ruoyi.production.bean.dto.ProductionPlanDto"> |
| | |
| | | </select> |
| | | |
| | | <select id="selectPurchaseLedgerListPage" resultType="com.ruoyi.purchase.dto.PurchaseLedgerDto"> |
| | | SELECT result.* |
| | | FROM ( |
| | | SELECT |
| | | pl.id, |
| | | pl.purchase_contract_number, |
| | |
| | | sm.is_white, |
| | | pl.approval_status, |
| | | pl.payment_method, |
| | | pl.remarks |
| | | pl.remarks, |
| | | CASE |
| | | WHEN IFNULL(ls.total_product_count, 0) = 0 THEN 'å¾
å
¥åº' |
| | | WHEN IFNULL(ls.full_product_count, 0) >= IFNULL(ls.total_product_count, 0) THEN 'å®å
¨å
¥åº' |
| | | WHEN IFNULL(ls.approved_product_count, 0) > 0 THEN 'å
¥åºä¸' |
| | | ELSE 'å¾
å
¥åº' |
| | | END AS stock_in_status |
| | | FROM purchase_ledger pl |
| | | LEFT JOIN supplier_manage sm ON pl.supplier_id = sm.id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | product_status.sales_ledger_id, |
| | | COUNT(1) AS total_product_count, |
| | | SUM(CASE WHEN product_status.approved_stock_in_num > 0 THEN 1 ELSE 0 END) AS approved_product_count, |
| | | SUM(CASE WHEN product_status.approved_stock_in_num >= product_status.product_quantity THEN 1 ELSE 0 END) AS full_product_count |
| | | FROM ( |
| | | SELECT |
| | | slp.id AS sales_ledger_product_id, |
| | | slp.sales_ledger_id, |
| | | IFNULL(slp.quantity, 0) AS product_quantity, |
| | | IFNULL(approved_qty.approved_stock_in_num, 0) AS approved_stock_in_num |
| | | FROM sales_ledger_product slp |
| | | LEFT JOIN ( |
| | | SELECT rel.sales_ledger_product_id, |
| | | IFNULL(SUM(rel.stock_in_num), 0) AS approved_stock_in_num |
| | | FROM ( |
| | | SELECT slp.id AS sales_ledger_product_id, |
| | | sir.stock_in_num |
| | | FROM stock_in_record sir |
| | | INNER JOIN sales_ledger_product slp |
| | | ON slp.type = 2 |
| | | AND TRIM(sir.record_type) = '7' |
| | | AND sir.record_id = slp.sales_ledger_id |
| | | AND ( |
| | | (sir.batch_no IS NOT NULL AND sir.batch_no LIKE CONCAT('%-', slp.id)) |
| | | OR (sir.batch_no IS NULL AND sir.product_model_id = slp.product_model_id) |
| | | ) |
| | | WHERE sir.approval_status = 1 |
| | | |
| | | UNION ALL |
| | | |
| | | SELECT slp.id AS sales_ledger_product_id, |
| | | sir.stock_in_num |
| | | FROM stock_in_record sir |
| | | INNER JOIN quality_inspect qi |
| | | ON TRIM(sir.record_type) = '10' |
| | | AND sir.record_id = qi.id |
| | | INNER JOIN sales_ledger_product slp |
| | | ON slp.type = 2 |
| | | AND slp.sales_ledger_id = qi.purchase_ledger_id |
| | | AND slp.product_model_id = qi.product_model_id |
| | | WHERE sir.approval_status = 1 |
| | | ) rel |
| | | GROUP BY rel.sales_ledger_product_id |
| | | ) approved_qty ON approved_qty.sales_ledger_product_id = slp.id |
| | | WHERE slp.type = 2 |
| | | ) product_status |
| | | GROUP BY product_status.sales_ledger_id |
| | | ) ls ON ls.sales_ledger_id = pl.id |
| | | <where> |
| | | <if test="c.purchaseContractNumber != null and c.purchaseContractNumber != ''"> |
| | | AND pl.purchase_contract_number LIKE CONCAT('%', #{c.purchaseContractNumber}, '%') |
| | |
| | | AND pl.approval_status = #{c.approvalStatus} |
| | | </if> |
| | | </where> |
| | | ORDER BY pl.entry_date DESC |
| | | ) result |
| | | <if test="c.stockInStatus != null and c.stockInStatus != ''"> |
| | | WHERE result.stock_in_status = #{c.stockInStatus} |
| | | </if> |
| | | ORDER BY result.entry_date DESC |
| | | </select> |
| | | |
| | | <select id="selectTotalPurchaseAmount" resultType="java.math.BigDecimal"> |
| | |
| | | <select id="qualityInspectListPage" resultType="com.ruoyi.quality.dto.QualityInspectDto"> |
| | | SELECT |
| | | qi.*, |
| | | CASE |
| | | WHEN (IFNULL(qi.qualified_quantity, 0) + IFNULL(qi.unqualified_quantity, 0)) = 0 THEN 0 |
| | | ELSE ROUND(IFNULL(qi.qualified_quantity, 0) / (IFNULL(qi.qualified_quantity, 0) + IFNULL(qi.unqualified_quantity, 0)) * 100, 2) |
| | | END AS passRate, |
| | | <choose> |
| | | <when test="qualityInspect.inspectType == 0"> |
| | | pl.purchase_contract_number as purchase_contract_no |
| | |
| | | |
| | | <select id="qualityInspectExport" resultType="com.ruoyi.quality.pojo.QualityInspect"> |
| | | SELECT |
| | | * |
| | | qi.*, |
| | | CASE |
| | | WHEN (IFNULL(qi.qualified_quantity, 0) + IFNULL(qi.unqualified_quantity, 0)) = 0 THEN 0 |
| | | ELSE ROUND(IFNULL(qi.qualified_quantity, 0) / (IFNULL(qi.qualified_quantity, 0) + IFNULL(qi.unqualified_quantity, 0)) * 100, 2) |
| | | END AS passRate |
| | | FROM quality_inspect |
| | | where |
| | | inspect_type=#{qualityInspect.inspectType} |
| | |
| | | </delete> |
| | | |
| | | <select id="getInspectStatistics" resultType="com.ruoyi.quality.dto.QualityInspectStatDto"> |
| | | SELECT CASE pp.product_name |
| | | WHEN 'åææ' THEN 0 |
| | | WHEN 'åæå' THEN 1 |
| | | WHEN 'æå' THEN 2 |
| | | END AS modelType, |
| | | SELECT qi.inspect_type AS modelType, |
| | | |
| | | IFNULL(SUM(qi.quantity), 0) AS totalCount, |
| | | |
| | |
| | | ELSE 0 |
| | | END), 0) AS completedCount |
| | | |
| | | FROM product p |
| | | INNER JOIN product pp |
| | | ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm |
| | | ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | FROM quality_inspect qi |
| | | |
| | | WHERE pp.product_name IN ('åææ', 'åæå', 'æå') |
| | | |
| | | GROUP BY pp.product_name |
| | | GROUP BY qi.inspect_type |
| | | |
| | | </select> |
| | | |
| | | <select id="getPassRateStatistics" resultType="com.ruoyi.quality.dto.QualityPassRateDto"> |
| | | SELECT t.modelType, |
| | | t.totalCount, |
| | | t.completedCount, |
| | | t.qualifiedCount, |
| | | t.unqualifiedCount, |
| | | |
| | | COALESCE(SUM(qi.quantity), 0) AS totalCount, |
| | | |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS completedCount, |
| | | |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 |
| | | AND qi.check_result = 'åæ ¼' |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS qualifiedCount, |
| | | |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 |
| | | AND qi.check_result = 'ä¸åæ ¼' |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS unqualifiedCount, |
| | | |
| | | /* 宿ç */ |
| | | IF(COALESCE(SUM(qi.quantity), 0) = 0, 0, |
| | | ROUND( |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) |
| | | / SUM(qi.quantity) * 100, 2) |
| | | /* 宿çï¼ |
| | | å¦ææ»æ°ä¸º 0 åè¿å 0ï¼å¦åè®¡ç®æ¯ä¾ï¼ä½¿ç¨ TRUNCATE ä¿ç 4 ä½å°æ°ï¼å¦ 99.9992ï¼ |
| | | */ |
| | | IF(t.totalCount = 0, 0, |
| | | TRUNCATE((t.completedCount / t.totalCount) * 100, 2) |
| | | ) AS completionRate, |
| | | |
| | | /* åæ ¼ç */ |
| | | IF(COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) = 0, 0, |
| | | ROUND( |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 |
| | | AND qi.check_result = 'åæ ¼' |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) |
| | | / |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) * 100, 2) |
| | | /* åæ ¼çï¼ |
| | | 妿å®å·¥æ°ä¸º 0 åè¿å 0ï¼ä½¿ç¨ TRUNCATE æªæï¼é²æ¢æå
¶æ¥è¿ 100% çæ°æ®è¢«åèäºå
¥æ 100 |
| | | */ |
| | | IF(t.completedCount = 0, 0, |
| | | TRUNCATE((t.qualifiedCount / t.completedCount) * 100, 2) |
| | | ) AS passRate |
| | | |
| | | FROM (SELECT 0 AS modelType |
| | | UNION ALL |
| | | SELECT 1 |
| | | UNION ALL |
| | | SELECT 2) t |
| | | LEFT JOIN product p |
| | | ON 1 = 1 |
| | | LEFT JOIN product pp |
| | | ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm |
| | | ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | AND ( |
| | | (pp.product_name = 'åææ' AND t.modelType = 0) OR |
| | | (pp.product_name = 'åæå' AND t.modelType = 1) OR |
| | | (pp.product_name = 'æå' AND t.modelType = 2) |
| | | ) |
| | | |
| | | GROUP BY t.modelType |
| | | FROM ( |
| | | /* å
éè¿åæ¥è¯¢æåºç¡æ°æ®è¿è¡èåç»è®¡ï¼é¿å
å¤å±éå¤ç¼å夿ç CASE WHEN */ |
| | | SELECT qi.inspect_type AS modelType, |
| | | COALESCE(SUM(qi.quantity), 0) AS totalCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END), |
| | | 0) AS completedCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.qualified_quantity ELSE 0 END), |
| | | 0) AS qualifiedCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.unqualified_quantity ELSE 0 END), |
| | | 0) AS unqualifiedCount |
| | | FROM quality_inspect qi |
| | | GROUP BY qi.inspect_type) t |
| | | ORDER BY t.modelType; |
| | | </select> |
| | | |
| | |
| | | FROM months m |
| | | CROSS JOIN types t) |
| | | |
| | | SELECT CASE b.month_num |
| | | SELECT |
| | | CASE t.month_num |
| | | WHEN 1 THEN '䏿' |
| | | WHEN 2 THEN 'äºæ' |
| | | WHEN 3 THEN '䏿' |
| | |
| | | WHEN 12 THEN 'åäºæ' |
| | | END AS month, |
| | | |
| | | b.modelType, |
| | | t.modelType, |
| | | t.totalCount, |
| | | t.completedCount, |
| | | t.qualifiedCount, |
| | | t.unqualifiedCount, |
| | | |
| | | /* æ»æ°é */ |
| | | IF(t.totalCount = 0, 0, |
| | | TRUNCATE((t.completedCount / t.totalCount) * 100, 2) |
| | | ) AS completionRate, |
| | | |
| | | IF(t.completedCount = 0, 0, |
| | | TRUNCATE((t.qualifiedCount / t.completedCount) * 100, 2) |
| | | ) AS passRate |
| | | |
| | | FROM ( |
| | | SELECT |
| | | b.month_num, |
| | | b.modelType, |
| | | COALESCE(SUM(qi.quantity), 0) AS totalCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END), 0) AS completedCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.qualified_quantity ELSE 0 END), 0) AS qualifiedCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.unqualified_quantity ELSE 0 END), 0) AS unqualifiedCount |
| | | FROM base b |
| | | LEFT JOIN quality_inspect qi ON qi.inspect_type = b.modelType |
| | | AND YEAR(qi.check_time) = #{year} |
| | | AND MONTH(qi.check_time) = b.month_num |
| | | GROUP BY b.month_num, b.modelType |
| | | ) t |
| | | ORDER BY t.month_num, t.modelType; |
| | | </select> |
| | | <select id="getYearlyPassRateStatistics" resultType="com.ruoyi.quality.dto.QualityPassRateDto"> |
| | | SELECT qi.inspect_type AS modelType, |
| | | |
| | | COALESCE(SUM(qi.quantity), 0) AS totalCount, |
| | | |
| | | /* 已宿 */ |
| | | COALESCE(SUM( |
| | | CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END |
| | | ), 0) AS completedCount, |
| | | |
| | | /* åæ ¼ */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 AND qi.check_result = 'åæ ¼' |
| | | THEN qi.quantity |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS completedCount, |
| | | |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.qualified_quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS qualifiedCount, |
| | | |
| | | /* ä¸åæ ¼ */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 AND qi.check_result = 'ä¸åæ ¼' |
| | | THEN qi.quantity |
| | | WHEN qi.inspect_state = 1 THEN qi.unqualified_quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS unqualifiedCount, |
| | |
| | | ROUND( |
| | | COALESCE(SUM( |
| | | CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END |
| | | ), 0) / SUM(qi.quantity) * 100, 2 |
| | | ) |
| | | ), 0) |
| | | / SUM(qi.quantity) * 100, 2) |
| | | ) AS completionRate, |
| | | |
| | | /* åæ ¼ç */ |
| | |
| | | ), 0) = 0, 0, |
| | | ROUND( |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 AND qi.check_result = 'åæ ¼' |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | CASE WHEN qi.inspect_state = 1 THEN qi.qualified_quantity ELSE 0 END |
| | | ), 0) |
| | | / |
| | | COALESCE(SUM( |
| | | CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END |
| | | ), 0) * 100, 2 |
| | | ) |
| | | ), 0) * 100, 2) |
| | | ) AS passRate |
| | | |
| | | FROM base b |
| | | LEFT JOIN product p ON 1 = 1 |
| | | LEFT JOIN product pp ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | AND YEAR(qi.check_time) = #{year} |
| | | AND MONTH(qi.check_time) = b.month_num |
| | | AND ( |
| | | (pp.product_name = 'åææ' AND b.modelType = 0) |
| | | OR (pp.product_name = 'åæå' AND b.modelType = 1) |
| | | OR (pp.product_name = 'æå' AND b.modelType = 2) |
| | | ) |
| | | |
| | | GROUP BY b.month_num, b.modelType |
| | | ORDER BY b.month_num, b.modelType; |
| | | |
| | | </select> |
| | | |
| | | <select id="getYearlyPassRateStatistics" resultType="com.ruoyi.quality.dto.QualityPassRateDto"> |
| | | SELECT t.modelType, |
| | | |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'åææ' AND t.modelType = 0 THEN qi.quantity |
| | | WHEN pp.product_name = 'åæå' AND t.modelType = 1 THEN qi.quantity |
| | | WHEN pp.product_name = 'æå' AND t.modelType = 2 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS totalCount |
| | | |
| | | FROM (SELECT 0 AS modelType |
| | | UNION ALL |
| | | SELECT 1 |
| | | UNION ALL |
| | | SELECT 2) t |
| | | LEFT JOIN product p ON 1 = 1 |
| | | LEFT JOIN product pp ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | AND YEAR(qi.check_time) = #{year} |
| | | AND qi.inspect_state = 1 |
| | | AND qi.check_result = 'åæ ¼' |
| | | |
| | | GROUP BY t.modelType |
| | | ORDER BY t.modelType; |
| | | FROM quality_inspect qi |
| | | WHERE YEAR(qi.check_time) = #{year} |
| | | GROUP BY qi.inspect_type |
| | | ORDER BY qi.inspect_type; |
| | | </select> |
| | | |
| | | |
| | |
| | | /* åææ */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'åææ' |
| | | WHEN qi.inspect_type = 0 |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | |
| | | /* åæå */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'åæå' |
| | | WHEN qi.inspect_type = 1 |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | |
| | | /* æå */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'æå' |
| | | WHEN qi.inspect_type = 2 |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS outgoingCount |
| | | |
| | | FROM months m |
| | | LEFT JOIN product p ON 1 = 1 |
| | | LEFT JOIN product pp ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | AND qi.inspect_state = 1 |
| | | ON qi.inspect_state = 1 |
| | | AND YEAR(qi.check_time) = #{year} |
| | | AND MONTH(qi.check_time) = m.month_num |
| | | |
| | |
| | | FROM quality_inspect_param qip |
| | | JOIN quality_inspect qi |
| | | ON qip.inspect_id = qi.id |
| | | JOIN product p |
| | | ON qi.product_id = p.id |
| | | JOIN product pp |
| | | ON p.parent_id = pp.id |
| | | WHERE qi.inspect_state = 1 |
| | | AND ( |
| | | (#{modelType} = 1 AND pp.product_name = 'åææ') |
| | | OR (#{modelType} = 2 AND pp.product_name = 'åæå') |
| | | OR (#{modelType} = 3 AND pp.product_name = 'æå') |
| | | ) |
| | | AND qi.inspect_type = #{modelType} - 1 |
| | | GROUP BY qip.parameter_item), |
| | | ranked AS (SELECT name, |
| | | count, |
| | |
| | | FROM sales_ledger |
| | | GROUP BY customer_name |
| | | </select> |
| | | |
| | | <select id="listSalesLedgerAndShipped" resultType="com.ruoyi.sales.dto.SalesLedgerDto"> |
| | | select distinct sl.id as 'disId', sl.* from |
| | | sales_ledger sl |
| | | left join sales_ledger_product slp on sl.id = slp.sales_ledger_id |
| | | left join shipping_info si on slp.id = si.sales_ledger_product_id |
| | | where si.status = 'å·²åè´§' |
| | | <if test="ew.customerName != null and ew.customerName != '' "> |
| | | and sl.customer_name like concat('%',#{ew.customerName},'%') |
| | | where si.status = 'å®¡æ ¸éè¿' |
| | | <if test="ew.customerId != null and ew.customerId != '' "> |
| | | and sl.customer_id = #{ew.customerId} |
| | | </if> |
| | | order by sl.execution_date desc |
| | | </select> |
| | | |
| | | <select id="selectPurchaseReportVoPage" resultType="com.ruoyi.purchase.vo.PurchaseReportVo"> |
| | | select sl.sales_contract_no customerContractNo, |
| | | c.customer_name, |
| | |
| | | WHEN IFNULL(t3.shipped_quantity, 0) = 0 THEN 'å¾
åè´§' |
| | | WHEN (IFNULL(T1.quantity, 0) - IFNULL(t3.shipped_quantity, 0)) > 0 THEN 'é¨ååè´§' |
| | | ELSE 'å·²åè´§' |
| | | END as shippingStatus |
| | | END as shippingStatus, |
| | | CASE |
| | | WHEN T1.type != 2 THEN NULL |
| | | WHEN IFNULL(t4.approved_stock_in_num, 0) <= 0 THEN 'å¾
å
¥åº' |
| | | WHEN IFNULL(t4.approved_stock_in_num, 0) >= IFNULL(T1.quantity, 0) THEN 'å®å
¨å
¥åº' |
| | | ELSE 'å
¥åºä¸' |
| | | END AS stock_in_approval_status |
| | | FROM |
| | | sales_ledger_product T1 |
| | | LEFT JOIN ( |
| | |
| | | where si.status != 'å®¡æ ¸æç»' |
| | | GROUP BY sales_ledger_product_id |
| | | ) t3 ON t3.sales_ledger_product_id = T1.id |
| | | LEFT JOIN ( |
| | | SELECT rel.sales_ledger_product_id, |
| | | IFNULL(SUM(rel.stock_in_num), 0) AS approved_stock_in_num |
| | | FROM ( |
| | | SELECT slp.id AS sales_ledger_product_id, |
| | | sir.stock_in_num |
| | | FROM stock_in_record sir |
| | | INNER JOIN sales_ledger_product slp |
| | | ON slp.type = 2 |
| | | AND TRIM(sir.record_type) = '7' |
| | | AND sir.record_id = slp.sales_ledger_id |
| | | AND ( |
| | | (sir.batch_no IS NOT NULL AND sir.batch_no LIKE CONCAT('%-', slp.id)) |
| | | OR (sir.batch_no IS NULL AND sir.product_model_id = slp.product_model_id) |
| | | ) |
| | | WHERE sir.approval_status = 1 |
| | | |
| | | UNION ALL |
| | | |
| | | SELECT slp.id AS sales_ledger_product_id, |
| | | sir.stock_in_num |
| | | FROM stock_in_record sir |
| | | INNER JOIN quality_inspect qi |
| | | ON TRIM(sir.record_type) = '10' |
| | | AND sir.record_id = qi.id |
| | | INNER JOIN sales_ledger_product slp |
| | | ON slp.type = 2 |
| | | AND slp.sales_ledger_id = qi.purchase_ledger_id |
| | | AND slp.product_model_id = qi.product_model_id |
| | | WHERE sir.approval_status = 1 |
| | | ) rel |
| | | GROUP BY rel.sales_ledger_product_id |
| | | ) t4 ON t4.sales_ledger_product_id = T1.id |
| | | left join product_model pm ON T1.product_model_id = pm.id |
| | | left join product p ON pm.product_id = p.id |
| | | <where> |
| | |
| | | JOIN product pr ON slp.product_id = pr.id |
| | | WHERE |
| | | slp.type = 2 |
| | | AND pr.parent_id = ( SELECT id FROM product WHERE product_name = 'åææ' ) |
| | | AND pr.parent_id = ( SELECT id FROM product WHERE product_name = 'åæ' ) |
| | | GROUP BY |
| | | pr.id, |
| | | pr.product_name |
| | |
| | | |
| | | <select id="selectProductCountByTypeAndDate" resultType="int"> |
| | | SELECT IFNULL(COUNT(*), 0) |
| | | FROM sales_ledger_product |
| | | FROM sales_ledger_product slp |
| | | LEFT JOIN sales_ledger sl ON sl.id = slp.sales_ledger_id |
| | | LEFT JOIN purchase_ledger pl ON pl.id = slp.sales_ledger_id |
| | | WHERE type = #{type} |
| | | |
| | | <choose> |
| | | <when test="type == 1"> |
| | | <if test="startDate != null"> |
| | | AND register_date >= #{startDate} |
| | | AND sl.entry_date >= #{startDate} |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND register_date <= #{endDate} |
| | | AND sl.entry_date <= #{endDate} |
| | | </if> |
| | | </when> |
| | | |
| | | <when test="type == 2"> |
| | | <if test="startDate != null"> |
| | | AND pl.entry_date >= #{startDate} |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND pl.entry_date <= #{endDate} |
| | | </if> |
| | | </when> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="selectRawMaterialExpense" resultType="java.math.BigDecimal"> |
| | | WITH RECURSIVE product_tree AS (SELECT id |
| | | FROM product |
| | | WHERE product_name = 'åææ' |
| | | WHERE product_name = 'åæ' |
| | | |
| | | UNION ALL |
| | | |
| | |
| | | FROM sales_quotation t1 |
| | | LEFT JOIN approve_process t2 ON t1.quotation_no = t2.approve_reason and t2.approve_type = 6 |
| | | WHERE 1=1 |
| | | and t2.approve_deleted = 0 |
| | | and t2.approve_delete = 0 |
| | | <if test="salesQuotationDto.quotationNo != null and salesQuotationDto.quotationNo != '' "> |
| | | AND t1.quotation_no LIKE CONCAT('%',#{salesQuotationDto.quotationNo},'%') |
| | | </if> |
| | |
| | | p.product_name as product_name, |
| | | pm.model, |
| | | pm.unit, |
| | | u.nick_name as createBy |
| | | u.nick_name as createBy, |
| | | CASE |
| | | WHEN #{params.topParentProductId} = 278 AND TRIM(sir.record_type) = '7' THEN |
| | | COALESCE(pl_by_product.purchase_contract_number, pl_direct.purchase_contract_number) |
| | | WHEN #{params.topParentProductId} = 278 AND TRIM(sir.record_type) = '10' THEN |
| | | pl_by_quality.purchase_contract_number |
| | | WHEN #{params.topParentProductId} = 276 THEN |
| | | CASE |
| | | WHEN TRIM(sir.record_type) IN ('14', '15') THEN |
| | | sl_return.sales_contract_no |
| | | WHEN TRIM(sir.record_type) IN ('2', '5') THEN |
| | | COALESCE(po_sales_main.sales_contract_no, po_main.nps_no) |
| | | WHEN TRIM(sir.record_type) = '6' THEN |
| | | COALESCE(po_sales_qi.sales_contract_no, po_qi.nps_no) |
| | | WHEN TRIM(sir.record_type) IN ('4', '11') THEN |
| | | COALESCE(po_sales_uq.sales_contract_no, po_uq.nps_no) |
| | | WHEN TRIM(sir.record_type) IN ('20', '22') THEN |
| | | COALESCE(po_sales_pick.sales_contract_no, po_pick.nps_no) |
| | | ELSE NULL |
| | | END |
| | | ELSE NULL |
| | | END AS sourceOrderNo |
| | | FROM stock_in_record as sir |
| | | LEFT JOIN product_model as pm on sir.product_model_id = pm.id |
| | | LEFT JOIN product as p on pm.product_id = p.id |
| | | LEFT JOIN sys_user as u on sir.create_user = u.user_id |
| | | LEFT JOIN quality_inspect as qi_purchase on TRIM(sir.record_type) = '10' and sir.record_id = qi_purchase.id |
| | | LEFT JOIN sales_ledger_product as slp on TRIM(sir.record_type) = '7' and slp.id = sir.record_id and slp.type = 2 |
| | | LEFT JOIN purchase_ledger as pl_by_product on TRIM(sir.record_type) = '7' and pl_by_product.id = slp.sales_ledger_id |
| | | LEFT JOIN purchase_ledger as pl_direct on TRIM(sir.record_type) = '7' and pl_direct.id = sir.record_id |
| | | LEFT JOIN purchase_ledger as pl_by_quality on TRIM(sir.record_type) = '10' and pl_by_quality.id = qi_purchase.purchase_ledger_id |
| | | |
| | | LEFT JOIN production_product_main as ppm_main on TRIM(sir.record_type) IN ('2', '5') and sir.record_id = ppm_main.id |
| | | LEFT JOIN production_operation_task as pot_main on ppm_main.production_operation_task_id = pot_main.id |
| | | LEFT JOIN production_order as po_main on pot_main.production_order_id = po_main.id |
| | | LEFT JOIN ( |
| | | select po2.id as production_order_id, |
| | | group_concat(distinct sl2.sales_contract_no order by sl2.sales_contract_no separator ',') as sales_contract_no |
| | | from production_order po2 |
| | | left join production_plan pp2 |
| | | on find_in_set(pp2.id, replace(replace(replace(po2.production_plan_ids, '[', ''), ']', ''), ' ', '')) > 0 |
| | | left join sales_ledger sl2 on sl2.id = pp2.sales_ledger_id |
| | | group by po2.id |
| | | ) as po_sales_main on po_sales_main.production_order_id = po_main.id |
| | | |
| | | LEFT JOIN quality_inspect as qi_prod on TRIM(sir.record_type) = '6' and sir.record_id = qi_prod.id |
| | | LEFT JOIN production_product_main as ppm_qi on qi_prod.product_main_id = ppm_qi.id |
| | | LEFT JOIN production_operation_task as pot_qi on ppm_qi.production_operation_task_id = pot_qi.id |
| | | LEFT JOIN production_order as po_qi on pot_qi.production_order_id = po_qi.id |
| | | LEFT JOIN ( |
| | | select po2.id as production_order_id, |
| | | group_concat(distinct sl2.sales_contract_no order by sl2.sales_contract_no separator ',') as sales_contract_no |
| | | from production_order po2 |
| | | left join production_plan pp2 |
| | | on find_in_set(pp2.id, replace(replace(replace(po2.production_plan_ids, '[', ''), ']', ''), ' ', '')) > 0 |
| | | left join sales_ledger sl2 on sl2.id = pp2.sales_ledger_id |
| | | group by po2.id |
| | | ) as po_sales_qi on po_sales_qi.production_order_id = po_qi.id |
| | | |
| | | LEFT JOIN quality_unqualified as qu on TRIM(sir.record_type) IN ('4', '11') and sir.record_id = qu.id |
| | | LEFT JOIN quality_inspect as qi_uq on qu.inspect_id = qi_uq.id |
| | | LEFT JOIN production_product_main as ppm_uq on qi_uq.product_main_id = ppm_uq.id |
| | | LEFT JOIN production_operation_task as pot_uq on ppm_uq.production_operation_task_id = pot_uq.id |
| | | LEFT JOIN production_order as po_uq on pot_uq.production_order_id = po_uq.id |
| | | LEFT JOIN ( |
| | | select po2.id as production_order_id, |
| | | group_concat(distinct sl2.sales_contract_no order by sl2.sales_contract_no separator ',') as sales_contract_no |
| | | from production_order po2 |
| | | left join production_plan pp2 |
| | | on find_in_set(pp2.id, replace(replace(replace(po2.production_plan_ids, '[', ''), ']', ''), ' ', '')) > 0 |
| | | left join sales_ledger sl2 on sl2.id = pp2.sales_ledger_id |
| | | group by po2.id |
| | | ) as po_sales_uq on po_sales_uq.production_order_id = po_uq.id |
| | | |
| | | LEFT JOIN production_order_pick as pop on TRIM(sir.record_type) IN ('20', '22') and sir.record_id = pop.id |
| | | LEFT JOIN production_order as po_pick on pop.production_order_id = po_pick.id |
| | | LEFT JOIN ( |
| | | select po2.id as production_order_id, |
| | | group_concat(distinct sl2.sales_contract_no order by sl2.sales_contract_no separator ',') as sales_contract_no |
| | | from production_order po2 |
| | | left join production_plan pp2 |
| | | on find_in_set(pp2.id, replace(replace(replace(po2.production_plan_ids, '[', ''), ']', ''), ' ', '')) > 0 |
| | | left join sales_ledger sl2 on sl2.id = pp2.sales_ledger_id |
| | | group by po2.id |
| | | ) as po_sales_pick on po_sales_pick.production_order_id = po_pick.id |
| | | |
| | | LEFT JOIN return_sale_product as rsp on TRIM(sir.record_type) IN ('14', '15') and sir.record_id = rsp.id |
| | | LEFT JOIN return_management as rm on rsp.return_management_id = rm.id |
| | | LEFT JOIN shipping_info as si_return on rm.shipping_id = si_return.id |
| | | LEFT JOIN sales_ledger as sl_return on si_return.sales_ledger_id = sl_return.id |
| | | <where> |
| | | <if test="params.timeStr != null and params.timeStr != ''"> |
| | | and sir.create_time like concat('%',#{params.timeStr},'%') |
| | |
| | | and p.id in (select id from product_tree) |
| | | </if> |
| | | </where> |
| | | order by sir.id desc |
| | | order by sir.create_time desc |
| | | </select> |
| | | <select id="listStockInRecordExportData" resultType="com.ruoyi.stock.execl.StockInRecordExportData"> |
| | | SELECT |
| | |
| | | and sir.record_type = #{params.recordType} |
| | | </if> |
| | | </where> |
| | | order by sir.id desc |
| | | order by sir.create_time desc |
| | | </select> |
| | | <select id="listPageAccountPurchase" resultType="com.ruoyi.account.bean.vo.purchase.PurchaseInboundVo"> |
| | | SELECT |
| | |
| | | product_model_id, |
| | | MAX(create_time) as create_time, |
| | | MAX(update_time) as update_time, |
| | | MAX(warn_num) as warn_num, |
| | | SUM(warn_num) as warn_num, |
| | | MAX(version) as version, |
| | | model, |
| | | MAX(remark) as remark, |
| | |
| | | and p.id in (select id from product_tree) |
| | | </if> |
| | | </where> |
| | | order by sor.id desc |
| | | order by sor.create_time desc |
| | | </select> |
| | | <select id="listStockOutRecordExportData" resultType="com.ruoyi.stock.execl.StockOutRecordExportData"> |
| | | SELECT |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectUserVo"> |
| | | select u.user_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.ai_enabled, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, |
| | | r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.tenant_id |
| | | select u.user_id, |
| | | u.user_name, |
| | | u.nick_name, |
| | | u.email, |
| | | u.avatar, |
| | | u.phonenumber, |
| | | u.password, |
| | | u.sex, |
| | | u.status, |
| | | u.del_flag, |
| | | u.ai_enabled, |
| | | u.login_ip, |
| | | u.login_date, |
| | | u.create_by, |
| | | u.create_time, |
| | | u.remark, |
| | | r.role_id, |
| | | r.role_name, |
| | | r.role_key, |
| | | r.role_sort, |
| | | r.data_scope, |
| | | r.status as role_status, |
| | | u.tenant_id |
| | | from sys_user u |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | </sql> |
| | | |
| | | <select id="selectUserList" parameterType="com.ruoyi.project.system.domain.SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,T2.dept_names from sys_user u |
| | | select u.user_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, |
| | | u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,T2.dept_names from sys_user u |
| | | left join |
| | | ( SELECT T1.user_id,GROUP_CONCAT(T2.dept_name SEPARATOR ', ') AS dept_names |
| | | FROM |
| | |
| | | ${params.dataScope} |
| | | </select> |
| | | |
| | | <select id="selectUnallocatedList" parameterType="com.ruoyi.project.system.domain.SysUser" resultMap="SysUserResult"> |
| | | <select id="selectUnallocatedList" parameterType="com.ruoyi.project.system.domain.SysUser" |
| | | resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | from sys_user u |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL) |
| | | and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId}) |
| | | and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and |
| | | ur.role_id = #{roleId}) |
| | | <if test="userName != null and userName != ''"> |
| | | AND u.user_name like concat('%', #{userName}, '%') |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult"> |
| | | select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1 |
| | | select user_id, user_name |
| | | from sys_user |
| | | where user_name = #{userName} |
| | | and del_flag = '0' limit 1 |
| | | </select> |
| | | |
| | | <select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult"> |
| | | select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1 |
| | | select user_id, phonenumber |
| | | from sys_user |
| | | where phonenumber = #{phonenumber} |
| | | and del_flag = '0' limit 1 |
| | | </select> |
| | | |
| | | <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult"> |
| | | select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1 |
| | | select user_id, email |
| | | from sys_user |
| | | where email = #{email} |
| | | and del_flag = '0' limit 1 |
| | | </select> |
| | | <select id="selectUserByIds" resultType="com.ruoyi.project.system.domain.SysUser"> |
| | | <include refid="selectUserVo"/> |
| | |
| | | limit 1 |
| | | </select> |
| | | |
| | | <insert id="insertUser" parameterType="com.ruoyi.project.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId"> |
| | | <insert id="insertUser" parameterType="com.ruoyi.project.system.domain.SysUser" useGeneratedKeys="true" |
| | | keyProperty="userId"> |
| | | insert into sys_user( |
| | | <if test="userId != null and userId != 0">user_id,</if> |
| | | <if test="userName != null and userName != ''">user_name,</if> |
| | |
| | | </update> |
| | | |
| | | <update id="updateUserStatus" parameterType="com.ruoyi.project.system.domain.SysUser"> |
| | | update sys_user set status = #{status} where user_id = #{userId} |
| | | update sys_user |
| | | set status = #{status} |
| | | where user_id = #{userId} |
| | | </update> |
| | | |
| | | <update id="updateUserAvatar" parameterType="com.ruoyi.project.system.domain.SysUser"> |
| | | update sys_user set avatar = #{avatar} where user_name = #{userName} |
| | | update sys_user |
| | | set avatar = #{avatar} |
| | | where user_name = #{userName} |
| | | </update> |
| | | |
| | | <update id="resetUserPwd" parameterType="com.ruoyi.project.system.domain.SysUser"> |
| | | update sys_user set password = #{password} where user_name = #{userName} |
| | | update sys_user |
| | | set password = #{password} |
| | | where user_name = #{userName} |
| | | </update> |
| | | |
| | | <delete id="deleteUserById" parameterType="Long"> |
| | | update sys_user set del_flag = '2' where user_id = #{userId} |
| | | update sys_user |
| | | set del_flag = '2' |
| | | where user_id = #{userId} |
| | | </delete> |
| | | |
| | | <delete id="deleteUserByIds" parameterType="Long"> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.stock.service.impl; |
| | | |
| | | import com.ruoyi.production.mapper.ProductionOrderMapper; |
| | | import com.ruoyi.production.mapper.ProductionOrderPickMapper; |
| | | import com.ruoyi.production.pojo.ProductionOrder; |
| | | import com.ruoyi.production.pojo.ProductionOrderPick; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrdersMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrders; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.stock.mapper.StockOutRecordMapper; |
| | | import com.ruoyi.stock.pojo.StockOutRecord; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @SpringBootTest |
| | | public class StockOutRecordBatchUpdateTest { |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | @Autowired |
| | | private StockOutRecordMapper stockOutRecordMapper; |
| | | |
| | | @Autowired |
| | | private PurchaseReturnOrdersMapper purchaseReturnOrdersMapper; |
| | | |
| | | @Autowired |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Autowired |
| | | private ProductionOrderPickMapper productionOrderPickMapper; |
| | | |
| | | @Autowired |
| | | private ProductionOrderMapper productionOrderMapper; |
| | | |
| | | /** |
| | | * æ´æ°åºåºåæ¶é´ |
| | | */ |
| | | @Test |
| | | void testUpdateStockOutRecords() { |
| | | List<StockOutRecord> allRecords = stockOutRecordMapper.selectList(null); |
| | | System.out.println("æ»è®°å½æ°: " + allRecords.size()); |
| | | |
| | | List<RecordWithDate> recordWithDates = new ArrayList<>(); |
| | | |
| | | for (StockOutRecord record : allRecords) { |
| | | String type = record.getRecordType(); |
| | | if (type == null) continue; |
| | | |
| | | switch (type) { |
| | | case "1": |
| | | case "10": |
| | | recordWithDates.add(resolveType1or10(record, type)); |
| | | break; |
| | | case "3": |
| | | System.out.println("ç±»å3ï¼ç产æ¥å·¥-åºåºï¼é¢ç忝ï¼å½åæ æ°æ®ï¼è·³è¿"); |
| | | break; |
| | | case "8": |
| | | System.out.println("ç±»å8ï¼éå®-åºåºï¼é¢ç忝ï¼å½åæ æ°æ®ï¼è·³è¿"); |
| | | break; |
| | | case "9": |
| | | recordWithDates.add(resolveType9(record)); |
| | | break; |
| | | case "13": |
| | | recordWithDates.add(resolveType13(record)); |
| | | break; |
| | | case "14": |
| | | recordWithDates.add(resolveType14or15(record)); |
| | | break; |
| | | case "15": |
| | | recordWithDates.add(resolveType14or15(record)); |
| | | break; |
| | | default: |
| | | System.out.println("æªç¥ç±»å " + type + "ï¼è·³è¿ ID=" + record.getId()); |
| | | } |
| | | } |
| | | |
| | | Map<LocalDate, List<RecordWithDate>> byDate = recordWithDates.stream() |
| | | .collect(Collectors.groupingBy( |
| | | rwd -> rwd.dateTime.toLocalDate(), |
| | | LinkedHashMap::new, |
| | | Collectors.toList() |
| | | )); |
| | | |
| | | int totalUpdated = 0; |
| | | for (Map.Entry<LocalDate, List<RecordWithDate>> dateEntry : byDate.entrySet()) { |
| | | LocalDate date = dateEntry.getKey(); |
| | | List<RecordWithDate> records = dateEntry.getValue(); |
| | | records.sort(Comparator.comparing(rwd -> rwd.dateTime)); |
| | | |
| | | assignRandomTimes(records, date); |
| | | |
| | | records.sort(Comparator.comparing(rwd -> rwd.dateTime)); |
| | | |
| | | int seq = 1; |
| | | for (RecordWithDate rwd : records) { |
| | | StockOutRecord record = rwd.record; |
| | | String type = record.getRecordType(); |
| | | String batchNo = "CK" + date.format(DateTimeFormatter.ofPattern("yyyyMMdd")) + String.format("%03d", seq++); |
| | | LocalDateTime createTime = rwd.dateTime; |
| | | |
| | | jdbcTemplate.update( |
| | | "UPDATE stock_out_record SET outbound_batches = ?, create_time = ?, update_time = ? WHERE id = ?", |
| | | batchNo, createTime, createTime, record.getId()); |
| | | |
| | | System.out.println("ID=" + record.getId() |
| | | + " type=" + type |
| | | + " batch=" + batchNo |
| | | + " time=" + createTime); |
| | | totalUpdated++; |
| | | } |
| | | } |
| | | |
| | | System.out.println("å
¨é¨å®æï¼å
±æ´æ° " + totalUpdated + " æ¡è®°å½"); |
| | | } |
| | | |
| | | private void assignRandomTimes(List<RecordWithDate> records, LocalDate date) { |
| | | List<RecordWithDate> individual = new ArrayList<>(); |
| | | Map<Long, List<RecordWithDate>> grouped = new LinkedHashMap<>(); |
| | | |
| | | for (RecordWithDate rwd : records) { |
| | | String type = rwd.record.getRecordType(); |
| | | if (!"1".equals(type) && !"9".equals(type) && !"10".equals(type) |
| | | && !"13".equals(type) && !"14".equals(type) && !"15".equals(type)) { |
| | | continue; |
| | | } |
| | | if (("14".equals(type) || "15".equals(type)) && rwd.record.getRecordId() != null) { |
| | | grouped.computeIfAbsent(rwd.record.getRecordId(), k -> new ArrayList<>()).add(rwd); |
| | | } else { |
| | | individual.add(rwd); |
| | | } |
| | | } |
| | | |
| | | List<TimeSlot> slots = new ArrayList<>(); |
| | | for (RecordWithDate rwd : individual) { |
| | | slots.add(new TimeSlot(rwd.record.getId(), List.of(rwd))); |
| | | } |
| | | for (Map.Entry<Long, List<RecordWithDate>> entry : grouped.entrySet()) { |
| | | long minId = entry.getValue().stream() |
| | | .mapToLong(rwd -> rwd.record.getId()) |
| | | .min().orElse(0); |
| | | slots.add(new TimeSlot(minId, entry.getValue())); |
| | | } |
| | | |
| | | if (slots.isEmpty()) return; |
| | | |
| | | slots.sort(Comparator.comparingLong(s -> s.sortKey)); |
| | | |
| | | int totalMinutes = 480; |
| | | for (int i = 0; i < slots.size(); i++) { |
| | | int offsetMinutes = (int) ((long) i * totalMinutes / slots.size()); |
| | | int jitter = (int) (Math.random() * 6 - 3); |
| | | offsetMinutes = Math.max(0, Math.min(479, offsetMinutes + jitter)); |
| | | |
| | | LocalTime time; |
| | | if (offsetMinutes < 240) { |
| | | time = LocalTime.of(8, 0).plusMinutes(offsetMinutes); |
| | | } else { |
| | | time = LocalTime.of(14, 0).plusMinutes(offsetMinutes - 240); |
| | | } |
| | | LocalDateTime dt = LocalDateTime.of(date, time); |
| | | for (RecordWithDate rwd : slots.get(i).members) { |
| | | rwd.dateTime = dt; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private static class TimeSlot { |
| | | final long sortKey; |
| | | final List<RecordWithDate> members; |
| | | |
| | | TimeSlot(long sortKey, List<RecordWithDate> members) { |
| | | this.sortKey = sortKey; |
| | | this.members = members; |
| | | } |
| | | } |
| | | |
| | | private RecordWithDate resolveType1or10(StockOutRecord record, String type) { |
| | | LocalDate date = record.getCreateTime() != null |
| | | ? record.getCreateTime().toLocalDate() |
| | | : LocalDate.now(); |
| | | return new RecordWithDate(record, LocalDateTime.of(date, LocalTime.of(8, 0))); |
| | | } |
| | | |
| | | private RecordWithDate resolveType9(StockOutRecord record) { |
| | | Long recordId = record.getRecordId(); |
| | | if (recordId != null) { |
| | | PurchaseReturnOrders pro = purchaseReturnOrdersMapper.selectById(recordId); |
| | | if (pro != null && pro.getPreparedAt() != null) { |
| | | return new RecordWithDate(record, LocalDateTime.of(pro.getPreparedAt(), LocalTime.of(8, 0))); |
| | | } |
| | | } |
| | | return fallbackDateTime(record); |
| | | } |
| | | |
| | | private RecordWithDate resolveType13(StockOutRecord record) { |
| | | Long recordId = record.getRecordId(); |
| | | if (recordId != null) { |
| | | ShippingInfo shippingInfo = shippingInfoMapper.selectById(recordId); |
| | | if (shippingInfo != null && shippingInfo.getSalesLedgerId() != null) { |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(shippingInfo.getSalesLedgerId()); |
| | | if (salesLedger != null && salesLedger.getDeliveryDate() != null) { |
| | | return new RecordWithDate(record, LocalDateTime.of(salesLedger.getDeliveryDate(), LocalTime.of(8, 0))); |
| | | } |
| | | } |
| | | } |
| | | return fallbackDateTime(record); |
| | | } |
| | | |
| | | private RecordWithDate resolveType14or15(StockOutRecord record) { |
| | | Long recordId = record.getRecordId(); |
| | | if (recordId != null) { |
| | | ProductionOrderPick pick = productionOrderPickMapper.selectById(recordId); |
| | | if (pick != null && pick.getProductionOrderId() != null) { |
| | | ProductionOrder order = productionOrderMapper.selectById(pick.getProductionOrderId()); |
| | | if (order != null && order.getStartTime() != null) { |
| | | return new RecordWithDate(record, LocalDateTime.of(order.getStartTime().toLocalDate(), LocalTime.of(8, 0))); |
| | | } |
| | | } |
| | | } |
| | | return fallbackDateTime(record); |
| | | } |
| | | |
| | | private RecordWithDate fallbackDateTime(StockOutRecord record) { |
| | | return record.getCreateTime() != null |
| | | ? new RecordWithDate(record, record.getCreateTime()) |
| | | : new RecordWithDate(record, LocalDateTime.now()); |
| | | } |
| | | |
| | | private static class RecordWithDate { |
| | | final StockOutRecord record; |
| | | LocalDateTime dateTime; |
| | | |
| | | RecordWithDate(StockOutRecord record, LocalDateTime dateTime) { |
| | | this.record = record; |
| | | this.dateTime = dateTime; |
| | | } |
| | | } |
| | | } |