已添加76个文件
已修改28个文件
已删除13个文件
| | |
| | | CREATE TABLE `prod_demand_main` |
| | | DROP TABLE IF EXISTS `production_plan`; |
| | | |
| | | CREATE TABLE production_plan |
| | | ( |
| | | `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'èªå¢ä¸»é®', |
| | | `tenant_id` bigint(20) NOT NULL COMMENT 'ç§æ·ç¼å·', |
| | | `dept_id` bigint(20) DEFAULT NULL COMMENT 'é¨é¨ID (ç¨äºæ°æ®æéé离)', |
| | | `form_instance_id` varchar(64) NOT NULL COMMENT '表åå®ä¾å¯ä¸ID (å
³èå表ç¨)', |
| | | `serial_no` varchar(64) DEFAULT NULL COMMENT 'åæ®æµæ°´å· (serialNo)', |
| | | `title` varchar(128) DEFAULT NULL COMMENT 'åæ®æ é¢ (title)', |
| | | `originator_user_id` varchar(64) DEFAULT NULL COMMENT 'ç¬¬ä¸æ¹å起人ID (creatorUserId)', |
| | | `originator_name` varchar(64) DEFAULT NULL COMMENT 'ç¬¬ä¸æ¹å起人å§å (originator.userName)', |
| | | `biz_create_time` datetime DEFAULT NULL COMMENT 'ç¬¬ä¸æ¹åæ®å建æ¶é´ (createdTimeGMT)', |
| | | `project_name` varchar(128) DEFAULT NULL COMMENT '项ç®åç§°/å®¢æ· (textField_lbkozohg)', |
| | | `batch_no` varchar(128) DEFAULT NULL COMMENT 'æ¹æ¬¡/å
³èç¼å· (textField_l7fytfco)', |
| | | `contact_person` varchar(128) DEFAULT NULL COMMENT 'è系人/夿³¨ (textareaField_l7fytfcy)', |
| | | `ext_text1` varchar(128) DEFAULT NULL COMMENT 'é¢çææ¬1 (textField_l7fytfcx)', |
| | | `ext_text2` varchar(128) DEFAULT NULL COMMENT 'é¢çææ¬2 (textField_lbknlltp)', |
| | | `create_user` bigint(20) DEFAULT NULL COMMENT 'å建è
', |
| | | `create_time` datetime DEFAULT NULL COMMENT 'å建æ¶é´', |
| | | `update_user` bigint(20) DEFAULT NULL COMMENT 'æ´æ°è
', |
| | | `update_time` datetime DEFAULT NULL COMMENT 'æ´æ°æ¶é´', |
| | | `remark` varchar(500) DEFAULT NULL COMMENT '夿³¨', |
| | | id BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '主é®', |
| | | form_instance_id VARCHAR(64) COMMENT '表åå®ä¾ID', |
| | | serial_no VARCHAR(50) COMMENT 'æµæ°´å·', |
| | | apply_no VARCHAR(100) COMMENT 'ç³è¯·åç¼å·', |
| | | customer_name VARCHAR(200) COMMENT '客æ·åç§°', |
| | | material_code VARCHAR(100) COMMENT 'ç©æç¼ç ', |
| | | product_name VARCHAR(200) COMMENT '产ååç§°', |
| | | product_spec VARCHAR(200) COMMENT '产åè§æ ¼', |
| | | length INT COMMENT 'é¿', |
| | | width INT COMMENT '宽', |
| | | height INT COMMENT 'é«', |
| | | quantity INT COMMENT 'åæ°', |
| | | total_count INT COMMENT 'æ¤æ¬¡ç»è®¡æ°é', |
| | | volume DECIMAL(10, 4) COMMENT 'æ¹æ°', |
| | | strength VARCHAR(50) COMMENT '强度', |
| | | start_date DATETIME COMMENT 'å¼å§æ¥æ', |
| | | end_date DATETIME COMMENT 'ç»ææ¥æ', |
| | | submitter VARCHAR(100) COMMENT 'æäº¤äºº', |
| | | submit_org VARCHAR(200) COMMENT 'æäº¤äººç»ç»', |
| | | remark_one TEXT COMMENT '夿³¨1', |
| | | remark_two TEXT COMMENT '夿³¨2', |
| | | creator_name VARCHAR(100) COMMENT 'å建人', |
| | | modifier_name VARCHAR(100) COMMENT 'ä¿®æ¹äºº', |
| | | form_created_time DATETIME COMMENT '表åå建æ¶é´', |
| | | form_modified_time DATETIME COMMENT '表åä¿®æ¹æ¶é´', |
| | | data_sync_type TINYINT DEFAULT 1 COMMENT 'æ°æ®åæ¥ç±»åï¼1=æå¨ 2=宿¶ä»»å¡', |
| | | data_source_type TINYINT DEFAULT 1 COMMENT 'æ°æ®æ¥æºç±»åï¼1=éå®è®¢å 2=éå®é¢æµ', |
| | | create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT 'æ°æ®åºå建æ¶é´', |
| | | update_time DATETIME COMMENT 'æ°æ®åºæ´æ°æ¶é´', |
| | | |
| | | PRIMARY KEY (`id`), |
| | | UNIQUE KEY `uk_form_instance_id` (`form_instance_id`) |
| | | INDEX idx_apply_no (apply_no), |
| | | INDEX idx_serial_no (serial_no), |
| | | INDEX idx_form_instance_id (form_instance_id), |
| | | INDEX idx_material_code (material_code) |
| | | ) ENGINE = InnoDB |
| | | DEFAULT CHARSET = utf8mb4 COMMENT ='éå®çäº§éæ±'; |
| | | DEFAULT CHARSET = utf8mb4 COMMENT ='éå®ç产计å'; |
| | | |
| | | CREATE TABLE `prod_demand_detail` |
| | | ( |
| | | `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'èªå¢ä¸»é®', |
| | | `tenant_id` bigint(20) NOT NULL COMMENT 'ç§æ·ç¼å·', |
| | | `prod_demand_main_id` bigint(20) NOT NULL COMMENT 'ç¶ç±»å
³èID', |
| | | `material_code` varchar(64) DEFAULT NULL COMMENT 'ç©æç¼ç (textField_l9xo62q5)', |
| | | `material_category` varchar(64) DEFAULT NULL COMMENT 'ç©æåç±» (textField_l9xo62q7)', |
| | | `spec_desc` varchar(128) DEFAULT NULL COMMENT 'è§æ ¼æè¿° (textField_l9xo62q8)', |
| | | `grade_type` varchar(32) DEFAULT NULL COMMENT 'ç级/ç±»å (radioField_m9urarr2)', |
| | | `length` decimal(10, 2) DEFAULT NULL COMMENT 'é¿åº¦ (numberField_lb7lgatg)', |
| | | `width` decimal(10, 2) DEFAULT NULL COMMENT '宽度 (numberField_lb7lgath)', |
| | | `thickness` decimal(10, 2) DEFAULT NULL COMMENT 'å度 (numberField_lb7lgati)', |
| | | `quantity` int(11) DEFAULT NULL COMMENT 'æ°é (numberField_lb7lgatj)', |
| | | `volume` decimal(10, 4) DEFAULT NULL COMMENT 'æ»ä½ç§¯ (numberField_l7fytfd3)', |
| | | `date_range` varchar(255) DEFAULT NULL COMMENT 'æ¶é´åºé´æ°ç»å符串 (cascadeDateField_lfxqqluw)', |
| | | `association_receipt` text DEFAULT NULL COMMENT 'å
³èçå
¶ä»åæ® (associationFormField_l9xo62q6_id)', |
| | | `create_user` bigint(20) DEFAULT NULL COMMENT 'å建è
', |
| | | `create_time` datetime DEFAULT NULL COMMENT 'å建æ¶é´', |
| | | `update_user` bigint(20) DEFAULT NULL COMMENT 'æ´æ°è
', |
| | | `update_time` datetime DEFAULT NULL COMMENT 'æ´æ°æ¶é´', |
| | | `remark` varchar(500) DEFAULT NULL COMMENT '夿³¨', |
| | | CREATE TABLE `product-inventory-management-zsjc`.`energy` ( |
| | | `id` int NOT NULL AUTO_INCREMENT, |
| | | `energy_tyep` varchar(255) NULL COMMENT 'è½æºç±»å', |
| | | `energy_name` varchar(255) NULL COMMENT 'è½æºåç§°', |
| | | `unit` varchar(255) NULL COMMENT 'åä½', |
| | | `unit_price` decimal(10, 2) NULL COMMENT 'åä»·', |
| | | `remark` varchar(255) NULL COMMENT '夿³¨', |
| | | `create_time` datetime(0) NULL DEFAULT NULL COMMENT 'å建æ¶é´', |
| | | `update_time` datetime(0) NULL DEFAULT NULL COMMENT 'æ´æ°æ¶é´', |
| | | `create_user` bigint NULL DEFAULT NULL COMMENT 'å建è
', |
| | | `update_user` bigint NULL DEFAULT NULL COMMENT 'æ´æ°è
', |
| | | PRIMARY KEY (`id`) |
| | | ) COMMENT = 'è½æºç±»å'; |
| | | |
| | | PRIMARY KEY (`id`), |
| | | KEY `idx_prod_demand_main_id` (`prod_demand_main_id`) |
| | | ) ENGINE = InnoDB |
| | | DEFAULT CHARSET = utf8mb4 COMMENT ='éå®çäº§éæ±_æç»è¡¨'; |
| | | CREATE TABLE `product-inventory-management-zsjc`.`energy_consumption_detail` ( |
| | | `id` int NOT NULL AUTO_INCREMENT, |
| | | `energy_id` int NULL COMMENT '夿£å
³èè½æºç±»åid', |
| | | `type` varchar(255) NULL COMMENT 'åå
¬/ç产', |
| | | `meter_reading_location` varchar(255) NULL COMMENT 'æè¡¨ä½ç½®', |
| | | `meter_reading_date` date NULL COMMENT 'æè¡¨æ¥æ', |
| | | `start_code` decimal(10, 2) NULL COMMENT 'èµ·ç ', |
| | | `stop_code` decimal(10, 2) NULL COMMENT 'æ¢ç ', |
| | | `dosage` decimal(10, 2) NULL COMMENT 'ç¨é', |
| | | `remark` varchar(255) NULL COMMENT '夿³¨', |
| | | `create_time` datetime(0) NULL DEFAULT NULL COMMENT 'å建æ¶é´', |
| | | `update_time` datetime(0) NULL DEFAULT NULL COMMENT 'æ´æ°æ¶é´', |
| | | `create_user` bigint NULL DEFAULT NULL COMMENT 'å建è
', |
| | | `update_user` bigint NULL DEFAULT NULL COMMENT 'æ´æ°è
', |
| | | PRIMARY KEY (`id`) |
| | | ) COMMENT = 'è½æºç±»å-è½èæè¡¨æç»'; |
| | | |
| | | CREATE TABLE `product-inventory-management-zsjc`.`energy_consumption_detail_file` ( |
| | | `id` int NOT NULL AUTO_INCREMENT, |
| | | `energy_consumption_detail_id` int NULL COMMENT 'å
³èå¤é®è½èæè¡¨id', |
| | | `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, |
| | | `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, |
| | | `file_size` double NULL DEFAULT NULL, |
| | | `create_time` timestamp(0) NULL DEFAULT NULL, |
| | | `create_user` int NULL DEFAULT NULL, |
| | | `update_time` timestamp(0) NULL DEFAULT NULL, |
| | | `update_user` int NULL DEFAULT NULL, |
| | | PRIMARY KEY (`id`) |
| | | ) COMMENT = 'è½æºç±»å-è½èæè¡¨æç»_éä»¶'; |
| | |
| | | <artifactId>hutool-all</artifactId>
|
| | | <version>5.8.43</version>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>com.fasterxml.jackson.datatype</groupId>
|
| | | <artifactId>jackson-datatype-jsr310</artifactId>
|
| | | </dependency>
|
| | |
|
| | | </dependencies>
|
| | |
|
| | |
| | | // æ¼ç¤ºä¾åï¼æ§è¡ main æ¹æ³æ§å¶å°è¾å
¥æ¨¡å表åå车èªå¨çæå¯¹åºé¡¹ç®ç®å½ä¸ |
| | | public class CodeGenerator { |
| | | |
| | | public static String database_url = "jdbc:mysql://1.15.17.182:9999/product-inventory-management-new"; |
| | | public static String database_url = "jdbc:mysql://1.15.17.182:9999/product-inventory-management-zsjc"; |
| | | public static String database_username = "root"; |
| | | public static String database_password= "xd@123456.."; |
| | | public static String author = "è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸"; |
| | | public static String model = "staff"; // 模å |
| | | public static String model = "energy"; // 模å |
| | | public static String setParent = "com.ruoyi."+ model; // å
è·¯å¾ |
| | | public static String tablePrefix = ""; // è®¾ç½®è¿æ»¤è¡¨åç¼ |
| | | public static void main(String[] args) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.account.dto.SalesReceiptReturnDto; |
| | | import com.ruoyi.account.pojo.SalesReceiptReturn; |
| | | import com.ruoyi.account.service.SalesReceiptReturnService; |
| | | import com.ruoyi.account.service.impl.SalesReceiptReturnServiceImpl; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ¶æ¬¾é货表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 03:34:18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/salesReceiptReturn") |
| | | public class SalesReceiptReturnController { |
| | | |
| | | @Autowired |
| | | private SalesReceiptReturnService salesReceiptReturnService; |
| | | |
| | | |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation("æ¶æ¬¾é货表-å页æ¥è¯¢") |
| | | public R<IPage<SalesReceiptReturnDto>> page(SalesReceiptReturnDto salesReceiptReturnDto) { |
| | | return R.ok(salesReceiptReturnService.pageSalesReceiptReturnDto(salesReceiptReturnDto)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.dto.SalesRefundAmountOrderDto; |
| | | import com.ruoyi.account.pojo.SalesRefundAmountOrder; |
| | | import com.ruoyi.account.service.SalesRefundAmountOrderService; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * éå®ç®¡ç--鿬¾å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-07 10:16:47 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/salesRefundAmountOrder") |
| | | public class SalesRefundAmountOrderController { |
| | | |
| | | @Autowired |
| | | private SalesRefundAmountOrderService salesRefundAmountOrderService; |
| | | |
| | | @GetMapping("/page") |
| | | public R pageSalesRefundAmountOrderDto(Page<SalesRefundAmountOrderDto> page, SalesRefundAmountOrderDto salesRefundAmountOrder) { |
| | | return R.ok(salesRefundAmountOrderService.pageSalesRefundAmountOrderDto(page, salesRefundAmountOrder)); |
| | | } |
| | | |
| | | @ApiOperation("å¤ç") |
| | | @PostMapping("/dispose") |
| | | public R dispose( SalesRefundAmountOrderDto salesRefundAmountOrderId) { |
| | | return R.ok(salesRefundAmountOrderService.dispose(salesRefundAmountOrderId)); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.dto; |
| | | |
| | | import com.ruoyi.account.pojo.SalesReceiptReturn; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SalesReceiptReturnDto extends SalesReceiptReturn { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.dto; |
| | | |
| | | import com.ruoyi.account.pojo.SalesRefundAmountOrder; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SalesRefundAmountOrderDto extends SalesRefundAmountOrder { |
| | | |
| | | @ApiModelProperty("éè´§åå·") |
| | | private String returnManagementNo; |
| | | |
| | | @ApiModelProperty("客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty("éå®åå·") |
| | | private String salesContractNo; |
| | | |
| | | @ApiModelProperty("å建人åç§°") |
| | | private String createUserName; |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.mapper; |
| | | |
| | | import com.ruoyi.account.pojo.SalesReceiptReturn; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ¶æ¬¾é货表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 03:34:18 |
| | | */ |
| | | @Mapper |
| | | public interface SalesReceiptReturnMapper extends BaseMapper<SalesReceiptReturn> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.dto.SalesRefundAmountOrderDto; |
| | | import com.ruoyi.account.pojo.SalesRefundAmountOrder; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * éå®ç®¡ç--鿬¾å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-07 10:16:47 |
| | | */ |
| | | @Mapper |
| | | public interface SalesRefundAmountOrderMapper extends BaseMapper<SalesRefundAmountOrder> { |
| | | |
| | | IPage<SalesRefundAmountOrderDto> pageSalesRefundAmountOrderDto(Page<SalesRefundAmountOrderDto> page,@Param("ew") SalesRefundAmountOrderDto salesRefundAmountOrder); |
| | | } |
| | |
| | | private Long businessId; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»å 1-仿¬¾ 2-è¿æ¬¾ |
| | | * ä¸å¡ç±»å 1-仿¬¾ 2-è¿æ¬¾ 3-èªèµåæ¾ |
| | | */ |
| | | private Integer businessType; |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.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 java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ¶æ¬¾é货表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 03:34:18 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("sales_receipt_return") |
| | | @ApiModel(value = "SalesReceiptReturn对象", description = "æ¶æ¬¾é货表") |
| | | public class SalesReceiptReturn implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("ä¸»é® ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("鿬¾åå·") |
| | | private String refundId; |
| | | |
| | | @ApiModelProperty("仿¬¾è´¦å·") |
| | | private String paymentAccount; |
| | | |
| | | @ApiModelProperty("仿¬¾è´¦å·åç§°") |
| | | private String paymentAccountName; |
| | | |
| | | @ApiModelProperty("仿¬¾æ¹å¼") |
| | | private Byte paymentMethod; |
| | | |
| | | @ApiModelProperty("å®é
仿¬¾éé¢") |
| | | private BigDecimal actualAmount; |
| | | |
| | | @ApiModelProperty("æç»è´¹") |
| | | private BigDecimal fee; |
| | | |
| | | @ApiModelProperty("交æå·") |
| | | private String transactionNo; |
| | | |
| | | @ApiModelProperty("伿 éé¢") |
| | | private BigDecimal discountAmount; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建è
") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.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 java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * éå®ç®¡ç--鿬¾å |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-07 10:16:47 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("sales_refund_amount_order") |
| | | @ApiModel(value = "SalesRefundAmountOrder对象", description = "éå®ç®¡ç--鿬¾å") |
| | | public class SalesRefundAmountOrder implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("éè´§åå·id") |
| | | private Long returnManagementId; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("åºé款éé¢") |
| | | private BigDecimal refundAmount; |
| | | |
| | | @ApiModelProperty("已鿬¾éé¢") |
| | | private BigDecimal refundedAmount; |
| | | |
| | | @ApiModelProperty("æªé款éé¢") |
| | | private BigDecimal notRefundedAmount; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | private Long createUserId; |
| | | |
| | | @ApiModelProperty("æ´æ°äººid") |
| | | private Long updateUserId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.account.dto.SalesReceiptReturnDto; |
| | | import com.ruoyi.account.pojo.SalesReceiptReturn; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ¶æ¬¾é货表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 03:34:18 |
| | | */ |
| | | public interface SalesReceiptReturnService extends IService<SalesReceiptReturn> { |
| | | |
| | | IPage<SalesReceiptReturnDto> pageSalesReceiptReturnDto(SalesReceiptReturnDto salesReceiptReturnDto); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.dto.SalesRefundAmountOrderDto; |
| | | import com.ruoyi.account.pojo.SalesRefundAmountOrder; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * éå®ç®¡ç--鿬¾å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-07 10:16:47 |
| | | */ |
| | | public interface SalesRefundAmountOrderService extends IService<SalesRefundAmountOrder> { |
| | | |
| | | IPage<SalesRefundAmountOrderDto> pageSalesRefundAmountOrderDto(Page<SalesRefundAmountOrderDto> page, SalesRefundAmountOrderDto salesRefundAmountOrder); |
| | | |
| | | Boolean addSalesRefundAmountOrderDto(SalesRefundAmountOrderDto salesRefundAmountOrder); |
| | | |
| | | |
| | | Boolean dispose(SalesRefundAmountOrderDto salesRefundAmountOrder); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.account.dto.SalesReceiptReturnDto; |
| | | import com.ruoyi.account.pojo.SalesReceiptReturn; |
| | | import com.ruoyi.account.mapper.SalesReceiptReturnMapper; |
| | | import com.ruoyi.account.service.SalesReceiptReturnService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ¶æ¬¾é货表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 03:34:18 |
| | | */ |
| | | @Service |
| | | public class SalesReceiptReturnServiceImpl extends ServiceImpl<SalesReceiptReturnMapper, SalesReceiptReturn> implements SalesReceiptReturnService { |
| | | |
| | | @Override |
| | | public IPage<SalesReceiptReturnDto> pageSalesReceiptReturnDto(SalesReceiptReturnDto salesReceiptReturnDto) { |
| | | |
| | | return null; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.dto.SalesRefundAmountOrderDto; |
| | | import com.ruoyi.account.pojo.SalesRefundAmountOrder; |
| | | import com.ruoyi.account.mapper.SalesRefundAmountOrderMapper; |
| | | import com.ruoyi.account.service.SalesRefundAmountOrderService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * éå®ç®¡ç--鿬¾å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-07 10:16:47 |
| | | */ |
| | | @Service |
| | | public class SalesRefundAmountOrderServiceImpl extends ServiceImpl<SalesRefundAmountOrderMapper, SalesRefundAmountOrder> implements SalesRefundAmountOrderService { |
| | | |
| | | |
| | | @Autowired |
| | | private SalesRefundAmountOrderMapper salesRefundAmountOrderMapper; |
| | | |
| | | @Override |
| | | public IPage<SalesRefundAmountOrderDto> pageSalesRefundAmountOrderDto(Page<SalesRefundAmountOrderDto> page, SalesRefundAmountOrderDto salesRefundAmountOrder) { |
| | | return salesRefundAmountOrderMapper.pageSalesRefundAmountOrderDto(page, salesRefundAmountOrder); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean addSalesRefundAmountOrderDto(SalesRefundAmountOrderDto salesRefundAmountOrder) { |
| | | return this.save(salesRefundAmountOrder); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean dispose(SalesRefundAmountOrderDto salesRefundAmountOrder) { |
| | | |
| | | return null; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.basic.service.CustomerFollowUpService; |
| | | import com.ruoyi.common.vo.SimpleFileVo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | |
| | | @RequiredArgsConstructor |
| | | public class CustomerFollowUpFileServiceImpl extends ServiceImpl<CustomerFollowUpFileMapper, CustomerFollowUpFile> implements CustomerFollowUpFileService { |
| | | |
| | | private final CustomerFollowUpService customerFollowUpService; |
| | | @Autowired |
| | | @Lazy |
| | | private CustomerFollowUpService customerFollowUpService; |
| | | |
| | | |
| | | @Override |
| | |
| | | if (StrUtil.isNotBlank(attachmentIds)) { |
| | | List<SimpleFileVo> fileVos = Arrays.stream(attachmentIds.split(",")) |
| | | .map(Long::valueOf) |
| | | .map(it->collectMap.getOrDefault(it, (SimpleFileVo) Collections.emptyList())) |
| | | .map(it->collectMap.getOrDefault(it, null)) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | setAttachmentList.accept(t, fileVos); |
| | | } |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Optional; |
| | | |
| | | @Component |
| | | public class MybatisHandler implements MetaObjectHandler { |
| | |
| | | this.strictInsertFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now()); |
| | | this.strictInsertFill(metaObject, "createUser", Integer.class, userId); |
| | | this.strictInsertFill(metaObject, "updateUser", Integer.class, userId); |
| | | this.strictInsertFill(metaObject, "createUser", Long.class, userId == null ? 0 : userId.longValue()); |
| | | this.strictInsertFill(metaObject, "updateUser", Long.class, userId == null ? 0 : userId.longValue()); |
| | | this.strictInsertFill(metaObject, "tenantId", Long.class, tenantId); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.enums; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonCreator; |
| | | import lombok.Getter; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Getter |
| | | public enum PlanStageEnum implements BaseEnum<Integer>, Serializable { |
| | | TO_BEGIN(1, "å¾
å¼å§"), |
| | | ON_GOING(2, "è¿è¡ä¸"), |
| | | ENDED(3, "å·²ç»æ"); |
| | | |
| | | private final Integer code; |
| | | private final String value; |
| | | |
| | | PlanStageEnum(Integer code, String value) { |
| | | this.code = code; |
| | | this.value = value; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Getter |
| | | public enum ReviewStatusEnum implements BaseEnum<Integer>, Serializable { |
| | | PENDING_REVIEW(0, "å¾
å®¡æ ¸"), |
| | | APPROVED(1, "å·²å®¡æ ¸"), |
| | | REJECTED(2, "å®¡æ ¸æªéè¿"); |
| | | |
| | | private final Integer code; |
| | | private final String value; |
| | | |
| | | ReviewStatusEnum(Integer code, String value) { |
| | | this.code = code; |
| | | this.value = value; |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Getter |
| | | public enum SaleEnum implements BaseEnum<Integer>{ |
| | | SALE(1, "éå®"), |
| | | PURCHASE(2, "éè´"), |
| | | MANAGEMENT(3, "项ç®"); |
| | | |
| | | private final Integer code; |
| | | private final String value; |
| | | |
| | | SaleEnum(Integer code, String value) { |
| | | this.code = code; |
| | | this.value = value; |
| | | } |
| | | } |
| | |
| | |
|
| | | /**
|
| | | * éç¨httpåéæ¹æ³
|
| | | * |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | public class HttpUtils
|
| | |
| | |
|
| | | /**
|
| | | * åæå® URL åéPOSTæ¹æ³ç请æ±
|
| | | * |
| | | *
|
| | | * @param url åé请æ±ç URL
|
| | | * @param param 请æ±åæ°
|
| | | * @param contentType å
容类å
|
| | |
| | | */
|
| | | public static String sendPostJson(String url, String jsonParam) {
|
| | | // éè½½è°ç¨ï¼é»è®¤ä½¿ç¨UTF-8ç¼ç ï¼Content-Typeåºå®ä¸ºapplication/json
|
| | | return sendPostJson(url, jsonParam, StandardCharsets.UTF_8.name(),null);
|
| | | return sendPostJson(url, jsonParam, StandardCharsets.UTF_8.name(), null, "");
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | public static String sendPostJson(String url, String jsonParam, String headerValue) {
|
| | | // éè½½è°ç¨ï¼é»è®¤ä½¿ç¨UTF-8ç¼ç ï¼Content-Typeåºå®ä¸ºapplication/json
|
| | | return sendPostJson(url, jsonParam, StandardCharsets.UTF_8.name(),headerValue);
|
| | | return sendPostJson(url, jsonParam, StandardCharsets.UTF_8.name(),headerValue,"");
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | * @param charset ç¼ç ç±»åï¼å¦UTF-8ãGBKçï¼å»ºè®®ä½¿ç¨StandardCharsets常éï¼
|
| | | * @return è¿ç¨èµæºçååºç»æ
|
| | | */
|
| | | public static String sendPostJson(String url, String jsonParam, String charset,String headerValue) {
|
| | | public static String sendPostJson(String url, String jsonParam, String charset,String headerValue,String accessToken) {
|
| | | PrintWriter out = null;
|
| | | BufferedReader in = null;
|
| | | StringBuilder result = new StringBuilder();
|
| | |
| | | if(StringUtils.isNotEmpty(headerValue)){
|
| | | conn.setRequestProperty("Authorization", headerValue);
|
| | | }
|
| | | if (StringUtils.isNotEmpty(accessToken)) {
|
| | | conn.setRequestProperty("x-acs-dingtalk-access-token", accessToken);
|
| | | }
|
| | | // 2. å¼å¯è¾å
¥è¾åºæµï¼POST请æ±å¿
é¡»ï¼
|
| | | conn.setDoOutput(true);
|
| | | conn.setDoInput(true);
|
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.energy.dto.EnergyConsumptionDetailDto; |
| | | import com.ruoyi.energy.dto.EnergyStatisticsDto; |
| | | import com.ruoyi.energy.pojo.Energy; |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetail; |
| | | import com.ruoyi.energy.service.EnergyConsumptionDetailService; |
| | | import com.ruoyi.energy.service.EnergyService; |
| | | 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.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç» å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 11:22:20 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/energyConsumptionDetail") |
| | | @Api(tags = "è½è管ç-è½èæè¡¨æç»") |
| | | public class EnergyConsumptionDetailController { |
| | | |
| | | @Autowired |
| | | private EnergyConsumptionDetailService energyConsumptionDetailService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | public R page(Page<EnergyConsumptionDetailDto> page, EnergyConsumptionDetailDto energyConsumptionDetailDto) { |
| | | return R.ok(energyConsumptionDetailService.pageEnergyConsumptionDetail(page, energyConsumptionDetailDto)); |
| | | } |
| | | |
| | | @ApiOperation("æ°å¢/ä¿®æ¹è½èæè¡¨") |
| | | @PostMapping() |
| | | public R add(@RequestBody EnergyConsumptionDetail energyConsumptionDetail) { |
| | | return R.ok(energyConsumptionDetailService.saveOrUpdate(energyConsumptionDetail)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤è½èæè¡¨") |
| | | @DeleteMapping("/{ids}") |
| | | public R delete(@PathVariable("ids") Long[] ids) { |
| | | return R.ok(energyConsumptionDetailService.removeBatchByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @Log(title = "è½èæè¡¨æç»-导å
¥", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public R importData(MultipartFile file) throws Exception { |
| | | return energyConsumptionDetailService.importData(file); |
| | | } |
| | | |
| | | @PostMapping("/downloadTemplate") |
| | | @Log(title = "è½èæè¡¨-ä¸è½½æ¨¡æ¿", businessType = BusinessType.EXPORT) |
| | | public void downloadTemplate(HttpServletResponse response) { |
| | | ExcelUtil<EnergyConsumptionDetailDto> util = new ExcelUtil<EnergyConsumptionDetailDto>(EnergyConsumptionDetailDto.class); |
| | | util.importTemplateExcel(response, "è½èæè¡¨æ¨¡ç"); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | @ApiOperation("è½èæè¡¨-导åº") |
| | | @Log(title = "è½èæè¡¨-导åº", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response) { |
| | | energyConsumptionDetailService.export(response); |
| | | } |
| | | |
| | | /*******************************************æ±æ»ç»è®¡*****************************************************************************************************************************************************************************/ |
| | | |
| | | @GetMapping("/statistics") |
| | | @ApiOperation("ææ¥æå¹´æ±æ»ç»è®¡") |
| | | public R statistics(EnergyStatisticsDto energyStatisticsDto) { |
| | | return R.ok(energyConsumptionDetailService.statistics(energyStatisticsDto)); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.energy.dto.EnergyConsumptionDetailDto; |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetail; |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetailFile; |
| | | import com.ruoyi.energy.service.EnergyConsumptionDetailFileService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.pojo.ProductWorkOrderFile; |
| | | import com.ruoyi.production.service.ProductWorkOrderFileService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç»_éä»¶ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 05:07:33 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/energyConsumptionDetailFile") |
| | | @Api(tags = "è½è管ç-è½èæè¡¨æç»-éä»¶") |
| | | public class EnergyConsumptionDetailFileController { |
| | | |
| | | @Autowired |
| | | private EnergyConsumptionDetailFileService energyConsumptionDetailFileService; |
| | | |
| | | @ApiOperation("æ°å¢è½èæè¡¨-éä»¶") |
| | | @PostMapping() |
| | | public R add(@RequestBody EnergyConsumptionDetailFile energyConsumptionDetailFile) { |
| | | return R.ok(energyConsumptionDetailFileService.save(energyConsumptionDetailFile)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤è½èæè¡¨-éä»¶") |
| | | @DeleteMapping("/{ids}") |
| | | public R delete(@PathVariable("ids") Long[] ids) { |
| | | return R.ok(energyConsumptionDetailFileService.removeBatchByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | public R page(Page<EnergyConsumptionDetailFile> page, EnergyConsumptionDetailFile energyConsumptionDetailFile) { |
| | | return R.ok(energyConsumptionDetailFileService.page(page,Wrappers.<EnergyConsumptionDetailFile>lambdaQuery().eq(EnergyConsumptionDetailFile::getEnergyConsumptionDetailId,energyConsumptionDetailFile.getEnergyConsumptionDetailId()))); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.energy.pojo.Energy; |
| | | import com.ruoyi.energy.service.EnergyService; |
| | | 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.framework.web.domain.R; |
| | | import com.ruoyi.production.dto.ProcessRouteDto; |
| | | import com.ruoyi.production.pojo.ProcessRoute; |
| | | import com.ruoyi.production.pojo.ProductProcess; |
| | | import com.ruoyi.production.service.ProcessRouteService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 10:50:18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/energy") |
| | | @Api(tags = "è½è管ç-è½æºç±»å") |
| | | public class EnergyController { |
| | | |
| | | @Autowired |
| | | private EnergyService energyService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | public R page(Page<Energy> page, Energy energy) { |
| | | return R.ok(energyService.pageEnergy(page, energy)); |
| | | } |
| | | |
| | | @ApiOperation("æ°å¢/ä¿®æ¹è½æºç±»å") |
| | | @PostMapping() |
| | | public R add(@RequestBody Energy energy) { |
| | | return R.ok(energyService.saveOrUpdate(energy)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤è½æºç±»å") |
| | | @DeleteMapping("/{ids}") |
| | | public R delete(@PathVariable("ids") Long[] ids) { |
| | | return R.ok(energyService.batchDelete(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @Log(title = "è½æºç±»å-导å
¥", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public R importData(MultipartFile file) throws Exception { |
| | | return energyService.importData(file); |
| | | } |
| | | |
| | | @PostMapping("/downloadTemplate") |
| | | @Log(title = "è½æºç±»å-ä¸è½½æ¨¡æ¿", businessType = BusinessType.EXPORT) |
| | | public void downloadTemplate(HttpServletResponse response) { |
| | | ExcelUtil<Energy> util = new ExcelUtil<Energy>(Energy.class); |
| | | util.importTemplateExcel(response, "è½æºç±»å模ç"); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | @ApiOperation("è½æºç±»å-导åº") |
| | | @Log(title = "è½æºç±»å-导åº", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response) { |
| | | energyService.export(response); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetail; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | //è½èæè¡¨æç» |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class EnergyConsumptionDetailDto extends EnergyConsumptionDetail { |
| | | |
| | | @ApiModelProperty("è½æºç±»å") |
| | | @Excel(name = "è½æºç±»å") |
| | | private String energyTyep; |
| | | |
| | | @ApiModelProperty("è½æºåç§°") |
| | | @Excel(name = "è½æºåç§°") |
| | | private String energyName; |
| | | |
| | | @ApiModelProperty("åä½") |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | |
| | | //å建人 |
| | | private String createUserName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.dto; |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | //ææ¥æå¹´æ±æ»ç»è®¡è½èçä¼ å |
| | | @Data |
| | | public class EnergyStatisticsDto { |
| | | |
| | | //å¼å§æ¥æ |
| | | private LocalDate startDate; |
| | | |
| | | //ç»ææ¥æ |
| | | private LocalDate endDate; |
| | | |
| | | //è½èåºæ¯(åå
¬/ç产) |
| | | private String type; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.mapper; |
| | | |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetailFile; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç»_éä»¶ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 05:07:33 |
| | | */ |
| | | @Mapper |
| | | public interface EnergyConsumptionDetailFileMapper extends BaseMapper<EnergyConsumptionDetailFile> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.energy.dto.EnergyConsumptionDetailDto; |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetail; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç» Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 11:22:20 |
| | | */ |
| | | @Mapper |
| | | public interface EnergyConsumptionDetailMapper extends BaseMapper<EnergyConsumptionDetail> { |
| | | |
| | | IPage<EnergyConsumptionDetailDto> pageEnergyConsumptionDetail(Page<EnergyConsumptionDetailDto> page, @Param("c") EnergyConsumptionDetailDto energyConsumptionDetailDto); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.energy.pojo.Energy; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 10:50:18 |
| | | */ |
| | | @Mapper |
| | | public interface EnergyMapper extends BaseMapper<Energy> { |
| | | |
| | | IPage<Energy> pageEnergy(Page<Energy> page, @Param("c") Energy energy); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | 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 java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 10:50:18 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("energy") |
| | | @ApiModel(value = "Energy对象", description = "è½æºç±»å") |
| | | @ExcelIgnoreUnannotated |
| | | public class Energy implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("è½æºç±»å") |
| | | @Excel(name = "è½æºç±»å") |
| | | private String energyTyep; |
| | | |
| | | @ApiModelProperty("è½æºåç§°") |
| | | @Excel(name = "è½æºåç§°") |
| | | private String energyName; |
| | | |
| | | @ApiModelProperty("åä½") |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty("åä»·") |
| | | @Excel(name = "åä»·") |
| | | private BigDecimal unitPrice; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @Excel(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建è
") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°è
") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | //å建人 |
| | | @TableField(exist = false) |
| | | private String createUserName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | 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 java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 11:22:20 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("energy_consumption_detail") |
| | | @ApiModel(value = "EnergyConsumptionDetail对象", description = "è½æºç±»å-è½èæè¡¨æç»") |
| | | @ExcelIgnoreUnannotated |
| | | public class EnergyConsumptionDetail implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("夿£å
³èè½æºç±»åid") |
| | | private Integer energyId; |
| | | |
| | | @ApiModelProperty("åå
¬/ç产") |
| | | @Excel(name = "è½èåºæ¯") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("æè¡¨ä½ç½®") |
| | | private String meterReadingLocation; |
| | | |
| | | @ApiModelProperty("æè¡¨æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "æ¥æ") |
| | | private LocalDate meterReadingDate; |
| | | |
| | | @ApiModelProperty("èµ·ç ") |
| | | @Excel(name = "èµ·ç ") |
| | | private BigDecimal startCode; |
| | | |
| | | @ApiModelProperty("æ¢ç ") |
| | | @Excel(name = "æ¢ç ") |
| | | private BigDecimal stopCode; |
| | | |
| | | @ApiModelProperty("ç¨é") |
| | | @Excel(name = "ç¨é") |
| | | private BigDecimal dosage; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @Excel(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建è
") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°è
") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.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 java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç»_éä»¶ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 05:07:33 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("energy_consumption_detail_file") |
| | | @ApiModel(value = "EnergyConsumptionDetailFile对象", description = "è½æºç±»å-è½èæè¡¨æç»_éä»¶") |
| | | public class EnergyConsumptionDetailFile implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å
³èå¤é®è½èæè¡¨id") |
| | | private Integer energyConsumptionDetailId; |
| | | |
| | | private String name; |
| | | |
| | | private String url; |
| | | |
| | | private Object fileSize; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.service; |
| | | |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetailFile; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç»_éä»¶ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 05:07:33 |
| | | */ |
| | | public interface EnergyConsumptionDetailFileService extends IService<EnergyConsumptionDetailFile> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.energy.dto.EnergyConsumptionDetailDto; |
| | | import com.ruoyi.energy.dto.EnergyStatisticsDto; |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetail; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç» æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 11:22:20 |
| | | */ |
| | | public interface EnergyConsumptionDetailService extends IService<EnergyConsumptionDetail> { |
| | | |
| | | IPage<EnergyConsumptionDetailDto> pageEnergyConsumptionDetail(Page<EnergyConsumptionDetailDto> page, EnergyConsumptionDetailDto energyConsumptionDetailDto); |
| | | |
| | | R importData(MultipartFile file); |
| | | |
| | | void export(HttpServletResponse response); |
| | | |
| | | Object statistics(EnergyStatisticsDto energyStatisticsDto); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.energy.pojo.Energy; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 10:50:18 |
| | | */ |
| | | public interface EnergyService extends IService<Energy> { |
| | | |
| | | IPage<Energy> pageEnergy(Page<Energy> page, Energy energy); |
| | | |
| | | boolean batchDelete(List<Long> ids); |
| | | |
| | | R importData(MultipartFile file); |
| | | |
| | | void export(HttpServletResponse response); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.service.impl; |
| | | |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetailFile; |
| | | import com.ruoyi.energy.mapper.EnergyConsumptionDetailFileMapper; |
| | | import com.ruoyi.energy.service.EnergyConsumptionDetailFileService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç»_éä»¶ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 05:07:33 |
| | | */ |
| | | @Service |
| | | public class EnergyConsumptionDetailFileServiceImpl extends ServiceImpl<EnergyConsumptionDetailFileMapper, EnergyConsumptionDetailFile> implements EnergyConsumptionDetailFileService { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.energy.dto.EnergyConsumptionDetailDto; |
| | | import com.ruoyi.energy.dto.EnergyStatisticsDto; |
| | | import com.ruoyi.energy.mapper.EnergyMapper; |
| | | import com.ruoyi.energy.pojo.Energy; |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetail; |
| | | import com.ruoyi.energy.mapper.EnergyConsumptionDetailMapper; |
| | | import com.ruoyi.energy.service.EnergyConsumptionDetailService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å-è½èæè¡¨æç» æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 11:22:20 |
| | | */ |
| | | @Service |
| | | public class EnergyConsumptionDetailServiceImpl extends ServiceImpl<EnergyConsumptionDetailMapper, EnergyConsumptionDetail> implements EnergyConsumptionDetailService { |
| | | |
| | | @Autowired |
| | | private EnergyConsumptionDetailMapper energyConsumptionDetailMapper; |
| | | |
| | | @Autowired |
| | | private EnergyMapper energyMapper; |
| | | |
| | | @Override |
| | | public IPage<EnergyConsumptionDetailDto> pageEnergyConsumptionDetail(Page<EnergyConsumptionDetailDto> page, EnergyConsumptionDetailDto energyConsumptionDetailDto) { |
| | | return energyConsumptionDetailMapper.pageEnergyConsumptionDetail(page,energyConsumptionDetailDto); |
| | | } |
| | | |
| | | @Override |
| | | public R importData(MultipartFile file) { |
| | | try { |
| | | ExcelUtil<EnergyConsumptionDetailDto> util = new ExcelUtil<EnergyConsumptionDetailDto>(EnergyConsumptionDetailDto.class); |
| | | List<EnergyConsumptionDetailDto> energyConsumptionDetailDtoList = util.importExcel(file.getInputStream()); |
| | | if(CollectionUtils.isEmpty(energyConsumptionDetailDtoList)){ |
| | | return R.fail("模æ¿é误æå¯¼å
¥æ°æ®ä¸ºç©º"); |
| | | } |
| | | List<EnergyConsumptionDetail> list = energyConsumptionDetailDtoList.stream().map(energyConsumptionDetailDto -> { |
| | | if (ObjectUtils.isEmpty(energyConsumptionDetailDto)) { |
| | | throw new RuntimeException("ä½¿ç¨æ¨¡æ¿è¿è¡å¯¼å
¥"); |
| | | } |
| | | if (ObjectUtils.isEmpty(energyConsumptionDetailDto.getEnergyTyep()) && ObjectUtils.isEmpty(energyConsumptionDetailDto.getEnergyName())) { |
| | | throw new RuntimeException("è½æºç±»åä¸è½ä¸ºç©º"); |
| | | } |
| | | List<Energy> energy = energyMapper.selectList(Wrappers.<Energy>lambdaQuery() |
| | | .eq(Energy::getEnergyTyep, energyConsumptionDetailDto.getEnergyTyep()) |
| | | .eq(Energy::getEnergyName, energyConsumptionDetailDto.getEnergyName())); |
| | | if (CollectionUtils.isEmpty(energy)) { |
| | | throw new RuntimeException("导å
¥æ°æ®ä¸çè½æºç±»åå¨ç³»ç»ä¸ä¸åå¨,请å
åå¾è½æºç±»åä¸é
ç½®!"); |
| | | } |
| | | EnergyConsumptionDetail energyConsumptionDetail = new EnergyConsumptionDetail(); |
| | | BeanUtils.copyProperties(energyConsumptionDetailDto, energyConsumptionDetail); |
| | | energyConsumptionDetail.setEnergyId(energy.get(0).getId()); |
| | | return energyConsumptionDetail; |
| | | }).collect(Collectors.toList()); |
| | | this.saveOrUpdateBatch(list); |
| | | return R.ok(true); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response) { |
| | | List<EnergyConsumptionDetailDto> list = energyConsumptionDetailMapper.pageEnergyConsumptionDetail(new Page<>(-1,-1),new EnergyConsumptionDetailDto()).getRecords(); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new RuntimeException("æ å¯¼åºæ°æ®"); |
| | | } |
| | | ExcelUtil<EnergyConsumptionDetailDto> util = new ExcelUtil<>(EnergyConsumptionDetailDto.class); |
| | | util.exportExcel(response, list, "è½èæè¡¨"); |
| | | } |
| | | |
| | | @Override |
| | | public Object statistics(EnergyStatisticsDto energyStatisticsDto) { |
| | | return null; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.energy.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.energy.mapper.EnergyConsumptionDetailMapper; |
| | | import com.ruoyi.energy.pojo.Energy; |
| | | import com.ruoyi.energy.mapper.EnergyMapper; |
| | | import com.ruoyi.energy.pojo.EnergyConsumptionDetail; |
| | | import com.ruoyi.energy.service.EnergyService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è½æºç±»å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-10 10:50:18 |
| | | */ |
| | | @Service |
| | | public class EnergyServiceImpl extends ServiceImpl<EnergyMapper, Energy> implements EnergyService { |
| | | |
| | | @Autowired |
| | | private EnergyMapper energyMapper; |
| | | |
| | | @Autowired |
| | | private EnergyConsumptionDetailMapper energyConsumptionDetailMapper; |
| | | |
| | | @Override |
| | | public IPage<Energy> pageEnergy(Page<Energy> page, Energy energy) { |
| | | return energyMapper.pageEnergy(page,energy); |
| | | } |
| | | |
| | | @Override |
| | | public boolean batchDelete(List<Long> ids) { |
| | | //å
夿æ¯å¦å·²ç»æå¡«åçè½èæ°æ® |
| | | List<EnergyConsumptionDetail> energyConsumptionDetails = energyConsumptionDetailMapper.selectList(Wrappers.<EnergyConsumptionDetail>lambdaQuery().in(EnergyConsumptionDetail::getEnergyId, ids)); |
| | | if (CollectionUtils.isNotEmpty(energyConsumptionDetails)){ |
| | | throw new RuntimeException("éä¸çè½æºç±»åå·²æå¯¹åºçè½èæ°æ®,æ æ³è¿è¡å é¤!"); |
| | | } |
| | | return removeBatchByIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public R importData(MultipartFile file) { |
| | | try { |
| | | ExcelUtil<Energy> util = new ExcelUtil<Energy>(Energy.class); |
| | | List<Energy> energyList = util.importExcel(file.getInputStream()); |
| | | if(CollectionUtils.isEmpty(energyList)){ |
| | | return R.fail("模æ¿é误æå¯¼å
¥æ°æ®ä¸ºç©º"); |
| | | } |
| | | energyList.forEach(energy -> { |
| | | if (ObjectUtils.isEmpty(energy)) { |
| | | throw new RuntimeException("ä½¿ç¨æ¨¡æ¿è¿è¡å¯¼å
¥"); |
| | | } |
| | | if (ObjectUtils.isEmpty(energy.getEnergyTyep())) { |
| | | throw new RuntimeException("è½æºç±»åä¸è½ä¸ºç©º"); |
| | | } |
| | | }); |
| | | this.saveOrUpdateBatch(energyList); |
| | | return R.ok(true); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response) { |
| | | List<Energy> list = energyMapper.selectList(null); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new RuntimeException("æ å¯¼åºæ°æ®"); |
| | | } |
| | | ExcelUtil<Energy> util = new ExcelUtil<>(Energy.class); |
| | | util.exportExcel(response, list, "è½æºç±»å"); |
| | | } |
| | | } |
| | |
| | | private BigDecimal unQuantity; |
| | | |
| | | private BigDecimal totalReturnNum; |
| | | |
| | | // éè´§æ»ä»· |
| | | private BigDecimal price; |
| | | |
| | | // éè´§æ»ä»· |
| | | private BigDecimal taxInclusiveUnitPrice; |
| | | } |
| | |
| | | public interface ReturnSaleProductMapper extends BaseMapper<ReturnSaleProduct> { |
| | | |
| | | List<ReturnSaleProductDto> listReturnSaleProductDto(@Param("returnManagementId") Long returnManagementId); |
| | | |
| | | List<ReturnSaleProductDto> listReturnSaleProduct(@Param("returnManagementId") Long returnManagementId); |
| | | } |
| | |
| | | public interface ReturnSaleProductService extends IService<ReturnSaleProduct> { |
| | | |
| | | List<ReturnSaleProductDto> listReturnSaleProductDto(Long returnManagementId); |
| | | |
| | | List<ReturnSaleProductDto> listReturnSaleProduct(Long returnManagementId); |
| | | } |
| | |
| | | package com.ruoyi.procurementrecord.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.account.dto.SalesRefundAmountOrderDto; |
| | | import com.ruoyi.account.pojo.SalesRefundAmountOrder; |
| | | import com.ruoyi.account.service.SalesRefundAmountOrderService; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.procurementrecord.dto.ReturnManagementDto; |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnManagementMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnManagement; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | private ShippingInfoService shippingInfoService; |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | @Autowired |
| | | private SalesRefundAmountOrderService salesRefundAmountOrderService; |
| | | |
| | | @Override |
| | | public IPage<ReturnManagementDto> listPage(Page page, ReturnManagementDto returnManagement) { |
| | |
| | | @Override |
| | | public boolean handle(Long returnManagementId) { |
| | | ReturnManagement byId = this.getById(returnManagementId); |
| | | List<ReturnSaleProductDto> list = returnSaleProductService.listReturnSaleProduct(returnManagementId); |
| | | byId.setStatus(1); |
| | | updateById(byId); |
| | | SalesRefundAmountOrderDto salesRefundAmountOrder = new SalesRefundAmountOrderDto(); |
| | | salesRefundAmountOrder.setReturnManagementId(returnManagementId); |
| | | salesRefundAmountOrder.setStatus(0); |
| | | salesRefundAmountOrder.setCreateTime(byId.getCreateTime()); |
| | | salesRefundAmountOrder.setCreateUserId(SecurityUtils.getUserId()); |
| | | BigDecimal bigDecimal = new BigDecimal(0); |
| | | for (ReturnSaleProductDto returnSaleProduct : list) { |
| | | bigDecimal = bigDecimal.add(returnSaleProduct.getPrice()); |
| | | salesRefundAmountOrder.setRefundedAmount(new BigDecimal(0)); |
| | | } |
| | | salesRefundAmountOrder.setRefundAmount(bigDecimal); |
| | | salesRefundAmountOrder.setNotRefundedAmount(salesRefundAmountOrder.getRefundedAmount()); |
| | | salesRefundAmountOrderService.addSalesRefundAmountOrderDto(salesRefundAmountOrder); |
| | | return true; |
| | | } |
| | | |
| | |
| | | |
| | | return returnSaleProductMapper.listReturnSaleProductDto(returnManagementId); |
| | | } |
| | | |
| | | @Override |
| | | public List<ReturnSaleProductDto> listReturnSaleProduct(Long returnManagementId) { |
| | | return returnSaleProductMapper.listReturnSaleProduct(returnManagementId); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.productionPlan.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.productionPlan.dto.ProductionPlanDto; |
| | | import com.ruoyi.productionPlan.service.ProductionPlanService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <br> |
| | | * éå®çäº§éæ±æ§å¶å± |
| | | * </br> |
| | | * |
| | | * @author deslrey |
| | | * @version 1.0 |
| | | * @since 2026/03/10 10:01 |
| | | */ |
| | | |
| | | @RestController |
| | | @RequestMapping("/productionPlan") |
| | | @Api(tags = "主ç产计å") |
| | | public class ProductionPlanController { |
| | | @Resource |
| | | private ProductionPlanService productionPlanService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("è·åç产计åå表") |
| | | public AjaxResult productionPlanListPage(Page page, ProductionPlanDto productionPlanDto) { |
| | | return AjaxResult.success(productionPlanService.listPage(page, productionPlanDto)); |
| | | } |
| | | |
| | | @GetMapping("/loadProdData") |
| | | @Log(title = "æåéå®ç产计å", businessType = BusinessType.INSERT) |
| | | public AjaxResult loadProdData() { |
| | | productionPlanService.loadProdData(); |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.productionPlan.dto; |
| | | |
| | | import com.ruoyi.productionPlan.pojo.ProductionPlan; |
| | | |
| | | public class ProductionPlanDto extends ProductionPlan { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.productionPlan.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * <br> |
| | | * æ°æ®æ¥æºæ¹å¼æä¸¾ç±» |
| | | * </br> |
| | | * |
| | | * @author deslrey |
| | | * @version 1.0 |
| | | * @since 2026/03/10 10:37 |
| | | */ |
| | | @Getter |
| | | public enum DataSourceTypeEnum { |
| | | |
| | | SALES_ORDER(1, "éå®è®¢å"), |
| | | PRODUCTION_FORECAST(2, "çäº§é¢æµ"); |
| | | |
| | | private final Integer code; |
| | | private final String desc; |
| | | |
| | | DataSourceTypeEnum(Integer code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static DataSourceTypeEnum getByCode(Integer code) { |
| | | if (code == null) { |
| | | return null; |
| | | } |
| | | for (DataSourceTypeEnum type : DataSourceTypeEnum.values()) { |
| | | if (type.getCode().equals(code)) { |
| | | return type; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.productionPlan.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * <br> |
| | | * æ°æ®æ¹å¼æä¸¾ç±» |
| | | * </br> |
| | | * |
| | | * @author deslrey |
| | | * @version 1.0 |
| | | * @since 2026/03/10 10:36 |
| | | */ |
| | | @Getter |
| | | public enum DataSyncTypeEnum { |
| | | |
| | | MANUAL(1, "æå¨"), |
| | | SCHEDULED(2, "宿¶"); |
| | | |
| | | private final Integer code; |
| | | private final String desc; |
| | | |
| | | DataSyncTypeEnum(Integer code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static DataSyncTypeEnum getByCode(Integer code) { |
| | | if (code == null) { |
| | | return null; |
| | | } |
| | | for (DataSyncTypeEnum type : DataSyncTypeEnum.values()) { |
| | | if (type.getCode().equals(code)) { |
| | | return type; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.productionPlan.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.productionPlan.dto.ProductionPlanDto; |
| | | import com.ruoyi.productionPlan.pojo.ProductionPlan; |
| | | import com.ruoyi.staff.dto.StaffLeaveDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <br> |
| | | * éå®çäº§éæ±Mapper |
| | | * </br> |
| | | * |
| | | * @author deslrey |
| | | * @version 1.0 |
| | | * @since 2026/03/10 9:56 |
| | | */ |
| | | public interface ProductionPlanMapper extends BaseMapper<ProductionPlan> { |
| | | IPage<ProductionPlanDto> listPage(Page page, @Param("c") ProductionPlanDto productionPlanDto); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.productionPlan.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <br> |
| | | * éå®çäº§éæ± |
| | | * </br> |
| | | * |
| | | * @author deslrey |
| | | * @version 1.0 |
| | | * @since 2026/03/10 9:54 |
| | | */ |
| | | @Data |
| | | @TableName("production_plan") |
| | | public class ProductionPlan { |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 表åå®ä¾ID |
| | | */ |
| | | private String formInstanceId; |
| | | |
| | | /** |
| | | * æµæ°´å· |
| | | */ |
| | | private String serialNo; |
| | | |
| | | /** |
| | | * ç³è¯·åç¼å· |
| | | */ |
| | | private String applyNo; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | private String customerName; |
| | | |
| | | /** |
| | | * ç©æç¼ç |
| | | */ |
| | | private String materialCode; |
| | | |
| | | /** |
| | | * 产ååç§° |
| | | */ |
| | | private String productName; |
| | | |
| | | /** |
| | | * 产åè§æ ¼ |
| | | */ |
| | | private String productSpec; |
| | | |
| | | /** |
| | | * é¿ |
| | | */ |
| | | private Integer length; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Integer width; |
| | | |
| | | /** |
| | | * é« |
| | | */ |
| | | private Integer height; |
| | | |
| | | /** |
| | | * åæ° |
| | | */ |
| | | private Integer quantity; |
| | | |
| | | /** |
| | | * æ¹æ° |
| | | */ |
| | | private BigDecimal volume; |
| | | |
| | | /** |
| | | * 强度 |
| | | */ |
| | | private String strength; |
| | | |
| | | /** |
| | | * å¼å§æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime startDate; |
| | | |
| | | /** |
| | | * ç»ææ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime endDate; |
| | | |
| | | /** |
| | | * æäº¤äºº |
| | | */ |
| | | private String submitter; |
| | | |
| | | /** |
| | | * æäº¤äººç»ç» |
| | | */ |
| | | private String submitOrg; |
| | | |
| | | /** |
| | | * 夿³¨1 |
| | | */ |
| | | private String remarkOne; |
| | | |
| | | /** |
| | | * 夿³¨2 |
| | | */ |
| | | private String remarkTwo; |
| | | |
| | | /** |
| | | * å建人 |
| | | */ |
| | | private String creatorName; |
| | | |
| | | /** |
| | | * ä¿®æ¹äºº |
| | | */ |
| | | private String modifierName; |
| | | |
| | | /** |
| | | * 表åå建æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime formCreatedTime; |
| | | |
| | | /** |
| | | * 表åä¿®æ¹æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime formModifiedTime; |
| | | |
| | | /** |
| | | * æ°æ®åæ¥ç±»åï¼1=æå¨ 2=宿¶ä»»å¡ |
| | | */ |
| | | private Integer dataSyncType; |
| | | |
| | | /** |
| | | * æ°æ®æ¥æºç±»åï¼1=éå®è®¢å 2=éå®é¢æµ |
| | | */ |
| | | private Integer dataSourceType; |
| | | |
| | | /** |
| | | * æ°æ®åºå建æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * æ°æ®åºæ´æ°æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * å½åæ´æ°æ°é |
| | | */ |
| | | private Integer totalCount; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.productionPlan.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.productionPlan.dto.ProductionPlanDto; |
| | | import com.ruoyi.productionPlan.pojo.ProductionPlan; |
| | | |
| | | /** |
| | | * <br> |
| | | * éå®çäº§éæ±æ¥å£ |
| | | * </br> |
| | | * |
| | | * @author deslrey |
| | | * @version 1.0 |
| | | * @since 2026/03/10 10:00 |
| | | */ |
| | | public interface ProductionPlanService extends IService<ProductionPlan> { |
| | | IPage<ProductionPlanDto> listPage(Page page, ProductionPlanDto productionPlanDto); |
| | | |
| | | /** |
| | | * æå¨åæ¥ |
| | | */ |
| | | void loadProdData(); |
| | | |
| | | /** |
| | | * 宿¶åæ¥ |
| | | */ |
| | | void syncProdDataJob(); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.productionPlan.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | 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.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.framework.config.AliDingConfig; |
| | | import com.ruoyi.productionPlan.dto.ProductionPlanDto; |
| | | import com.ruoyi.productionPlan.mapper.ProductionPlanMapper; |
| | | import com.ruoyi.productionPlan.pojo.ProductionPlan; |
| | | import com.ruoyi.productionPlan.service.ProductionPlanService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.time.Instant; |
| | | import java.time.LocalDateTime; |
| | | import java.time.OffsetDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.format.DateTimeParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.concurrent.locks.ReentrantLock; |
| | | |
| | | /** |
| | | * <br> |
| | | * éå®çäº§éæ±æ¥å£å®ç°ç±» |
| | | * </br> |
| | | * |
| | | * @author deslrey |
| | | * @version 1.0 |
| | | * @since 2026/03/10 10:00 |
| | | */ |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class ProductionPlanServiceImpl extends ServiceImpl<ProductionPlanMapper, ProductionPlan> implements ProductionPlanService { |
| | | |
| | | @Autowired |
| | | private AliDingConfig aliDingConfig; |
| | | |
| | | @Autowired |
| | | private ProductionPlanMapper productionPlanMapper; |
| | | |
| | | /** |
| | | * 忥éï¼ç¡®ä¿æå¨å宿¶ä»»å¡ä¸åæ¶æ§è¡ |
| | | */ |
| | | private final ReentrantLock syncLock = new ReentrantLock(); |
| | | |
| | | @Override |
| | | public IPage<ProductionPlanDto> listPage(Page page, ProductionPlanDto productionPlanDto) { |
| | | return productionPlanMapper.listPage(page, productionPlanDto); |
| | | } |
| | | |
| | | /** |
| | | * 页颿å¨åæ¥ |
| | | */ |
| | | @Override |
| | | public void loadProdData() { |
| | | syncProdData(1); |
| | | } |
| | | |
| | | /** |
| | | * 宿¶ä»»å¡åæ¥ |
| | | */ |
| | | @Override |
| | | public void syncProdDataJob() { |
| | | syncProdData(2); |
| | | } |
| | | |
| | | /** |
| | | * åæ¥æ°æ® |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void syncProdData(Integer dataSyncType) { |
| | | if (!syncLock.tryLock()) { |
| | | log.warn("忥æ£å¨è¿è¡ä¸ï¼æ¬æ¬¡ {} åæ¥è¯·æ±è¢«è·³è¿", dataSyncType == 1 ? "æå¨" : "宿¶ä»»å¡"); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | // è·å AccessToken |
| | | String accessToken = getAccessToken(); |
| | | if (StringUtils.isEmpty(accessToken)) { |
| | | return; |
| | | } |
| | | |
| | | // è·åæ¬å°æå忥æ¶é´ |
| | | LocalDateTime lastSyncTime = getLastSyncTime(); |
| | | log.info("å¼å§å¢éåæ¥ï¼æ¬å°æåä¿®æ¹æ¶é´: {}", lastSyncTime); |
| | | |
| | | int pageNumber = 1; |
| | | int pageSize = 50; |
| | | boolean hasMore = true; |
| | | int totalSynced = 0; |
| | | |
| | | while (hasMore) { |
| | | // æ¥è¯¢åæ° |
| | | JSONObject searchParam = buildSearchParam(lastSyncTime, pageNumber, pageSize); |
| | | |
| | | // è°ç¨å®ææ¥å£æåæ°æ® |
| | | String dataRes = HttpUtils.sendPostJson( |
| | | aliDingConfig.getSearchFormDataUrl(), |
| | | searchParam.toJSONString(), |
| | | StandardCharsets.UTF_8.name(), |
| | | null, |
| | | accessToken |
| | | ); |
| | | |
| | | if (StringUtils.isEmpty(dataRes)) { |
| | | log.warn("第 {} 页æåæ°æ®ä¸ºç©º", pageNumber); |
| | | break; |
| | | } |
| | | |
| | | JSONObject resultObj = JSON.parseObject(dataRes); |
| | | JSONArray dataArr = resultObj.getJSONArray("data"); |
| | | Integer totalCount = resultObj.getInteger("totalCount"); |
| | | |
| | | if (dataArr == null || dataArr.isEmpty()) { |
| | | log.info("æ²¡ææ´å¤æ°æ°æ®éè¦åæ¥"); |
| | | break; |
| | | } |
| | | |
| | | // è§£æå¹¶ä¿åæ°æ® |
| | | List<ProductionPlan> list = parseProductionPlans(dataArr, dataSyncType, totalCount); |
| | | if (!list.isEmpty()) { |
| | | // å¤çæ´æ°ææ°å¢ |
| | | processSaveOrUpdate(list); |
| | | totalSynced += list.size(); |
| | | } |
| | | |
| | | // 夿æ¯å¦è¿æä¸ä¸é¡µ |
| | | hasMore = (pageNumber * pageSize) < totalCount; |
| | | pageNumber++; |
| | | |
| | | log.info("æ£å¨åæ¥ç¬¬ {} 页ï¼å½å已忥 {}/{}", pageNumber - 1, totalSynced, totalCount); |
| | | } |
| | | |
| | | log.info("æ°æ®åæ¥å®æï¼å
±åæ¥ {} æ¡æ°æ®", totalSynced); |
| | | } catch (Exception e) { |
| | | log.error("忥ç产计åå¼å¸¸", e); |
| | | } finally { |
| | | // éæ¾é |
| | | syncLock.unlock(); |
| | | } |
| | | } |
| | | |
| | | private String getAccessToken() { |
| | | String params = "appkey=" + aliDingConfig.getAppKey() |
| | | + "&appsecret=" + aliDingConfig.getAppSecret(); |
| | | String tokenRes = HttpUtils.sendGet(aliDingConfig.getAccessTokenUrl(), params); |
| | | JSONObject tokenObj = JSON.parseObject(tokenRes); |
| | | String accessToken = tokenObj.getString("access_token"); |
| | | if (StringUtils.isEmpty(accessToken)) { |
| | | log.error("è·åééAccessToken失败: {}", tokenRes); |
| | | } |
| | | return accessToken; |
| | | } |
| | | |
| | | private LocalDateTime getLastSyncTime() { |
| | | // æ¥è¯¢æ¬å°æ°æ®åºä¸ formModifiedTime æå¤§çè®°å½ |
| | | LambdaQueryWrapper<ProductionPlan> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.orderByDesc(ProductionPlan::getFormModifiedTime).last("LIMIT 1"); |
| | | ProductionPlan lastRecord = this.getOne(queryWrapper); |
| | | return lastRecord != null ? lastRecord.getFormModifiedTime() : null; |
| | | } |
| | | |
| | | private JSONObject buildSearchParam(LocalDateTime lastSyncTime, int pageNumber, int pageSize) { |
| | | JSONObject searchParam = new JSONObject(); |
| | | searchParam.put("appType", aliDingConfig.getAppType()); |
| | | searchParam.put("systemToken", aliDingConfig.getSystemToken()); |
| | | searchParam.put("userId", aliDingConfig.getUserId()); |
| | | searchParam.put("formUuid", aliDingConfig.getFormUuid()); |
| | | searchParam.put("pageSize", pageSize); |
| | | searchParam.put("pageNumber", pageNumber); |
| | | |
| | | // é»è®¤æä¿®æ¹æ¶é´ååºæåºï¼ç¡®ä¿å页æåæ°æ®çè¿ç»æ§ |
| | | // "+" 表示ååºï¼"gmt_modified" æ¯å®æ¹å
ç½®åæ®µ |
| | | searchParam.put("orderConfigJson", "{\"gmt_modified\":\"+\"}"); |
| | | |
| | | // è®¾ç½®ä¿®æ¹æ¶é´çéåºé´ (æ ¼å¼å¿
须为yyyy-MM-dd HH:mm:ss) |
| | | if (lastSyncTime != null) { |
| | | // èµ·å§æ¶é´ï¼ä¸æ¬¡åæ¥å°çæå䏿¡æ°æ®çä¿®æ¹æ¶é´ |
| | | String startTime = lastSyncTime.plusSeconds(1).atZone(ZoneId.systemDefault()) |
| | | .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | searchParam.put("modifiedFromTimeGMT", startTime); |
| | | } |
| | | |
| | | // æªæ¢æ¶é´ï¼å½åæ¶é´ï¼ç¡®ä¿è·åææ°ç已修æ¹/å·²æ°å¢æ°æ® |
| | | String endTime = LocalDateTime.now().atZone(ZoneId.systemDefault()) |
| | | .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | searchParam.put("modifiedToTimeGMT", endTime); |
| | | |
| | | return searchParam; |
| | | } |
| | | |
| | | private List<ProductionPlan> parseProductionPlans(JSONArray dataArr, Integer dataSyncType, Integer totalCount) { |
| | | List<ProductionPlan> list = new ArrayList<>(); |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | |
| | | for (int i = 0; i < dataArr.size(); i++) { |
| | | JSONObject item = dataArr.getJSONObject(i); |
| | | String formInstanceId = item.getString("formInstanceId"); |
| | | String serialNo = item.getString("serialNo"); |
| | | |
| | | JSONObject originator = item.getJSONObject("originator"); |
| | | String originatorName = originator != null && originator.containsKey("userName") |
| | | ? originator.getJSONObject("userName").getString("nameInChinese") : "æªç¥"; |
| | | |
| | | JSONObject formData = item.getJSONObject("formData"); |
| | | JSONArray tableArr = formData.getJSONArray("tableField_l7fytfcn"); |
| | | if (tableArr == null || tableArr.isEmpty()) { |
| | | continue; |
| | | } |
| | | |
| | | for (int j = 0; j < tableArr.size(); j++) { |
| | | JSONObject row = tableArr.getJSONObject(j); |
| | | ProductionPlan plan = new ProductionPlan(); |
| | | |
| | | plan.setFormInstanceId(formInstanceId); |
| | | plan.setSerialNo(serialNo); |
| | | plan.setApplyNo(formData.getString("textField_l7fytfco")); |
| | | plan.setCustomerName(formData.getString("textField_lbkozohg")); |
| | | |
| | | plan.setMaterialCode(row.getString("textField_l9xo62q5")); |
| | | plan.setProductName(row.getString("textField_l9xo62q7")); |
| | | plan.setProductSpec(row.getString("textField_l9xo62q8")); |
| | | plan.setLength(row.getInteger("numberField_lb7lgatg_value")); |
| | | plan.setWidth(row.getInteger("numberField_lb7lgath_value")); |
| | | plan.setHeight(row.getInteger("numberField_lb7lgati_value")); |
| | | plan.setQuantity(row.getInteger("numberField_lb7lgatj_value")); |
| | | plan.setVolume(row.getBigDecimal("numberField_l7fytfd3_value")); |
| | | plan.setStrength(row.getString("radioField_m9urarr2_id")); |
| | | |
| | | JSONArray dateArr = row.getJSONArray("cascadeDateField_lfxqqluw"); |
| | | if (dateArr != null && dateArr.size() == 2) { |
| | | try { |
| | | long start = Long.parseLong(dateArr.getString(0)); |
| | | long end = Long.parseLong(dateArr.getString(1)); |
| | | plan.setStartDate(Instant.ofEpochMilli(start).atZone(ZoneId.systemDefault()).toLocalDateTime()); |
| | | plan.setEndDate(Instant.ofEpochMilli(end).atZone(ZoneId.systemDefault()).toLocalDateTime()); |
| | | } catch (Exception e) { |
| | | log.warn("è§£ææ¥æå¤±è´¥: {}", dateArr); |
| | | } |
| | | } |
| | | |
| | | plan.setSubmitter(originatorName); |
| | | plan.setSubmitOrg("å®å¤ä¸å绿è½å®ä¸é墿éå
¬å¸"); |
| | | plan.setRemarkOne(formData.getString("textareaField_l7fytfcy")); |
| | | plan.setRemarkTwo(formData.getString("textField_l7fytfcx")); |
| | | plan.setCreatorName(originatorName); |
| | | |
| | | JSONObject modifyUser = item.getJSONObject("modifyUser"); |
| | | if (modifyUser != null && modifyUser.containsKey("userName")) { |
| | | plan.setModifierName(modifyUser.getJSONObject("userName").getString("nameInChinese")); |
| | | } |
| | | |
| | | plan.setFormCreatedTime(parseUtcTime(item.getString("createdTimeGMT"))); |
| | | plan.setFormModifiedTime(parseUtcTime(item.getString("modifiedTimeGMT"))); |
| | | plan.setDataSyncType(dataSyncType); |
| | | plan.setDataSourceType(1); |
| | | plan.setCreateTime(now); |
| | | plan.setUpdateTime(now); |
| | | plan.setTotalCount(totalCount); |
| | | |
| | | list.add(plan); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | private void processSaveOrUpdate(List<ProductionPlan> list) { |
| | | for (ProductionPlan plan : list) { |
| | | LambdaQueryWrapper<ProductionPlan> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(ProductionPlan::getFormInstanceId, plan.getFormInstanceId()) |
| | | .eq(ProductionPlan::getMaterialCode, plan.getMaterialCode()); |
| | | ProductionPlan existing = this.getOne(queryWrapper); |
| | | if (existing != null) { |
| | | plan.setId(existing.getId()); |
| | | this.updateById(plan); |
| | | } else { |
| | | this.save(plan); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private LocalDateTime parseUtcTime(String utcString) { |
| | | if (StringUtils.isEmpty(utcString)) { |
| | | return null; |
| | | } |
| | | try { |
| | | OffsetDateTime odt = OffsetDateTime.parse(utcString); |
| | | return odt.toLocalDateTime(); |
| | | } catch (DateTimeParseException ex) { |
| | | log.warn("è§£ææ¶é´ {} 失败: {}", utcString, ex.getMessage()); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.productionPlan.task; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.ruoyi.productionPlan.service.ProductionPlanService; |
| | | |
| | | /** |
| | | * <br> |
| | | * éå®çäº§éæ±å®æ¶ä»»å¡ |
| | | * </br> |
| | | * |
| | | * @author deslrey |
| | | * @version 1.0 |
| | | * @since 2026/03/09 17:02 |
| | | */ |
| | | |
| | | |
| | | @Component |
| | | public class ProductionPlanTask { |
| | | |
| | | @Autowired |
| | | private ProductionPlanService productionPlanService; |
| | | |
| | | @Scheduled(cron = "0 0 * * * ?") |
| | | public void syncProdDataJob() { |
| | | productionPlanService.syncProdDataJob(); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.controller; |
| | | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.projectManagement.service.InfoService; |
| | | import com.ruoyi.projectManagement.vo.SaveInfoVo; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.RequiredArgsConstructor; |
| | | 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; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/projectManagement/info") |
| | | @Api(value = "InfoController", tags = "项ç®ç®¡çä¿¡æ¯è¡¨(项ç®ç®¡çç±»å)") |
| | | @RequiredArgsConstructor |
| | | public class InfoController { |
| | | |
| | | private final InfoService infoService; |
| | | |
| | | @PostMapping("/save") |
| | | public AjaxResult save(@RequestBody @Valid SaveInfoVo saveInfoVo) { |
| | | infoService.save(saveInfoVo); |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class ContractInfoDto implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | * åç§° |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * æ§å« |
| | | */ |
| | | private String sex; |
| | | |
| | | /** |
| | | * çæ¥ |
| | | */ |
| | | private String birthday; |
| | | |
| | | /** |
| | | * é¨é¨ |
| | | */ |
| | | private String department; |
| | | |
| | | /** |
| | | * èå¡ |
| | | */ |
| | | private String job; |
| | | |
| | | /** |
| | | * ææºå· |
| | | */ |
| | | private String phoneNumber; |
| | | |
| | | /** |
| | | * é®ç®± |
| | | */ |
| | | private String email; |
| | | |
| | | /** |
| | | * QQ |
| | | */ |
| | | private String qq; |
| | | |
| | | /** |
| | | * åºå®å·ç |
| | | */ |
| | | private String lineaFissa; |
| | | |
| | | /** |
| | | * 微信 |
| | | */ |
| | | private String wx; |
| | | |
| | | /** |
| | | * ç±è´¯ |
| | | */ |
| | | private String origineEtnica; |
| | | |
| | | /** |
| | | * æ³äººä»£è¡¨ |
| | | */ |
| | | private String rappresentanteLegale; |
| | | |
| | | /** |
| | | * 对åºé¡¹ç®ç®¡çä¿¡æ¯id |
| | | */ |
| | | private Long projectManagementInfoId; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.dto; |
| | | |
| | | import com.ruoyi.common.enums.PlanStageEnum; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class PlanStageDto implements Serializable { |
| | | private Long id; |
| | | private String name; |
| | | private PlanStageEnum planStageEnum; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class SaveInfoDto implements Serializable { |
| | | private Long id; |
| | | private String no; |
| | | @NotBlank |
| | | private String title; |
| | | private Long clientId; |
| | | private String clientName; |
| | | // å¼ç¨çç¶id |
| | | private Long projectManagementInfoParentId; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate establishTime; |
| | | // 项ç®ç±»å id |
| | | @NotNull |
| | | private Long projectManagementPlanId; |
| | | |
| | | private String source; |
| | | |
| | | private Long managerId; |
| | | private String managerName; |
| | | private Long salesmanId; |
| | | private String salesmanName; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate planStartTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate planEndTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate actualStartTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate actualEndTime; |
| | | |
| | | // 项ç®ç¶æ |
| | | private Integer status; |
| | | |
| | | private Long departmentId; |
| | | private String departmentName; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate orderDate; |
| | | |
| | | |
| | | private String orderAmount; |
| | | |
| | | private String remark; |
| | | |
| | | private List<String> attachmentIds; // éä»¶ids |
| | | |
| | | private List<TeamDto> teamList; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.dto; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class ShippingAddressDto implements Serializable { |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * æ¶è´§äºº |
| | | */ |
| | | private String consignee; |
| | | |
| | | /** |
| | | * èç³»æ¹å¼ |
| | | */ |
| | | private String contract; |
| | | |
| | | /** |
| | | * å°å |
| | | */ |
| | | private String address; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class TeamDto implements Serializable { |
| | | |
| | | private Integer userId; |
| | | private String userName; |
| | | private String userRoleId; |
| | | private String userRoleName; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date joinTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date departTime; |
| | | private String contact; |
| | | private String remark; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.mapper; |
| | | |
| | | import com.ruoyi.projectManagement.pojo.ContractInfo; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãproject_management_contract_info(项ç®è系信æ¯)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2026-03-09 16:38:09 |
| | | * @Entity com.ruoyi.projectManagement.pojo.ContractInfo |
| | | */ |
| | | public interface ContractInfoMapper extends BaseMapper<ContractInfo> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.mapper; |
| | | |
| | | import com.ruoyi.projectManagement.pojo.Info; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãproject_management_info(项ç®ç®¡çä¿¡æ¯)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2026-03-09 13:57:50 |
| | | * @Entity com.ruoyi.projectManagement.pojo.Info |
| | | */ |
| | | public interface InfoMapper extends BaseMapper<Info> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.mapper; |
| | | |
| | | import com.ruoyi.projectManagement.pojo.ShippingAddress; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãproject_management_shipping_address(æ¶è´§å°å)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2026-03-09 16:28:07 |
| | | * @Entity com.ruoyi.projectManagement.pojo.ShippingAddress |
| | | */ |
| | | public interface ShippingAddressMapper extends BaseMapper<ShippingAddress> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 项ç®èç³»ä¿¡æ¯ |
| | | * @TableName project_management_contract_info |
| | | */ |
| | | @TableName(value ="project_management_contract_info") |
| | | @Data |
| | | public class ContractInfo implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * åç§° |
| | | */ |
| | | @TableField(value = "name") |
| | | private String name; |
| | | |
| | | /** |
| | | * æ§å« |
| | | */ |
| | | @TableField(value = "sex") |
| | | private String sex; |
| | | |
| | | /** |
| | | * çæ¥ |
| | | */ |
| | | @TableField(value = "birthday") |
| | | private String birthday; |
| | | |
| | | /** |
| | | * é¨é¨ |
| | | */ |
| | | @TableField(value = "department") |
| | | private String department; |
| | | |
| | | /** |
| | | * èå¡ |
| | | */ |
| | | @TableField(value = "job") |
| | | private String job; |
| | | |
| | | /** |
| | | * ææºå· |
| | | */ |
| | | @TableField(value = "phone_number") |
| | | private String phoneNumber; |
| | | |
| | | /** |
| | | * é®ç®± |
| | | */ |
| | | @TableField(value = "email") |
| | | private String email; |
| | | |
| | | /** |
| | | * QQ |
| | | */ |
| | | @TableField(value = "qq") |
| | | private String qq; |
| | | |
| | | /** |
| | | * åºå®å·ç |
| | | */ |
| | | @TableField(value = "linea_fissa") |
| | | private String lineaFissa; |
| | | |
| | | /** |
| | | * 微信 |
| | | */ |
| | | @TableField(value = "wx") |
| | | private String wx; |
| | | |
| | | /** |
| | | * ç±è´¯ |
| | | */ |
| | | @TableField(value = "origine_etnica") |
| | | private String origineEtnica; |
| | | |
| | | /** |
| | | * æ³äººä»£è¡¨ |
| | | */ |
| | | @TableField(value = "rappresentante_legale") |
| | | private String rappresentanteLegale; |
| | | |
| | | /** |
| | | * 对åºé¡¹ç®ç®¡çä¿¡æ¯id |
| | | */ |
| | | @TableField(value = "project_management_info_id") |
| | | private Long projectManagementInfoId; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_user", fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_user", fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_time", fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
| | | import com.ruoyi.projectManagement.dto.PlanStageDto; |
| | | import com.ruoyi.projectManagement.dto.TeamDto; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 项ç®ç®¡çä¿¡æ¯ |
| | | * @TableName project_management_info |
| | | */ |
| | | @TableName(value ="project_management_info",autoResultMap = true) |
| | | @Data |
| | | public class Info implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 项ç®ç¼å· |
| | | */ |
| | | @TableField(value = "no") |
| | | private String no; |
| | | |
| | | /** |
| | | * ä¸»é¢ |
| | | */ |
| | | @TableField(value = "title") |
| | | private String title; |
| | | |
| | | /** |
| | | * 客æ·id |
| | | */ |
| | | @TableField(value = "client_id") |
| | | private Long clientId; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @TableField(value = "client_name") |
| | | private String clientName; |
| | | |
| | | /** |
| | | * ç´¢å¼çç¶é¡¹ç®id |
| | | */ |
| | | @TableField(value = "project_management_info_parent_id") |
| | | private Long projectManagementInfoParentId; |
| | | |
| | | /** |
| | | * ç«é¡¹æ¶é´ |
| | | */ |
| | | @TableField(value = "establish_time") |
| | | private LocalDate establishTime; |
| | | |
| | | /** |
| | | * 项ç®é¶æ®µid |
| | | */ |
| | | @TableField(value = "project_management_plan_id") |
| | | private Long projectManagementPlanId; |
| | | |
| | | /** |
| | | * æ¥æº |
| | | */ |
| | | @TableField(value = "source") |
| | | private String source; |
| | | |
| | | /** |
| | | * 项ç®ç»çid |
| | | */ |
| | | @TableField(value = "manager_id") |
| | | private Long managerId; |
| | | |
| | | /** |
| | | * 项ç®ç»çåå |
| | | */ |
| | | @TableField(value = "manager_name") |
| | | private String managerName; |
| | | |
| | | /** |
| | | * ä¸å¡åid |
| | | */ |
| | | @TableField(value = "salesman_id") |
| | | private Long salesmanId; |
| | | |
| | | /** |
| | | * ä¸å¡ååå |
| | | */ |
| | | @TableField(value = "salesman_name") |
| | | private String salesmanName; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_time",fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_user",fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * 计åå¼å§æ¶é´ |
| | | */ |
| | | @TableField(value = "plan_start_time") |
| | | private LocalDate planStartTime; |
| | | |
| | | /** |
| | | * 计åç»ææ¶é´ |
| | | */ |
| | | @TableField(value = "plan_end_time") |
| | | private LocalDate planEndTime; |
| | | |
| | | /** |
| | | * å®é
å¼å§æ¶é´ |
| | | */ |
| | | @TableField(value = "actual_start_time") |
| | | private LocalDate actualStartTime; |
| | | |
| | | /** |
| | | * å®é
ç»ææ¥æ |
| | | */ |
| | | @TableField(value = "actual_end_time") |
| | | private LocalDate actualEndTime; |
| | | |
| | | /** |
| | | * å®¡æ ¸ç¶æ |
| | | */ |
| | | @TableField(value = "review_status") |
| | | private Integer reviewStatus; |
| | | |
| | | /** |
| | | * 项ç®ç¶æ |
| | | */ |
| | | @TableField(value = "status") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * é¨é¨id |
| | | */ |
| | | @TableField(value = "department_id") |
| | | private Long departmentId; |
| | | |
| | | /** |
| | | * é¨é¨åå |
| | | */ |
| | | @TableField(value = "department_name") |
| | | private String departmentName; |
| | | |
| | | /** |
| | | * è®¢åæ¥æ |
| | | */ |
| | | @TableField(value = "order_date") |
| | | private LocalDate orderDate; |
| | | |
| | | /** |
| | | * 订åéé¢ |
| | | */ |
| | | @TableField(value = "order_amount") |
| | | private String orderAmount; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @TableField(value = "remark") |
| | | private String remark; |
| | | |
| | | /** |
| | | * éä»¶ |
| | | */ |
| | | @TableField(value = "attachment") |
| | | private String attachment; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableField(value = "plan_stage",typeHandler = JacksonTypeHandler.class) |
| | | private List<PlanStageDto> planStage; |
| | | |
| | | @TableField(value = "team",typeHandler = JacksonTypeHandler.class) |
| | | private List<TeamDto> team; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ¶è´§å°å |
| | | * @TableName project_management_shipping_address |
| | | */ |
| | | @TableName(value ="project_management_shipping_address") |
| | | @Data |
| | | public class ShippingAddress implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * æ¶è´§äºº |
| | | */ |
| | | @TableField(value = "consignee") |
| | | private String consignee; |
| | | |
| | | /** |
| | | * èç³»æ¹å¼ |
| | | */ |
| | | @TableField(value = "contract") |
| | | private String contract; |
| | | |
| | | /** |
| | | * å°å |
| | | */ |
| | | @TableField(value = "address") |
| | | private String address; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_time",fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_user",fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | @TableField(value = "project_management_info_id") |
| | | private Long projectManagementInfoId; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.service; |
| | | |
| | | import com.ruoyi.projectManagement.vo.SaveInfoVo; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | public interface InfoService { |
| | | void save(@NotNull SaveInfoVo saveInfoVo); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.projectManagement.pojo.Plan; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.projectManagement.pojo.PlanNode; |
| | | import com.ruoyi.projectManagement.vo.PlanVo; |
| | | import com.ruoyi.projectManagement.vo.SavePlanNodeVo; |
| | | import com.ruoyi.projectManagement.vo.SavePlanVo; |
| | |
| | | */ |
| | | void savePlanNode(@NotNull Long planId,@Nullable List<SavePlanNodeVo> savePlanNodeVos); |
| | | |
| | | List<PlanNode> getPlanNodeByPlanId(@NotNull Long planId); |
| | | |
| | | /** |
| | | * å é¤é¡¹ç®ç®¡ç计å |
| | | * @param id |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.service.impl; |
| | | |
| | | import com.ruoyi.common.enums.SaleEnum; |
| | | import com.ruoyi.projectManagement.service.InfoService; |
| | | import com.ruoyi.projectManagement.service.impl.handle.ContractInfoHandleService; |
| | | import com.ruoyi.projectManagement.service.impl.handle.InfoHandleService; |
| | | import com.ruoyi.projectManagement.service.impl.handle.ShippingAddressHandleService; |
| | | import com.ruoyi.projectManagement.vo.SaveInfoVo; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Transactional(readOnly = true) |
| | | public class InfoServiceImpl implements InfoService { |
| | | private final InfoHandleService infoHandleService; |
| | | private final ContractInfoHandleService contractInfoHandleService; |
| | | private final ShippingAddressHandleService shippingAddressHandleService; |
| | | private final ISalesLedgerService salesLedgerService; |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void save(SaveInfoVo saveInfoVo) { |
| | | // ä¿åä¸»ä¿¡æ¯ |
| | | Long infoId = infoHandleService.save(saveInfoVo.getInfo()); |
| | | shippingAddressHandleService.save(infoId, saveInfoVo.getShippingAddress()); |
| | | contractInfoHandleService.save(infoId, saveInfoVo.getContractInfo()); |
| | | salesLedgerService.handleSalesLedgerProducts(infoId, saveInfoVo.getSalesLedgerProductList(), SaleEnum.MANAGEMENT); |
| | | } |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | private List<PlanNode> getPlanNodeByPlanId(Long planId) { |
| | | @Override |
| | | public List<PlanNode> getPlanNodeByPlanId(Long planId) { |
| | | return planNodeMapper.selectList(new LambdaQueryWrapper<PlanNode>() |
| | | .eq(PlanNode::getIsDelete, 0) |
| | | .eq(PlanNode::getProjectManagementPlanId, planId)); |
| | | .eq(PlanNode::getProjectManagementPlanId, planId).orderByAsc(PlanNode::getSort)); |
| | | } |
| | | |
| | | private List<PlanNode> getPlanNodeByPlanIds(List<Long> planIds) { |
| | | return planNodeMapper.selectList(new LambdaQueryWrapper<PlanNode>() |
| | | .eq(PlanNode::getIsDelete, 0) |
| | | .in(PlanNode::getProjectManagementPlanId, planIds)); |
| | | .in(PlanNode::getProjectManagementPlanId, planIds).orderByAsc(PlanNode::getSort)); |
| | | } |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.service.impl.handle; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.ruoyi.projectManagement.dto.ContractInfoDto; |
| | | import com.ruoyi.projectManagement.mapper.ContractInfoMapper; |
| | | import com.ruoyi.projectManagement.pojo.ContractInfo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Nullable; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Component |
| | | @Transactional(rollbackFor = Exception.class,readOnly = true) |
| | | public class ContractInfoHandleService{ |
| | | |
| | | @Autowired |
| | | private ContractInfoMapper contractInfoMapper; |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void save(@Nullable Long id, @NotNull ContractInfoDto contractInfoDto) { |
| | | ContractInfo contractInfo = BeanUtil.copyProperties(contractInfoDto, ContractInfo.class); |
| | | contractInfo.setProjectManagementInfoId(id); |
| | | if (contractInfoDto.getId() == null) { |
| | | contractInfoMapper.insert(contractInfo); |
| | | } else { |
| | | contractInfoMapper.updateById(contractInfo); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.service.impl.handle; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.enums.PlanStageEnum; |
| | | import com.ruoyi.common.enums.ReviewStatusEnum; |
| | | import com.ruoyi.common.utils.EnumUtil; |
| | | import com.ruoyi.projectManagement.dto.PlanStageDto; |
| | | import com.ruoyi.projectManagement.dto.SaveInfoDto; |
| | | import com.ruoyi.projectManagement.mapper.InfoMapper; |
| | | import com.ruoyi.projectManagement.pojo.Info; |
| | | import com.ruoyi.projectManagement.pojo.PlanNode; |
| | | import com.ruoyi.projectManagement.service.PlanService; |
| | | import com.ruoyi.projectManagement.service.impl.PlanServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class,readOnly = true) |
| | | public class InfoHandleService { |
| | | |
| | | private static final String GENERATE_SERIAL_NUMBER_PREFIX = "XM"; |
| | | |
| | | private final InfoMapper infoMapper; |
| | | |
| | | private final PlanService planService; |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Long save(@NotNull SaveInfoDto saveInfoDto){ |
| | | Info info = BeanUtil.copyProperties(saveInfoDto, Info.class); |
| | | |
| | | // éä»¶ç¹æ®å¤ç |
| | | String attachmentIds = StrUtil.join(",", Optional.ofNullable(saveInfoDto.getAttachmentIds()).orElse(Collections.emptyList())); |
| | | info.setAttachment(attachmentIds); |
| | | |
| | | // çæåºå· (妿éè¦èªå¨çæçè¯) |
| | | if(StrUtil.isBlank(info.getNo())){ |
| | | info.setNo(generateSerialNumber()); |
| | | } |
| | | info.setTeam(saveInfoDto.getTeamList()); |
| | | if(info.getId() == null){ |
| | | // çæå¯¹åºçé¶æ®µå
³ç³»æ°æ® |
| | | info.setPlanStage(getPlanStageList(info.getProjectManagementPlanId())); |
| | | // æå
¥é»è®¤ç¶æ |
| | | info.setStatus(PlanStageEnum.TO_BEGIN.getCode()); |
| | | info.setReviewStatus(ReviewStatusEnum.PENDING_REVIEW.getCode()); |
| | | infoMapper.insert(info); |
| | | }else { |
| | | infoMapper.updateById(info); |
| | | } |
| | | return info.getId(); |
| | | } |
| | | |
| | | |
| | | private List<PlanStageDto> getPlanStageList(@NotNull Long planId) { |
| | | List<PlanNode> planNodeByPlanId = planService.getPlanNodeByPlanId(planId); |
| | | return planNodeByPlanId.stream().map(it-> new PlanStageDto(it.getId(), it.getName(), PlanStageEnum.TO_BEGIN)).collect(Collectors.toList()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * çæé¡¹ç®ç¼å· |
| | | * @return |
| | | */ |
| | | private String generateSerialNumber() { |
| | | // è·åå½åæ¥æ |
| | | String date = DateUtil.format(DateUtil.date(), "yyyyMMdd"); |
| | | |
| | | // æ¥è¯¢ä»å¤©å·²ç»çæçæ°é |
| | | LambdaQueryWrapper<Info> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.likeRight(Info::getNo, GENERATE_SERIAL_NUMBER_PREFIX + date); |
| | | |
| | | Long count = infoMapper.selectCount(queryWrapper); |
| | | |
| | | // åºå· +1 |
| | | Long serial = count + 1; |
| | | |
| | | // 3ä½è¡¥0 |
| | | String serialStr = String.format("%03d", serial); |
| | | |
| | | return GENERATE_SERIAL_NUMBER_PREFIX + date + serialStr; |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.service.impl.handle; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.ruoyi.projectManagement.dto.ShippingAddressDto; |
| | | import com.ruoyi.projectManagement.mapper.ShippingAddressMapper; |
| | | import com.ruoyi.projectManagement.pojo.ShippingAddress; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Nullable; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class,readOnly = true) |
| | | public class ShippingAddressHandleService { |
| | | |
| | | private final ShippingAddressMapper shippingAddressMapper; |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void save(@Nullable Long infoId,@NotNull ShippingAddressDto shippingAddressDto){ |
| | | ShippingAddress shippingAddress = BeanUtil.copyProperties(shippingAddressDto, ShippingAddress.class); |
| | | shippingAddress.setProjectManagementInfoId(infoId); |
| | | if (shippingAddressDto.getId() == null) { |
| | | shippingAddressMapper.insert(shippingAddress); |
| | | }else { |
| | | shippingAddressMapper.updateById(shippingAddress); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.vo; |
| | | |
| | | import com.ruoyi.projectManagement.dto.ContractInfoDto; |
| | | import com.ruoyi.projectManagement.dto.SaveInfoDto; |
| | | import com.ruoyi.projectManagement.dto.ShippingAddressDto; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/9 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class SaveInfoVo implements Serializable { |
| | | |
| | | @Valid |
| | | private SaveInfoDto info; |
| | | |
| | | @Valid |
| | | private ShippingAddressDto shippingAddress; |
| | | |
| | | @Valid |
| | | private ContractInfoDto contractInfo; |
| | | |
| | | private List<SalesLedgerProduct> salesLedgerProductList; |
| | | } |
| | |
| | | package com.ruoyi.projectManagement.vo; |
| | | |
| | | |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | |
| | | private Long id; |
| | | @NotBlank |
| | | private String name; |
| | | @NotBlank |
| | | // @NotBlank |
| | | private String description; |
| | | |
| | | private List<String> attachmentIds; |
| | |
| | | @Valid |
| | | private List<SavePlanNodeVo> savePlanNodeList; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 01:37:44 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/purchaseReturnOrderProducts") |
| | | public class PurchaseReturnOrderProductsController { |
| | | |
| | | } |
| | |
| | | if (purchaseReturnOrderDto.getIsDefaultNo()) { |
| | | purchaseReturnOrderDto.setNo(OrderUtils.countTodayByCreateTime(purchaseReturnOrdersMapper, "CGTL")); |
| | | } |
| | | return AjaxResult.success(purchaseReturnOrdersService.save(purchaseReturnOrderDto)); |
| | | return AjaxResult.success(purchaseReturnOrdersService.add(purchaseReturnOrderDto)); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.purchase.dto; |
| | | |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrderProducts; |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrders; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PurchaseReturnOrderDto extends PurchaseReturnOrders { |
| | | // æ¯å¦ä½¿ç¨ç³»ç»åå· |
| | | private Boolean isDefaultNo; |
| | | |
| | | |
| | | private List<PurchaseReturnOrderProductsDto> purchaseReturnOrderProductsDtos; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.dto; |
| | | |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrderProducts; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PurchaseReturnOrderProductsDto extends PurchaseReturnOrderProducts { |
| | | |
| | | private String productName; |
| | | private String model; |
| | | private String unit; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.mapper; |
| | | |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrderProducts; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 01:37:44 |
| | | */ |
| | | @Mapper |
| | | public interface PurchaseReturnOrderProductsMapper extends BaseMapper<PurchaseReturnOrderProducts> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.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 java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 01:37:44 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("purchase_return_order_products") |
| | | @ApiModel(value = "PurchaseReturnOrderProducts对象", description = "") |
| | | public class PurchaseReturnOrderProducts implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("éè´§åid") |
| | | private Long purchaseReturnOrderId; |
| | | |
| | | @ApiModelProperty("éè´äº§åid") |
| | | private Long salesLedgerProductId; |
| | | |
| | | @ApiModelProperty("å½å
¥æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("éè´§æ°é") |
| | | private BigDecimal num; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.service; |
| | | |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrderProducts; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 01:37:44 |
| | | */ |
| | | public interface PurchaseReturnOrderProductsService extends IService<PurchaseReturnOrderProducts> { |
| | | |
| | | } |
| | |
| | | */ |
| | | public interface PurchaseReturnOrdersService extends IService<PurchaseReturnOrders> { |
| | | IPage<PurchaseReturnOrderVo> listPage(Page page, PurchaseReturnOrderDto purchaseReturnOrderDto); |
| | | |
| | | Boolean add(PurchaseReturnOrderDto purchaseReturnOrderDto); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.service.impl; |
| | | |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrderProducts; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper; |
| | | import com.ruoyi.purchase.service.PurchaseReturnOrderProductsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-09 01:37:44 |
| | | */ |
| | | @Service |
| | | public class PurchaseReturnOrderProductsServiceImpl extends ServiceImpl<PurchaseReturnOrderProductsMapper, PurchaseReturnOrderProducts> implements PurchaseReturnOrderProductsService { |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.purchase.dto.PurchaseReturnOrderDto; |
| | | import com.ruoyi.purchase.dto.PurchaseReturnOrderProductsDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrders; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrdersMapper; |
| | | import com.ruoyi.purchase.service.PurchaseReturnOrdersService; |
| | |
| | | import com.ruoyi.purchase.vo.PurchaseReturnOrderVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public class PurchaseReturnOrdersServiceImpl extends ServiceImpl<PurchaseReturnOrdersMapper, PurchaseReturnOrders> implements PurchaseReturnOrdersService { |
| | | @Autowired |
| | | private PurchaseReturnOrdersMapper purchaseReturnOrdersMapper; |
| | | @Autowired |
| | | private PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper; |
| | | |
| | | @Override |
| | | public IPage<PurchaseReturnOrderVo> listPage(Page page, PurchaseReturnOrderDto purchaseReturnOrderDto) { |
| | | return purchaseReturnOrdersMapper.listPage(page, purchaseReturnOrderDto); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean add(PurchaseReturnOrderDto purchaseReturnOrderDto) { |
| | | this.save(purchaseReturnOrderDto); |
| | | if (purchaseReturnOrderDto.getPurchaseReturnOrderProductsDtos().isEmpty()) { |
| | | for (PurchaseReturnOrderProductsDto purchaseReturnOrderProductsDto :purchaseReturnOrderDto.getPurchaseReturnOrderProductsDtos()) { |
| | | purchaseReturnOrderProductsDto.setPurchaseReturnOrderId(purchaseReturnOrderDto.getId()); |
| | | purchaseReturnOrderProductsMapper.insert(purchaseReturnOrderProductsDto); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.aftersalesservice.pojo.AfterSalesService; |
| | | import com.ruoyi.common.enums.SaleEnum; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.dto.LossProductModelDto; |
| | | import com.ruoyi.sales.dto.MonthlyAmountDto; |
| | | import com.ruoyi.sales.dto.SalesLedgerDto; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | int addOrUpdateSalesLedger(SalesLedgerDto salesLedgerDto); |
| | | |
| | | void handleSalesLedgerProducts(Long salesLedgerId, List<SalesLedgerProduct> products, SaleEnum type); |
| | | |
| | | SalesLedgerDto getSalesLedgerWithProducts(SalesLedgerDto salesLedgerDto); |
| | | |
| | | List getSalesNo(); |
| | |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.enums.SaleEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.EnumUtil; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | // 4. å¤çåè¡¨æ°æ® |
| | | List<SalesLedgerProduct> productList = salesLedgerDto.getProductData(); |
| | | if (productList != null && !productList.isEmpty()) { |
| | | handleSalesLedgerProducts(salesLedger.getId(), productList, salesLedgerDto.getType()); |
| | | handleSalesLedgerProducts(salesLedger.getId(), productList, EnumUtil.fromCode(SaleEnum.class,salesLedgerDto.getType())); |
| | | updateMainContractAmount( |
| | | salesLedger.getId(), |
| | | productList, |
| | |
| | | } |
| | | |
| | | |
| | | private void handleSalesLedgerProducts(Long salesLedgerId, List<SalesLedgerProduct> products, Integer type) { |
| | | @Override |
| | | public void handleSalesLedgerProducts(Long salesLedgerId, List<SalesLedgerProduct> products, SaleEnum type) { |
| | | // æIDåç»ï¼åºåæ°å¢åæ´æ°çè®°å½ |
| | | Map<Boolean, List<SalesLedgerProduct>> partitionedProducts = products.stream() |
| | | .peek(p -> p.setSalesLedgerId(salesLedgerId)) |
| | |
| | | // æ§è¡æ´æ°æä½ |
| | | if (!updateList.isEmpty()) { |
| | | for (SalesLedgerProduct product : updateList) { |
| | | product.setType(type); |
| | | product.setType(type.getCode()); |
| | | salesLedgerProductMapper.updateById(product); |
| | | } |
| | | } |
| | | // æ§è¡æå
¥æä½ |
| | | if (!insertList.isEmpty()) { |
| | | for (SalesLedgerProduct salesLedgerProduct : insertList) { |
| | | salesLedgerProduct.setType(type); |
| | | salesLedgerProduct.setType(type.getCode()); |
| | | salesLedgerProduct.setNoInvoiceNum(salesLedgerProduct.getQuantity()); |
| | | salesLedgerProduct.setNoInvoiceAmount(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | | salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | |
| | | 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.CalculateSalaryDto; |
| | | import com.ruoyi.staff.pojo.StaffSalaryMain; |
| | | import com.ruoyi.staff.service.StaffSalaryMainService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @ApiOperation("éè¿é¨é¨idsè·åç¨æ·ä¿¡æ¯è®¡ç®æ¯ä¸ªåå·¥çå·¥èµ") |
| | | @PostMapping("/calculateSalary") |
| | | public AjaxResult calculateSalary(@RequestBody List<Long> ids) { |
| | | return staffSalaryMainService.calculateSalary(ids); |
| | | public AjaxResult calculateSalary(@RequestBody CalculateSalaryDto calculateSalaryDto) { |
| | | return staffSalaryMainService.calculateSalary(calculateSalaryDto); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2026/3/9 11:53 |
| | | */ |
| | | @Data |
| | | public class CalculateSalaryDto { |
| | | |
| | | private List<Long> ids; |
| | | |
| | | private String date; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.CalculateSalaryDto; |
| | | import com.ruoyi.staff.pojo.StaffSalaryMain; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | |
| | | |
| | | AjaxResult delete(List<Long> ids); |
| | | |
| | | AjaxResult calculateSalary(List<Long> ids); |
| | | AjaxResult calculateSalary(CalculateSalaryDto calculateSalaryDto); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.UserAccountDto; |
| | | import com.ruoyi.production.dto.UserProductionAccountingDto; |
| | | import com.ruoyi.production.service.SalesLedgerProductionAccountingService; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.domain.SysUserDept; |
| | |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductionAccountingService salesLedgerProductionAccountingService; |
| | | |
| | | |
| | | @Override |
| | |
| | | * éè¿åå·¥id计ç®ç¤¾ä¿æ¹æ¡ |
| | | * @param id |
| | | */ |
| | | public void calculateByEmployeeId(Integer id,Map<String, Object> map) { |
| | | public void calculateByEmployeeId(Integer id,Map<String, Object> map,String date) { |
| | | // 1. å
¥åæ ¡éª |
| | | if (id == null) { |
| | | return; // æè¿å空åè¡¨ï¼æ ¹æ®ä¸å¡éæ±è°æ´ |
| | |
| | | // 个ç¨éé¢ï¼æ 社ä¿çï¼ |
| | | BigDecimal bigDecimal = TaxCalculator.calculateMonthlyTax(basicSalary, schemeAmount, gjj); |
| | | map.put("salaryTax", bigDecimal); |
| | | // 计æ¶å·¥èµ è®¡ä»¶å·¥èµ |
| | | UserProductionAccountingDto userProductionAccountingDto = new UserProductionAccountingDto(); |
| | | userProductionAccountingDto.setUserId(getUidByStaffId(staffId)); |
| | | userProductionAccountingDto.setDate(date); |
| | | UserAccountDto byUserId = salesLedgerProductionAccountingService.getByUserId(userProductionAccountingDto); |
| | | if(byUserId != null){ |
| | | map.put("pieceSalary", byUserId.getAccountBalance()); |
| | | map.put("hourlySalary", byUserId.getAccount()); |
| | | // åºå å®åå¢å |
| | | grossSalary = grossSalary.add(byUserId.getAccountBalance()).add(byUserId.getAccount()); |
| | | map.put("grossSalary", grossSalary); |
| | | netSalary = netSalary.add(byUserId.getAccountBalance()).add(byUserId.getAccount()); |
| | | map.put("netSalary", netSalary); |
| | | } |
| | | // 2. æ¥è¯¢è¯¥äººå对åºçç¤¾ä¿æ¹æ¡ |
| | | List<SchemeApplicableStaff> schemeList = schemeApplicableStaffMapper.selectSchemeByStaffId(staffId); |
| | | if (CollectionUtils.isEmpty(schemeList)) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * éè¿åå·¥Idè·åç¨æ·id |
| | | * @param staffId |
| | | * @return |
| | | */ |
| | | public Long getUidByStaffId(Long staffId){ |
| | | StaffOnJob staffOnJob = staffOnJobMapper.selectById(staffId); |
| | | if(staffOnJob == null){ |
| | | return -1L; // è¿åä¸åå¨Id |
| | | } |
| | | SysUser sysUser = sysUserMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .eq(SysUser::getUserName, staffOnJob.getStaffNo()) |
| | | .eq(SysUser::getDelFlag, "0") |
| | | .last("limit 1")); |
| | | if(sysUser == null){ |
| | | return -1L; // è¿åä¸åå¨Id |
| | | } |
| | | return sysUser.getUserId(); |
| | | } |
| | | |
| | | /** |
| | | * è®¡ç® |
| | | * @param type |
| | | * @param bigDecimal |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.mapper.AccountExpenseMapper; |
| | | import com.ruoyi.account.pojo.AccountExpense; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.domain.SysUserDept; |
| | | import com.ruoyi.project.system.mapper.SysUserDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.staff.dto.CalculateSalaryDto; |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.mapper.StaffSalaryDetailMapper; |
| | | import com.ruoyi.staff.pojo.SchemeApplicableStaff; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.pojo.StaffSalaryDetail; |
| | | import com.ruoyi.staff.pojo.StaffSalaryMain; |
| | | import com.ruoyi.staff.mapper.StaffSalaryMainMapper; |
| | |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private StaffOnJobMapper staffOnJobMapper; |
| | | |
| | | @Autowired |
| | | private AccountExpenseMapper accountExpenseMapper; |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, StaffSalaryMain staffSalaryMain) { |
| | |
| | | detail.setMainId(staffSalaryMain.getId()); |
| | | }); |
| | | staffSalaryDetailService.saveBatch(staffSalaryMain.getStaffSalaryDetailList()); |
| | | // åè´¢å¡èå¨ï¼æ°å¢æ¯åº |
| | | if(staffSalaryMain.getStatus().equals(5)){ |
| | | AccountExpense accountExpense = new AccountExpense(); |
| | | accountExpense.setBusinessType(3); |
| | | accountExpense.setExpenseMoney(staffSalaryMain.getTotalSalary()); |
| | | accountExpense.setBusinessId(staffSalaryMain.getId()); |
| | | accountExpense.setExpenseDate(new Date()); |
| | | accountExpense.setExpenseMethod("2"); |
| | | accountExpense.setExpenseType("1"); |
| | | accountExpense.setExpenseDescribed(staffSalaryMain.getSalaryTitle()); |
| | | accountExpense.setNote(staffSalaryMain.getRemark()); |
| | | accountExpense.setInputUser(SecurityUtils.getLoginUser().getNickName()); |
| | | accountExpense.setInputTime(new Date()); |
| | | accountExpenseMapper.insert(accountExpense); |
| | | } |
| | | return AjaxResult.success("ä¿®æ¹æå"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult calculateSalary(List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | public AjaxResult calculateSalary(CalculateSalaryDto calculateSalaryDto) { |
| | | if(CollectionUtils.isEmpty(calculateSalaryDto.getIds())){ |
| | | return AjaxResult.error("åæ°é误"); |
| | | } |
| | | List<Map<String, Object>> longs = setSchemeApplicableStaffUserInfo(ids); // éè¿é¨é¨idsè·åç¨æ·ä¿¡æ¯ |
| | | List<Map<String, Object>> longs = setSchemeApplicableStaffUserInfo(calculateSalaryDto.getIds()); // éè¿é¨é¨idsè·åç¨æ·ä¿¡æ¯ |
| | | if(CollectionUtils.isEmpty(longs)){ |
| | | return AjaxResult.error("æ åå·¥"); |
| | | } |
| | | for (Map<String, Object> id : longs) { |
| | | schemeApplicableStaffService.calculateByEmployeeId((Integer) id.get("id"),id); |
| | | schemeApplicableStaffService.calculateByEmployeeId((Integer) id.get("id"),id,calculateSalaryDto.getDate()); |
| | | } |
| | | return AjaxResult.success(longs); |
| | | } |
| | |
| | | // éè¿é¨é¨è·å人åid |
| | | return sysUserDeptMapper.setSchemeApplicableStaffUserInfo(ids); |
| | | } |
| | | |
| | | } |
| | |
| | | captchaType: math |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEWTEST |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | ali-ding: |
| | | app-key: "dingj5d95ijzaf8lka7c" |
| | | app-secret: "XqZUBeCfaz8z51vz0TdSu_KxP-aUuUu-ebJ5mT25yeELSyAuFrQ7F_g7exQBWf0sb" |
| | | app-key: "dingjnydbagc9ol7cwq4" |
| | | app-secret: "fO07qSZC5SMLw9It3Ydd3BuoFyVbRlsWXUnVr2kwPJXz0OpUntCAO5dqnr8G7zq5" |
| | | user-id: "290166234126410562" |
| | | app-type: "APP_UY8XMO7GNA8OF08EFNVQ" |
| | | form-uuid: "FORM-4IA66891C5H3QWMDBSGO05C0OX9628GRPYF7L8" |
| | | system-token: "4J766L91OFH3V612E7LG5B4DI8M13MQF9VF7LG4" |
| | | # æ¥å£å°å |
| | | access-token-url: "https://api.dingtalk.com/v1.0/oauth2/accessToken" |
| | | access-token-url: "https://oapi.dingtalk.com/gettoken" |
| | | search-form-data-url: "https://api.dingtalk.com/v2.0/yida/forms/instances/search" |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.mapper.SalesReceiptReturnMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.pojo.SalesReceiptReturn"> |
| | | <id column="id" property="id" /> |
| | | <result column="refund_id" property="refundId" /> |
| | | <result column="payment_account" property="paymentAccount" /> |
| | | <result column="payment_account_name" property="paymentAccountName" /> |
| | | <result column="payment_method" property="paymentMethod" /> |
| | | <result column="actual_amount" property="actualAmount" /> |
| | | <result column="fee" property="fee" /> |
| | | <result column="transaction_no" property="transactionNo" /> |
| | | <result column="discount_amount" property="discountAmount" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.mapper.SalesRefundAmountOrderMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.pojo.SalesRefundAmountOrder"> |
| | | <id column="id" property="id" /> |
| | | <result column="return_management_id" property="returnManagementId" /> |
| | | <result column="status" property="status" /> |
| | | <result column="refund_amount" property="refundAmount" /> |
| | | <result column="refunded_amount" property="refundedAmount" /> |
| | | <result column="not_refunded_amount" property="notRefundedAmount" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user_id" property="createUserId" /> |
| | | <result column="update_user_id" property="updateUserId" /> |
| | | </resultMap> |
| | | <select id="pageSalesRefundAmountOrderDto" resultType="com.ruoyi.account.dto.SalesRefundAmountOrderDto"> |
| | | select sl.sales_contract_no, |
| | | sl.customer_contract_no, |
| | | slp.specification_model, |
| | | slp.product_category as product_name, |
| | | slp.unit, |
| | | sl.customer_name, |
| | | rm.return_no as return_management_no, |
| | | srao.* |
| | | from sales_refund_amount_order srao |
| | | left join return_management rm on srao.return_management_id = rm.id |
| | | left join return_sale_product rs on rm.id = rs.return_management_id |
| | | left join sales_ledger_product slp on rs.return_sale_ledger_product_id = slp.id |
| | | left join sales_ledger sl on slp.sales_ledger_id = sl.id |
| | | <where> |
| | | <if test="ew.salesContractNo != null and ew.salesContractNo !=''"> |
| | | and sl.sales_contract_no like concat('%',#{ew.salesContractNo},'%') |
| | | </if> |
| | | <if test="ew.returnManagementNo != null and ew.returnManagementNo !=''"> |
| | | and rm.return_no like concat('%',#{ew.returnManagementNo},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.energy.mapper.EnergyConsumptionDetailFileMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.energy.pojo.EnergyConsumptionDetailFile"> |
| | | <id column="id" property="id" /> |
| | | <result column="energy_consumption_detail_id" property="energyConsumptionDetailId" /> |
| | | <result column="name" property="name" /> |
| | | <result column="url" property="url" /> |
| | | <result column="file_size" property="fileSize" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.energy.mapper.EnergyConsumptionDetailMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.energy.pojo.EnergyConsumptionDetail"> |
| | | <id column="id" property="id"/> |
| | | <result column="energy_id" property="energyId"/> |
| | | <result column="type" property="type"/> |
| | | <result column="meter_reading_location" property="meterReadingLocation"/> |
| | | <result column="meter_reading_date" property="meterReadingDate"/> |
| | | <result column="start_code" property="startCode"/> |
| | | <result column="stop_code" property="stopCode"/> |
| | | <result column="dosage" property="dosage"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | </resultMap> |
| | | <select id="pageEnergyConsumptionDetail" |
| | | resultType="com.ruoyi.energy.dto.EnergyConsumptionDetailDto"> |
| | | select * |
| | | from (select ecd.*, e.energy_tyep, e.energy_name, e.unit, su.nick_name createUserName |
| | | from energy_consumption_detail ecd |
| | | left join energy e on ecd.energy_id = e.id |
| | | left join sys_user su on ecd.create_user = su.user_id) A |
| | | <where> |
| | | <if test="c.energyTyep != null and c.energyTyep != ''"> |
| | | and energy_tyep like concat('%',#{c.energyTyep},'%') |
| | | </if> |
| | | <if test="c.energyName != null and c.energyName != ''"> |
| | | and energy_name like concat('%',#{c.energyName},'%') |
| | | </if> |
| | | <if test="c.meterReadingDate != null and c.meterReadingDate != ''"> |
| | | and meter_reading_date =#{c.meterReadingDate} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.energy.mapper.EnergyMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.energy.pojo.Energy"> |
| | | <id column="id" property="id"/> |
| | | <result column="energy_tyep" property="energyTyep"/> |
| | | <result column="energy_name" property="energyName"/> |
| | | <result column="unit" property="unit"/> |
| | | <result column="unit_price" property="unitPrice"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | </resultMap> |
| | | <select id="pageEnergy" resultType="com.ruoyi.energy.pojo.Energy"> |
| | | select * from (select e.*, su.nick_name createUserName |
| | | from energy e |
| | | left join sys_user su on e.create_user = su.user_id)A |
| | | <where> |
| | | <if test="c.energyTyep != null and c.energyTyep != ''"> |
| | | and energy_tyep like concat('%',#{c.energyTyep},'%') |
| | | </if> |
| | | <if test="c.energyName != null and c.energyName != ''"> |
| | | and energy_name like concat('%',#{c.energyName},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | GROUP BY return_sale_ledger_product_id) rs ON rs.return_sale_ledger_product_id = slp.id |
| | | where rm.id =#{returnManagementId} |
| | | </select> |
| | | <select id="listReturnSaleProduct" resultType="com.ruoyi.procurementrecord.dto.ReturnSaleProductDto"> |
| | | select rsp.*,slp.tax_inclusive_unit_price ,slp.tax_inclusive_total_price*rsp.num as price |
| | | from return_sale_product rsp |
| | | left join sales_ledger_product slp on slp.id = rsp.return_sale_ledger_product_id |
| | | where rsp.return_management_id = #{returnManagementId} |
| | | </select> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.ruoyi.productionPlan.mapper.ProductionPlanMapper"> |
| | | |
| | | <resultMap id="ProductionPlanResultMap" type="com.ruoyi.productionPlan.pojo.ProductionPlan"> |
| | | <id property="id" column="id"/> |
| | | <result property="formInstanceId" column="form_instance_id"/> |
| | | <result property="serialNo" column="serial_no"/> |
| | | <result property="applyNo" column="apply_no"/> |
| | | <result property="customerName" column="customer_name"/> |
| | | <result property="materialCode" column="material_code"/> |
| | | <result property="productName" column="product_name"/> |
| | | <result property="productSpec" column="product_spec"/> |
| | | <result property="length" column="length"/> |
| | | <result property="width" column="width"/> |
| | | <result property="height" column="height"/> |
| | | <result property="quantity" column="quantity"/> |
| | | <result property="volume" column="volume"/> |
| | | <result property="strength" column="strength"/> |
| | | <result property="startDate" column="start_date"/> |
| | | <result property="endDate" column="end_date"/> |
| | | <result property="submitter" column="submitter"/> |
| | | <result property="submitOrg" column="submit_org"/> |
| | | <result property="remarkOne" column="remark_one"/> |
| | | <result property="remarkTwo" column="remark_two"/> |
| | | <result property="creatorName" column="creator_name"/> |
| | | <result property="modifierName" column="modifier_name"/> |
| | | <result property="formCreatedTime" column="form_created_time"/> |
| | | <result property="formModifiedTime" column="form_modified_time"/> |
| | | <result property="dataSyncType" column="data_sync_type"/> |
| | | <result property="dataSourceType" column="data_source_type"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="totalCount" column="total_count"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="listPage" resultMap="ProductionPlanResultMap"> |
| | | SELECT * |
| | | FROM production_plan |
| | | WHERE 1 = 1 |
| | | </select> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.projectManagement.mapper.ContractInfoMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.projectManagement.pojo.ContractInfo"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="sex" column="sex" jdbcType="VARCHAR"/> |
| | | <result property="birthday" column="birthday" jdbcType="VARCHAR"/> |
| | | <result property="department" column="department" jdbcType="VARCHAR"/> |
| | | <result property="job" column="job" jdbcType="VARCHAR"/> |
| | | <result property="phoneNumber" column="phone_number" jdbcType="VARCHAR"/> |
| | | <result property="email" column="email" jdbcType="VARCHAR"/> |
| | | <result property="qq" column="qq" jdbcType="VARCHAR"/> |
| | | <result property="lineaFissa" column="linea_fissa" jdbcType="VARCHAR"/> |
| | | <result property="wx" column="wx" jdbcType="VARCHAR"/> |
| | | <result property="origineEtnica" column="origine_etnica" jdbcType="VARCHAR"/> |
| | | <result property="rappresentanteLegale" column="rappresentante_legale" jdbcType="VARCHAR"/> |
| | | <result property="projectManagementInfoId" column="project_management_info_id" jdbcType="BIGINT"/> |
| | | <result property="isDelete" column="is_delete" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="BIGINT"/> |
| | | <result property="updateUser" column="update_user" jdbcType="BIGINT"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,name,sex, |
| | | birthday,department,job, |
| | | phone_number,email,qq, |
| | | linea_fissa,wx,origine_etnica, |
| | | rappresentante_legale,project_management_info_id,is_delete, |
| | | create_user,update_user,create_time, |
| | | update_time |
| | | </sql> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.projectManagement.mapper.InfoMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.projectManagement.pojo.Info"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="no" column="no" jdbcType="VARCHAR"/> |
| | | <result property="title" column="title" jdbcType="VARCHAR"/> |
| | | <result property="clientId" column="client_id" jdbcType="BIGINT"/> |
| | | <result property="clientName" column="client_name" jdbcType="VARCHAR"/> |
| | | <result property="projectManagementInfoParentId" column="project_management_info_parent_id" jdbcType="BIGINT"/> |
| | | <result property="establishTime" column="establish_time" jdbcType="TIMESTAMP"/> |
| | | <result property="projectManagementPlanId" column="project_management_plan_id" jdbcType="BIGINT"/> |
| | | <result property="source" column="source" jdbcType="VARCHAR"/> |
| | | <result property="managerId" column="manager_id" jdbcType="BIGINT"/> |
| | | <result property="managerName" column="manager_name" jdbcType="VARCHAR"/> |
| | | <result property="salesmanId" column="salesman_id" jdbcType="BIGINT"/> |
| | | <result property="salesmanName" column="salesman_name" jdbcType="VARCHAR"/> |
| | | <result property="isDelete" column="is_delete" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="planStartTime" column="plan_start_time" jdbcType="TIMESTAMP"/> |
| | | <result property="planEndTime" column="plan_end_time" jdbcType="TIMESTAMP"/> |
| | | <result property="actualStartTime" column="actual_start_time" jdbcType="TIMESTAMP"/> |
| | | <result property="actualEndTime" column="actual_end_time" jdbcType="TIMESTAMP"/> |
| | | <result property="status" column="status" jdbcType="INTEGER"/> |
| | | <result property="departmentId" column="department_id" jdbcType="BIGINT"/> |
| | | <result property="departmentName" column="department_name" jdbcType="VARCHAR"/> |
| | | <result property="orderDate" column="order_date" jdbcType="TIMESTAMP"/> |
| | | <result property="orderAmount" column="order_amount" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="attachment" column="attachment" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,no,title, |
| | | client_id,client_name,project_management_info_parent_id, |
| | | establish_time,project_management_plan_id,source, |
| | | manager_id,manager_name,salesman_id, |
| | | salesman_name,is_delete,create_time, |
| | | update_time,create_user,update_user, |
| | | plan_start_time,plan_end_time,actual_start_time, |
| | | actual_end_time,status,department_id, |
| | | department_name,order_date,order_amount, |
| | | remark,attachment |
| | | </sql> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.projectManagement.mapper.ShippingAddressMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.projectManagement.pojo.ShippingAddress"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="consignee" column="consignee" jdbcType="VARCHAR"/> |
| | | <result property="contract" column="contract" jdbcType="VARCHAR"/> |
| | | <result property="address" column="address" jdbcType="VARCHAR"/> |
| | | <result property="isDelete" column="is_delete" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="BIGINT"/> |
| | | <result property="updateUser" column="update_user" jdbcType="BIGINT"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,consignee,contract, |
| | | address,is_delete,create_time, |
| | | update_time,create_user,update_user |
| | | </sql> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.purchase.pojo.PurchaseReturnOrderProducts"> |
| | | <id column="id" property="id" /> |
| | | <result column="purchase_return_order_id" property="purchaseReturnOrderId" /> |
| | | <result column="sales_ledger_product_id" property="salesLedgerProductId" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="num" property="num" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |