feat: 新增销售台账取消新增订单,区分对公/对私
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | ALTER TABLE `product-inventory-management-xzgm`.`customer` |
| | | MODIFY COLUMN `taxpayer_identification_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '纳ç¨äººè¯å«å·' AFTER `customer_name`, |
| | | MODIFY COLUMN `company_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'å
¬å¸å°å' AFTER `taxpayer_identification_number`, |
| | | MODIFY COLUMN `company_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'å
¬å¸çµè¯' AFTER `company_address`, |
| | | MODIFY COLUMN `contact_person` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'è系人' AFTER `company_phone`, |
| | | MODIFY COLUMN `contact_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'èç³»çµè¯' AFTER `contact_person`, |
| | | MODIFY COLUMN `maintainer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'ç»´æ¤äºº' AFTER `contact_phone`, |
| | | MODIFY COLUMN `maintenance_time` date NULL COMMENT 'ç»´æ¤æ¶é´' AFTER `maintainer`, |
| | | MODIFY COLUMN `customer_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '客æ·åç±»ï¼å¯¹å
¬ï¼å¯¹ç§' AFTER `bank_code`; |
| | | |
| | | ALTER TABLE `product-inventory-management-xzgm`.`supplier_manage` |
| | | MODIFY COLUMN `supplier_type` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ä¾åºåç±»åï¼å¯¹å
¬/对ç§ï¼' AFTER `company_address`; |
| | | |
| | | ALTER TABLE `product-inventory-management-xzgm`.`sales_ledger` |
| | | ADD COLUMN `sales_type` varchar(255) NULL COMMENT 'å°è´¦ç±»åï¼å¯¹å
¬/对ç§ï¼' AFTER `delivery_date`; |
| | |
| | | private String unit; |
| | | |
| | | //éå®ååå· |
| | | @Excel(name = "éå®ååå·") |
| | | // @Excel(name = "éå®ååå·") |
| | | private String salesContractNo; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | |
| | | */ |
| | | @Excel(name = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * ä¾åºååç§° |
| | | */ |
| | | @Excel(name = "ä¾åºåç±»å") |
| | | private String supplierType; |
| | | /** |
| | | * æ¯å¦ç½åå |
| | | */ |
| | |
| | | |
| | | @ApiModelProperty(value = "äº¤è´§æ¥æ") |
| | | private LocalDate deliveryDate; |
| | | |
| | | @ApiModelProperty(value = "客æ·åç±»") |
| | | private String customerType; |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | //æ¯å¦å¯ç¼è¾ |
| | | private Boolean isEdit; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "客æ·åç±»") |
| | | private String customerType; |
| | | |
| | | @ApiModelProperty(value = "å°è´¦åç±»") |
| | | private String salesType; |
| | | } |
| | | |
| | |
| | | salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | // æ·»å çäº§æ°æ® |
| | | salesLedgerProductServiceImpl.addProductionData(salesLedgerProduct); |
| | | // salesLedgerProductServiceImpl.addProductionData(salesLedgerProduct); |
| | | } |
| | | } |
| | | } |
| | |
| | | pm.model as productModelName, |
| | | ppo.quantity, |
| | | ppo.scrap_qty, |
| | | pm.unit, |
| | | sl.sales_contract_no salesContractNo |
| | | pm.unit |
| | | from |
| | | production_product_main ppm |
| | | left join product_work_order pwo on pwo.id = ppm.work_order_id |
| | |
| | | left join production_product_output ppo on ppm.id = ppo.product_main_id |
| | | left join product_model pm on pm.id = ppo.product_model_id |
| | | left join product p on p.id = pm.product_id |
| | | left join sales_ledger sl on sl.id = po.sales_ledger_id |
| | | left join sys_user u on u.user_id = ppm.user_id |
| | | <where> |
| | | <if test="c.nickName != null and c.nickName != ''"> |
| | |
| | | pl.template_name, |
| | | pl.approve_user_ids, |
| | | sm.is_white, |
| | | sm.supplier_type AS supplierType, |
| | | pl.approval_status, |
| | | pl.payment_method, |
| | | pl.remarks |
| | |
| | | <if test="c.supplierId != null"> |
| | | AND pl.supplier_id = #{c.supplierId} |
| | | </if> |
| | | <if test="c.approvalStatus != null"> |
| | | AND pl.approval_status = #{c.approvalStatus} |
| | | <if test="c.supplierType != null and c.supplierType != ''"> |
| | | AND sm.supplier_type = #{c.supplierType} |
| | | </if> |
| | | </where> |
| | | ORDER BY pl.entry_date DESC |
| | |
| | | </select> |
| | | |
| | | <select id="selectSalesLedgerListPage" resultType="com.ruoyi.sales.pojo.SalesLedger"> |
| | | SELECT T1.id, |
| | | SELECT |
| | | T1.id, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | |
| | | T1.attachment_materials, |
| | | T1.tenant_id, |
| | | T1.contract_amount, |
| | | T1.contract_amount as noInvoiceAmountTotal, |
| | | T1.contract_amount AS noInvoiceAmountTotal, |
| | | T1.execution_date, |
| | | T2.nick_name AS entry_person_name, |
| | | T2.nick_name AS entry_person_name, |
| | | T1.payment_method, |
| | | T1.delivery_date, |
| | | DATEDIFF(T1.delivery_date, CURDATE()) AS delivery_days_diff, |
| | | T3.customer_type AS customerType, |
| | | CASE |
| | | WHEN shipping_status_counts.total_count = 0 THEN false |
| | | WHEN shipping_status_counts.unshipped_count = 0 THEN true |
| | |
| | | END AS is_fh |
| | | FROM sales_ledger T1 |
| | | LEFT JOIN sys_user T2 ON T1.entry_person = T2.user_id |
| | | LEFT JOIN customer T3 ON T1.customer_id = T3.id |
| | | LEFT JOIN ( |
| | | SELECT sales_ledger_id, |
| | | COUNT(*) as total_count, |
| | |
| | | ) shipping_status_counts ON T1.id = shipping_status_counts.sales_ledger_id |
| | | <where> |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | AND T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' "> |
| | | AND T1.entry_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | | AND T1.entry_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateEnd != null and salesLedgerDto.entryDateEnd != '' "> |
| | | AND T1.entry_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | AND T1.entry_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | <if test="salesLedgerDto.customerType != null and salesLedgerDto.customerType != '' "> |
| | | AND T3.customer_type = #{salesLedgerDto.customerType} |
| | | </if> |
| | | </where> |
| | | order by T1.entry_date desc |
| | | ORDER BY T1.entry_date DESC |
| | | </select> |
| | | |
| | | <select id="selectIncomeStats" resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto"> |