feat: 库存入库/出库字段全链路、采购台账申请提交时间、储罐租客信息、油库储罐模块
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | @echo off |
| | | echo. |
| | | echo [INFO] Starting file service with embedded Tomcat on port 7006 (same app, dev profile). |
| | | echo [INFO] Business backend stays on 7005; file preview/download URLs point to this instance. |
| | | echo. |
| | | |
| | | %~d0 |
| | | cd %~dp0 |
| | | |
| | | cd .. |
| | | title %cd% - file service (7006) |
| | | |
| | | rem Project targets Java 25; use JDK 25 if present, otherwise rely on global JAVA_HOME. |
| | | if exist "D:\develop\JDK.25\bin\java.exe" set JAVA_HOME=D:\develop\JDK.25 |
| | | |
| | | set MAVEN_OPTS=%MAVEN_OPTS% -Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m |
| | | call mvn spring-boot:run -Dmaven.test.skip=true -Dspring-boot.run.arguments="--server.port=7006" |
| | | |
| | | pause |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | -- éè´å°è´¦æ°å¢âç©æµæ¹å¼âåæ®µï¼åå®¶é
éãå§å¤ç©æµã客æ·èªæï¼ |
| | | -- æ§è¡åºï¼product-inventory-managementï¼åç§æ·åºåï¼ |
| | | ALTER TABLE `purchase_ledger` |
| | | ADD COLUMN `logistics_method` varchar(20) DEFAULT NULL COMMENT 'ç©æµæ¹å¼ï¼åå®¶é
éãå§å¤ç©æµã客æ·èªæ' AFTER `purchase_oil_product`; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | -- éè´å°è´¦æ°å¢âæè´§æ¹å¼âåæ®µï¼æä¸æè´§ãæè´§ï¼ |
| | | -- æ§è¡åºï¼product-inventory-managementï¼åç§æ·åºåï¼ |
| | | ALTER TABLE `purchase_ledger` |
| | | ADD COLUMN `pickup_method` varchar(20) DEFAULT NULL COMMENT 'æè´§æ¹å¼ï¼æä¸æè´§ãæè´§' AFTER `logistics_method`; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | -- éè´å°è´¦æ°å¢âéè´æ²¹åâåæ®µï¼æ±½#92ãæ±½#95ãæ´#0ãæ´#-35ï¼ |
| | | -- æ§è¡åºï¼product-inventory-managementï¼åç§æ·åºåï¼ |
| | | ALTER TABLE `purchase_ledger` |
| | | ADD COLUMN `purchase_oil_product` varchar(20) DEFAULT NULL COMMENT 'éè´æ²¹åï¼æ±½#92ãæ±½#95ãæ´#0ãæ´#-35' AFTER `purchase_category`; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | -- éè´å°è´¦æ°å¢âç³è¯·æäº¤æ¶é´âåæ®µ |
| | | -- æ§è¡åºï¼product-inventory-managementï¼åç§æ·åºåï¼ |
| | | ALTER TABLE `purchase_ledger` |
| | | ADD COLUMN `application_submit_time` datetime DEFAULT NULL COMMENT 'ç³è¯·æäº¤æ¶é´' AFTER `purchase_order_status`; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | -- åºåºè®°å½æ°å¢âæ²¹ååºåºâ表ååæ®µï¼åºåºä¿¡æ¯/è£
æ²¹æä½ä¿¡æ¯/è¿ç£
æ°æ®/ç©æµä¿¡æ¯ï¼ |
| | | -- æ§è¡åºï¼product-inventory-managementï¼åç§æ·åºåï¼ |
| | | ALTER TABLE `stock_out_record` |
| | | ADD COLUMN `out_category` varchar(20) DEFAULT NULL COMMENT 'åºåºç±»å«ï¼å®¢å/代å¨/éå®' AFTER `record_type`, |
| | | ADD COLUMN `oil_depot_id` bigint DEFAULT NULL COMMENT 'å¨åºid' AFTER `out_category`, |
| | | ADD COLUMN `oil_depot_name` varchar(100) DEFAULT NULL COMMENT 'å¨åºåç§°' AFTER `oil_depot_id`, |
| | | ADD COLUMN `tank_id` bigint DEFAULT NULL COMMENT 'å¨ç½id' AFTER `oil_depot_name`, |
| | | ADD COLUMN `tank_no` varchar(50) DEFAULT NULL COMMENT 'å¨ç½å·' AFTER `tank_id`, |
| | | ADD COLUMN `out_date` date DEFAULT NULL COMMENT 'åºåºæ¥æ' AFTER `tank_no`, |
| | | ADD COLUMN `oil_product` varchar(20) DEFAULT NULL COMMENT 'æ²¹å' AFTER `out_date`, |
| | | ADD COLUMN `out_tonnage` decimal(14,2) DEFAULT NULL COMMENT 'åºåºå¨ä½(å¨)' AFTER `oil_product`, |
| | | ADD COLUMN `customer_id` bigint DEFAULT NULL COMMENT '客æ·id' AFTER `out_tonnage`, |
| | | ADD COLUMN `customer_name` varchar(100) DEFAULT NULL COMMENT '客æ·åç§°' AFTER `customer_id`, |
| | | ADD COLUMN `contact_person` varchar(50) DEFAULT NULL COMMENT '客æ·å¯¹æ¥äºº' AFTER `customer_name`, |
| | | ADD COLUMN `contact_phone` varchar(20) DEFAULT NULL COMMENT '对æ¥äººçµè¯' AFTER `contact_person`, |
| | | ADD COLUMN `loading_inspection_status` varchar(20) DEFAULT NULL COMMENT '车ä½/é
å°æ£éªæ¯å¦æ£å¸¸' AFTER `contact_phone`, |
| | | ADD COLUMN `loading_crane_position` varchar(20) DEFAULT NULL COMMENT 'è£
车鹤ä½' AFTER `loading_inspection_status`, |
| | | ADD COLUMN `loading_photos` text COMMENT 'è£
æ²¹å
³é®ç¯èä¸è½¦è¾å
³é®ä½ç½®æç
§ï¼JSONæ°ç»ï¼' AFTER `loading_crane_position`, |
| | | ADD COLUMN `density` varchar(20) DEFAULT NULL COMMENT 'å¯åº¦ï¼kg/Lï¼' AFTER `loading_photos`, |
| | | ADD COLUMN `gross_weight` decimal(14,2) DEFAULT NULL COMMENT 'æ¯é(å¨)' AFTER `density`, |
| | | ADD COLUMN `tare_weight` decimal(14,2) DEFAULT NULL COMMENT 'ç®é(å¨)' AFTER `gross_weight`, |
| | | ADD COLUMN `net_weight` decimal(14,2) DEFAULT NULL COMMENT 'åé(å¨)' AFTER `tare_weight`, |
| | | ADD COLUMN `loss_quantity` decimal(14,2) DEFAULT NULL COMMENT 'äºé(å¨)' AFTER `net_weight`, |
| | | ADD COLUMN `actual_volume` decimal(14,2) DEFAULT NULL COMMENT 'å®é
å
¥åºä½ç§¯(å)' AFTER `loss_quantity`, |
| | | ADD COLUMN `pound_photos` text COMMENT 'ç£
åä¸ä¼ ï¼JSONæ°ç»ï¼' AFTER `actual_volume`, |
| | | ADD COLUMN `driver_name` varchar(50) DEFAULT NULL COMMENT '叿ºå§å' AFTER `pound_photos`, |
| | | ADD COLUMN `driver_phone` varchar(20) DEFAULT NULL COMMENT '叿ºçµè¯' AFTER `driver_name`, |
| | | ADD COLUMN `escort_name` varchar(50) DEFAULT NULL COMMENT 'æ¼è¿åå§å' AFTER `driver_phone`, |
| | | ADD COLUMN `escort_phone` varchar(20) DEFAULT NULL COMMENT 'æ¼è¿åçµè¯' AFTER `escort_name`, |
| | | ADD COLUMN `truck_plate_no` varchar(20) DEFAULT NULL COMMENT '车çå·' AFTER `escort_phone`, |
| | | ADD COLUMN `trailer_plate_no` varchar(20) DEFAULT NULL COMMENT '车æçå·' AFTER `truck_plate_no`; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | -- å¨ç½ä¿¡æ¯è¡¨æ°å¢âç§å®¢ä¿¡æ¯âåæ®µ |
| | | -- æ§è¡åºï¼product-inventory-managementï¼åç§æ·åºåï¼ |
| | | ALTER TABLE `tank_info` |
| | | ADD COLUMN `tenant_info` varchar(255) DEFAULT NULL COMMENT 'ç§å®¢ä¿¡æ¯' AFTER `remaining`; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | -- å
¥åºè®°å½æ°å¢â叿²¹æä½ä¿¡æ¯âä¸âè¿ç£
æ°æ®âåæ®µ |
| | | -- æ§è¡åºï¼product-inventory-managementï¼åç§æ·åºåï¼ |
| | | ALTER TABLE `stock_in_record` |
| | | ADD COLUMN `tank_inspection_status` varchar(20) DEFAULT NULL COMMENT '车ä½/é
å°æ£éªæ¯å¦æ£å¸¸ï¼æ£å¸¸/å¼å¸¸' AFTER `trailer_plate_no`, |
| | | ADD COLUMN `unloading_crane_position` varchar(20) DEFAULT NULL COMMENT 'å¸è½¦é¹¤ä½ï¼1#æ¬è£
/2#æ¬è£
/ä¸´æ¶æ³µ' AFTER `tank_inspection_status`, |
| | | ADD COLUMN `density` varchar(20) DEFAULT NULL COMMENT 'å¯åº¦ï¼kg/Lï¼' AFTER `unloading_crane_position`, |
| | | ADD COLUMN `unload_photos` text COMMENT '叿²¹å
³é®ç¯èä¸è½¦è¾å
³é®ä½ç½®æç
§ï¼JSONæ°ç»ï¼' AFTER `density`, |
| | | ADD COLUMN `gross_weight` decimal(14,2) DEFAULT NULL COMMENT 'æ¯é(å¨)' AFTER `unload_photos`, |
| | | ADD COLUMN `tare_weight` decimal(14,2) DEFAULT NULL COMMENT 'ç®é(å¨)' AFTER `gross_weight`, |
| | | ADD COLUMN `net_weight` decimal(14,2) DEFAULT NULL COMMENT 'åé(å¨)' AFTER `tare_weight`, |
| | | ADD COLUMN `loss_quantity` decimal(14,2) DEFAULT NULL COMMENT 'äºé(å¨)' AFTER `net_weight`, |
| | | ADD COLUMN `actual_volume` decimal(14,2) DEFAULT NULL COMMENT 'å®é
å
¥åºä½ç§¯(å)' AFTER `loss_quantity`, |
| | | ADD COLUMN `pound_photos` text COMMENT 'ç£
åä¸ä¼ ï¼JSONæ°ç»ï¼' AFTER `actual_volume`; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.OilDepot; |
| | | import com.ruoyi.basic.service.IOilDepotService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * æ²¹åºä¿¡æ¯Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/basic/oilDepot") |
| | | @AllArgsConstructor |
| | | public class OilDepotController { |
| | | private IOilDepotService oilDepotService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢æ²¹åºä¿¡æ¯å表 |
| | | */ |
| | | @GetMapping("/list") |
| | | public R list(Page<OilDepot> page, OilDepot oilDepot) { |
| | | IPage<OilDepot> result = oilDepotService.selectOilDepotList(page, oilDepot); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¨é¨æ²¹åºä¿¡æ¯ï¼ä¾ä¸æéæ©ï¼ |
| | | */ |
| | | @GetMapping("/all") |
| | | public R all() { |
| | | return R.ok(oilDepotService.selectAll()); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ²¹åºä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @GetMapping(value = "/{id}") |
| | | public R getInfo(@PathVariable("id") Long id) { |
| | | return R.ok(oilDepotService.selectOilDepotById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ²¹åºä¿¡æ¯ |
| | | */ |
| | | @Log(title = "æ²¹åºä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody OilDepot oilDepot) { |
| | | return R.ok(oilDepotService.insertOilDepot(oilDepot)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ²¹åºä¿¡æ¯ |
| | | */ |
| | | @Log(title = "æ²¹åºä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public R edit(@RequestBody OilDepot oilDepot) { |
| | | return R.ok(oilDepotService.updateOilDepot(oilDepot)); |
| | | } |
| | | |
| | | /** |
| | | * å 餿²¹åºä¿¡æ¯ |
| | | */ |
| | | @Log(title = "æ²¹åºä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public R remove(@RequestBody Long[] ids) { |
| | | if (ids == null || ids.length == 0) { |
| | | return R.fail("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | } |
| | | return R.ok(oilDepotService.deleteOilDepotByIds(ids)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.TankInfo; |
| | | import com.ruoyi.basic.service.ITankInfoService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * å¨ç½ä¿¡æ¯Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/basic/tankInfo") |
| | | @AllArgsConstructor |
| | | public class TankInfoController { |
| | | private ITankInfoService tankInfoService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢å¨ç½ä¿¡æ¯å表 |
| | | */ |
| | | @GetMapping("/list") |
| | | public R list(Page<TankInfo> page, TankInfo tankInfo) { |
| | | IPage<TankInfo> result = tankInfoService.selectTankInfoList(page, tankInfo); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¨é¨å¨ç½ä¿¡æ¯ï¼ä¾ä¸æéæ©ï¼ |
| | | */ |
| | | @GetMapping("/all") |
| | | public R all() { |
| | | return R.ok(tankInfoService.selectAll()); |
| | | } |
| | | |
| | | /** |
| | | * è·åå¨ç½ä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @GetMapping(value = "/{id}") |
| | | public R getInfo(@PathVariable("id") Long id) { |
| | | return R.ok(tankInfoService.selectTankInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å¨ç½ä¿¡æ¯ |
| | | */ |
| | | @Log(title = "å¨ç½ä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody TankInfo tankInfo) { |
| | | return R.ok(tankInfoService.insertTankInfo(tankInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å¨ç½ä¿¡æ¯ |
| | | */ |
| | | @Log(title = "å¨ç½ä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public R edit(@RequestBody TankInfo tankInfo) { |
| | | return R.ok(tankInfoService.updateTankInfo(tankInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å¨ç½ä¿¡æ¯ |
| | | */ |
| | | @Log(title = "å¨ç½ä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public R remove(@RequestBody Long[] ids) { |
| | | if (ids == null || ids.length == 0) { |
| | | return R.fail("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | } |
| | | return R.ok(tankInfoService.deleteTankInfoByIds(ids)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.pojo.OilDepot; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * æ²¹åºä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | @Mapper |
| | | public interface OilDepotMapper extends BaseMapper<OilDepot> { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.pojo.TankInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * å¨ç½ä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | @Mapper |
| | | public interface TankInfoMapper extends BaseMapper<TankInfo> { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ²¹åºä¿¡æ¯å¯¹è±¡ oil_depot |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | @TableName(value = "oil_depot") |
| | | @Data |
| | | public class OilDepot implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * æ²¹åºid |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * æ²¹åºåç§° |
| | | */ |
| | | private String depotName; |
| | | |
| | | /** |
| | | * è´è´£äºº |
| | | */ |
| | | private String chargePerson; |
| | | |
| | | /** |
| | | * èç³»çµè¯ |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * å¯ç¨æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate enableDate; |
| | | |
| | | /** |
| | | * æå±å
¬å¸ |
| | | */ |
| | | private String company; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | private Long updateUser; |
| | | |
| | | /** |
| | | * ç§æ·id |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | /** |
| | | * é¨é¨id |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * å¨ç½ä¿¡æ¯å¯¹è±¡ tank_info |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | @TableName(value = "tank_info") |
| | | @Data |
| | | public class TankInfo implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * å¨ç½id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * å¨ç½å· |
| | | */ |
| | | private String tankNo; |
| | | |
| | | /** |
| | | * 大类 |
| | | */ |
| | | private String category; |
| | | |
| | | /** |
| | | * æ²¹å |
| | | */ |
| | | private String oilProduct; |
| | | |
| | | /** |
| | | * ç½å®¹ |
| | | */ |
| | | private BigDecimal capacity; |
| | | |
| | | /** |
| | | * åºåä½é(m3) |
| | | */ |
| | | private BigDecimal remaining; |
| | | |
| | | /** |
| | | * ç§å®¢ä¿¡æ¯ |
| | | */ |
| | | private String tenantInfo; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | private Long updateUser; |
| | | |
| | | /** |
| | | * ç§æ·id |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | /** |
| | | * é¨é¨id |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.OilDepot; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ²¹åºä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | public interface IOilDepotService extends IService<OilDepot> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢æ²¹åºä¿¡æ¯å表 |
| | | * |
| | | * @param page å页忰 |
| | | * @param oilDepot æ¥è¯¢æ¡ä»¶ |
| | | * @return æ²¹åºä¿¡æ¯éå |
| | | */ |
| | | IPage<OilDepot> selectOilDepotList(Page<OilDepot> page, OilDepot oilDepot); |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¨é¨æ²¹åºä¿¡æ¯ï¼ä¾ä¸æéæ©ï¼ |
| | | * |
| | | * @return æ²¹åºä¿¡æ¯éå |
| | | */ |
| | | List<OilDepot> selectAll(); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ²¹åºä¿¡æ¯ |
| | | * |
| | | * @param id æ²¹åºä¿¡æ¯ä¸»é® |
| | | * @return æ²¹åºä¿¡æ¯ |
| | | */ |
| | | OilDepot selectOilDepotById(Long id); |
| | | |
| | | /** |
| | | * æ°å¢æ²¹åºä¿¡æ¯ |
| | | * |
| | | * @param oilDepot æ²¹åºä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | boolean insertOilDepot(OilDepot oilDepot); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ²¹åºä¿¡æ¯ |
| | | * |
| | | * @param oilDepot æ²¹åºä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | boolean updateOilDepot(OilDepot oilDepot); |
| | | |
| | | /** |
| | | * æ¹éå 餿²¹åºä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ²¹åºä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | boolean deleteOilDepotByIds(Long[] ids); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.TankInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å¨ç½ä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | public interface ITankInfoService extends IService<TankInfo> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢å¨ç½ä¿¡æ¯å表 |
| | | * |
| | | * @param page å页忰 |
| | | * @param tankInfo æ¥è¯¢æ¡ä»¶ |
| | | * @return å¨ç½ä¿¡æ¯éå |
| | | */ |
| | | IPage<TankInfo> selectTankInfoList(Page<TankInfo> page, TankInfo tankInfo); |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¨é¨å¨ç½ä¿¡æ¯ï¼ä¾ä¸æéæ©ï¼ |
| | | * |
| | | * @return å¨ç½ä¿¡æ¯éå |
| | | */ |
| | | List<TankInfo> selectAll(); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¨ç½ä¿¡æ¯ |
| | | * |
| | | * @param id å¨ç½ä¿¡æ¯ä¸»é® |
| | | * @return å¨ç½ä¿¡æ¯ |
| | | */ |
| | | TankInfo selectTankInfoById(Long id); |
| | | |
| | | /** |
| | | * æ°å¢å¨ç½ä¿¡æ¯ |
| | | * |
| | | * @param tankInfo å¨ç½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | boolean insertTankInfo(TankInfo tankInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹å¨ç½ä¿¡æ¯ |
| | | * |
| | | * @param tankInfo å¨ç½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | boolean updateTankInfo(TankInfo tankInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤å¨ç½ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çå¨ç½ä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | boolean deleteTankInfoByIds(Long[] ids); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.OilDepotMapper; |
| | | import com.ruoyi.basic.pojo.OilDepot; |
| | | import com.ruoyi.basic.service.IOilDepotService; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ²¹åºä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | @Service |
| | | public class OilDepotServiceImpl extends ServiceImpl<OilDepotMapper, OilDepot> implements IOilDepotService { |
| | | |
| | | @Override |
| | | public IPage<OilDepot> selectOilDepotList(Page<OilDepot> page, OilDepot oilDepot) { |
| | | LambdaQueryWrapper<OilDepot> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.like(StringUtils.isNotBlank(oilDepot.getDepotName()), OilDepot::getDepotName, oilDepot.getDepotName()) |
| | | .like(StringUtils.isNotBlank(oilDepot.getCompany()), OilDepot::getCompany, oilDepot.getCompany()) |
| | | .orderByAsc(OilDepot::getId); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<OilDepot> selectAll() { |
| | | LambdaQueryWrapper<OilDepot> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.orderByAsc(OilDepot::getId); |
| | | return this.list(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public OilDepot selectOilDepotById(Long id) { |
| | | return this.getById(id); |
| | | } |
| | | |
| | | @Override |
| | | public boolean insertOilDepot(OilDepot oilDepot) { |
| | | return this.save(oilDepot); |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateOilDepot(OilDepot oilDepot) { |
| | | return this.updateById(oilDepot); |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteOilDepotByIds(Long[] ids) { |
| | | return this.removeByIds(List.of(ids)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.TankInfoMapper; |
| | | import com.ruoyi.basic.pojo.TankInfo; |
| | | import com.ruoyi.basic.service.ITankInfoService; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å¨ç½ä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @date 2026-09-10 |
| | | */ |
| | | @Service |
| | | public class TankInfoServiceImpl extends ServiceImpl<TankInfoMapper, TankInfo> implements ITankInfoService { |
| | | |
| | | @Override |
| | | public IPage<TankInfo> selectTankInfoList(Page<TankInfo> page, TankInfo tankInfo) { |
| | | LambdaQueryWrapper<TankInfo> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.like(StringUtils.isNotBlank(tankInfo.getTankNo()), TankInfo::getTankNo, tankInfo.getTankNo()) |
| | | .like(StringUtils.isNotBlank(tankInfo.getCategory()), TankInfo::getCategory, tankInfo.getCategory()) |
| | | .orderByAsc(TankInfo::getId); |
| | | return this.page(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<TankInfo> selectAll() { |
| | | LambdaQueryWrapper<TankInfo> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.orderByAsc(TankInfo::getId); |
| | | return this.list(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public TankInfo selectTankInfoById(Long id) { |
| | | return this.getById(id); |
| | | } |
| | | |
| | | @Override |
| | | public boolean insertTankInfo(TankInfo tankInfo) { |
| | | return this.save(tankInfo); |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateTankInfo(TankInfo tankInfo) { |
| | | return this.updateById(tankInfo); |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteTankInfoByIds(Long[] ids) { |
| | | return this.removeByIds(List.of(ids)); |
| | | } |
| | | } |
| | |
| | | private Date entryDate; |
| | | |
| | | /** |
| | | * ç³è¯·æäº¤æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date applicationSubmitTime; |
| | | |
| | | /** |
| | | * ç¾è®¢æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | @Schema(description = "仿¬¾æ¹å¼") |
| | | private String paymentMethod; |
| | | @Schema(description = "éè´ç±»å«ï¼å®¢åã代å¨ãéè´å
¥åºãéè´ç´é") |
| | | private String purchaseCategory; |
| | | |
| | | @Schema(description = "éè´æ²¹åï¼æ±½#92ãæ±½#95ãæ´#0ãæ´#-35") |
| | | private String purchaseOilProduct; |
| | | |
| | | @Schema(description = "ç©æµæ¹å¼ï¼åå®¶é
éãå§å¤ç©æµã客æ·èªæ") |
| | | private String logisticsMethod; |
| | | |
| | | @Schema(description = "æè´§æ¹å¼ï¼æä¸æè´§ãæè´§") |
| | | private String pickupMethod; |
| | | @Schema(description = "éè´æ²¹åºid") |
| | | private Long oilDepotId; |
| | | @Schema(description = "éè´æ²¹åºåç§°") |
| | | private String oilDepotName; |
| | | @Schema(description = "客æ·åç§°") |
| | | private String customerName; |
| | | @Schema(description = "æä½³å°ç«æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date bestArrivalDate; |
| | | @Schema(description = "éè´æ°éï¼å¨ï¼") |
| | | private Integer purchaseQuantity; |
| | | @Schema(description = "éè´ç³è¯·è®¢åç¶æ") |
| | | private String purchaseOrderStatus; |
| | | @Schema(description = "审æ¹ç¶æ") |
| | | private Integer approvalStatus; |
| | | @Schema(description = "模æ¿åç§°") |
| | |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date entryDate; |
| | | |
| | | /** |
| | | * ç³è¯·æäº¤æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date applicationSubmitTime; |
| | | |
| | | |
| | | /** |
| | | * ç¾è®¢æ¥æ |
| | |
| | | |
| | | @Schema(description = "仿¬¾æ¹å¼") |
| | | private String paymentMethod; |
| | | |
| | | /** |
| | | * éè´ç±»å«ï¼å®¢åã代å¨ãéè´å
¥åºãéè´ç´é |
| | | */ |
| | | @Schema(description = "éè´ç±»å«") |
| | | @Excel(name = "éè´ç±»å«") |
| | | private String purchaseCategory; |
| | | |
| | | /** |
| | | * éè´æ²¹åï¼æ±½#92ãæ±½#95ãæ´#0ãæ´#-35 |
| | | */ |
| | | @Schema(description = "éè´æ²¹å") |
| | | @Excel(name = "éè´æ²¹å") |
| | | private String purchaseOilProduct; |
| | | |
| | | /** |
| | | * ç©æµæ¹å¼ï¼åå®¶é
éãå§å¤ç©æµã客æ·èªæ |
| | | */ |
| | | @Schema(description = "ç©æµæ¹å¼") |
| | | @Excel(name = "ç©æµæ¹å¼") |
| | | private String logisticsMethod; |
| | | |
| | | /** |
| | | * æè´§æ¹å¼ï¼æä¸æè´§ãæè´§ |
| | | */ |
| | | @Schema(description = "æè´§æ¹å¼") |
| | | @Excel(name = "æè´§æ¹å¼") |
| | | private String pickupMethod; |
| | | |
| | | /** |
| | | * éè´æ²¹åºid |
| | | */ |
| | | @Schema(description = "éè´æ²¹åºid") |
| | | private Long oilDepotId; |
| | | |
| | | /** |
| | | * éè´æ²¹åºåç§° |
| | | */ |
| | | @Schema(description = "éè´æ²¹åºåç§°") |
| | | @Excel(name = "éè´æ²¹åº") |
| | | private String oilDepotName; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @Schema(description = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | /** |
| | | * æä½³å°ç«æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Schema(description = "æä½³å°ç«æ¥æ") |
| | | private Date bestArrivalDate; |
| | | |
| | | /** |
| | | * éè´æ°éï¼å¨ï¼ |
| | | */ |
| | | @Schema(description = "éè´æ°éï¼å¨ï¼") |
| | | private Integer purchaseQuantity; |
| | | |
| | | /** |
| | | * éè´ç³è¯·è®¢åç¶æï¼å·²ç³è¯·ï¼æªè£
车 / 以åºåï¼æªå
¥åº / å·²å
¥åº |
| | | */ |
| | | @Schema(description = "éè´ç³è¯·è®¢åç¶æ") |
| | | private String purchaseOrderStatus; |
| | | @Schema(description = "审æ¹ç¶æ 1-å¾
å®¡æ ¸ï¼2-审æ¹ä¸ï¼3-审æ¹éè¿ï¼4-审æ¹å¤±è´¥,5è¡¨ç¤ºæ¯æ¨¡æ¿") |
| | | @Excel(name = "审æ¹ç¶æ", readConverterExp = "1=å¾
å®¡æ ¸,2=审æ¹ä¸,3=审æ¹éè¿,4=审æ¹å¤±è´¥") |
| | | private Integer approvalStatus; |
| | |
| | | import com.ruoyi.approve.service.impl.ApproveProcessServiceImpl; |
| | | import com.ruoyi.basic.enums.ApplicationTypeEnum; |
| | | import com.ruoyi.basic.enums.RecordTypeEnum; |
| | | import com.ruoyi.basic.mapper.OilDepotMapper; |
| | | import com.ruoyi.basic.mapper.ProductMapper; |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | | import com.ruoyi.basic.mapper.SupplierManageMapper; |
| | | import com.ruoyi.basic.pojo.OilDepot; |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | |
| | | private final StockInRecordService stockInRecordService; |
| | | private final StockUtils stockUtils; |
| | | private final ApprovalTemplateMapper approvalTemplateMapper; |
| | | private final OilDepotMapper oilDepotMapper; |
| | | |
| | | @Override |
| | | public List<PurchaseLedger> selectPurchaseLedgerList(PurchaseLedger purchaseLedger) { |
| | |
| | | purchaseLedger.setSupplierName(supplierManage.getSupplierName()); |
| | | purchaseLedger.setRecorderId(purchaseLedgerDto.getRecorderId()); |
| | | |
| | | // éè´æ²¹åºï¼æ ¹æ®æ²¹åºidåå¡«æ²¹åºåç§° |
| | | if (purchaseLedgerDto.getOilDepotId() != null) { |
| | | OilDepot oilDepot = oilDepotMapper.selectById(purchaseLedgerDto.getOilDepotId()); |
| | | if (oilDepot != null) { |
| | | purchaseLedger.setOilDepotName(oilDepot.getDepotName()); |
| | | } |
| | | } |
| | | |
| | | purchaseLedger.setApprovalStatus(1); |
| | | // å®é
ååéé¢å§ç»çäºååéé¢ |
| | | purchaseLedger.setNetContractAmount(purchaseLedger.getContractAmount()); |
| | |
| | | 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.StockOutRecordDto; |
| | | import com.ruoyi.stock.execl.StockInventoryExportData; |
| | | import com.ruoyi.stock.service.StockInventoryService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | return R.ok(stockInventoryService.addStockOutRecordOnly(stockInventoryDto)); |
| | | } |
| | | |
| | | @PostMapping("/addOilOutRecordOnly") |
| | | @Operation(summary = "æ°å¢æ²¹ååºåºè®°å½ï¼ä»
å建记å½ï¼ä¸è°æ´åºåï¼") |
| | | public R addOilOutRecordOnly(@RequestBody StockOutRecordDto stockOutRecordDto) { |
| | | stockOutRecordDto.setRecordType(String.valueOf(StockOutQualifiedRecordTypeEnum.CUSTOMIZATION_STOCK_OUT.getCode())); |
| | | stockOutRecordDto.setRecordId(0L); |
| | | return R.ok(stockInventoryService.addOilOutRecordOnly(stockOutRecordDto)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/importStockInventory") |
| | | @Operation(summary = "导å
¥åºå") |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class StockInventoryDto extends StockInventory { |
| | |
| | | private String model; |
| | | private String unit; |
| | | private String batchNo; |
| | | private Long oilDepotId; |
| | | private String oilDepotName; |
| | | private String inboundCategory; |
| | | private Long tankId; |
| | | private String tankNo; |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime inboundTime; |
| | | private String oilProduct; |
| | | private BigDecimal originalQuantity; |
| | | private Long customerId; |
| | | private String customerName; |
| | | private String contactPerson; |
| | | private String contactPhone; |
| | | |
| | | //ç©æµä¿¡æ¯ |
| | | private String driverName; |
| | | private String driverPhone; |
| | | private String escortName; |
| | | private String escortPhone; |
| | | private String truckPlateNo; |
| | | private String trailerPlateNo; |
| | | |
| | | //叿²¹æä½ä¿¡æ¯ |
| | | private String tankInspectionStatus; |
| | | private String unloadingCranePosition; |
| | | private String density; |
| | | // å
¥å为æ°ç»ï¼å表è¿å为JSONå符串 |
| | | private Object unloadPhotos; |
| | | |
| | | //è¿ç£
æ°æ® |
| | | private BigDecimal grossWeight; |
| | | private BigDecimal tareWeight; |
| | | private BigDecimal netWeight; |
| | | private BigDecimal lossQuantity; |
| | | private BigDecimal actualVolume; |
| | | // å
¥å为æ°ç»ï¼å表è¿å为JSONå符串 |
| | | private Object poundPhotos; |
| | | |
| | | |
| | | //å
¥åºç±»å |
| | |
| | | |
| | | @Schema(description = "产åid") |
| | | private Long productId; |
| | | |
| | | //æ²¹ååºåºè®°å½å±ç¤ºå段ï¼è¯¦æ
æ¥å£æäº§åå
³èææ°åºåºè®°å½ï¼ |
| | | private String outCategory; |
| | | private LocalDate outDate; |
| | | private BigDecimal outTonnage; |
| | | private String outCustomerName; |
| | | private String loadingInspectionStatus; |
| | | private String loadingCranePosition; |
| | | private String outDensity; |
| | | private String outDriverName; |
| | | private String outTruckPlateNo; |
| | | private String outOilDepotName; |
| | | private String outTankNo; |
| | | private String outOilProduct; |
| | | private String outContactPerson; |
| | | private String outContactPhone; |
| | | private BigDecimal outGrossWeight; |
| | | private BigDecimal outTareWeight; |
| | | private BigDecimal outNetWeight; |
| | | private BigDecimal outLossQuantity; |
| | | private BigDecimal outActualVolume; |
| | | private String outDriverPhone; |
| | | private String outEscortName; |
| | | private String outEscortPhone; |
| | | private String outTrailerPlateNo; |
| | | // å表è¿å为JSONå符串 |
| | | private Object loadingPhotos; |
| | | private Object outPoundPhotos; |
| | | } |
| | |
| | | package com.ruoyi.stock.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.stock.pojo.StockUninventory; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class StockUninventoryDto extends StockUninventory { |
| | | private String productName; |
| | | private String model; |
| | | private String unit; |
| | | private Long oilDepotId; |
| | | private String oilDepotName; |
| | | private String inboundCategory; |
| | | private Long tankId; |
| | | private String tankNo; |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime inboundTime; |
| | | private String oilProduct; |
| | | private BigDecimal originalQuantity; |
| | | private Long customerId; |
| | | private String customerName; |
| | | private String contactPerson; |
| | | private String contactPhone; |
| | | |
| | | //ç©æµä¿¡æ¯ |
| | | private String driverName; |
| | | private String driverPhone; |
| | | private String escortName; |
| | | private String escortPhone; |
| | | private String truckPlateNo; |
| | | private String trailerPlateNo; |
| | | |
| | | //叿²¹æä½ä¿¡æ¯ |
| | | private String tankInspectionStatus; |
| | | private String unloadingCranePosition; |
| | | private String density; |
| | | // å
¥å为æ°ç»ï¼å表è¿å为JSONå符串 |
| | | private Object unloadPhotos; |
| | | |
| | | //è¿ç£
æ°æ® |
| | | private BigDecimal grossWeight; |
| | | private BigDecimal tareWeight; |
| | | private BigDecimal netWeight; |
| | | private BigDecimal lossQuantity; |
| | | private BigDecimal actualVolume; |
| | | // å
¥å为æ°ç»ï¼å表è¿å为JSONå符串 |
| | | private Object poundPhotos; |
| | | |
| | | |
| | | //å
¥åºç±»å |
| | |
| | | @Schema(description = "é¢è¦æ°é") |
| | | private BigDecimal warnNum; |
| | | |
| | | @Schema(description = "å
¥åºæ²¹åºid") |
| | | private Long oilDepotId; |
| | | |
| | | @Schema(description = "å
¥åºåç§°ï¼æ²¹åºåç§°ï¼") |
| | | private String oilDepotName; |
| | | |
| | | @Schema(description = "å
¥åºç±»å«ï¼èªè´å
¥åº/代å¨å
¥åº") |
| | | private String inboundCategory; |
| | | |
| | | @Schema(description = "å¨ç½id") |
| | | private Long tankId; |
| | | |
| | | @Schema(description = "å¨ç½å·") |
| | | private String tankNo; |
| | | |
| | | @Schema(description = "å
¥åºæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime inboundTime; |
| | | |
| | | @Schema(description = "æ²¹åï¼æ±½#92ãæ±½#95ãæ´#0ãæ´#-35") |
| | | private String oilProduct; |
| | | |
| | | @Schema(description = "ååæ°é(å¨)") |
| | | private BigDecimal originalQuantity; |
| | | |
| | | @Schema(description = "客æ·id") |
| | | private Long customerId; |
| | | |
| | | @Schema(description = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | @Schema(description = "客æ·å¯¹æ¥äºº") |
| | | private String contactPerson; |
| | | |
| | | @Schema(description = "对æ¥äººçµè¯") |
| | | private String contactPhone; |
| | | |
| | | @Schema(description = "叿ºå§å") |
| | | private String driverName; |
| | | |
| | | @Schema(description = "叿ºçµè¯") |
| | | private String driverPhone; |
| | | |
| | | @Schema(description = "æ¼è¿åå§å") |
| | | private String escortName; |
| | | |
| | | @Schema(description = "æ¼è¿åçµè¯") |
| | | private String escortPhone; |
| | | |
| | | @Schema(description = "车çå·") |
| | | private String truckPlateNo; |
| | | |
| | | @Schema(description = "车æçå·") |
| | | private String trailerPlateNo; |
| | | |
| | | @Schema(description = "车ä½/é
å°æ£éªæ¯å¦æ£å¸¸ï¼æ£å¸¸/å¼å¸¸") |
| | | private String tankInspectionStatus; |
| | | |
| | | @Schema(description = "å¸è½¦é¹¤ä½ï¼1#æ¬è£
/2#æ¬è£
/ä¸´æ¶æ³µ") |
| | | private String unloadingCranePosition; |
| | | |
| | | @Schema(description = "å¯åº¦ï¼kg/Lï¼") |
| | | private String density; |
| | | |
| | | @Schema(description = "叿²¹å
³é®ç¯èä¸è½¦è¾å
³é®ä½ç½®æç
§ï¼JSONæ°ç»ï¼") |
| | | private String unloadPhotos; |
| | | |
| | | @Schema(description = "æ¯é(å¨)") |
| | | private BigDecimal grossWeight; |
| | | |
| | | @Schema(description = "ç®é(å¨)") |
| | | private BigDecimal tareWeight; |
| | | |
| | | @Schema(description = "åé(å¨)") |
| | | private BigDecimal netWeight; |
| | | |
| | | @Schema(description = "äºé(å¨)") |
| | | private BigDecimal lossQuantity; |
| | | |
| | | @Schema(description = "å®é
å
¥åºä½ç§¯(å)") |
| | | private BigDecimal actualVolume; |
| | | |
| | | @Schema(description = "ç£
åä¸ä¼ ï¼JSONæ°ç»ï¼") |
| | | private String poundPhotos; |
| | | |
| | | @Schema(description = "ç±»å 0åæ ¼å
¥åº 1ä¸åæ ¼å
¥åº") |
| | | private String type; |
| | | |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | @Schema(description = "å
¥åºç±»å") |
| | | private String recordType; |
| | | |
| | | @Schema(description = "åºåºç±»å«ï¼å®¢å/代å¨/éå®") |
| | | private String outCategory; |
| | | |
| | | @Schema(description = "å¨åºid") |
| | | private Long oilDepotId; |
| | | |
| | | @Schema(description = "å¨åºåç§°") |
| | | private String oilDepotName; |
| | | |
| | | @Schema(description = "å¨ç½id") |
| | | private Long tankId; |
| | | |
| | | @Schema(description = "å¨ç½å·") |
| | | private String tankNo; |
| | | |
| | | @Schema(description = "åºåºæ¥æ") |
| | | private LocalDate outDate; |
| | | |
| | | @Schema(description = "æ²¹å") |
| | | private String oilProduct; |
| | | |
| | | @Schema(description = "åºåºå¨ä½(å¨)") |
| | | private BigDecimal outTonnage; |
| | | |
| | | @Schema(description = "客æ·id") |
| | | private Long customerId; |
| | | |
| | | @Schema(description = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | @Schema(description = "客æ·å¯¹æ¥äºº") |
| | | private String contactPerson; |
| | | |
| | | @Schema(description = "对æ¥äººçµè¯") |
| | | private String contactPhone; |
| | | |
| | | @Schema(description = "车ä½/é
å°æ£éªæ¯å¦æ£å¸¸") |
| | | private String loadingInspectionStatus; |
| | | |
| | | @Schema(description = "è£
车鹤ä½") |
| | | private String loadingCranePosition; |
| | | |
| | | @Schema(description = "è£
æ²¹å
³é®ç¯èä¸è½¦è¾å
³é®ä½ç½®æç
§ï¼JSONæ°ç»ï¼") |
| | | private String loadingPhotos; |
| | | |
| | | @Schema(description = "å¯åº¦ï¼kg/Lï¼") |
| | | private String density; |
| | | |
| | | @Schema(description = "æ¯é(å¨)") |
| | | private BigDecimal grossWeight; |
| | | |
| | | @Schema(description = "ç®é(å¨)") |
| | | private BigDecimal tareWeight; |
| | | |
| | | @Schema(description = "åé(å¨)") |
| | | private BigDecimal netWeight; |
| | | |
| | | @Schema(description = "äºé(å¨)") |
| | | private BigDecimal lossQuantity; |
| | | |
| | | @Schema(description = "å®é
å
¥åºä½ç§¯(å)") |
| | | private BigDecimal actualVolume; |
| | | |
| | | @Schema(description = "ç£
åä¸ä¼ ï¼JSONæ°ç»ï¼") |
| | | private String poundPhotos; |
| | | |
| | | @Schema(description = "叿ºå§å") |
| | | private String driverName; |
| | | |
| | | @Schema(description = "叿ºçµè¯") |
| | | private String driverPhone; |
| | | |
| | | @Schema(description = "æ¼è¿åå§å") |
| | | private String escortName; |
| | | |
| | | @Schema(description = "æ¼è¿åçµè¯") |
| | | private String escortPhone; |
| | | |
| | | @Schema(description = "车çå·") |
| | | private String truckPlateNo; |
| | | |
| | | @Schema(description = "车æçå·") |
| | | private String trailerPlateNo; |
| | | |
| | | @Schema(description = "产åè§æ ¼id") |
| | | private Long productModelId; |
| | | |
| | |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.stock.dto.StockInRecordDto; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.dto.StockOutRecordDto; |
| | | import com.ruoyi.stock.pojo.StockInventory; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | |
| | | Boolean addStockOutRecordOnly(StockInventoryDto stockInventoryDto); |
| | | |
| | | Boolean addOilOutRecordOnly(StockOutRecordDto stockOutRecordDto); |
| | | |
| | | R importStockInventory(MultipartFile file); |
| | | |
| | | void exportStockInventory(HttpServletResponse response, StockInventoryDto stockInventoryDto); |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ruoyi.basic.dto.StorageBlobVO; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | | import com.ruoyi.basic.mapper.OilDepotMapper; |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | | import com.ruoyi.basic.mapper.TankInfoMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.OilDepot; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.basic.pojo.TankInfo; |
| | | import com.ruoyi.basic.utils.FileUtil; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | private final StockUninventoryService stockUninventoryService; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final ProductModelMapper productModelMapper; |
| | | private final OilDepotMapper oilDepotMapper; |
| | | private final TankInfoMapper tankInfoMapper; |
| | | private final CustomerMapper customerMapper; |
| | | private final FileUtil fileUtil; |
| | | |
| | | @Override |
| | | public IPage<StockInventoryDto> pagestockInventory(Page page, StockInventoryDto stockInventoryDto) { |
| | |
| | | stockInRecordDto.setType("0"); |
| | | stockInRecordDto.setRemark(stockInventoryDto.getRemark()); |
| | | stockInRecordDto.setWarnNum(stockInventoryDto.getWarnNum()); |
| | | stockInRecordDto.setOilDepotId(stockInventoryDto.getOilDepotId()); |
| | | stockInRecordDto.setOilDepotName(stockInventoryDto.getOilDepotName()); |
| | | stockInRecordDto.setInboundCategory(stockInventoryDto.getInboundCategory()); |
| | | if (stockInventoryDto.getOilDepotId() != null && StringUtils.isEmpty(stockInRecordDto.getOilDepotName())) { |
| | | OilDepot oilDepot = oilDepotMapper.selectById(stockInventoryDto.getOilDepotId()); |
| | | if (oilDepot != null) { |
| | | stockInRecordDto.setOilDepotName(oilDepot.getDepotName()); |
| | | } |
| | | } |
| | | stockInRecordDto.setTankId(stockInventoryDto.getTankId()); |
| | | stockInRecordDto.setTankNo(stockInventoryDto.getTankNo()); |
| | | if (stockInventoryDto.getTankId() != null && StringUtils.isEmpty(stockInRecordDto.getTankNo())) { |
| | | TankInfo tankInfo = tankInfoMapper.selectById(stockInventoryDto.getTankId()); |
| | | if (tankInfo != null) { |
| | | stockInRecordDto.setTankNo(tankInfo.getTankNo()); |
| | | } |
| | | } |
| | | stockInRecordDto.setInboundTime(stockInventoryDto.getInboundTime()); |
| | | stockInRecordDto.setOilProduct(stockInventoryDto.getOilProduct()); |
| | | stockInRecordDto.setOriginalQuantity(stockInventoryDto.getOriginalQuantity()); |
| | | stockInRecordDto.setCustomerId(stockInventoryDto.getCustomerId()); |
| | | stockInRecordDto.setCustomerName(stockInventoryDto.getCustomerName()); |
| | | stockInRecordDto.setContactPerson(stockInventoryDto.getContactPerson()); |
| | | stockInRecordDto.setContactPhone(stockInventoryDto.getContactPhone()); |
| | | stockInRecordDto.setDriverName(stockInventoryDto.getDriverName()); |
| | | stockInRecordDto.setDriverPhone(stockInventoryDto.getDriverPhone()); |
| | | stockInRecordDto.setEscortName(stockInventoryDto.getEscortName()); |
| | | stockInRecordDto.setEscortPhone(stockInventoryDto.getEscortPhone()); |
| | | stockInRecordDto.setTruckPlateNo(stockInventoryDto.getTruckPlateNo()); |
| | | stockInRecordDto.setTrailerPlateNo(stockInventoryDto.getTrailerPlateNo()); |
| | | stockInRecordDto.setTankInspectionStatus(stockInventoryDto.getTankInspectionStatus()); |
| | | stockInRecordDto.setUnloadingCranePosition(stockInventoryDto.getUnloadingCranePosition()); |
| | | stockInRecordDto.setDensity(stockInventoryDto.getDensity()); |
| | | stockInRecordDto.setUnloadPhotos(stockInventoryDto.getUnloadPhotos() == null |
| | | ? null : JSON.toJSONString(stockInventoryDto.getUnloadPhotos())); |
| | | stockInRecordDto.setGrossWeight(stockInventoryDto.getGrossWeight()); |
| | | stockInRecordDto.setTareWeight(stockInventoryDto.getTareWeight()); |
| | | stockInRecordDto.setNetWeight(stockInventoryDto.getNetWeight()); |
| | | stockInRecordDto.setLossQuantity(stockInventoryDto.getLossQuantity()); |
| | | stockInRecordDto.setActualVolume(stockInventoryDto.getActualVolume()); |
| | | stockInRecordDto.setPoundPhotos(stockInventoryDto.getPoundPhotos() == null |
| | | ? null : JSON.toJSONString(stockInventoryDto.getPoundPhotos())); |
| | | if (stockInventoryDto.getCustomerId() != null && StringUtils.isEmpty(stockInRecordDto.getCustomerName())) { |
| | | Customer customer = customerMapper.selectById(stockInventoryDto.getCustomerId()); |
| | | if (customer != null) { |
| | | stockInRecordDto.setCustomerName(customer.getCustomerName()); |
| | | } |
| | | } |
| | | stockInRecordService.add(stockInRecordDto); |
| | | return true; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public IPage<StockInventoryDto> getBatchNoQty(Page page, StockInventoryDto stockInventoryDto) { |
| | | return stockInventoryMapper.getBatchNoQty(page, stockInventoryDto); |
| | | IPage<StockInventoryDto> result = stockInventoryMapper.getBatchNoQty(page, stockInventoryDto); |
| | | // ç
§çåºéåçæ¯ä¸ä¼ æ¶çç¾åURLï¼é»è®¤2å°æ¶è¿æï¼ï¼è¿ååéæ°ç¾åï¼é¿å
å端å¾çå 载失败 |
| | | for (StockInventoryDto record : result.getRecords()) { |
| | | record.setUnloadPhotos(refreshPhotoUrls(record.getUnloadPhotos())); |
| | | record.setPoundPhotos(refreshPhotoUrls(record.getPoundPhotos())); |
| | | record.setLoadingPhotos(refreshPhotoUrls(record.getLoadingPhotos())); |
| | | record.setOutPoundPhotos(refreshPhotoUrls(record.getOutPoundPhotos())); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean addOilOutRecordOnly(StockOutRecordDto stockOutRecordDto) { |
| | | stockOutRecordDto.setStockOutNum(stockOutRecordDto.getOutTonnage()); |
| | | stockOutRecordDto.setApprovalStatus(0); |
| | | return stockOutRecordService.add(stockOutRecordDto) > 0; |
| | | } |
| | | |
| | | /** |
| | | * éæ°ç¾åç
§çé¢è§/ä¸è½½URL |
| | | */ |
| | | private Object refreshPhotoUrls(Object photos) { |
| | | if (!(photos instanceof String)) { |
| | | return photos; |
| | | } |
| | | String json = (String) photos; |
| | | if (StringUtils.isEmpty(json)) { |
| | | return photos; |
| | | } |
| | | try { |
| | | List<StorageBlobVO> list = JSON.parseArray(json, StorageBlobVO.class); |
| | | if (list == null || list.isEmpty()) { |
| | | return photos; |
| | | } |
| | | for (StorageBlobVO vo : list) { |
| | | String previewUrl = fileUtil.buildSignedUrl(vo, "/preview/", null); |
| | | vo.setPreviewURL(previewUrl); |
| | | vo.setUrl(previewUrl); |
| | | vo.setDownloadURL(fileUtil.buildSignedUrl(vo, "/download/", null)); |
| | | } |
| | | return JSON.toJSONString(list); |
| | | } catch (Exception e) { |
| | | return photos; |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | | import com.ruoyi.basic.mapper.OilDepotMapper; |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | | import com.ruoyi.basic.mapper.TankInfoMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.basic.pojo.OilDepot; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.basic.pojo.TankInfo; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | private final StockInRecordService stockInRecordService; |
| | | private final ProductModelMapper productModelMapper; |
| | | private final StockInventoryMapper stockInventoryMapper; |
| | | private final OilDepotMapper oilDepotMapper; |
| | | private final TankInfoMapper tankInfoMapper; |
| | | private final CustomerMapper customerMapper; |
| | | |
| | | @Override |
| | | public IPage<StockUninventoryDto> pageStockUninventory(Page page, StockUninventoryDto stockUninventoryDto) { |
| | |
| | | stockInRecordDto.setBatchNo(stockUninventoryDto.getBatchNo()); |
| | | stockInRecordDto.setProductModelId(stockUninventoryDto.getProductModelId()); |
| | | stockInRecordDto.setType("1"); |
| | | stockInRecordDto.setOilDepotId(stockUninventoryDto.getOilDepotId()); |
| | | stockInRecordDto.setOilDepotName(stockUninventoryDto.getOilDepotName()); |
| | | stockInRecordDto.setInboundCategory(stockUninventoryDto.getInboundCategory()); |
| | | if (stockUninventoryDto.getOilDepotId() != null && StringUtils.isEmpty(stockInRecordDto.getOilDepotName())) { |
| | | OilDepot oilDepot = oilDepotMapper.selectById(stockUninventoryDto.getOilDepotId()); |
| | | if (oilDepot != null) { |
| | | stockInRecordDto.setOilDepotName(oilDepot.getDepotName()); |
| | | } |
| | | } |
| | | stockInRecordDto.setTankId(stockUninventoryDto.getTankId()); |
| | | stockInRecordDto.setTankNo(stockUninventoryDto.getTankNo()); |
| | | if (stockUninventoryDto.getTankId() != null && StringUtils.isEmpty(stockInRecordDto.getTankNo())) { |
| | | TankInfo tankInfo = tankInfoMapper.selectById(stockUninventoryDto.getTankId()); |
| | | if (tankInfo != null) { |
| | | stockInRecordDto.setTankNo(tankInfo.getTankNo()); |
| | | } |
| | | } |
| | | stockInRecordDto.setInboundTime(stockUninventoryDto.getInboundTime()); |
| | | stockInRecordDto.setOilProduct(stockUninventoryDto.getOilProduct()); |
| | | stockInRecordDto.setOriginalQuantity(stockUninventoryDto.getOriginalQuantity()); |
| | | stockInRecordDto.setCustomerId(stockUninventoryDto.getCustomerId()); |
| | | stockInRecordDto.setCustomerName(stockUninventoryDto.getCustomerName()); |
| | | stockInRecordDto.setContactPerson(stockUninventoryDto.getContactPerson()); |
| | | stockInRecordDto.setContactPhone(stockUninventoryDto.getContactPhone()); |
| | | stockInRecordDto.setDriverName(stockUninventoryDto.getDriverName()); |
| | | stockInRecordDto.setDriverPhone(stockUninventoryDto.getDriverPhone()); |
| | | stockInRecordDto.setEscortName(stockUninventoryDto.getEscortName()); |
| | | stockInRecordDto.setEscortPhone(stockUninventoryDto.getEscortPhone()); |
| | | stockInRecordDto.setTruckPlateNo(stockUninventoryDto.getTruckPlateNo()); |
| | | stockInRecordDto.setTrailerPlateNo(stockUninventoryDto.getTrailerPlateNo()); |
| | | stockInRecordDto.setTankInspectionStatus(stockUninventoryDto.getTankInspectionStatus()); |
| | | stockInRecordDto.setUnloadingCranePosition(stockUninventoryDto.getUnloadingCranePosition()); |
| | | stockInRecordDto.setDensity(stockUninventoryDto.getDensity()); |
| | | stockInRecordDto.setUnloadPhotos(stockUninventoryDto.getUnloadPhotos() == null |
| | | ? null : JSON.toJSONString(stockUninventoryDto.getUnloadPhotos())); |
| | | stockInRecordDto.setGrossWeight(stockUninventoryDto.getGrossWeight()); |
| | | stockInRecordDto.setTareWeight(stockUninventoryDto.getTareWeight()); |
| | | stockInRecordDto.setNetWeight(stockUninventoryDto.getNetWeight()); |
| | | stockInRecordDto.setLossQuantity(stockUninventoryDto.getLossQuantity()); |
| | | stockInRecordDto.setActualVolume(stockUninventoryDto.getActualVolume()); |
| | | stockInRecordDto.setPoundPhotos(stockUninventoryDto.getPoundPhotos() == null |
| | | ? null : JSON.toJSONString(stockUninventoryDto.getPoundPhotos())); |
| | | if (stockUninventoryDto.getCustomerId() != null && StringUtils.isEmpty(stockInRecordDto.getCustomerName())) { |
| | | Customer customer = customerMapper.selectById(stockUninventoryDto.getCustomerId()); |
| | | if (customer != null) { |
| | | stockInRecordDto.setCustomerName(customer.getCustomerName()); |
| | | } |
| | | } |
| | | stockInRecordService.add(stockInRecordDto); |
| | | //审æ¹åæ·»å |
| | | return 1; |
| | |
| | | stockInRecordDto.setProductModelId(stockUninventoryDto.getProductModelId()); |
| | | stockInRecordDto.setType("1"); |
| | | stockInRecordDto.setRemark(stockUninventoryDto.getRemark()); |
| | | stockInRecordDto.setOilDepotId(stockUninventoryDto.getOilDepotId()); |
| | | stockInRecordDto.setOilDepotName(stockUninventoryDto.getOilDepotName()); |
| | | stockInRecordDto.setInboundCategory(stockUninventoryDto.getInboundCategory()); |
| | | if (stockUninventoryDto.getOilDepotId() != null && StringUtils.isEmpty(stockInRecordDto.getOilDepotName())) { |
| | | OilDepot oilDepot = oilDepotMapper.selectById(stockUninventoryDto.getOilDepotId()); |
| | | if (oilDepot != null) { |
| | | stockInRecordDto.setOilDepotName(oilDepot.getDepotName()); |
| | | } |
| | | } |
| | | stockInRecordDto.setTankId(stockUninventoryDto.getTankId()); |
| | | stockInRecordDto.setTankNo(stockUninventoryDto.getTankNo()); |
| | | if (stockUninventoryDto.getTankId() != null && StringUtils.isEmpty(stockInRecordDto.getTankNo())) { |
| | | TankInfo tankInfo = tankInfoMapper.selectById(stockUninventoryDto.getTankId()); |
| | | if (tankInfo != null) { |
| | | stockInRecordDto.setTankNo(tankInfo.getTankNo()); |
| | | } |
| | | } |
| | | stockInRecordDto.setInboundTime(stockUninventoryDto.getInboundTime()); |
| | | stockInRecordDto.setOilProduct(stockUninventoryDto.getOilProduct()); |
| | | stockInRecordDto.setOriginalQuantity(stockUninventoryDto.getOriginalQuantity()); |
| | | stockInRecordDto.setCustomerId(stockUninventoryDto.getCustomerId()); |
| | | stockInRecordDto.setCustomerName(stockUninventoryDto.getCustomerName()); |
| | | stockInRecordDto.setContactPerson(stockUninventoryDto.getContactPerson()); |
| | | stockInRecordDto.setContactPhone(stockUninventoryDto.getContactPhone()); |
| | | stockInRecordDto.setDriverName(stockUninventoryDto.getDriverName()); |
| | | stockInRecordDto.setDriverPhone(stockUninventoryDto.getDriverPhone()); |
| | | stockInRecordDto.setEscortName(stockUninventoryDto.getEscortName()); |
| | | stockInRecordDto.setEscortPhone(stockUninventoryDto.getEscortPhone()); |
| | | stockInRecordDto.setTruckPlateNo(stockUninventoryDto.getTruckPlateNo()); |
| | | stockInRecordDto.setTrailerPlateNo(stockUninventoryDto.getTrailerPlateNo()); |
| | | stockInRecordDto.setTankInspectionStatus(stockUninventoryDto.getTankInspectionStatus()); |
| | | stockInRecordDto.setUnloadingCranePosition(stockUninventoryDto.getUnloadingCranePosition()); |
| | | stockInRecordDto.setDensity(stockUninventoryDto.getDensity()); |
| | | stockInRecordDto.setUnloadPhotos(stockUninventoryDto.getUnloadPhotos() == null |
| | | ? null : JSON.toJSONString(stockUninventoryDto.getUnloadPhotos())); |
| | | stockInRecordDto.setGrossWeight(stockUninventoryDto.getGrossWeight()); |
| | | stockInRecordDto.setTareWeight(stockUninventoryDto.getTareWeight()); |
| | | stockInRecordDto.setNetWeight(stockUninventoryDto.getNetWeight()); |
| | | stockInRecordDto.setLossQuantity(stockUninventoryDto.getLossQuantity()); |
| | | stockInRecordDto.setActualVolume(stockUninventoryDto.getActualVolume()); |
| | | stockInRecordDto.setPoundPhotos(stockUninventoryDto.getPoundPhotos() == null |
| | | ? null : JSON.toJSONString(stockUninventoryDto.getPoundPhotos())); |
| | | if (stockUninventoryDto.getCustomerId() != null && StringUtils.isEmpty(stockInRecordDto.getCustomerName())) { |
| | | Customer customer = customerMapper.selectById(stockUninventoryDto.getCustomerId()); |
| | | if (customer != null) { |
| | | stockInRecordDto.setCustomerName(customer.getCustomerName()); |
| | | } |
| | | } |
| | | stockInRecordService.add(stockInRecordDto); |
| | | return 1; |
| | | } |
| | |
| | | pl.approval_status, |
| | | pl.payment_method, |
| | | pl.remarks, |
| | | pl.purchase_category, |
| | | pl.pickup_method, |
| | | pl.purchase_oil_product, |
| | | pl.logistics_method, |
| | | pl.oil_depot_name, |
| | | pl.customer_name, |
| | | pl.best_arrival_date, |
| | | pl.purchase_quantity, |
| | | pl.purchase_order_status, |
| | | pl.application_submit_time, |
| | | CASE |
| | | WHEN IFNULL(ls.total_product_count, 0) = 0 THEN 'å¾
å
¥åº' |
| | | WHEN IFNULL(ls.full_product_count, 0) >= IFNULL(ls.total_product_count, 0) THEN 'å®å
¨å
¥åº' |
| | |
| | | unit, |
| | | product_name, |
| | | product_id, |
| | | 'combined' as stockType |
| | | 'combined' as stockType, |
| | | ( |
| | | select sir.oil_product |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as oil_product, |
| | | ( |
| | | select sir.tank_inspection_status |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as tank_inspection_status, |
| | | ( |
| | | select sir.unloading_crane_position |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as unloading_crane_position, |
| | | ( |
| | | select sir.density |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as density, |
| | | ( |
| | | select sir.unload_photos |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as unload_photos, |
| | | ( |
| | | select sir.gross_weight |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as gross_weight, |
| | | ( |
| | | select sir.tare_weight |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as tare_weight, |
| | | ( |
| | | select sir.net_weight |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as net_weight, |
| | | ( |
| | | select sir.loss_quantity |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as loss_quantity, |
| | | ( |
| | | select sir.actual_volume |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as actual_volume, |
| | | ( |
| | | select sir.pound_photos |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as pound_photos |
| | | from ( |
| | | select |
| | | si.batch_no, |
| | |
| | | unit, |
| | | product_name, |
| | | product_id |
| | | order by combined.create_time desc |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData"> |
| | |
| | | MAX(version) as version, |
| | | MAX(remark) as remark, |
| | | |
| | | 'combined' as stockType |
| | | 'combined' as stockType, |
| | | ( |
| | | select sir.oil_product |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as oil_product, |
| | | ( |
| | | select sir.tank_inspection_status |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as tank_inspection_status, |
| | | ( |
| | | select sir.unloading_crane_position |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as unloading_crane_position, |
| | | ( |
| | | select sir.density |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as density, |
| | | ( |
| | | select sir.unload_photos |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as unload_photos, |
| | | ( |
| | | select sir.gross_weight |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as gross_weight, |
| | | ( |
| | | select sir.tare_weight |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as tare_weight, |
| | | ( |
| | | select sir.net_weight |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as net_weight, |
| | | ( |
| | | select sir.loss_quantity |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as loss_quantity, |
| | | ( |
| | | select sir.actual_volume |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as actual_volume, |
| | | ( |
| | | select sir.pound_photos |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as pound_photos, |
| | | ( |
| | | select sor.out_category |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_category, |
| | | ( |
| | | select sor.out_date |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_date, |
| | | ( |
| | | select sor.out_tonnage |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_tonnage, |
| | | ( |
| | | select sor.customer_name |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_customer_name, |
| | | ( |
| | | select sor.loading_inspection_status |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as loading_inspection_status, |
| | | ( |
| | | select sor.loading_crane_position |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as loading_crane_position, |
| | | ( |
| | | select sor.density |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_density, |
| | | ( |
| | | select sor.driver_name |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_driver_name, |
| | | ( |
| | | select sor.truck_plate_no |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_truck_plate_no, |
| | | ( |
| | | select sor.loading_photos |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as loading_photos, |
| | | ( |
| | | select sor.pound_photos |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_pound_photos, |
| | | ( |
| | | select sor.oil_depot_name |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_oil_depot_name, |
| | | ( |
| | | select sor.tank_no |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_tank_no, |
| | | ( |
| | | select sor.oil_product |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_oil_product, |
| | | ( |
| | | select sor.contact_person |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_contact_person, |
| | | ( |
| | | select sor.contact_phone |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_contact_phone, |
| | | ( |
| | | select sor.gross_weight |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_gross_weight, |
| | | ( |
| | | select sor.tare_weight |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_tare_weight, |
| | | ( |
| | | select sor.net_weight |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_net_weight, |
| | | ( |
| | | select sor.loss_quantity |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_loss_quantity, |
| | | ( |
| | | select sor.actual_volume |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_actual_volume, |
| | | ( |
| | | select sor.driver_phone |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_driver_phone, |
| | | ( |
| | | select sor.escort_name |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_escort_name, |
| | | ( |
| | | select sor.escort_phone |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_escort_phone, |
| | | ( |
| | | select sor.trailer_plate_no |
| | | from stock_out_record sor |
| | | where sor.product_model_id = combined.product_model_id |
| | | order by sor.id desc |
| | | limit 1 |
| | | ) as out_trailer_plate_no, |
| | | ( |
| | | select sir.oil_depot_name |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as oil_depot_name, |
| | | ( |
| | | select sir.inbound_category |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as inbound_category, |
| | | ( |
| | | select sir.tank_no |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as tank_no, |
| | | ( |
| | | select sir.inbound_time |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as inbound_time, |
| | | ( |
| | | select sir.original_quantity |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as original_quantity, |
| | | ( |
| | | select sir.customer_name |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as customer_name, |
| | | ( |
| | | select sir.contact_person |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as contact_person, |
| | | ( |
| | | select sir.contact_phone |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as contact_phone, |
| | | ( |
| | | select sir.driver_name |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as driver_name, |
| | | ( |
| | | select sir.driver_phone |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as driver_phone, |
| | | ( |
| | | select sir.escort_name |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as escort_name, |
| | | ( |
| | | select sir.escort_phone |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as escort_phone, |
| | | ( |
| | | select sir.truck_plate_no |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as truck_plate_no, |
| | | ( |
| | | select sir.trailer_plate_no |
| | | from stock_in_record sir |
| | | where sir.product_model_id = combined.product_model_id |
| | | and (sir.batch_no = combined.batch_no or (combined.batch_no is null and sir.batch_no is null)) |
| | | order by sir.id desc |
| | | limit 1 |
| | | ) as trailer_plate_no |
| | | from ( |
| | | select |
| | | si.batch_no, |