diff --git a/pom.xml b/pom.xml index a7260d61..bcbf955f 100644 --- a/pom.xml +++ b/pom.xml @@ -303,6 +303,18 @@ liss + + qsj + + qsj + + + + qsj + + qsj + + diff --git a/supply-server/Dockerfile b/supply-server/Dockerfile index 9ae44025..706f0a57 100644 --- a/supply-server/Dockerfile +++ b/supply-server/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:17-jre-slim +FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre # 设置应用目录 WORKDIR /app diff --git a/supply-server/pom.xml b/supply-server/pom.xml index dbc51ab6..24a85bea 100644 --- a/supply-server/pom.xml +++ b/supply-server/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> cn.iocoder.cloud - yudao + dsc-supply ${revision} 4.0.0 @@ -25,6 +25,12 @@ yudao-module-infra-api ${revision} + + cn.iocoder.cloud + yudao-framework + ${revision} + pom + cn.iocoder.cloud yudao-module-capital-server @@ -75,12 +81,43 @@ yudao-module-sell-server ${revision} + + + + cn.iocoder.cloud + yudao-spring-boot-starter-biz-data-permission + + + cn.iocoder.cloud + yudao-spring-boot-starter-biz-tenant + + + + + cn.iocoder.cloud + yudao-spring-boot-starter-web + + + cn.iocoder.cloud + yudao-spring-boot-starter-security + org.springframework.boot spring-boot-configuration-processor true + + + cn.iocoder.cloud + yudao-spring-boot-starter-mybatis + + + + cn.iocoder.cloud + yudao-spring-boot-starter-redis + + cn.iocoder.cloud @@ -103,13 +140,6 @@ cn.iocoder.cloud yudao-spring-boot-starter-rpc - - - - org.springframework.cloud - spring-cloud-starter-openfeign - - diff --git a/supply-server/src/main/java/cn/iocoder/yudao/supply/controller/supply/SupplyController.java b/supply-server/src/main/java/cn/iocoder/yudao/supply/controller/supply/SupplyController.java index df889d19..aad56011 100644 --- a/supply-server/src/main/java/cn/iocoder/yudao/supply/controller/supply/SupplyController.java +++ b/supply-server/src/main/java/cn/iocoder/yudao/supply/controller/supply/SupplyController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.supply.controller.supply; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/supply-server/src/main/resources/application.yml b/supply-server/src/main/resources/application.yml index 2f26d2fb..7332cfab 100644 --- a/supply-server/src/main/resources/application.yml +++ b/supply-server/src/main/resources/application.yml @@ -104,7 +104,7 @@ xxl: yudao: info: version: 1.0.0 - base-package: cn.iocoder.yudao.module + base-package: cn.iocoder.yudao web: admin-ui: url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址 diff --git a/yudao-module-bill/pom.xml b/yudao-module-bill/pom.xml index f88fdc77..0389c39f 100644 --- a/yudao-module-bill/pom.xml +++ b/yudao-module-bill/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} diff --git a/yudao-module-bill/yudao-module-bill-api/src/main/java/cn/iocoder/yudao/module/bill/enums/ErrorCodeConstants.java b/yudao-module-bill/yudao-module-bill-api/src/main/java/cn/iocoder/yudao/module/bill/enums/ErrorCodeConstants.java index 7b8e4a5b..34d07048 100644 --- a/yudao-module-bill/yudao-module-bill-api/src/main/java/cn/iocoder/yudao/module/bill/enums/ErrorCodeConstants.java +++ b/yudao-module-bill/yudao-module-bill-api/src/main/java/cn/iocoder/yudao/module/bill/enums/ErrorCodeConstants.java @@ -14,4 +14,7 @@ public interface ErrorCodeConstants { // ========== 示例模块 1-001-000-000 ========== ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); + ErrorCode INVOICE_MAIN_NOT_EXISTS = new ErrorCode(1, "发票主不存在"); + + ErrorCode INVOICE_DETAIL_NOT_EXISTS = new ErrorCode(2, "发票明细不存在"); } diff --git a/yudao-module-bill/yudao-module-bill-server/pom.xml b/yudao-module-bill/yudao-module-bill-server/pom.xml index 79114506..f0a2548e 100644 --- a/yudao-module-bill/yudao-module-bill-server/pom.xml +++ b/yudao-module-bill/yudao-module-bill-server/pom.xml @@ -131,21 +131,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/BillServerApplication.java b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/BillServerApplication.java index ecfc296f..3ad49c27 100644 --- a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/BillServerApplication.java +++ b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/BillServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class BillServerApplication { public static void main(String[] args) { diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/controller/admin/bill/BillController.java b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/controller/admin/bill/BillController.java index 9d5c63a4..7ac0de55 100644 --- a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/controller/admin/bill/BillController.java +++ b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/controller/admin/bill/BillController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.module.bill.controller.admin.bill; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/rpc/config/RpcConfiguration.java b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..d921851b --- /dev/null +++ b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.bill.framework.rpc.config; + +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "billRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/security/config/SecurityConfiguration.java b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/security/config/SecurityConfiguration.java index 7e1b4def..3f2e1823 100644 --- a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Bill 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("billSecurityConfiguration") public class SecurityConfiguration { @Bean diff --git a/yudao-module-capital/pom.xml b/yudao-module-capital/pom.xml index 429e5add..1c9ada2f 100644 --- a/yudao-module-capital/pom.xml +++ b/yudao-module-capital/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} @@ -18,7 +18,7 @@ ${project.artifactId} - Capital 模块。 + Capital 模块。资金授信模块。 diff --git a/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/CapitalDictTypeConstants.java b/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/CapitalDictTypeConstants.java new file mode 100644 index 00000000..8838faf6 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/CapitalDictTypeConstants.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.capital.enums; + +/** + * 资金授信模块 字典类型的枚举类 + * + * @author 芋道源码 + */ +public interface CapitalDictTypeConstants { + +// ========== capital 模块 ========== + + String SPLY_AMT_CRDT_CREDIT_TYPE = "sply_amt_crdt_credit_type"; // 授信台账-授信类型 + String SPLY_AMT_CRDT_CHG_CHANGE_TYPE = "sply_amt_crdt_chg_change_type"; // 授信台账检索详情-变动类型 + String SPLY_AMT_CRDT_CHG_REFERENCE_TYPE = "sply_amt_crdt_chg_reference_type"; // 授信台账检索详情-关联交易类型 + String SPLY_AMT_CRDT_APPL_DTL_PTNRTP = "sply_amt_crdt_appl_dtl_ptnrTp"; // 授信单明细-客户/供应商类别 + String AMOUNT_CREDIT_APPLY_TYPE = "amount_credit_apply_type"; // 授信单-额度类型 + String AMOUNT_CREDIT_APPLY_COMPANY_TYPE = "amount_credit_apply_company_type"; // 授信单-企业性质 + String SPLY_AMT_CRDT_APPL_STS = "sply_amt_crdt_appl_sts"; // 授信单-状态 + String SPLY_AMT_CRDT_APPL_SGN_STATUS = "sply_amt_crdt_appl_sgn_status"; // 授信单签字确认状态 + +} diff --git a/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/ErrorCodeConstants.java b/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/ErrorCodeConstants.java index a8eb0d30..f884b6c9 100644 --- a/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/ErrorCodeConstants.java +++ b/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/ErrorCodeConstants.java @@ -13,5 +13,15 @@ public interface ErrorCodeConstants { // ========== 示例模块 1-001-000-000 ========== ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); + ErrorCode AMOUNT_CREDIT_APPLY_NOT_EXISTS = new ErrorCode(1_004_000_005, "授信单不存在"); + ErrorCode AMOUNT_CREDIT_APPLY_DETAIL_NOT_EXISTS = new ErrorCode(1_004_000_006, "授信单明细不存在"); + ErrorCode AMOUNT_CREDIT_APPLY_SIGN_NOT_EXISTS = new ErrorCode(1_004_000_007, "授信调整签字区域明细不存在"); + ErrorCode AMOUNT_CREDIT_STATUS_DELETE = new ErrorCode(1_004_000_008, "授信单不是草稿状态,不允许删除"); + ErrorCode AMOUNT_CREDIT_STATUS_UPDATE = new ErrorCode(1_004_000_009, "授信单是申请中状态,不允许更新"); + ErrorCode AMOUNT_CREDIT_NOT_EXISTS = new ErrorCode(1_004_002_001, "授信额度不存在"); + ErrorCode AMOUNT_CREDIT_CHANGE_NOT_EXISTS = new ErrorCode(1_004_002_002, "授信额度变动记录不存在"); + ErrorCode AMOUNT_CREDIT_APPLY_ID_NOT_EXISTS = new ErrorCode(1_004_002_004, "授信单id不能为空"); + + } diff --git a/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/GeneralSequenceConstants.java b/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/GeneralSequenceConstants.java new file mode 100644 index 00000000..05cdbef3 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/GeneralSequenceConstants.java @@ -0,0 +1,9 @@ +package cn.iocoder.yudao.module.capital.enums; + +/** + * 授信模块-序列号编码常量 + */ +public interface GeneralSequenceConstants { + + String SPLY_AMT_CRDT_APPL_APPL_NUM = "SPLY_AMT_CRDT_APPL_APPL_NUM"; // 资金授信管理-授信单序列号编码 +} diff --git a/yudao-module-capital/yudao-module-capital-server/pom.xml b/yudao-module-capital/yudao-module-capital-server/pom.xml index f318fc60..b66524fc 100644 --- a/yudao-module-capital/yudao-module-capital-server/pom.xml +++ b/yudao-module-capital/yudao-module-capital-server/pom.xml @@ -42,6 +42,12 @@ ${revision} + + cn.iocoder.cloud + yudao-module-bpm-api + ${revision} + + cn.iocoder.cloud @@ -131,21 +137,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/CapitalServerApplication.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/CapitalServerApplication.java index 5858498c..cda3687a 100644 --- a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/CapitalServerApplication.java +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/CapitalServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class CapitalServerApplication { public static void main(String[] args) { diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/CapitalController.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/CapitalController.java deleted file mode 100644 index a3eab462..00000000 --- a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/CapitalController.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.capital.controller.admin.capital; - -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -/** - * Capital 控制器 - * - * @author ZT - */ -@Tag(name = "管理后台 - Capital") -@RestController -@RequestMapping("/admin/capital/capital") -public class CapitalController { - - @GetMapping("/hello") - @Operation(summary = "Hello Capital") - public CommonResult hello() { - return success("Hello, Capital!"); - } - -} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/AmountCreditChangeController.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/AmountCreditChangeController.java new file mode 100644 index 00000000..f58064c7 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/AmountCreditChangeController.java @@ -0,0 +1,117 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit; + +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangeExcelVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangePageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangeRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangeSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit.AmountCreditChangeDO; +import cn.iocoder.yudao.module.capital.service.splyAmountCredit.AmountCreditChangeService; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "授信台账详情") +@RestController +@RequestMapping("/supply/sply/amount-credit-change") +@Validated +@FileUploadController(source = "sply.amountcreditchange") +public class AmountCreditChangeController extends AbstractFileUploadController implements BusinessControllerMarker{ + + static { + FileUploadController annotation = AmountCreditChangeController.class.getAnnotation(FileUploadController.class); + if (annotation != null) { + setFileUploadInfo(annotation); + } + } + + @Resource + private AmountCreditChangeService amountCreditChangeService; + + @PostMapping("/create") + //@Operation(summary = "创建授信额度变动记录") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-change:create')") + public CommonResult createAmountCreditChange(@Valid @RequestBody AmountCreditChangeSaveReqVO createReqVO) { + return success(amountCreditChangeService.createAmountCreditChange(createReqVO)); + } + + @PutMapping("/update") + //@Operation(summary = "更新授信额度变动记录") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-change:update')") + public CommonResult updateAmountCreditChange(@Valid @RequestBody AmountCreditChangeSaveReqVO updateReqVO) { + amountCreditChangeService.updateAmountCreditChange(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + //@Operation(summary = "删除授信额度变动记录") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('sply:amount-credit-change:delete')") + public CommonResult deleteAmountCreditChange(@RequestParam("id") Long id) { + amountCreditChangeService.deleteAmountCreditChange(id); + return success(true); + } + + @DeleteMapping("/delete-list") + //@Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除授信额度变动记录") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-change:delete')") + public CommonResult deleteAmountCreditChangeList(@RequestBody BatchDeleteReqVO req) { + amountCreditChangeService.deleteAmountCreditChangeListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + //@Operation(summary = "获得授信额度变动记录") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-change:query')") + public CommonResult getAmountCreditChange(@RequestParam("id") Long id) { + AmountCreditChangeDO amountCreditChange = amountCreditChangeService.getAmountCreditChange(id); + return success(BeanUtils.toBean(amountCreditChange, AmountCreditChangeRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获取授信台账详情分页") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-change:query')") + public CommonResult> getAmountCreditChangePage(@Valid AmountCreditChangePageReqVO pageReqVO) { + PageResult pageResult = amountCreditChangeService.getAmountCreditChangePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, AmountCreditChangeRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出授信台账详情 Excel") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-change:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportAmountCreditChangeExcel(@Valid AmountCreditChangePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageNo(1); + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = amountCreditChangeService.getAmountCreditChangePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "授信台账详情.xls", "授信台账详情", AmountCreditChangeExcelVO.class, + BeanUtils.toBean(list, AmountCreditChangeExcelVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/AmountCreditController.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/AmountCreditController.java new file mode 100644 index 00000000..4060710d --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/AmountCreditController.java @@ -0,0 +1,119 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit; + +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditExcelVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit.AmountCreditDO; +import cn.iocoder.yudao.module.capital.service.splyAmountCredit.AmountCreditService; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + +@Tag(name = "授信台账检索") +@RestController +@RequestMapping("/supply/sply/amount-credit") +@Validated +@FileUploadController(source = "sply.amountcredit") +public class AmountCreditController extends AbstractFileUploadController implements BusinessControllerMarker{ + + static { + FileUploadController annotation = AmountCreditController.class.getAnnotation(FileUploadController.class); + if (annotation != null) { + setFileUploadInfo(annotation); + } + } + + @Resource + private AmountCreditService amountCreditService; + + @PostMapping("/create") + //@Operation(summary = "创建授信额度") + @PreAuthorize("@ss.hasPermission('sply:amount-credit:create')") + public CommonResult createAmountCredit(@Valid @RequestBody AmountCreditSaveReqVO createReqVO) { + return success(amountCreditService.createAmountCredit(createReqVO)); + } + + @PutMapping("/update") + //@Operation(summary = "更新授信额度") + @PreAuthorize("@ss.hasPermission('sply:amount-credit:update')") + public CommonResult updateAmountCredit(@Valid @RequestBody AmountCreditSaveReqVO updateReqVO) { + amountCreditService.updateAmountCredit(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + //@Operation(summary = "删除授信额度") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('sply:amount-credit:delete')") + public CommonResult deleteAmountCredit(@RequestParam("id") Long id) { + amountCreditService.deleteAmountCredit(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + //@Operation(summary = "批量删除授信额度") + @PreAuthorize("@ss.hasPermission('sply:amount-credit:delete')") + public CommonResult deleteAmountCreditList(@RequestBody BatchDeleteReqVO req) { + amountCreditService.deleteAmountCreditListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + //@Operation(summary = "获得授信额度信息") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:amount-credit:query')") + public CommonResult getAmountCredit(@RequestParam("id") Long id) { + AmountCreditDO amountCredit = amountCreditService.getAmountCredit(id); + return success(BeanUtils.toBean(amountCredit, AmountCreditRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得授信额度分页") + @PreAuthorize("@ss.hasPermission('sply:amount-credit:query')") + public CommonResult> getAmountCreditPage(@Valid AmountCreditPageReqVO pageReqVO) { + PageResult pageResult = amountCreditService.getAmountCreditPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, AmountCreditRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出授信台账检索 Excel") + @PreAuthorize("@ss.hasPermission('sply:amount-credit:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportAmountCreditExcel(@Valid AmountCreditPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageNo(1); + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = amountCreditService.getAmountCreditPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "授信台账检索.xls", "授信台账检索", AmountCreditExcelVO.class, + BeanUtils.toBean(list, AmountCreditExcelVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangeExcelVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangeExcelVO.java new file mode 100644 index 00000000..62226d6b --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangeExcelVO.java @@ -0,0 +1,73 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo; + +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.module.capital.enums.CapitalDictTypeConstants; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信额度变动记录 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditChangeExcelVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8514") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "关联单据号;收款单/付款单/结算单", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("关联单据号;收款单/付款单/结算单") + private String referenceNumber; + + @Schema(description = "授信表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5903") + //@ExcelProperty("授信表主键") + private Long creditId; + + @Schema(description = "变动单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("变动单号") + private String changeNumber; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("客商名称") + private String partnerName; + + @Schema(description = "客商编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("客商编码") + private String partnerNumber; + + @Schema(description = "变动类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("变动类型") + @DictFormat(CapitalDictTypeConstants.SPLY_AMT_CRDT_CHG_CHANGE_TYPE) + private String changeType; + + @Schema(description = "变动金额", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("变动金额") + private BigDecimal amount; + + @Schema(description = "变动原因") + @ExcelProperty("变动原因") + private String cause; + + @Schema(description = "关联交易类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("关联交易类型") + @DictFormat(CapitalDictTypeConstants.SPLY_AMT_CRDT_CHG_REFERENCE_TYPE) + private String referenceType; + + @Schema(description = "凭证日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("凭证日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime voucherDate; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangePageReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangePageReqVO.java new file mode 100644 index 00000000..71109337 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangePageReqVO.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信额度变动记录分页 Request VO") +@Data +public class AmountCreditChangePageReqVO extends PageParam { + + @Schema(description = "关联单据号;收款单/付款单/结算单") + private String referenceNumber; + + @Schema(description = "授信表主键", example = "5903") + private Long creditId; + + @Schema(description = "变动单号") + private String changeNumber; + + @Schema(description = "客商名称", example = "王五") + private String partnerName; + + @Schema(description = "客商编码") + private String partnerNumber; + + @Schema(description = "变动类型", example = "1") + private String changeType; + + @Schema(description = "变动金额") + private BigDecimal amount; + + @Schema(description = "变动原因") + private String cause; + + @Schema(description = "关联交易类型", example = "1") + private String referenceType; + + @Schema(description = "凭证日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] voucherDate; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangeRespVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangeRespVO.java new file mode 100644 index 00000000..01ac6f46 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangeRespVO.java @@ -0,0 +1,67 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信额度变动记录 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditChangeRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8514") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "关联单据号;收款单/付款单/结算单", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("关联单据号;收款单/付款单/结算单") + private String referenceNumber; + + @Schema(description = "授信表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5903") + //@ExcelProperty("授信表主键") + private Long creditId; + + @Schema(description = "变动单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("变动单号") + private String changeNumber; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("客商名称") + private String partnerName; + + @Schema(description = "客商编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("客商编码") + private String partnerNumber; + + @Schema(description = "变动类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("变动类型") + private String changeType; + + @Schema(description = "变动金额", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("变动金额") + private BigDecimal amount; + + @Schema(description = "变动原因") + @ExcelProperty("变动原因") + private String cause; + + @Schema(description = "关联交易类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("关联交易类型") + private String referenceType; + + @Schema(description = "凭证日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("凭证日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime voucherDate; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangeSaveReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangeSaveReqVO.java new file mode 100644 index 00000000..21d718f4 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditChangeSaveReqVO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信额度变动记录新增/修改 Request VO") +@Data +public class AmountCreditChangeSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8514") + private Long id; + + @Schema(description = "关联单据号;收款单/付款单/结算单", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "关联单据号;收款单/付款单/结算单不能为空") + private String referenceNumber; + + @Schema(description = "授信表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5903") + @NotEmpty(message = "授信表主键不能为空") + private Long creditId; + + @Schema(description = "变动单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "变动单号不能为空") + private String changeNumber; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "客商名称不能为空") + private String partnerName; + + @Schema(description = "客商编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "客商编码不能为空") + private String partnerNumber; + + @Schema(description = "变动类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "变动类型不能为空") + private String changeType; + + @Schema(description = "变动金额", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "变动金额不能为空") + private BigDecimal amount; + + @Schema(description = "变动原因") + private String cause; + + @Schema(description = "关联交易类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "关联交易类型不能为空") + private String referenceType; + + @Schema(description = "凭证日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "凭证日期不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime voucherDate; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditExcelVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditExcelVO.java new file mode 100644 index 00000000..260e6d61 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditExcelVO.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo; + +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.module.capital.enums.CapitalDictTypeConstants; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信额度 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditExcelVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11717") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("客商名称") + private String partnerName; + + @Schema(description = "客商编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("客商编码") + private String partnerNumber; + + @Schema(description = "授信类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("授信类型") + @DictFormat(CapitalDictTypeConstants.SPLY_AMT_CRDT_CREDIT_TYPE) + private String creditType; + + @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("开始日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime startDate; + + @Schema(description = "结束日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("结束日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endDate; + + @Schema(description = "授信额度上限", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("授信额度上限") + private BigDecimal amountLimit; + + @Schema(description = "授信使用额度") + @ExcelProperty("授信使用额度") + private BigDecimal useAmount; + + @Schema(description = "授信剩余余额") + @ExcelProperty("授信剩余余额") + private BigDecimal remaineAmount; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditPageReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditPageReqVO.java new file mode 100644 index 00000000..39d8ff40 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditPageReqVO.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo; + +import lombok.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信额度分页 Request VO") +@Data +public class AmountCreditPageReqVO extends PageParam { + + @Schema(description = "客商名称", example = "赵六") + private String partnerName; + + @Schema(description = "客商编码") + private String partnerNumber; + + @Schema(description = "授信类型", example = "1") + private String creditType; + + @Schema(description = "开始日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] startDate; + + @Schema(description = "结束日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] endDate; + + @Schema(description = "授信额度上限") + private BigDecimal amountLimit; + + @Schema(description = "授信使用额度") + private BigDecimal useAmount; + + @Schema(description = "授信剩余余额") + private BigDecimal remaineAmount; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditRespVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditRespVO.java new file mode 100644 index 00000000..db87ffeb --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditRespVO.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信额度 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11717") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("客商名称") + private String partnerName; + + @Schema(description = "客商编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("客商编码") + private String partnerNumber; + + @Schema(description = "授信类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("授信类型") + private String creditType; + + @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("开始日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime startDate; + + @Schema(description = "结束日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("结束日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endDate; + + @Schema(description = "授信额度上限", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("授信额度上限") + private BigDecimal amountLimit; + + @Schema(description = "授信使用额度") + @ExcelProperty("授信使用额度") + private BigDecimal useAmount; + + @Schema(description = "授信剩余余额") + @ExcelProperty("授信剩余余额") + private BigDecimal remaineAmount; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditSaveReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditSaveReqVO.java new file mode 100644 index 00000000..e70d16f2 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmountCredit/vo/AmountCreditSaveReqVO.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import jakarta.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信额度新增/修改 Request VO") +@Data +public class AmountCreditSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11717") + private Long id; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "客商名称不能为空") + private String partnerName; + + @Schema(description = "客商编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "客商编码不能为空") + private String partnerNumber; + + @Schema(description = "授信类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "授信类型不能为空") + private String creditType; + + @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "开始日期不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime startDate; + + @Schema(description = "结束日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "结束日期不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endDate; + + @Schema(description = "授信额度上限", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "授信额度上限不能为空") + private BigDecimal amountLimit; + + @Schema(description = "授信使用额度") + private BigDecimal useAmount; + + @Schema(description = "授信剩余余额") + private BigDecimal remaineAmount; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/AmountCreditApplyController.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/AmountCreditApplyController.java new file mode 100644 index 00000000..ae8b3208 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/AmountCreditApplyController.java @@ -0,0 +1,189 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.AmountCreditController; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.*; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDetailDO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplySignDO; +import cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl.AmountCreditApplyDetailService; +import cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl.AmountCreditApplyService; +import cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl.AmountCreditApplySignService; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptSimpleRespDTO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * 注意前缀需要与网关的配置路由前缀统一 + */ +@Tag(name = "授信单编制与检索") +@RestController +@RequestMapping("/supply/sply/amount-credit-apply") +@Validated +public class AmountCreditApplyController extends AbstractFileUploadController implements BusinessControllerMarker{ + + static { + FileUploadController annotation = AmountCreditController.class.getAnnotation(FileUploadController.class); + if (annotation != null) { + setFileUploadInfo(annotation); + } + } + + @Resource + private AmountCreditApplyService amountCreditApplyService; + @Resource + private AmountCreditApplyDetailService amountCreditApplyDetailService; + @Resource + private AmountCreditApplySignService amountCreditApplySignService; + + @PostMapping("/create") + @Operation(summary = "授信单编制新增") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:create')") + public CommonResult createAmountCreditApply(@Valid @RequestBody AmountCreditApplySaveReqVO createReqVO) { + return success(amountCreditApplyService.createAmountCreditApply(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "授信单编制更新") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:update')") + public CommonResult updateAmountCreditApply(@Valid @RequestBody AmountCreditApplySaveReqVO updateReqVO) { + amountCreditApplyService.updateAmountCreditApply(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "授信单编制删除") + @Parameter(name = "id", description = "授信单id", required = true) + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:delete')") + public CommonResult deleteAmountCreditApply(@RequestParam("id") Long id) { + amountCreditApplyService.deleteAmountCreditApply(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除授信单编制") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:delete')") + public CommonResult deleteAmountCreditApplyList(@RequestBody BatchDeleteReqVO req) { + amountCreditApplyService.deleteAmountCreditApplyListByIds(req.getIds()); + return success(true); + } + + @DeleteMapping("/deleteAmountCreditApplyDetailList") + @Parameter(name = "ids", description = "授信单明细id", required = true) + @Operation(summary = "批量删除授信单明细") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:delete')") + public CommonResult deleteAmountCreditApplyDetailList(@RequestBody BatchDeleteReqVO req) { + amountCreditApplyDetailService.deleteAmountCreditApplyDetailListByIds(req.getIds()); + return success(true); + } + + @DeleteMapping("/deleteAmountCreditApplySignList") + @Parameter(name = "ids", description = "授信单签字id", required = true) + @Operation(summary = "批量删除授信单签字信息") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:delete')") + public CommonResult deleteAmountCreditApplySignList(@RequestBody BatchDeleteReqVO req) { + amountCreditApplySignService.deleteAmountCreditApplySignListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得授信单编制详情信息") + @Parameter(name = "id", description = "主键id", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:query')") + public CommonResult getAmountCreditApply(@RequestParam("id") Long id) { + AmountCreditApplyDO amountCreditApply = amountCreditApplyService.getAmountCreditApplyById(id); + AmountCreditApplyRespVO acarBean = BeanUtils.toBean(amountCreditApply, AmountCreditApplyRespVO.class); + List acadList = amountCreditApplyDetailService.getAmountCreditApplyDetailListByApplyId(amountCreditApply.getId()); + List acasList = amountCreditApplySignService.getAmountCreditApplySignListByApplyId(amountCreditApply.getId()); + acarBean.setAcadetailList(BeanUtils.toBean(acadList, AmountCreditApplyDetailRespVO.class)); + acarBean.setAcasList(BeanUtils.toBean(acasList, AmountCreditApplySignRespVO.class)); + return success(acarBean); + } + + @GetMapping("/page") + @Operation(summary = "分页获取授信单编制") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:query')") + public CommonResult> getAmountCreditApplyPage(@Valid AmountCreditApplyPageReqVO pageReqVO) { + PageResult pageResult = amountCreditApplyService.getAmountCreditApplyPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, AmountCreditApplyRespVO.class)); + } + + @GetMapping("/getLoginUserAllCompanyList") + @Operation(summary = "获取登陆人的所在公司以及下属公司") + @PreAuthorize("@ss.hasAnyPermissions({'sply:amount-credit-apply:create','sply:amount-credit-apply:update'})") + public CommonResult> getLoginUserAllCompanyList() { + return success(amountCreditApplyService.getLoginUserAllCompanyList()); + } + + + @GetMapping("/amountCreditApplySubmitApproval") + @Operation(summary = "授信单提交审批") + @Parameter(name = "id", description = "主键id", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:submitApproval')") + public CommonResult amountCreditApplySubmitApproval(@RequestParam("id") Long id, @RequestParam("processInstanceId") String processInstanceId) { + return success(amountCreditApplyService.amountCreditApplySubmitApproval(id,processInstanceId)); + } + + /*@GetMapping("/getBpmTaskListByProcessInstanceId") + @Operation(summary = "查看审批信息") + @Parameter(name = "id", description = "流程实例id", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:bpmTaskList')") + public CommonResult getBpmTaskListByProcessInstanceId(@RequestParam("processInstanceId") String processInstanceId) { + return success(amountCreditApplyService.getBpmTaskListByProcessInstanceId(processInstanceId)); + } + + @GetMapping("/getBpmProcessInstanceBpmnModelView") + @Operation(summary = "查看审批流程图") + @Parameter(name = "id", description = "流程实例id", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:bpmProcessInstanceBpmnModelView')") + public CommonResult getBpmProcessInstanceBpmnModelView(@RequestParam("processInstanceId") String processInstanceId) { + return success(amountCreditApplyService.getBpmProcessInstanceBpmnModelView(processInstanceId)); + } + + @GetMapping("/getBpmApprovalDetail") + @Operation(summary = "查看审详情(就是审批页面)") + @Parameter(name = "processDefinitionId", description = "流程实例id,任务id(如果没有就传流程实例id)", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:bpmApprovalDetail')") + public CommonResult getBpmApprovalDetail(@RequestParam("processDefinitionId") String processDefinitionId,@RequestParam("taskId") String taskId) { + return success(amountCreditApplyService.getBpmApprovalDetail(processDefinitionId,taskId)); + }*/ + + + @GetMapping("/export-excel") + @Operation(summary = "导出授信调整申请主 Excel") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportAmountCreditApplyExcel(@Valid AmountCreditApplyPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageNo(1); + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = amountCreditApplyService.getAmountCreditApplyPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "授信单信息.xls", "授信单信息", AmountCreditApplyExcelVO.class, + BeanUtils.toBean(list, AmountCreditApplyExcelVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/AmountCreditApplyReviewController.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/AmountCreditApplyReviewController.java new file mode 100644 index 00000000..e1288f32 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/AmountCreditApplyReviewController.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyDetailRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyReviewPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySignRespVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDetailDO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplySignDO; +import cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl.AmountCreditApplyDetailService; +import cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl.AmountCreditApplyService; +import cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl.AmountCreditApplySignService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * 授信单审核 + * + * @author qianshijiang + */ +@Tag(name = "授信单审核") +@RestController +@RequestMapping("/supply/sply/amount-credit-review") +public class AmountCreditApplyReviewController { + @Resource + private AmountCreditApplyService amountCreditApplyService; + @Resource + private AmountCreditApplyDetailService amountCreditApplyDetailService; + @Resource + private AmountCreditApplySignService amountCreditApplySignService; + + + @GetMapping("/getTodoOrDoneTaskList") + @Operation(summary = "待办/已办任务") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:query')") + public CommonResult> getAmountCreditApplyReviewTaskList(@Valid AmountCreditApplyReviewPageReqVO pageReqVO) { + PageResult pageResult = amountCreditApplyService.getAmountCreditApplyReviewTaskList(pageReqVO); + return success(BeanUtils.toBean(pageResult, AmountCreditApplyRespVO.class)); + } + + @GetMapping("/getAmountCreditApplyDetail") + @Operation(summary = "授信单审核详情") + @Parameter(name = "id", description = "授信单主键id", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:amount-credit-apply:query')") + public CommonResult getAmountCreditApplyDetail(@RequestParam("id") Long id) { + AmountCreditApplyDO amountCreditApply = amountCreditApplyService.getAmountCreditApplyById(id); + AmountCreditApplyRespVO acarBean = BeanUtils.toBean(amountCreditApply, AmountCreditApplyRespVO.class); + List acadList = amountCreditApplyDetailService.getAmountCreditApplyDetailListByApplyId(amountCreditApply.getId()); + List acasList = amountCreditApplySignService.getAmountCreditApplySignListByApplyId(amountCreditApply.getId()); + acarBean.setAcadetailList(BeanUtils.toBean(acadList, AmountCreditApplyDetailRespVO.class)); + acarBean.setAcasList(BeanUtils.toBean(acasList, AmountCreditApplySignRespVO.class)); + return success(acarBean); + } + + + +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailExcelVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailExcelVO.java new file mode 100644 index 00000000..e6a23b90 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailExcelVO.java @@ -0,0 +1,69 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.module.capital.enums.CapitalDictTypeConstants; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整申请明细 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditApplyDetailExcelVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31074") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "申请表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1046") + @ExcelProperty("申请表主键") + private Long applyId; + + @Schema(description = "客户/供应商类别(字典编码:sply_amt_crdt_appl_dtl_ptnrTp)(CUSTOMER:客户;SUPPLIER:供应商)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("客户/供应商类别") + @DictFormat(CapitalDictTypeConstants.SPLY_AMT_CRDT_APPL_DTL_PTNRTP) + private String ptnrTp; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("客商名称") + private String partnerName; + + @Schema(description = "客商编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("客商编码") + private String partnerNumber; + + @Schema(description = "原额度", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("原额度") + private BigDecimal originalAmount; + + @Schema(description = "申请额度", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请额度") + private BigDecimal applyAmount; + + @Schema(description = "实际占用额") + @ExcelProperty("实际占用额") + private BigDecimal actualAmount; + + @Schema(description = "使用期限开始日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("使用期限开始日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime startDate; + + @Schema(description = "使用期限结束日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("使用期限结束日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endDate; + + @Schema(description = "创建人名称") + private String creatorName; + + @Schema(description = "更新人名称") + private String updaterName; +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailPageReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailPageReqVO.java new file mode 100644 index 00000000..ac1383b4 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailPageReqVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整申请明细分页 Request VO") +@Data +public class AmountCreditApplyDetailPageReqVO extends PageParam { + + @Schema(description = "申请表主键", example = "1046") + private String applyId; + + @Schema(description = "客商名称", example = "王五") + private String partnerName; + + @Schema(description = "客商编码") + private String partnerNumber; + + @Schema(description = "原额度") + private BigDecimal originalAmount; + + @Schema(description = "申请额度") + private BigDecimal applyAmount; + + @Schema(description = "实际占用额") + private BigDecimal actualAmount; + + @Schema(description = "开始日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] startDate; + + @Schema(description = "结束日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] endDate; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailRespVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailRespVO.java new file mode 100644 index 00000000..da4efb28 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailRespVO.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整申请明细 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditApplyDetailRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31074") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "申请表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1046") + @ExcelProperty("申请表主键") + private Long applyId; + + @Schema(description = "客户/供应商类别(字典编码:sply_amt_crdt_appl_dtl_ptnrTp)(CUSTOMER:客户;SUPPLIER:供应商)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("客户/供应商类别") + private String ptnrTp; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("客商名称") + private String partnerName; + + @Schema(description = "客商编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("客商编码") + private String partnerNumber; + + @Schema(description = "原额度", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("原额度") + private BigDecimal originalAmount; + + @Schema(description = "申请额度", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请额度") + private BigDecimal applyAmount; + + @Schema(description = "实际占用额") + @ExcelProperty("实际占用额") + private BigDecimal actualAmount; + + @Schema(description = "使用期限开始日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("使用期限开始日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime startDate; + + @Schema(description = "使用期限结束日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("使用期限结束日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endDate; + + @Schema(description = "创建人名称") + private String creatorName; + + @Schema(description = "更新人名称") + private String updaterName; +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailSaveReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailSaveReqVO.java new file mode 100644 index 00000000..c0ed83ee --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyDetailSaveReqVO.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 授信调整申请明细新增/修改 Request VO") +@Data +public class AmountCreditApplyDetailSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31074") + private Long id; + + @Schema(description = "申请表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1046") + @NotBlank(message = "申请表主键不能为空") + private Long applyId; + + @Schema(description = "客户/供应商类别(字典编码:sply_amt_crdt_appl_dtl_ptnrTp)(CUSTOMER:客户;SUPPLIER:供应商)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotBlank(message = "客户/供应商类别不能为空") + private String ptnrTp; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotBlank(message = "客商名称不能为空") + private String partnerName; + + @Schema(description = "客商编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "客商编码不能为空") + private String partnerNumber; + + @Schema(description = "原额度", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "原额度不能为空") + private BigDecimal originalAmount; + + @Schema(description = "申请额度", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "申请额度不能为空") + private BigDecimal applyAmount; + + @Schema(description = "实际占用额") + private BigDecimal actualAmount; + + @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "开始日期不能为空") + private LocalDateTime startDate; + + @Schema(description = "结束日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "结束日期不能为空") + private LocalDateTime endDate; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyExcelVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyExcelVO.java new file mode 100644 index 00000000..67402ecd --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyExcelVO.java @@ -0,0 +1,100 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.module.capital.enums.CapitalDictTypeConstants; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整申请主 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditApplyExcelVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7225") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "申请单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请单号") + private String applyNumber; + + @Schema(description = "申请单位编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请单位编码") + private String applyUnitNumber; + + @Schema(description = "申请单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("申请单位名称") + private String applyUnitName; + + @Schema(description = "申请日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime applyDate; + + @Schema(description = "额度类型(字典编码:amount_credit_apply_type):INVESTMENT:投资类;MINERAL_CATEGORY:矿产类;FINANCIAL_CATEGORY:财务类;HUMAN_RESOURCES_CATEGORY:人力资源类;SAFETY_AND_ENVIRONMENTAL_PROTECTION_CATEGORY:安全环保类;TECHNOLOGY:科技类;INFORMATIONIZATION_CATEGORY:信息化类;MARKETING:营销类;PRODUCTION_CATEGORY:生产类;OTHERS_TYPE:其他类;", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("额度类型") + @DictFormat(CapitalDictTypeConstants.AMOUNT_CREDIT_APPLY_TYPE) + private String type; + + @Schema(description = "企业性质(字典编码:amount_credit_apply_company_type)(STATE_OWNED_ENTERPRISE:国企;PRIVATE_ENTERPRISE:私企;GOVERNMENT_AGENCY:政府机构;OTHERS_TYPE:其他类;)", example = "2") + @ExcelProperty("企业性质") + @DictFormat(CapitalDictTypeConstants.AMOUNT_CREDIT_APPLY_COMPANY_TYPE) + private String companyType; + + @Schema(description = "申请事由", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请事由") + private String applyCause; + + @Schema(description = "额度使用情况及财务账务处理计划") + @ExcelProperty("额度使用情况及财务账务处理计划") + private String plan; + + @Schema(description = "不纳入授信管理依据") + @ExcelProperty("不纳入授信管理依据") + private String excludingCreditDescription; + + @Schema(description = "附件路径") + @ExcelProperty("附件路径") + private String attachmentPath; + + @Schema(description = "状态(字典编码:sply_amt_crdt_appl_sts)(ACAS_DRAFT:草稿,可删除;ACAS_DELETED:已删除;ACAS_UNDER_REVIEW:申请中,不允许任何操作;ACAS_REJECT:驳回,可以编辑,重新提交;ACAS_PASS:通过,不允许删除;ACAS_OFFSET:冲销;)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("状态") + @DictFormat(CapitalDictTypeConstants.SPLY_AMT_CRDT_APPL_STS) + private String status; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + + @Schema(description = "经办人", requiredMode = Schema.RequiredMode.REQUIRED, example = "钱仕江") + @ExcelProperty("经办人") + private String hdlr; + + @Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED, example = "18669001156") + @ExcelProperty("手机号") + private String hdlrPhn; + + @Schema(description = "授信申请明细信息") + List acadetailList; + + @Schema(description = "授信调整签字区域明细信息") + List acasList; + + @Schema(description = "创建人名称") + private String creatorName; + + @Schema(description = "更新人名称") + private String updaterName; + + @Schema(description = "流程实例编号") + private String processInstanceId; +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyPageReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyPageReqVO.java new file mode 100644 index 00000000..68f92332 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyPageReqVO.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整申请主分页 Request VO") +@Data +public class AmountCreditApplyPageReqVO extends PageParam { + + @Schema(description = "申请单号") + private String applyNumber; + + @Schema(description = "申请单位编码") + private String applyUnitNumber; + + @Schema(description = "申请单位名称", example = "芋艿") + private String applyUnitName; + + @Schema(description = "申请日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] applyDate; + + @Schema(description = "额度类型(字典编码:amount_credit_apply_type):INVESTMENT:投资类;MINERAL_CATEGORY:矿产类;FINANCIAL_CATEGORY:财务类;HUMAN_RESOURCES_CATEGORY:人力资源类;SAFETY_AND_ENVIRONMENTAL_PROTECTION_CATEGORY:安全环保类;TECHNOLOGY:科技类;INFORMATIONIZATION_CATEGORY:信息化类;MARKETING:营销类;PRODUCTION_CATEGORY:生产类;OTHERS_TYPE:其他类;", example = "1") + private String type; + + @Schema(description = "企业性质(字典编码:amount_credit_apply_company_type)(STATE_OWNED_ENTERPRISE:国企;PRIVATE_ENTERPRISE:私企;GOVERNMENT_AGENCY:政府机构;OTHERS_TYPE:其他类;)", example = "2") + private String companyType; + + @Schema(description = "申请事由") + private String applyCause; + + @Schema(description = "额度使用情况及财务账务处理计划") + private String plan; + + @Schema(description = "不纳入授信管理依据") + private String excludingCreditDescription; + + @Schema(description = "附件路径") + private String attachmentPath; + + @Schema(description = "状态(字典编码:sply_amt_crdt_appl_sts)(ACAS_DRAFT:草稿,可删除;ACAS_DELETED:已删除;ACAS_UNDER_REVIEW:申请中,不允许任何操作;ACAS_REJECT:驳回,可以编辑,重新提交;ACAS_PASS:通过,不允许删除;ACAS_OFFSET:冲销;)", example = "1") + private String status; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "创建人名称") + private String creatorName; + + @Schema(description = "更新人名称") + private String updaterName; + + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyRespVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyRespVO.java new file mode 100644 index 00000000..dd027131 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyRespVO.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整申请主 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditApplyRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7225") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "申请单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请单号") + private String applyNumber; + + @Schema(description = "申请单位编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请单位编码") + private String applyUnitNumber; + + @Schema(description = "申请单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("申请单位名称") + private String applyUnitName; + + @Schema(description = "申请日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime applyDate; + + @Schema(description = "额度类型(字典编码:amount_credit_apply_type):INVESTMENT:投资类;MINERAL_CATEGORY:矿产类;FINANCIAL_CATEGORY:财务类;HUMAN_RESOURCES_CATEGORY:人力资源类;SAFETY_AND_ENVIRONMENTAL_PROTECTION_CATEGORY:安全环保类;TECHNOLOGY:科技类;INFORMATIONIZATION_CATEGORY:信息化类;MARKETING:营销类;PRODUCTION_CATEGORY:生产类;OTHERS_TYPE:其他类;", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("额度类型") + private String type; + + @Schema(description = "企业性质(字典编码:amount_credit_apply_company_type)(STATE_OWNED_ENTERPRISE:国企;PRIVATE_ENTERPRISE:私企;GOVERNMENT_AGENCY:政府机构;OTHERS_TYPE:其他类;)", example = "2") + @ExcelProperty("企业性质") + private String companyType; + + @Schema(description = "申请事由", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请事由") + private String applyCause; + + @Schema(description = "额度使用情况及财务账务处理计划") + @ExcelProperty("额度使用情况及财务账务处理计划") + private String plan; + + @Schema(description = "不纳入授信管理依据") + @ExcelProperty("不纳入授信管理依据") + private String excludingCreditDescription; + + @Schema(description = "附件路径") + @ExcelProperty("附件路径") + private String attachmentPath; + + @Schema(description = "状态(字典编码:sply_amt_crdt_appl_sts)(ACAS_DRAFT:草稿,可删除;ACAS_DELETED:已删除;ACAS_UNDER_REVIEW:申请中,不允许任何操作;ACAS_REJECT:驳回,可以编辑,重新提交;ACAS_PASS:通过,不允许删除;ACAS_OFFSET:冲销;)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("状态") + private String status; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + + @Schema(description = "经办人", requiredMode = Schema.RequiredMode.REQUIRED, example = "钱仕江") + @ExcelProperty("经办人") + private String hdlr; + + @Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED, example = "18669001156") + @ExcelProperty("手机号") + private String hdlrPhn; + + @Schema(description = "授信申请明细信息") + List acadetailList; + + @Schema(description = "授信调整签字区域明细信息") + List acasList; + + @Schema(description = "创建人名称") + private String creatorName; + + @Schema(description = "更新人名称") + private String updaterName; + + @Schema(description = "流程实例编号") + private String processInstanceId; +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyReviewPageReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyReviewPageReqVO.java new file mode 100644 index 00000000..1ea6ef96 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplyReviewPageReqVO.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信单审核分页 Request VO") +@Data +public class AmountCreditApplyReviewPageReqVO extends PageParam { + + @Schema(description = "申请单号") + private String applyNumber; + + @Schema(description = "申请单位编码") + private String applyUnitNumber; + + @Schema(description = "申请单位名称", example = "芋艿") + private String applyUnitName; + + @Schema(description = "申请日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] applyDate; + + @Schema(description = "额度类型(字典编码:amount_credit_apply_type):INVESTMENT:投资类;MINERAL_CATEGORY:矿产类;FINANCIAL_CATEGORY:财务类;HUMAN_RESOURCES_CATEGORY:人力资源类;SAFETY_AND_ENVIRONMENTAL_PROTECTION_CATEGORY:安全环保类;TECHNOLOGY:科技类;INFORMATIONIZATION_CATEGORY:信息化类;MARKETING:营销类;PRODUCTION_CATEGORY:生产类;OTHERS_TYPE:其他类;", example = "1") + private String type; + + @Schema(description = "企业性质(字典编码:amount_credit_apply_company_type)(STATE_OWNED_ENTERPRISE:国企;PRIVATE_ENTERPRISE:私企;GOVERNMENT_AGENCY:政府机构;OTHERS_TYPE:其他类;)", example = "2") + private String companyType; + + @Schema(description = "申请事由") + private String applyCause; + + @Schema(description = "额度使用情况及财务账务处理计划") + private String plan; + + @Schema(description = "不纳入授信管理依据") + private String excludingCreditDescription; + + @Schema(description = "附件路径") + private String attachmentPath; + + @Schema(description = "状态(字典编码:sply_amt_crdt_appl_sts)(ACAS_DRAFT:草稿,可删除;ACAS_DELETED:已删除;ACAS_UNDER_REVIEW:申请中,不允许任何操作;ACAS_REJECT:驳回,可以编辑,重新提交;ACAS_PASS:通过,不允许删除;ACAS_OFFSET:冲销;)", example = "1") + @NotNull(message = "状态不能为空") + @NotEmpty(message = "状态不能为空") + private List status; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "创建人名称") + private String creatorName; + + @Schema(description = "更新人名称") + private String updaterName; + + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySaveReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySaveReqVO.java new file mode 100644 index 00000000..a1b468ee --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySaveReqVO.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整申请主新增/修改 Request VO") +@Data +public class AmountCreditApplySaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7225") + private Long id; + + @Schema(description = "申请单号", requiredMode = Schema.RequiredMode.REQUIRED) + //@NotBlank(message = "申请单号不能为空") + private String applyNumber; + + @Schema(description = "申请单位编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "申请单位编码不能为空") + private String applyUnitNumber; + + @Schema(description = "申请单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotBlank(message = "申请单位名称不能为空") + private String applyUnitName; + + @Schema(description = "申请日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "申请日期不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime applyDate; + + @Schema(description = "额度类型(字典编码:amount_credit_apply_type):INVESTMENT:投资类;MINERAL_CATEGORY:矿产类;FINANCIAL_CATEGORY:财务类;HUMAN_RESOURCES_CATEGORY:人力资源类;SAFETY_AND_ENVIRONMENTAL_PROTECTION_CATEGORY:安全环保类;TECHNOLOGY:科技类;INFORMATIONIZATION_CATEGORY:信息化类;MARKETING:营销类;PRODUCTION_CATEGORY:生产类;OTHERS_TYPE:其他类;", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotBlank(message = "额度类型不能为空") + private String type; + + @Schema(description = "企业性质(字典编码:amount_credit_apply_company_type)(STATE_OWNED_ENTERPRISE:国企;PRIVATE_ENTERPRISE:私企;GOVERNMENT_AGENCY:政府机构;OTHERS_TYPE:其他类;)", example = "2") + @NotBlank(message = "企业性质不能为空") + private String companyType; + + @Schema(description = "申请事由", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "申请事由不能为空") + private String applyCause; + + @Schema(description = "额度使用情况及财务账务处理计划") + @NotBlank(message = "额度使用情况及财务账务处理计划不能为空") + private String plan; + + @Schema(description = "不纳入授信管理依据") + @NotBlank(message = "不纳入授信管理依据不能为空") + private String excludingCreditDescription; + + @Schema(description = "附件路径") + private String attachmentPath; + + @Schema(description = "状态(字典编码:sply_amt_crdt_appl_sts)(ACAS_DRAFT:草稿,可删除;ACAS_DELETED:已删除;ACAS_UNDER_REVIEW:申请中,不允许任何操作;ACAS_REJECT:驳回,可以编辑,重新提交;ACAS_PASS:通过,不允许删除;ACAS_OFFSET:冲销;)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + //@NotBlank(message = "状态不能为空") + private String status; + + @Schema(description = "经办人", requiredMode = Schema.RequiredMode.REQUIRED, example = "钱仕江") + @NotBlank(message = "经办人不能为空") + private String hdlr; + + @Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED, example = "18669001156") + @NotBlank(message = "手机号码不能为空") + private String hdlrPhn; + + @Schema(description = "授信申请明细信息") + List acadetailList; + + @Schema(description = "授信调整签字区域明细信息") + List acasList; + + @Schema(description = "创建人名称") + private String creatorName; + + @Schema(description = "更新人名称") + private String updaterName; +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignExcelVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignExcelVO.java new file mode 100644 index 00000000..8790e2c7 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignExcelVO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.module.capital.enums.CapitalDictTypeConstants; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整签字区域明细 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditApplySignExcelVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24362") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "申请表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31358") + @ExcelProperty("申请表主键") + private Long applyId; + + @Schema(description = "审批人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("审批人") + private String reviewSigner; + + @Schema(description = "申请部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请部门") + private String applyDepartment; + + @Schema(description = "审批时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("审批时间") + private LocalDateTime reviewDate; + + @Schema(description = "审批意见") + @ExcelProperty("审批意见") + private String approvalComment; + + @Schema(description = "审批步骤") + @ExcelProperty("审批步骤") + private String approvalStep; + + @Schema(description = "状态(字典编码:sply_amt_crdt_appl_sgn_status)(SIGNED:已签字;UNSIGNED:未签字;)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("状态") + @DictFormat(CapitalDictTypeConstants.SPLY_AMT_CRDT_APPL_SGN_STATUS) + private String status; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + + @Schema(description = "创建人名称") + private String creatorName; + + @Schema(description = "更新人名称") + private String updaterName; +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignPageReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignPageReqVO.java new file mode 100644 index 00000000..ebd3cbd9 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignPageReqVO.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整签字区域明细分页 Request VO") +@Data +public class AmountCreditApplySignPageReqVO extends PageParam { + + @Schema(description = "申请表主键", example = "31358") + private String applyId; + + @Schema(description = "审批人") + private String reviewSigner; + + @Schema(description = "申请部门") + private String applyDepartment; + + @Schema(description = "审批时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] reviewDate; + + @Schema(description = "审批意见") + private String approvalComment; + + @Schema(description = "审批步骤") + private String approvalStep; + + @Schema(description = "状态", example = "2") + private String status; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignRespVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignRespVO.java new file mode 100644 index 00000000..bb9ea2a2 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignRespVO.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整签字区域明细 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AmountCreditApplySignRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24362") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "申请表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31358") + @ExcelProperty("申请表主键") + private Long applyId; + + @Schema(description = "审批人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("审批人") + private String reviewSigner; + + @Schema(description = "申请部门", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("申请部门") + private String applyDepartment; + + @Schema(description = "审批时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("审批时间") + private LocalDateTime reviewDate; + + @Schema(description = "审批意见") + @ExcelProperty("审批意见") + private String approvalComment; + + @Schema(description = "审批步骤") + @ExcelProperty("审批步骤") + private String approvalStep; + + @Schema(description = "状态(字典编码:sply_amt_crdt_appl_sgn_status)(SIGNED:已签字;UNSIGNED:未签字;)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("状态") + private String status; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignSaveReqVO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignSaveReqVO.java new file mode 100644 index 00000000..aee895b8 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/splyAmtCrdtAppl/vo/AmountCreditApplySignSaveReqVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 授信调整签字区域明细新增/修改 Request VO") +@Data +public class AmountCreditApplySignSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24362") + private Long id; + + @Schema(description = "申请表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31358") + @NotEmpty(message = "申请表主键不能为空") + private Long applyId; + + @Schema(description = "审批人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "审批人不能为空") + private String reviewSigner; + + @Schema(description = "申请部门", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "申请部门不能为空") + private String applyDepartment; + + @Schema(description = "审批时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "审批时间不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime reviewDate; + + @Schema(description = "审批意见") + private String approvalComment; + + @Schema(description = "审批步骤") + private String approvalStep; + + @Schema(description = "状态(字典编码:sply_amt_crdt_appl_sgn_status)(SIGNED:已签字;UNSIGNED:未签字;)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + //@NotEmpty(message = "状态不能为空") + private String status; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/convert/splyAmtCrdtAppl/AmountCreditApplySaveReqVOConvert.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/convert/splyAmtCrdtAppl/AmountCreditApplySaveReqVOConvert.java new file mode 100644 index 00000000..6745afc5 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/convert/splyAmtCrdtAppl/AmountCreditApplySaveReqVOConvert.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.capital.convert.splyAmtCrdtAppl; + +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +/** + * 授信单对象转换器 + */ +@Mapper +public interface AmountCreditApplySaveReqVOConvert { + AmountCreditApplySaveReqVOConvert INSTANCE = Mappers.getMapper(AmountCreditApplySaveReqVOConvert.class); + + AmountCreditApplyDO convert(AmountCreditApplySaveReqVO bean); + + +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmountCredit/AmountCreditChangeMapper.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmountCredit/AmountCreditChangeMapper.java new file mode 100644 index 00000000..a54ea1ec --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmountCredit/AmountCreditChangeMapper.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.capital.dal.dao.splyAmountCredit; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangePageReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit.AmountCreditChangeDO; +import cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl.WhetherDeletedEnum; +import org.apache.ibatis.annotations.Mapper; + +/** + * 授信额度变动记录 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface AmountCreditChangeMapper extends BaseMapperX { + + default PageResult selectPage(AmountCreditChangePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eq(AmountCreditChangeDO::getDeleted, WhetherDeletedEnum.NO.getCode()) + .eqIfPresent(AmountCreditChangeDO::getReferenceNumber, reqVO.getReferenceNumber()) + .eqIfPresent(AmountCreditChangeDO::getCreditId, reqVO.getCreditId()) + .eqIfPresent(AmountCreditChangeDO::getChangeNumber, reqVO.getChangeNumber()) + .likeIfPresent(AmountCreditChangeDO::getPartnerName, reqVO.getPartnerName()) + .eqIfPresent(AmountCreditChangeDO::getPartnerNumber, reqVO.getPartnerNumber()) + .eqIfPresent(AmountCreditChangeDO::getChangeType, reqVO.getChangeType()) + .eqIfPresent(AmountCreditChangeDO::getAmount, reqVO.getAmount()) + .eqIfPresent(AmountCreditChangeDO::getCause, reqVO.getCause()) + .eqIfPresent(AmountCreditChangeDO::getReferenceType, reqVO.getReferenceType()) + .betweenIfPresent(AmountCreditChangeDO::getVoucherDate, reqVO.getVoucherDate()) + .betweenIfPresent(AmountCreditChangeDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(AmountCreditChangeDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmountCredit/AmountCreditMapper.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmountCredit/AmountCreditMapper.java new file mode 100644 index 00000000..18b33153 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmountCredit/AmountCreditMapper.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.capital.dal.dao.splyAmountCredit; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditPageReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit.AmountCreditDO; +import cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl.WhetherDeletedEnum; +import org.apache.ibatis.annotations.Mapper; +/** + * 授信额度 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface AmountCreditMapper extends BaseMapperX { + + default PageResult selectPage(AmountCreditPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eq(AmountCreditDO::getDeleted, WhetherDeletedEnum.NO.getCode()) + .likeIfPresent(AmountCreditDO::getPartnerName, reqVO.getPartnerName()) + .eqIfPresent(AmountCreditDO::getPartnerNumber, reqVO.getPartnerNumber()) + .eqIfPresent(AmountCreditDO::getCreditType, reqVO.getCreditType()) + .betweenIfPresent(AmountCreditDO::getStartDate, reqVO.getStartDate()) + .betweenIfPresent(AmountCreditDO::getEndDate, reqVO.getEndDate()) + .eqIfPresent(AmountCreditDO::getAmountLimit, reqVO.getAmountLimit()) + .eqIfPresent(AmountCreditDO::getUseAmount, reqVO.getUseAmount()) + .eqIfPresent(AmountCreditDO::getRemaineAmount, reqVO.getRemaineAmount()) + .betweenIfPresent(AmountCreditDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(AmountCreditDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmtCrdtAppl/AmountCreditApplyDetailMapper.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmtCrdtAppl/AmountCreditApplyDetailMapper.java new file mode 100644 index 00000000..13441317 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmtCrdtAppl/AmountCreditApplyDetailMapper.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.module.capital.dal.dao.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyDetailPageReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDetailDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 授信调整申请明细 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface AmountCreditApplyDetailMapper extends BaseMapperX { + + default PageResult selectPage(AmountCreditApplyDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(AmountCreditApplyDetailDO::getApplyId, reqVO.getApplyId()) + .likeIfPresent(AmountCreditApplyDetailDO::getPartnerName, reqVO.getPartnerName()) + .eqIfPresent(AmountCreditApplyDetailDO::getPartnerNumber, reqVO.getPartnerNumber()) + .eqIfPresent(AmountCreditApplyDetailDO::getOriginalAmount, reqVO.getOriginalAmount()) + .eqIfPresent(AmountCreditApplyDetailDO::getApplyAmount, reqVO.getApplyAmount()) + .eqIfPresent(AmountCreditApplyDetailDO::getActualAmount, reqVO.getActualAmount()) + .betweenIfPresent(AmountCreditApplyDetailDO::getStartDate, reqVO.getStartDate()) + .betweenIfPresent(AmountCreditApplyDetailDO::getEndDate, reqVO.getEndDate()) + .betweenIfPresent(AmountCreditApplyDetailDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(AmountCreditApplyDetailDO::getId)); + } + + /** + * 通过主表id查询授信调整申请明细信息 + * @param applyId 主表id + * @return + */ + List getAmountCreditApplyDetailListByApplyId(@Param("applyId") Long applyId); + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmtCrdtAppl/AmountCreditApplyMapper.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmtCrdtAppl/AmountCreditApplyMapper.java new file mode 100644 index 00000000..1fe52680 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmtCrdtAppl/AmountCreditApplyMapper.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.capital.dal.dao.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyReviewPageReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDO; +import cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl.WhetherDeletedEnum; +import org.apache.ibatis.annotations.Mapper; + +/** + * 授信调整申请主 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface AmountCreditApplyMapper extends BaseMapperX { + + default PageResult selectPage(AmountCreditApplyPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eq(AmountCreditApplyDO::getDeleted, WhetherDeletedEnum.NO.getCode()) + .eqIfPresent(AmountCreditApplyDO::getApplyNumber, reqVO.getApplyNumber()) + .eqIfPresent(AmountCreditApplyDO::getApplyUnitNumber, reqVO.getApplyUnitNumber()) + .likeIfPresent(AmountCreditApplyDO::getApplyUnitName, reqVO.getApplyUnitName()) + .betweenIfPresent(AmountCreditApplyDO::getApplyDate, reqVO.getApplyDate()) + .eqIfPresent(AmountCreditApplyDO::getType, reqVO.getType()) + .eqIfPresent(AmountCreditApplyDO::getCompanyType, reqVO.getCompanyType()) + .eqIfPresent(AmountCreditApplyDO::getApplyCause, reqVO.getApplyCause()) + .eqIfPresent(AmountCreditApplyDO::getPlan, reqVO.getPlan()) + .eqIfPresent(AmountCreditApplyDO::getExcludingCreditDescription, reqVO.getExcludingCreditDescription()) + .eqIfPresent(AmountCreditApplyDO::getAttachmentPath, reqVO.getAttachmentPath()) + .eqIfPresent(AmountCreditApplyDO::getStatus, reqVO.getStatus()) + .betweenIfPresent(AmountCreditApplyDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(AmountCreditApplyDO::getId)); + } + + default PageResult selectAmountCreditApplyReviewPage(AmountCreditApplyReviewPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eq(AmountCreditApplyDO::getDeleted, WhetherDeletedEnum.NO.getCode()) + .eqIfPresent(AmountCreditApplyDO::getApplyNumber, reqVO.getApplyNumber()) + .eqIfPresent(AmountCreditApplyDO::getApplyUnitNumber, reqVO.getApplyUnitNumber()) + .likeIfPresent(AmountCreditApplyDO::getApplyUnitName, reqVO.getApplyUnitName()) + .betweenIfPresent(AmountCreditApplyDO::getApplyDate, reqVO.getApplyDate()) + .eqIfPresent(AmountCreditApplyDO::getType, reqVO.getType()) + .eqIfPresent(AmountCreditApplyDO::getCompanyType, reqVO.getCompanyType()) + .eqIfPresent(AmountCreditApplyDO::getApplyCause, reqVO.getApplyCause()) + .eqIfPresent(AmountCreditApplyDO::getPlan, reqVO.getPlan()) + .eqIfPresent(AmountCreditApplyDO::getExcludingCreditDescription, reqVO.getExcludingCreditDescription()) + .eqIfPresent(AmountCreditApplyDO::getAttachmentPath, reqVO.getAttachmentPath()) + .inIfPresent(AmountCreditApplyDO::getStatus, reqVO.getStatus()) + .betweenIfPresent(AmountCreditApplyDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(AmountCreditApplyDO::getId)); + } + + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmtCrdtAppl/AmountCreditApplySignMapper.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmtCrdtAppl/AmountCreditApplySignMapper.java new file mode 100644 index 00000000..c7ae193b --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dao/splyAmtCrdtAppl/AmountCreditApplySignMapper.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.capital.dal.dao.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySignPageReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplySignDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 授信调整签字区域明细 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface AmountCreditApplySignMapper extends BaseMapperX { + + default PageResult selectPage(AmountCreditApplySignPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(AmountCreditApplySignDO::getApplyId, reqVO.getApplyId()) + .eqIfPresent(AmountCreditApplySignDO::getReviewSigner, reqVO.getReviewSigner()) + .eqIfPresent(AmountCreditApplySignDO::getApplyDepartment, reqVO.getApplyDepartment()) + .betweenIfPresent(AmountCreditApplySignDO::getReviewDate, reqVO.getReviewDate()) + .eqIfPresent(AmountCreditApplySignDO::getApprovalComment, reqVO.getApprovalComment()) + .eqIfPresent(AmountCreditApplySignDO::getApprovalStep, reqVO.getApprovalStep()) + .eqIfPresent(AmountCreditApplySignDO::getStatus, reqVO.getStatus()) + .betweenIfPresent(AmountCreditApplySignDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(AmountCreditApplySignDO::getId)); + } + + /** + * 通过主表id查询授信调整签字区域明细信息 + * @param applyId 主表id + * @return + */ + List getAmountCreditApplySignListByApplyId(@Param("applyId") Long applyId); +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmountCredit/AmountCreditChangeDO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmountCredit/AmountCreditChangeDO.java new file mode 100644 index 00000000..3329102f --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmountCredit/AmountCreditChangeDO.java @@ -0,0 +1,92 @@ +package cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit; + +import lombok.*; +import java.util.*; + import java.math.BigDecimal; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** +* 授信额度变动记录 DO +* +* @author 后台管理 +*/ +@TableName("sply_amt_crdt_chg") +@KeySequence("sply_amt_crdt_chg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class AmountCreditChangeDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 关联单据号;收款单/付款单/结算单 + */ + @TableField("REF_NUM") + private String referenceNumber; + /** + * 授信表主键 + */ + @TableField("CRDT_ID") + private Long creditId; + /** + * 变动单号 + */ + @TableField("CHG_NUM") + private String changeNumber; + /** + * 客商名称 + */ + @TableField("PTNR_NAME") + private String partnerName; + /** + * 客商编码 + */ + @TableField("PTNR_NUM") + private String partnerNumber; + /** + * 变动类型 + */ + @TableField("CHG_TP") + private String changeType; + /** + * 变动金额 + */ + @TableField("AMT") + private BigDecimal amount; + /** + * 变动原因 + */ + @TableField("CAUS") + private String cause; + /** + * 关联交易类型 + */ + @TableField("REF_TP") + private String referenceType; + /** + * 凭证日期 + */ + @TableField("VCHR_DT") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime voucherDate; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmountCredit/AmountCreditDO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmountCredit/AmountCreditDO.java new file mode 100644 index 00000000..5590cf80 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmountCredit/AmountCreditDO.java @@ -0,0 +1,86 @@ +package cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit; + +import lombok.*; +import java.util.*; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** +* 授信额度 DO +* +* @author 后台管理 +*/ +@TableName("sply_amt_crdt") +@KeySequence("sply_amt_crdt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class AmountCreditDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 客商名称 + */ + @TableField("PTNR_NAME") + private String partnerName; + /** + * 客商编码 + */ + @TableField("PTNR_NUM") + private String partnerNumber; + /** + * 授信类型 + */ + @TableField("CRDT_TP") + private String creditType; + /** + * 开始日期 + */ + @TableField("STRT_DT") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime startDate; + /** + * 结束日期 + */ + @TableField("END_DT") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endDate; + /** + * 授信额度上限 + */ + @TableField("AMT_LIM") + private BigDecimal amountLimit; + /** + * 授信使用额度 + */ + @TableField("USE_AMT") + private BigDecimal useAmount; + /** + * 授信剩余余额 + */ + @TableField("RMNE_AMT") + private BigDecimal remaineAmount; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmtCrdtAppl/AmountCreditApplyDO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmtCrdtAppl/AmountCreditApplyDO.java new file mode 100644 index 00000000..aa33cae7 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmtCrdtAppl/AmountCreditApplyDO.java @@ -0,0 +1,106 @@ +package cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** + * 授信调整申请主 DO + * + * @author 后台管理 + */ +@TableName("sply_amt_crdt_appl") +@KeySequence("sply_amt_crdt_appl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** + * 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO + */ +public class AmountCreditApplyDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 申请单号 + */ + @TableField("APPL_NUM") + private String applyNumber; + /** + * 申请单位编码 + */ + @TableField("APPL_UNT_NUM") + private String applyUnitNumber; + /** + * 申请单位名称 + */ + @TableField("APPL_UNT_NAME") + private String applyUnitName; + /** + * 申请日期 + */ + @TableField("APPL_DT") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime applyDate; + /** + * 类型 + */ + @TableField("TP") + private String type; + /** + * 企业性质 + */ + @TableField("CPN_TP") + private String companyType; + /** + * 申请事由 + */ + @TableField("APPL_CAUS") + private String applyCause; + /** + * 额度使用情况及财务账务处理计划 + */ + @TableField("PLN") + private String plan; + /** + * 不纳入授信管理依据 + */ + @TableField("EXCL_CRDT_DSP") + private String excludingCreditDescription; + /** + * 附件路径 + */ + @TableField("ATM_PATH") + private String attachmentPath; + /** + * 状态 + */ + @TableField("STS") + private String status; + + /** + * 经办人 + */ + @TableField("HDLR") + private String hdlr; + + /** + * 手机号码 + */ + @TableField("HDLR_PHN") + private String hdlrPhn; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmtCrdtAppl/AmountCreditApplyDetailDO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmtCrdtAppl/AmountCreditApplyDetailDO.java new file mode 100644 index 00000000..09eb1b95 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmtCrdtAppl/AmountCreditApplyDetailDO.java @@ -0,0 +1,88 @@ +package cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** + * 授信调整申请明细 DO + * + * @author 后台管理 + */ +@TableName("sply_amt_crdt_appl_dtl") +@KeySequence("sply_amt_crdt_appl_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** + * 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO + */ +public class AmountCreditApplyDetailDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 申请表主键 + */ + @TableField("APPL_ID") + private Long applyId; + + /** + * 客户/供应商类别(CUSTOMER:客户;SUPPLIER:供应商) + */ + @TableField("PTNR_TP") + private String ptnrTp; + + /** + * 客商名称 + */ + @TableField("PTNR_NAME") + private String partnerName; + /** + * 客商编码 + */ + @TableField("PTNR_NUM") + private String partnerNumber; + /** + * 原额度 + */ + @TableField("ORIG_AMT") + private BigDecimal originalAmount; + /** + * 申请额度 + */ + @TableField("APPL_AMT") + private BigDecimal applyAmount; + /** + * 实际占用额 + */ + @TableField("ACT_AMT") + private BigDecimal actualAmount; + /** + * 开始日期 + */ + @TableField("STRT_DT") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime startDate; + /** + * 结束日期 + */ + @TableField("END_DT") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endDate; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmtCrdtAppl/AmountCreditApplySignDO.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmtCrdtAppl/AmountCreditApplySignDO.java new file mode 100644 index 00000000..7eca04d4 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/dataobject/splyAmtCrdtAppl/AmountCreditApplySignDO.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** + * 授信调整签字区域明细 DO + * + * @author 后台管理 + */ +@TableName("sply_amt_crdt_appl_sgn") +@KeySequence("sply_amt_crdt_appl_sgn_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** + * 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO + */ +public class AmountCreditApplySignDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 申请表主键 + */ + @TableField("APPL_ID") + private Long applyId; + /** + * 审批人 + */ + @TableField("RVW_SGNR") + private String reviewSigner; + /** + * 申请部门 + */ + @TableField("APPL_DEPT") + private String applyDepartment; + /** + * 审批时间 + */ + @TableField("RVW_DT") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime reviewDate; + /** + * 审批意见 + */ + @TableField("APRV_CMT") + private String approvalComment; + /** + * 审批步骤 + */ + @TableField("APRV_STP") + private String approvalStep; + /** + * 状态 + */ + @TableField("STS") + private String status; + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/redis/RedisKeyConstants.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/redis/RedisKeyConstants.java new file mode 100644 index 00000000..8283fb23 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/dal/redis/RedisKeyConstants.java @@ -0,0 +1,11 @@ +package cn.iocoder.yudao.module.capital.dal.redis; + +/** + * System Redis Key 枚举类 + * + * @author ZT + */ +public interface RedisKeyConstants { + + +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmountCredit/AmountCreditChangeChangeTypeEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmountCredit/AmountCreditChangeChangeTypeEnum.java new file mode 100644 index 00000000..fa66d1df --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmountCredit/AmountCreditChangeChangeTypeEnum.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmountCredit; + +/** + * 授信额度变动记录-变动类型枚举 + * TODO + */ +public enum AmountCreditChangeChangeTypeEnum { + YES("0","0"), + NO("1","1") + ; + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + AmountCreditChangeChangeTypeEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmountCredit/AmountCreditChangeReferenceTypeEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmountCredit/AmountCreditChangeReferenceTypeEnum.java new file mode 100644 index 00000000..f90cdc04 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmountCredit/AmountCreditChangeReferenceTypeEnum.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmountCredit; + +/** + * 授信额度变动记录-关联交易类型 + * TODO + */ +public enum AmountCreditChangeReferenceTypeEnum { + YES("0","0"), + NO("1","1") + ; + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + AmountCreditChangeReferenceTypeEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmountCredit/AmountCreditCreditTypeEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmountCredit/AmountCreditCreditTypeEnum.java new file mode 100644 index 00000000..ef92abe6 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmountCredit/AmountCreditCreditTypeEnum.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmountCredit; + +/** + * 授信额度表-授信类型枚举 + * TODO + */ +public enum AmountCreditCreditTypeEnum { + + YES("0","0"), + NO("1","1") + ; + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + AmountCreditCreditTypeEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyCompanyTypeEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyCompanyTypeEnum.java new file mode 100644 index 00000000..19f4d19e --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyCompanyTypeEnum.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl; + +import org.apache.commons.lang3.StringUtils; + +/** + * 授信申请管理客户企业性质枚举:STATE_OWNED_ENTERPRISE:国企;PRIVATE_ENTERPRISE:私企;GOVERNMENT_AGENCY:政府机构;OTHERS_TYPE:其他类; + * + */ +public enum AmountCreditApplyCompanyTypeEnum { + OTHERS_TYPE("OTHERS_TYPE","其他类"), + STATE_OWNED_ENTERPRISE("STATE_OWNED_ENTERPRISE","国企"), + PRIVATE_ENTERPRISE("PRIVATE_ENTERPRISE","私企"), + GOVERNMENT_AGENCY("GOVERNMENT_AGENCY","政府机构"), + ; + + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + AmountCreditApplyCompanyTypeEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public static AmountCreditApplyCompanyTypeEnum getEnumByCode(String code){ + for (AmountCreditApplyCompanyTypeEnum e : AmountCreditApplyCompanyTypeEnum.values()) { + if (e.getCode().equals(code)) { + return e; + } + } + return OTHERS_TYPE; + } + + public static AmountCreditApplyCompanyTypeEnum getEnumByName(String name){ + if (StringUtils.isEmpty(name)) return OTHERS_TYPE; + for (AmountCreditApplyCompanyTypeEnum e : AmountCreditApplyCompanyTypeEnum.values()) { + if (name.equals(e.getName())) { + return e; + } + } + return OTHERS_TYPE; + } + +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyDetailPtnrTpEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyDetailPtnrTpEnum.java new file mode 100644 index 00000000..ac20b1e5 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyDetailPtnrTpEnum.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl; + +/** + * 客户/供应商类别枚举(CUSTOMER:客户;SUPPLIER:供应商) + */ +public enum AmountCreditApplyDetailPtnrTpEnum { + CUSTOMER("CUSTOMER","客户"), + SUPPLIER("SUPPLIER","供应商") + ; + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + AmountCreditApplyDetailPtnrTpEnum(String code, String name){ + this.code = code; + this.name = name; + } +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplySignStatusEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplySignStatusEnum.java new file mode 100644 index 00000000..0ea67dde --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplySignStatusEnum.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl; + +/** + * 授信调整签字区域明细表-状态枚举- SIGNED:已签字;UNSIGNED:未签字; + */ +public enum AmountCreditApplySignStatusEnum { + SIGNED("SIGNED","已签字"), + UNSIGNED("UNSIGNED","未签字"), + ; + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + AmountCreditApplySignStatusEnum(String code, String name){ + this.code = code; + this.name = name; + } +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyStatusEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyStatusEnum.java new file mode 100644 index 00000000..72c49882 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyStatusEnum.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl; + +import org.apache.commons.lang3.StringUtils; + +/** + * 授信申请管理状态枚举(ACAS_DRAFT:草稿,可删除;ACAS_DELETED:已删除;ACAS_UNDER_REVIEW:申请中,不允许任何操作;ACAS_REJECT:驳回,可以编辑,重新提交;ACAS_PASS:通过,不允许删除;ACAS_OFFSET:冲销;) + * + */ +public enum AmountCreditApplyStatusEnum { + ACAS_DRAFT("ACAS_DRAFT","草稿"), + ACAS_DELETED("ACAS_DELETED","已删除"), + ACAS_UNDER_REVIEW("ACAS_UNDER_REVIEW","申请中"), + ACAS_REJECT("ACAS_REJECT","驳回"), + ACAS_PASS("ACAS_PASS","通过"), + ACAS_OFFSET("ACAS_OFFSET","冲销"), + ; + + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + AmountCreditApplyStatusEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public static AmountCreditApplyStatusEnum getEnumByCode(String code){ + for (AmountCreditApplyStatusEnum e : AmountCreditApplyStatusEnum.values()) { + if (e.getCode().equals(code)) { + return e; + } + } + return ACAS_DRAFT; + } + + public static AmountCreditApplyStatusEnum getEnumByName(String name){ + if (StringUtils.isEmpty(name)) return ACAS_DRAFT; + for (AmountCreditApplyStatusEnum e : AmountCreditApplyStatusEnum.values()) { + if (name.equals(e.getName())) { + return e; + } + } + return ACAS_DRAFT; + } + +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyTypeEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyTypeEnum.java new file mode 100644 index 00000000..26eda4d4 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/AmountCreditApplyTypeEnum.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl; + +import org.apache.commons.lang3.StringUtils; + +/** + * 授信申请管理额度类型枚举:INVESTMENT:投资类;MINERAL_CATEGORY:矿产类;FINANCIAL_CATEGORY:财务类;HUMAN_RESOURCES_CATEGORY:人力资源类;SAFETY_AND_ENVIRONMENTAL_PROTECTION_CATEGORY:安全环保类;TECHNOLOGY:科技类; + * INFORMATIONIZATION_CATEGORY:信息化类;MARKETING:营销类;PRODUCTION_CATEGORY:生产类;OTHERS_TYPE:其他类; + */ +public enum AmountCreditApplyTypeEnum { + OTHERS_TYPE("OTHERS_TYPE","其他类"), + INVESTMENT("INVESTMENT","投资类"), + MINERAL_CATEGORY("MINERAL_CATEGORY","矿产类"), + FINANCIAL_CATEGORY("FINANCIAL_CATEGORY","财务类"), + HUMAN_RESOURCES_CATEGORY("HUMAN_RESOURCES_CATEGORY","人力资源类"), + SAFETY_AND_ENVIRONMENTAL_PROTECTION_CATEGORY("SAFETY_AND_ENVIRONMENTAL_PROTECTION_CATEGORY","安全环保类"), + TECHNOLOGY("TECHNOLOGY","科技类"), + INFORMATIONIZATION_CATEGORY("INFORMATIONIZATION_CATEGORY","信息化类"), + MARKETING("MARKETING","营销类"), + PRODUCTION_CATEGORY("PRODUCTION_CATEGORY","生产类"), + ; + + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + AmountCreditApplyTypeEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public static AmountCreditApplyTypeEnum getEnumByCode(String code){ + for (AmountCreditApplyTypeEnum e : AmountCreditApplyTypeEnum.values()) { + if (e.getCode().equals(code)) { + return e; + } + } + return OTHERS_TYPE; + } + + public static AmountCreditApplyTypeEnum getEnumByName(String name){ + if (StringUtils.isEmpty(name)) return OTHERS_TYPE; + for (AmountCreditApplyTypeEnum e : AmountCreditApplyTypeEnum.values()) { + if (name.equals(e.getName())) { + return e; + } + } + return OTHERS_TYPE; + } + +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/WhetherDeletedEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/WhetherDeletedEnum.java new file mode 100644 index 00000000..d9813234 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/WhetherDeletedEnum.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl; + +/** + * 是否删除枚举 + * 是否删除;0:未删除;1:已删除 + */ +public enum WhetherDeletedEnum { + YES(1,"已删除"), + NO(0,"未删除") + ; + + /** + * 编码 + */ + private Integer code; + + /** + * 名称 + */ + private String name; + + public Integer getCode() { + return code; + } + + public String getName() { + return name; + } + + WhetherDeletedEnum(Integer code, String name){ + this.code = code; + this.name = name; + } + +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/YesOrNoEnum.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/YesOrNoEnum.java new file mode 100644 index 00000000..acfee933 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/enums/splyAmtCrdtAppl/YesOrNoEnum.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl; + +import org.apache.commons.lang3.StringUtils; + +/** + * 是否枚举 + * 标识:0:否;1:是 + */ +public enum YesOrNoEnum { + YES("1","是"), + NO("0","否") + ; + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + YesOrNoEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public static YesOrNoEnum getEnumByCode(String code){ + for (YesOrNoEnum e : YesOrNoEnum.values()) { + if (code.equals(e.getCode())) { + return e; + } + } + return NO; + } + + public static YesOrNoEnum getEnumByName(String name){ + if (StringUtils.isEmpty(name)) return NO; + for (YesOrNoEnum e : YesOrNoEnum.values()){ + if (name.equals(e.getName())){ + return e; + } + } + return NO; + } +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/rpc/config/RpcConfiguration.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..660a37c2 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,13 @@ +package cn.iocoder.yudao.module.capital.framework.rpc.config; + +import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.sequence.SequenceApi; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "capitalRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class, SequenceApi.class, BpmProcessInstanceApi.class, AdminUserApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/security/config/SecurityConfiguration.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/security/config/SecurityConfiguration.java index e81d8aa2..9816a3ea 100644 --- a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Capital 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("capitalSecurityConfiguration") public class SecurityConfiguration { @Bean diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditChangeService.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditChangeService.java new file mode 100644 index 00000000..215c8943 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditChangeService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.capital.service.splyAmountCredit; + +import java.util.*; + +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangePageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangeRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangeSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit.AmountCreditChangeDO; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 授信额度变动记录 Service 接口 + * + * @author 后台管理 + */ +public interface AmountCreditChangeService { + + /** + * 创建授信额度变动记录 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + AmountCreditChangeRespVO createAmountCreditChange(@Valid AmountCreditChangeSaveReqVO createReqVO); + + /** + * 更新授信额度变动记录 + * + * @param updateReqVO 更新信息 + */ + void updateAmountCreditChange(@Valid AmountCreditChangeSaveReqVO updateReqVO); + + /** + * 删除授信额度变动记录 + * + * @param id 编号 + */ + void deleteAmountCreditChange(Long id); + + /** + * 批量删除授信额度变动记录 + * + * @param ids 编号 + */ + void deleteAmountCreditChangeListByIds(List ids); + + /** + * 获得授信额度变动记录 + * + * @param id 编号 + * @return 授信额度变动记录 + */ + AmountCreditChangeDO getAmountCreditChange(Long id); + + /** + * 获得授信额度变动记录分页 + * + * @param pageReqVO 分页查询 + * @return 授信额度变动记录分页 + */ + PageResult getAmountCreditChangePage(AmountCreditChangePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditChangeServiceImpl.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditChangeServiceImpl.java new file mode 100644 index 00000000..f75e583a --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditChangeServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.capital.service.splyAmountCredit; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangePageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangeRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditChangeSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit.AmountCreditChangeDO; +import cn.iocoder.yudao.module.capital.dal.dao.splyAmountCredit.AmountCreditChangeMapper; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.capital.enums.ErrorCodeConstants.AMOUNT_CREDIT_CHANGE_NOT_EXISTS; + +/** + * 授信额度变动记录 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class AmountCreditChangeServiceImpl implements AmountCreditChangeService { + + @Resource + private AmountCreditChangeMapper amountCreditChangeMapper; + + @Override + public AmountCreditChangeRespVO createAmountCreditChange(AmountCreditChangeSaveReqVO createReqVO) { + // 插入 + AmountCreditChangeDO amountCreditChange = BeanUtils.toBean(createReqVO, AmountCreditChangeDO.class); + amountCreditChangeMapper.insert(amountCreditChange); + // 返回 + return BeanUtils.toBean(amountCreditChange, AmountCreditChangeRespVO.class); + } + + @Override + public void updateAmountCreditChange(AmountCreditChangeSaveReqVO updateReqVO) { + // 校验存在 + validateAmountCreditChangeExists(updateReqVO.getId()); + // 更新 + AmountCreditChangeDO updateObj = BeanUtils.toBean(updateReqVO, AmountCreditChangeDO.class); + amountCreditChangeMapper.updateById(updateObj); + } + + @Override + public void deleteAmountCreditChange(Long id) { + // 校验存在 + validateAmountCreditChangeExists(id); + // 删除 + amountCreditChangeMapper.deleteById(id); + } + + @Override + public void deleteAmountCreditChangeListByIds(List ids) { + // 校验存在 + validateAmountCreditChangeExists(ids); + // 删除 + amountCreditChangeMapper.deleteByIds(ids); + } + + private void validateAmountCreditChangeExists(List ids) { + List list = amountCreditChangeMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(AMOUNT_CREDIT_CHANGE_NOT_EXISTS); + } + } + + private void validateAmountCreditChangeExists(Long id) { + if (amountCreditChangeMapper.selectById(id) == null) { + throw exception(AMOUNT_CREDIT_CHANGE_NOT_EXISTS); + } + } + + @Override + public AmountCreditChangeDO getAmountCreditChange(Long id) { + return amountCreditChangeMapper.selectById(id); + } + + @Override + public PageResult getAmountCreditChangePage(AmountCreditChangePageReqVO pageReqVO) { + return amountCreditChangeMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditService.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditService.java new file mode 100644 index 00000000..53f83ddc --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.capital.service.splyAmountCredit; + +import java.util.*; + +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit.AmountCreditDO; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 授信额度 Service 接口 + * + * @author 后台管理 + */ +public interface AmountCreditService { + + /** + * 创建授信额度 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + AmountCreditRespVO createAmountCredit(@Valid AmountCreditSaveReqVO createReqVO); + + /** + * 更新授信额度 + * + * @param updateReqVO 更新信息 + */ + void updateAmountCredit(@Valid AmountCreditSaveReqVO updateReqVO); + + /** + * 删除授信额度 + * + * @param id 编号 + */ + void deleteAmountCredit(Long id); + + /** + * 批量删除授信额度 + * + * @param ids 编号 + */ + void deleteAmountCreditListByIds(List ids); + + /** + * 获得授信额度 + * + * @param id 编号 + * @return 授信额度 + */ + AmountCreditDO getAmountCredit(Long id); + + /** + * 获得授信额度分页 + * + * @param pageReqVO 分页查询 + * @return 授信额度分页 + */ + PageResult getAmountCreditPage(AmountCreditPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditServiceImpl.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditServiceImpl.java new file mode 100644 index 00000000..b3d0a30b --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmountCredit/AmountCreditServiceImpl.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.capital.service.splyAmountCredit; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmountCredit.vo.AmountCreditSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmountCredit.AmountCreditDO; +import cn.iocoder.yudao.module.capital.dal.dao.splyAmountCredit.AmountCreditMapper; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.capital.enums.ErrorCodeConstants.AMOUNT_CREDIT_NOT_EXISTS; + +/** + * 授信额度 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class AmountCreditServiceImpl implements AmountCreditService { + + @Resource + private AmountCreditMapper amountCreditMapper; + + @Override + public AmountCreditRespVO createAmountCredit(AmountCreditSaveReqVO createReqVO) { + // 插入 + AmountCreditDO amountCredit = BeanUtils.toBean(createReqVO, AmountCreditDO.class); + amountCreditMapper.insert(amountCredit); + // 返回 + return BeanUtils.toBean(amountCredit, AmountCreditRespVO.class); + } + + @Override + public void updateAmountCredit(AmountCreditSaveReqVO updateReqVO) { + // 校验存在 + validateAmountCreditExists(updateReqVO.getId()); + // 更新 + AmountCreditDO updateObj = BeanUtils.toBean(updateReqVO, AmountCreditDO.class); + amountCreditMapper.updateById(updateObj); + } + + @Override + public void deleteAmountCredit(Long id) { + // 校验存在 + validateAmountCreditExists(id); + // 删除 + amountCreditMapper.deleteById(id); + } + + @Override + public void deleteAmountCreditListByIds(List ids) { + // 校验存在 + validateAmountCreditExists(ids); + // 删除 + amountCreditMapper.deleteByIds(ids); + } + + private void validateAmountCreditExists(List ids) { + List list = amountCreditMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(AMOUNT_CREDIT_NOT_EXISTS); + } + } + + private void validateAmountCreditExists(Long id) { + if (amountCreditMapper.selectById(id) == null) { + throw exception(AMOUNT_CREDIT_NOT_EXISTS); + } + } + + @Override + public AmountCreditDO getAmountCredit(Long id) { + return amountCreditMapper.selectById(id); + } + + @Override + public PageResult getAmountCreditPage(AmountCreditPageReqVO pageReqVO) { + return amountCreditMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyDetailService.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyDetailService.java new file mode 100644 index 00000000..5134d1f4 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyDetailService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyDetailPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyDetailRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyDetailSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDetailDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 授信调整申请明细 Service 接口 + * + * @author 后台管理 + */ +public interface AmountCreditApplyDetailService { + + /** + * 创建授信调整申请明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + AmountCreditApplyDetailRespVO createAmountCreditApplyDetail(@Valid AmountCreditApplyDetailSaveReqVO createReqVO); + + /** + * 更新授信调整申请明细 + * + * @param updateReqVO 更新信息 + */ + void updateAmountCreditApplyDetail(@Valid AmountCreditApplyDetailSaveReqVO updateReqVO); + + /** + * 删除授信调整申请明细 + * + * @param id 编号 + */ + void deleteAmountCreditApplyDetail(Long id); + + /** + * 批量删除授信调整申请明细 + * + * @param ids 编号 + */ + void deleteAmountCreditApplyDetailListByIds(List ids); + + /** + * 获得授信调整申请明细 + * + * @param id 编号 + * @return 授信调整申请明细 + */ + AmountCreditApplyDetailDO getAmountCreditApplyDetail(Long id); + + /** + * 获得授信调整申请明细分页 + * + * @param pageReqVO 分页查询 + * @return 授信调整申请明细分页 + */ + PageResult getAmountCreditApplyDetailPage(AmountCreditApplyDetailPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyDetailServiceImpl.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyDetailServiceImpl.java new file mode 100644 index 00000000..2baf049b --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyDetailServiceImpl.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyDetailPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyDetailRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyDetailSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDetailDO; +import cn.iocoder.yudao.module.capital.dal.dao.splyAmtCrdtAppl.AmountCreditApplyDetailMapper; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.capital.enums.ErrorCodeConstants.*; + +/** + * 授信调整申请明细 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class AmountCreditApplyDetailServiceImpl implements AmountCreditApplyDetailService { + + @Resource + private AmountCreditApplyDetailMapper amountCreditApplyDetailMapper; + + @Override + public AmountCreditApplyDetailRespVO createAmountCreditApplyDetail(AmountCreditApplyDetailSaveReqVO createReqVO) { + // 插入 + AmountCreditApplyDetailDO amountCreditApplyDetail = BeanUtils.toBean(createReqVO, AmountCreditApplyDetailDO.class); + amountCreditApplyDetailMapper.insert(amountCreditApplyDetail); + // 返回 + return BeanUtils.toBean(amountCreditApplyDetail, AmountCreditApplyDetailRespVO.class); + } + + @Override + public void updateAmountCreditApplyDetail(AmountCreditApplyDetailSaveReqVO updateReqVO) { + // 校验存在 + validateAmountCreditApplyDetailExists(updateReqVO.getId()); + // 更新 + AmountCreditApplyDetailDO updateObj = BeanUtils.toBean(updateReqVO, AmountCreditApplyDetailDO.class); + amountCreditApplyDetailMapper.updateById(updateObj); + } + + @Override + public void deleteAmountCreditApplyDetail(Long id) { + // 校验存在 + validateAmountCreditApplyDetailExists(id); + // 删除 + amountCreditApplyDetailMapper.deleteById(id); + } + + @Override + public void deleteAmountCreditApplyDetailListByIds(List ids) { + // 校验存在 + validateAmountCreditApplyDetailExists(ids); + // 删除 + amountCreditApplyDetailMapper.deleteByIds(ids); + } + + private void validateAmountCreditApplyDetailExists(List ids) { + List list = amountCreditApplyDetailMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(AMOUNT_CREDIT_APPLY_DETAIL_NOT_EXISTS); + } + } + + private void validateAmountCreditApplyDetailExists(Long id) { + if (amountCreditApplyDetailMapper.selectById(id) == null) { + throw exception(AMOUNT_CREDIT_APPLY_DETAIL_NOT_EXISTS); + } + } + + @Override + public AmountCreditApplyDetailDO getAmountCreditApplyDetail(Long id) { + return amountCreditApplyDetailMapper.selectById(id); + } + + @Override + public PageResult getAmountCreditApplyDetailPage(AmountCreditApplyDetailPageReqVO pageReqVO) { + return amountCreditApplyDetailMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyService.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyService.java new file mode 100644 index 00000000..dba34245 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyService.java @@ -0,0 +1,110 @@ +package cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplyReviewPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDO; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptSimpleRespDTO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 授信调整申请主 Service 接口 + * + * @author 后台管理 + */ +public interface AmountCreditApplyService { + + /** + * 创建授信调整申请主 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + AmountCreditApplyRespVO createAmountCreditApply(@Valid AmountCreditApplySaveReqVO createReqVO); + + /** + * 更新授信调整申请主 + * + * @param updateReqVO 更新信息 + */ + void updateAmountCreditApply(@Valid AmountCreditApplySaveReqVO updateReqVO); + + /** + * 删除授信调整申请主 + * + * @param id 编号 + */ + void deleteAmountCreditApply(Long id); + + /** + * 批量删除授信调整申请主 + * + * @param ids 编号 + */ + void deleteAmountCreditApplyListByIds(List ids); + + /** + * 获得授信调整申请主 + * + * @param id 编号 + * @return 授信调整申请主 + */ + AmountCreditApplyDO getAmountCreditApplyById(Long id); + + /** + * 获得授信调整申请主分页 + * + * @param pageReqVO 分页查询 + * @return 授信调整申请主分页 + */ + PageResult getAmountCreditApplyPage(AmountCreditApplyPageReqVO pageReqVO); + + /** + * 获取授信单审核-待办/已办任务 + * @param pageReqVO 请求参数 + * @return + */ + PageResult getAmountCreditApplyReviewTaskList(AmountCreditApplyReviewPageReqVO pageReqVO); + + /** + * 获取登陆人的所在公司以及下属公司 + * @return + */ + List getLoginUserAllCompanyList(); + + /** + * 授信单提交审批 + * @param id 主键id + * @param processInstanceId 流程实例id + * @return + */ + String amountCreditApplySubmitApproval(Long id,String processInstanceId); + + + /** + * 通过流程实例id 获得指定流程实例的任务列表 + * @param processInstanceId 实例id + * @return + */ + Object getBpmTaskListByProcessInstanceId(String processInstanceId); + + /** + * 通过流程实例id 获取流程实例的 BPMN 模型视图 + * @param processInstanceId 流程实例id + * @return + */ + Object getBpmProcessInstanceBpmnModelView(String processInstanceId); + + /** + * 获得审批详情 + * @param processDefinitionId 流程实例id + * @param taskId 任务编号 没有任务编号传流程实例id + * @return + */ + Object getBpmApprovalDetail(String processDefinitionId,String taskId); + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyServiceImpl.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyServiceImpl.java new file mode 100644 index 00000000..f218cf2e --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplyServiceImpl.java @@ -0,0 +1,267 @@ +package cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.*; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplyDetailDO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplySignDO; +import cn.iocoder.yudao.module.capital.dal.dao.splyAmtCrdtAppl.AmountCreditApplyDetailMapper; +import cn.iocoder.yudao.module.capital.dal.dao.splyAmtCrdtAppl.AmountCreditApplyMapper; +import cn.iocoder.yudao.module.capital.dal.dao.splyAmtCrdtAppl.AmountCreditApplySignMapper; +import cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl.AmountCreditApplySignStatusEnum; +import cn.iocoder.yudao.module.capital.enums.splyAmtCrdtAppl.AmountCreditApplyStatusEnum; +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import cn.iocoder.yudao.module.system.api.dept.dto.DeptSimpleRespDTO; +import cn.iocoder.yudao.module.system.api.sequence.SequenceApi; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import jakarta.annotation.Resource; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.validation.annotation.Validated; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.capital.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.capital.enums.GeneralSequenceConstants.SPLY_AMT_CRDT_APPL_APPL_NUM; + +/** + * 授信调整申请主 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class AmountCreditApplyServiceImpl implements AmountCreditApplyService { + + @Resource + private AmountCreditApplyMapper amountCreditApplyMapper; + @Resource + private AmountCreditApplyDetailMapper amountCreditApplyDetailMapper; + @Resource + private AmountCreditApplySignMapper amountCreditApplySignMapper; + @Resource + private SequenceApi sequenceApi; + @Resource + private BpmProcessInstanceApi bpmProcessInstanceApi; + @Resource + private AdminUserApi adminUserApi; + @Resource + private DeptApi deptApi; + + @Override + @Transactional + public AmountCreditApplyRespVO createAmountCreditApply(AmountCreditApplySaveReqVO createReqVO) { + // 插入 + AmountCreditApplyDO amountCreditApply = BeanUtils.toBean(createReqVO, AmountCreditApplyDO.class); + String applyNum = sequenceApi.getNextSequence(SPLY_AMT_CRDT_APPL_APPL_NUM,null,null).getData(); + amountCreditApply.setApplyNumber(applyNum); // 设置申请单号 + amountCreditApply.setStatus(AmountCreditApplyStatusEnum.ACAS_DRAFT.getCode()); + amountCreditApplyMapper.insert(amountCreditApply); + if (ObjectUtils.isNotEmpty(amountCreditApply.getId())){ + List acadetailList = createReqVO.getAcadetailList(); + List acasList = createReqVO.getAcasList(); + if (CollectionUtils.isNotEmpty(acadetailList)) { + List beans = BeanUtils.toBean(acadetailList, AmountCreditApplyDetailDO.class); + for (AmountCreditApplyDetailDO bean : beans) { + bean.setApplyId(amountCreditApply.getId()); + } + amountCreditApplyDetailMapper.insertBatch(beans); + } + if (CollectionUtils.isNotEmpty(acasList)) { + List beans = BeanUtils.toBean(acasList, AmountCreditApplySignDO.class); + for (AmountCreditApplySignDO bean : beans) { + bean.setApplyId(amountCreditApply.getId()); + bean.setStatus(AmountCreditApplySignStatusEnum.UNSIGNED.getCode()); + } + amountCreditApplySignMapper.insertBatch(beans); + } + } + // 返回 + AmountCreditApplyRespVO respBean = BeanUtils.toBean(amountCreditApply, AmountCreditApplyRespVO.class); + List amountCreditApplyDetailListByApplyId = amountCreditApplyDetailMapper.getAmountCreditApplyDetailListByApplyId(amountCreditApply.getId()); + List amountCreditApplySignListByApplyId = amountCreditApplySignMapper.getAmountCreditApplySignListByApplyId(amountCreditApply.getId()); + respBean.setAcadetailList(BeanUtils.toBean(amountCreditApplyDetailListByApplyId,AmountCreditApplyDetailRespVO.class)); + respBean.setAcasList(BeanUtils.toBean(amountCreditApplySignListByApplyId,AmountCreditApplySignRespVO.class)); + return respBean; + } + + @Override + @Transactional + public void updateAmountCreditApply(AmountCreditApplySaveReqVO updateReqVO) { + // 校验存在 + validateAmountCreditApplyExistsUpdate(updateReqVO.getId()); + // 更新 + AmountCreditApplyDO updateObj = BeanUtils.toBean(updateReqVO, AmountCreditApplyDO.class); + amountCreditApplyMapper.updateById(updateObj); + // 先更新主表,后更新子表 + if (CollectionUtils.isNotEmpty(updateReqVO.getAcadetailList())) { + List beans = BeanUtils.toBean(updateReqVO.getAcadetailList(), AmountCreditApplyDetailDO.class); + // 更新子表中,需要判断有新的数据插入的情况 + for (AmountCreditApplyDetailDO item : beans) { + if (ObjectUtils.isEmpty(item.getId())) { + item.setApplyId(updateObj.getId()); + amountCreditApplyDetailMapper.insert(item); + } else { + amountCreditApplyDetailMapper.updateById(item); + } + } + } + if (CollectionUtils.isNotEmpty(updateReqVO.getAcasList())) { + List beans = BeanUtils.toBean(updateReqVO.getAcasList(), AmountCreditApplySignDO.class); + // 更新子表中,需要判断有新的数据插入的情况 + for (AmountCreditApplySignDO item : beans) { + if (ObjectUtils.isEmpty(item.getId())) { + item.setApplyId(updateObj.getId()); + item.setStatus(AmountCreditApplySignStatusEnum.UNSIGNED.getCode()); + amountCreditApplySignMapper.insert(item); + } else { + amountCreditApplySignMapper.updateById(beans); + } + } + } + } + + @Override + @Transactional + public void deleteAmountCreditApply(Long id) { + // 校验存在 + validateAmountCreditApplyExistsDeleted(id); + // 删除 + amountCreditApplyMapper.deleteById(id); + // 子表删除 + List amountCreditApplyDetailListByApplyId = amountCreditApplyDetailMapper.getAmountCreditApplyDetailListByApplyId(id); + List amountCreditApplySignListByApplyId = amountCreditApplySignMapper.getAmountCreditApplySignListByApplyId(id); + if (CollectionUtils.isNotEmpty(amountCreditApplyDetailListByApplyId)) { + List ids = amountCreditApplyDetailListByApplyId.stream().map(obj -> obj.getId()).collect(Collectors.toList()); + amountCreditApplyDetailMapper.deleteByIds(ids); + } + if (CollectionUtils.isNotEmpty(amountCreditApplySignListByApplyId)) { + List ids = amountCreditApplySignListByApplyId.stream().map(obj -> obj.getId()).collect(Collectors.toList()); + amountCreditApplySignMapper.deleteByIds(ids); + } + } + + @Override + @Transactional + public void deleteAmountCreditApplyListByIds(List ids) { + // 校验存在 + validateAmountCreditApplyExistsDeleted(ids); + // 删除 + amountCreditApplyMapper.deleteByIds(ids); + // 删除子表 + for (Long id : ids) { + List amountCreditApplyDetailListByApplyId = amountCreditApplyDetailMapper.getAmountCreditApplyDetailListByApplyId(id); + List amountCreditApplySignListByApplyId = amountCreditApplySignMapper.getAmountCreditApplySignListByApplyId(id); + if (CollectionUtils.isNotEmpty(amountCreditApplyDetailListByApplyId)) { + List idcs = amountCreditApplyDetailListByApplyId.stream().map(obj -> obj.getId()).collect(Collectors.toList()); + amountCreditApplyDetailMapper.deleteByIds(idcs); + } + if (CollectionUtils.isNotEmpty(amountCreditApplySignListByApplyId)) { + List idcs = amountCreditApplySignListByApplyId.stream().map(obj -> obj.getId()).collect(Collectors.toList()); + amountCreditApplySignMapper.deleteByIds(idcs); + } + } + } + + private void validateAmountCreditApplyExistsDeleted(List ids) { + List list = amountCreditApplyMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(AMOUNT_CREDIT_APPLY_NOT_EXISTS); + } else { + for (AmountCreditApplyDO item : list) { + // 不是草稿不允许删除 + if (!AmountCreditApplyStatusEnum.ACAS_DRAFT.getCode().equals(item.getStatus())){ + throw exception(AMOUNT_CREDIT_STATUS_DELETE); + } + } + } + } + + private void validateAmountCreditApplyExistsDeleted(Long id) { + AmountCreditApplyDO amountCreditApplyDO = amountCreditApplyMapper.selectById(id); + if ( amountCreditApplyDO == null) { + throw exception(AMOUNT_CREDIT_APPLY_NOT_EXISTS); + // 不是草稿不允许删除 + } else if (!AmountCreditApplyStatusEnum.ACAS_DRAFT.getCode().equals(amountCreditApplyDO.getStatus())){ + throw exception(AMOUNT_CREDIT_STATUS_DELETE); + } + } + private void validateAmountCreditApplyExistsUpdate(Long id) { + AmountCreditApplyDO amountCreditApplyDO = amountCreditApplyMapper.selectById(id); + if ( amountCreditApplyDO == null) { + throw exception(AMOUNT_CREDIT_APPLY_NOT_EXISTS); + // 申请中不允许更新 + } else if (AmountCreditApplyStatusEnum.ACAS_UNDER_REVIEW.getCode().equals(amountCreditApplyDO.getStatus())){ + throw exception(AMOUNT_CREDIT_STATUS_UPDATE); + } + } + + @Override + public AmountCreditApplyDO getAmountCreditApplyById(Long id) { + AmountCreditApplyDO amountCreditApplyDO = amountCreditApplyMapper.selectById(id); + return amountCreditApplyDO; + } + + @Override + public PageResult getAmountCreditApplyPage(AmountCreditApplyPageReqVO pageReqVO) { + return amountCreditApplyMapper.selectPage(pageReqVO); + } + + @Override + public PageResult getAmountCreditApplyReviewTaskList(AmountCreditApplyReviewPageReqVO pageReqVO) { + return amountCreditApplyMapper.selectAmountCreditApplyReviewPage(pageReqVO); + } + + @Override + public List getLoginUserAllCompanyList() { + //return deptApi.getAllCompanyList(); TODO 新版本未发到maven仓库 + return new ArrayList<>(); + } + + @Override + @Transactional + public String amountCreditApplySubmitApproval(Long id,String processInstanceId) { + if (ObjectUtils.isEmpty(id)) { + throw exception(AMOUNT_CREDIT_APPLY_ID_NOT_EXISTS); + } + // 前端先去请求 bpm 服务的 创建流程接口,成功后会返回流程实例id,然后后再调用接口更新状态 + AmountCreditApplyDO amountCreditApplyDO = amountCreditApplyMapper.selectById(id); + if (ObjectUtils.isEmpty(amountCreditApplyDO)) { + throw exception(AMOUNT_CREDIT_APPLY_NOT_EXISTS); + } + amountCreditApplyDO.setProcessInstanceId(processInstanceId); + amountCreditApplyDO.setStatus(AmountCreditApplyStatusEnum.ACAS_UNDER_REVIEW.getCode()); + amountCreditApplyMapper.updateById(amountCreditApplyDO); + return "提交审批成功"; + } + + @Override + public Object getBpmTaskListByProcessInstanceId(String processInstanceId) { + // TODO 获得指定流程实例的任务列表-审批结果 + return null; + } + + @Override + public Object getBpmProcessInstanceBpmnModelView(String processInstanceId) { + // TODO 获取流程实例的 BPMN 模型视图 + return null; + } + + @Override + public Object getBpmApprovalDetail(String processDefinitionId, String taskId) { + // TODO 获取审批界面 - 获得审批详情 + return null; + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplySignService.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplySignService.java new file mode 100644 index 00000000..d6a24ec9 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplySignService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySignPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySignRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySignSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplySignDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 授信调整签字区域明细 Service 接口 + * + * @author 后台管理 + */ +public interface AmountCreditApplySignService { + + /** + * 创建授信调整签字区域明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + AmountCreditApplySignRespVO createAmountCreditApplySign(@Valid AmountCreditApplySignSaveReqVO createReqVO); + + /** + * 更新授信调整签字区域明细 + * + * @param updateReqVO 更新信息 + */ + void updateAmountCreditApplySign(@Valid AmountCreditApplySignSaveReqVO updateReqVO); + + /** + * 删除授信调整签字区域明细 + * + * @param id 编号 + */ + void deleteAmountCreditApplySign(Long id); + + /** + * 批量删除授信调整签字区域明细 + * + * @param ids 编号 + */ + void deleteAmountCreditApplySignListByIds(List ids); + + /** + * 获得授信调整签字区域明细 + * + * @param id 编号 + * @return 授信调整签字区域明细 + */ + AmountCreditApplySignDO getAmountCreditApplySignById(Long id); + + /** + * 获得授信调整签字区域明细分页 + * + * @param pageReqVO 分页查询 + * @return 授信调整签字区域明细分页 + */ + PageResult getAmountCreditApplySignPage(AmountCreditApplySignPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplySignServiceImpl.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplySignServiceImpl.java new file mode 100644 index 00000000..fde69fbd --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/service/splyAmtCrdtAppl/AmountCreditApplySignServiceImpl.java @@ -0,0 +1,88 @@ +package cn.iocoder.yudao.module.capital.service.splyAmtCrdtAppl; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySignPageReqVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySignRespVO; +import cn.iocoder.yudao.module.capital.controller.admin.capital.splyAmtCrdtAppl.vo.AmountCreditApplySignSaveReqVO; +import cn.iocoder.yudao.module.capital.dal.dataobject.splyAmtCrdtAppl.AmountCreditApplySignDO; +import cn.iocoder.yudao.module.capital.dal.dao.splyAmtCrdtAppl.AmountCreditApplySignMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.module.capital.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +/** + * 授信调整签字区域明细 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class AmountCreditApplySignServiceImpl implements AmountCreditApplySignService { + + @Resource + private AmountCreditApplySignMapper amountCreditApplySignMapper; + + @Override + public AmountCreditApplySignRespVO createAmountCreditApplySign(AmountCreditApplySignSaveReqVO createReqVO) { + // 插入 + AmountCreditApplySignDO amountCreditApplySign = BeanUtils.toBean(createReqVO, AmountCreditApplySignDO.class); + amountCreditApplySignMapper.insert(amountCreditApplySign); + // 返回 + return BeanUtils.toBean(amountCreditApplySign, AmountCreditApplySignRespVO.class); + } + + @Override + public void updateAmountCreditApplySign(AmountCreditApplySignSaveReqVO updateReqVO) { + // 校验存在 + validateAmountCreditApplySignExists(updateReqVO.getId()); + // 更新 + AmountCreditApplySignDO updateObj = BeanUtils.toBean(updateReqVO, AmountCreditApplySignDO.class); + amountCreditApplySignMapper.updateById(updateObj); + } + + @Override + public void deleteAmountCreditApplySign(Long id) { + // 校验存在 + validateAmountCreditApplySignExists(id); + // 删除 + amountCreditApplySignMapper.deleteById(id); + } + + @Override + public void deleteAmountCreditApplySignListByIds(List ids) { + // 校验存在 + validateAmountCreditApplySignExists(ids); + // 删除 + amountCreditApplySignMapper.deleteByIds(ids); + } + + private void validateAmountCreditApplySignExists(List ids) { + List list = amountCreditApplySignMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(AMOUNT_CREDIT_APPLY_SIGN_NOT_EXISTS); + } + } + + private void validateAmountCreditApplySignExists(Long id) { + if (amountCreditApplySignMapper.selectById(id) == null) { + throw exception(AMOUNT_CREDIT_APPLY_SIGN_NOT_EXISTS); + } + } + + @Override + public AmountCreditApplySignDO getAmountCreditApplySignById(Long id) { + return amountCreditApplySignMapper.selectById(id); + } + + @Override + public PageResult getAmountCreditApplySignPage(AmountCreditApplySignPageReqVO pageReqVO) { + return amountCreditApplySignMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-local.yml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-local.yml index 4e052a51..f15a3f2d 100644 --- a/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-local.yml +++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-local.yml @@ -78,7 +78,7 @@ management: logging: level: # 配置自己写的 MyBatis Mapper 打印日志 - cn.iocoder.yudao.module.capital.dal.mysql: debug + cn.iocoder.yudao.module.capital.dal.dao: debug org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR mybatis-plus: diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/application.yml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application.yml index 4fcd5721..3384fed9 100644 --- a/yudao-module-capital/yudao-module-capital-server/src/main/resources/application.yml +++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application.yml @@ -72,8 +72,14 @@ knife4j: # MyBatis Plus 的配置项 mybatis-plus: + mapper-locations: + - classpath*:mapper/**/*.xml configuration: + cache-enabled: false + call-setters-on-nulls: true map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #开启sql日志 + #log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl #关闭日志输出 global-config: db-config: id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。 diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/logback-spring.xml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..b62890e3 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/logback-spring.xml @@ -0,0 +1,76 @@ + + + + + + + + + +       + + + ${PATTERN_DEFAULT} + + + + + + + + + + ${PATTERN_DEFAULT} + + + + ${LOG_FILE} + + + ${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz} + + ${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false} + + ${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB} + + ${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0} + + ${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-30} + + + + + + 0 + + 256 + + + + + + + + ${PATTERN_DEFAULT} + + + + + + + + + + + + + + + + + + + + + + diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmountCredit/AmountCreditChangeMapper.xml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmountCredit/AmountCreditChangeMapper.xml new file mode 100644 index 00000000..5b99d9c0 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmountCredit/AmountCreditChangeMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmountCredit/AmountCreditMapper.xml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmountCredit/AmountCreditMapper.xml new file mode 100644 index 00000000..bd50ab10 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmountCredit/AmountCreditMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmtCrdtAppl/AmountCreditApplyDetailMapper.xml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmtCrdtAppl/AmountCreditApplyDetailMapper.xml new file mode 100644 index 00000000..27ca8ad2 --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmtCrdtAppl/AmountCreditApplyDetailMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmtCrdtAppl/AmountCreditApplyMapper.xml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmtCrdtAppl/AmountCreditApplyMapper.xml new file mode 100644 index 00000000..dd1fbc9d --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmtCrdtAppl/AmountCreditApplyMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmtCrdtAppl/AmountCreditApplySignMapper.xml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmtCrdtAppl/AmountCreditApplySignMapper.xml new file mode 100644 index 00000000..930f0dcd --- /dev/null +++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/mapper/splyAmtCrdtAppl/AmountCreditApplySignMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file diff --git a/yudao-module-customs/pom.xml b/yudao-module-customs/pom.xml index 64497d23..2b9a05a5 100644 --- a/yudao-module-customs/pom.xml +++ b/yudao-module-customs/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} diff --git a/yudao-module-customs/yudao-module-customs-server/pom.xml b/yudao-module-customs/yudao-module-customs-server/pom.xml index 416f6d3c..64ce8cc6 100644 --- a/yudao-module-customs/yudao-module-customs-server/pom.xml +++ b/yudao-module-customs/yudao-module-customs-server/pom.xml @@ -131,21 +131,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/CustomsServerApplication.java b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/CustomsServerApplication.java index 003cd279..04c7d314 100644 --- a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/CustomsServerApplication.java +++ b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/CustomsServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class CustomsServerApplication { public static void main(String[] args) { diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/controller/admin/customs/CustomsController.java b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/controller/admin/customs/CustomsController.java index 8a12bb8a..0e50febc 100644 --- a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/controller/admin/customs/CustomsController.java +++ b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/controller/admin/customs/CustomsController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.module.customs.controller.admin.customs; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/rpc/config/RpcConfiguration.java b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..eda3ea1e --- /dev/null +++ b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.customs.framework.rpc.config; + +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "customsRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/security/config/SecurityConfiguration.java b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/security/config/SecurityConfiguration.java index bab51bf8..f0f6fbd7 100644 --- a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Customs 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("customsSecurityConfiguration") public class SecurityConfiguration { @Bean diff --git a/yudao-module-exchange/pom.xml b/yudao-module-exchange/pom.xml index 623b34ba..acf07647 100644 --- a/yudao-module-exchange/pom.xml +++ b/yudao-module-exchange/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} diff --git a/yudao-module-exchange/yudao-module-exchange-server/pom.xml b/yudao-module-exchange/yudao-module-exchange-server/pom.xml index c3812105..f209691e 100644 --- a/yudao-module-exchange/yudao-module-exchange-server/pom.xml +++ b/yudao-module-exchange/yudao-module-exchange-server/pom.xml @@ -131,21 +131,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/ExchangeServerApplication.java b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/ExchangeServerApplication.java index a46d570d..9094dd0b 100644 --- a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/ExchangeServerApplication.java +++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/ExchangeServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class ExchangeServerApplication { public static void main(String[] args) { diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/controller/admin/exchange/ExchangeController.java b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/controller/admin/exchange/ExchangeController.java index d4528e6c..c72ae4f7 100644 --- a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/controller/admin/exchange/ExchangeController.java +++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/controller/admin/exchange/ExchangeController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.module.exchange.controller.admin.exchange; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/rpc/config/RpcConfiguration.java b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..6546938e --- /dev/null +++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.exchange.framework.rpc.config; + +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "exchangeRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/security/config/SecurityConfiguration.java b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/security/config/SecurityConfiguration.java index 254fc597..50396551 100644 --- a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Exchange 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("exchangeSecurityConfiguration") public class SecurityConfiguration { @Bean diff --git a/yudao-module-metering-test/pom.xml b/yudao-module-metering-test/pom.xml index f7ade6f1..9315e4f1 100644 --- a/yudao-module-metering-test/pom.xml +++ b/yudao-module-metering-test/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/pom.xml b/yudao-module-metering-test/yudao-module-metering-test-server/pom.xml index 8a85d250..306099dc 100644 --- a/yudao-module-metering-test/yudao-module-metering-test-server/pom.xml +++ b/yudao-module-metering-test/yudao-module-metering-test-server/pom.xml @@ -131,21 +131,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/MeteringTestServerApplication.java b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/MeteringTestServerApplication.java index 063ee42e..81a3865e 100644 --- a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/MeteringTestServerApplication.java +++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/MeteringTestServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class MeteringTestServerApplication { public static void main(String[] args) { diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/controller/admin/meteringtest/MeteringTestController.java b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/controller/admin/meteringtest/MeteringTestController.java index 3e3d8839..741b08d8 100644 --- a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/controller/admin/meteringtest/MeteringTestController.java +++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/controller/admin/meteringtest/MeteringTestController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.module.meteringtest.controller.admin.meteringtest; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/rpc/config/RpcConfiguration.java b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..b5852080 --- /dev/null +++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.meteringtest.framework.rpc.config; + +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "meteringtestRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/security/config/SecurityConfiguration.java b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/security/config/SecurityConfiguration.java index 2724e2fe..dca51048 100644 --- a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * MeteringTest 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("meteringTestSecurityConfiguration") public class SecurityConfiguration { @Bean diff --git a/yudao-module-price/pom.xml b/yudao-module-price/pom.xml index 762bd924..95cd05dd 100644 --- a/yudao-module-price/pom.xml +++ b/yudao-module-price/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} diff --git a/yudao-module-price/yudao-module-price-server/pom.xml b/yudao-module-price/yudao-module-price-server/pom.xml index f9605a0c..afbd26e0 100644 --- a/yudao-module-price/yudao-module-price-server/pom.xml +++ b/yudao-module-price/yudao-module-price-server/pom.xml @@ -131,21 +131,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/PriceServerApplication.java b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/PriceServerApplication.java index 2508913b..4ffbbd53 100644 --- a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/PriceServerApplication.java +++ b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/PriceServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class PriceServerApplication { public static void main(String[] args) { diff --git a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/controller/admin/price/PriceController.java b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/controller/admin/price/PriceController.java index 90f9e182..c25a7eed 100644 --- a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/controller/admin/price/PriceController.java +++ b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/controller/admin/price/PriceController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.module.price.controller.admin.price; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/rpc/config/RpcConfiguration.java b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..b7519bba --- /dev/null +++ b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.price.framework.rpc.config; + +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "priceRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/security/config/SecurityConfiguration.java b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/security/config/SecurityConfiguration.java index e361021f..b14d0610 100644 --- a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Price 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("priceSecurityConfiguration") public class SecurityConfiguration { @Bean diff --git a/yudao-module-purchase/pom.xml b/yudao-module-purchase/pom.xml index 681c1af0..8e777211 100644 --- a/yudao-module-purchase/pom.xml +++ b/yudao-module-purchase/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} diff --git a/yudao-module-purchase/yudao-module-purchase-server/pom.xml b/yudao-module-purchase/yudao-module-purchase-server/pom.xml index 04f66920..57b876f5 100644 --- a/yudao-module-purchase/yudao-module-purchase-server/pom.xml +++ b/yudao-module-purchase/yudao-module-purchase-server/pom.xml @@ -131,21 +131,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/PurchaseServerApplication.java b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/PurchaseServerApplication.java index 53838092..8757483f 100644 --- a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/PurchaseServerApplication.java +++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/PurchaseServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class PurchaseServerApplication { public static void main(String[] args) { diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/controller/admin/purchase/PurchaseController.java b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/controller/admin/purchase/PurchaseController.java index 745bc663..97b20d0b 100644 --- a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/controller/admin/purchase/PurchaseController.java +++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/controller/admin/purchase/PurchaseController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.module.purchase.controller.admin.purchase; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/rpc/config/RpcConfiguration.java b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..88b426b4 --- /dev/null +++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.purchase.framework.rpc.config; + +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "purchaseRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/security/config/SecurityConfiguration.java b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/security/config/SecurityConfiguration.java index 25e9a300..59c5d258 100644 --- a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Purchase 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("purchaseSecurityConfiguration") public class SecurityConfiguration { @Bean diff --git a/yudao-module-receive-deliver/pom.xml b/yudao-module-receive-deliver/pom.xml index 14732fef..278e2844 100644 --- a/yudao-module-receive-deliver/pom.xml +++ b/yudao-module-receive-deliver/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ErrorCodeConstants.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ErrorCodeConstants.java index f362f6fa..65715502 100644 --- a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ErrorCodeConstants.java +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ErrorCodeConstants.java @@ -13,5 +13,9 @@ public interface ErrorCodeConstants { // ========== 示例模块 1-001-000-000 ========== ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在"); + ErrorCode BILL_MAIN_NOT_EXISTS = new ErrorCode(1, "收发货单不存在"); + ErrorCode BILL_MAIN_DETAIL_NOT_EXISTS = new ErrorCode(2, "收发货单明细不存在"); + + ErrorCode PARAMS_NOT_EXISTS = new ErrorCode(1_029_000_101, "参数不合法"); } diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastDetailStatusEnum.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastDetailStatusEnum.java new file mode 100644 index 00000000..e7ef397e --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastDetailStatusEnum.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.receivedeliver.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 预报明细状态,字典代码FRCST_DTL_STS + */ +@Getter +@AllArgsConstructor +public enum ForecastDetailStatusEnum { + + IS_CFRM("IS_CFRM", "未确认"), + UN_ENBD("UN_ENBD", "未收发货"), + IS_ENBD("IS_ENBD", "已收发货"), + PRVS("PRVS","停用"); + + /** + * 条目代码 + */ + private String code; + + /** + * 条目显示名称 + */ + private String name; +} diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastDetailTypeEnum.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastDetailTypeEnum.java new file mode 100644 index 00000000..8f894925 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastDetailTypeEnum.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.receivedeliver.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 预报明细类型,字典代码FRCST_WY + */ +@Getter +@AllArgsConstructor +public enum ForecastDetailTypeEnum { + + API("API", "接口上传"), + HAND("HAND", "用户新增"); + + /** + * 条目代码 + */ + private String code; + + /** + * 条目显示名称 + */ + private String name; +} diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastElementRelativityTypeEnum.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastElementRelativityTypeEnum.java new file mode 100644 index 00000000..99b74a6f --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastElementRelativityTypeEnum.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.receivedeliver.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 预报品位关联类型,字典代码FRCST_REL_TP + */ +@Getter +@AllArgsConstructor +public enum ForecastElementRelativityTypeEnum { + + MAIN("MAIN", "主表关联"), + DTL("DTL", "明细关联"); + + /** + * 条目代码 + */ + private String code; + + /** + * 条目显示名称 + */ + private String name; +} diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastPlanStatusEnum.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastPlanStatusEnum.java new file mode 100644 index 00000000..faf37c31 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastPlanStatusEnum.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.receivedeliver.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 预报类型,字典代码FRCST_TP + */ +@Getter +@AllArgsConstructor +public enum ForecastPlanStatusEnum { + + FRCST("FRCST", "到货预报"), + SND_PLN("SND_PLN", "发货计划"), + MVE_SBM("MVE_SBM", "移库提货单"), + SND_SBM("SND_SBM", "发货提货单"); + + /** + * 条目代码 + */ + private String code; + + /** + * 条目显示名称 + */ + private String name; +} diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastStatusEnum.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastStatusEnum.java new file mode 100644 index 00000000..fb14e1c4 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastStatusEnum.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.receivedeliver.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 预报状态,字典代码FRCST_STS + */ +@Getter +@AllArgsConstructor +public enum ForecastStatusEnum { + + UN("UN", "到货预报"), + IS_TRNS("IS_TRNS", "已下发"), + IS_CFRM("IS_CFRM", "已确认"), + IS_APRV("IS_APRV", "已收货/已发货"), + IS_DEL("IS_DEL", "已删除"), + IS_SUBMIT("IS_SUBMIT", "已提交"), + IS_CLOSE("IS_CLOSE", "已关闭"); + + /** + * 条目代码 + */ + private String code; + + /** + * 条目显示名称 + */ + private String name; +} diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastTransportWayEnum.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastTransportWayEnum.java new file mode 100644 index 00000000..058fcbe4 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ForecastTransportWayEnum.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.receivedeliver.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 运输方式,字典代码TRP_WY + */ +@Getter +@AllArgsConstructor +public enum ForecastTransportWayEnum { + + CR("CR", "汽运配送"), + PLWY("PLWY", "火车配送"), + ARLN("ARLN", "机场配送"), + CSTM("CSTM", "客户自提"); + + /** + * 条目代码 + */ + private String code; + + /** + * 条目显示名称 + */ + private String name; +} diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/pom.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/pom.xml index 589b9da8..83f6aae8 100644 --- a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/pom.xml +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/pom.xml @@ -131,21 +131,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/ReceiveDeliverServerApplication.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/ReceiveDeliverServerApplication.java index 4f3c4301..2ac1225b 100644 --- a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/ReceiveDeliverServerApplication.java +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/ReceiveDeliverServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class ReceiveDeliverServerApplication { public static void main(String[] args) { diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/AssayController.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/AssayController.java new file mode 100644 index 00000000..e4f91ad4 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/AssayController.java @@ -0,0 +1,99 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.assay; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssayPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssayRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssaySaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.assay.AssayDO; +import cn.iocoder.yudao.module.receivedeliver.service.assay.AssayService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 品位") +@RestController +@RequestMapping("/supply/assay") +@FileUploadController(source = "sply.assay") +public class AssayController extends AbstractFileUploadController implements BusinessControllerMarker{ + + @Resource + private AssayService assayService; + + @PostMapping("/create") + @Operation(summary = "创建品位") + public CommonResult createAssay(@Valid @RequestBody AssaySaveReqVO createReqVO) { + return success(assayService.createAssay(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新品位") + public CommonResult updateAssay(@Valid @RequestBody AssaySaveReqVO updateReqVO) { + assayService.updateAssay(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除品位") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deleteAssay(@RequestParam("id") Long id) { + assayService.deleteAssay(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除品位") + public CommonResult deleteAssayList(@RequestBody BatchDeleteReqVO req) { + assayService.deleteAssayListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得品位") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getAssay(@RequestParam("id") Long id) { + AssayDO assay = assayService.getAssay(id); + return success(BeanUtils.toBean(assay, AssayRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得品位分页") + public CommonResult> getAssayPage(@Valid AssayPageReqVO pageReqVO) { + PageResult pageResult = assayService.getAssayPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, AssayRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出品位 Excel") + @ApiAccessLog(operateType = EXPORT) + public void exportAssayExcel(@Valid AssayPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = assayService.getAssayPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "品位.xls", "数据", AssayRespVO.class, + BeanUtils.toBean(list, AssayRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/vo/AssayPageReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/vo/AssayPageReqVO.java new file mode 100644 index 00000000..cd9f8bd4 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/vo/AssayPageReqVO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 品位分页 Request VO") +@Data +public class AssayPageReqVO extends PageParam { + + @Schema(description = "品味类型", example = "2") + private String gradeType; + + @Schema(description = "订单号") + private String orderNumber; + + @Schema(description = "订单类型;销售/采购/委托加工", example = "1") + private String orderType; + + @Schema(description = "运单号") + private String waybillNumber; + + @Schema(description = "批次号") + private String batchNumber; + + @Schema(description = "小协议号") + private String agreementNumber; + + @Schema(description = "金属元素缩写") + private String elementAbbreviation; + + @Schema(description = "金属元素编码") + private String elementNumber; + + @Schema(description = "金属元素名称", example = "芋艿") + private String elementName; + + @Schema(description = "检验结果") + private BigDecimal result; + + @Schema(description = "品位单位") + private String gradeUnit; + + @Schema(description = "小数位数") + private Long countLocation; + + @Schema(description = "小数位数(ERP)") + private Long countLocationErp; + + @Schema(description = "检验时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] inspectionDatetime; + + @Schema(description = "实验室代码") + private String laboratoryCode; + + @Schema(description = "实验室名称", example = "王五") + private String laboratoryName; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/vo/AssayRespVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/vo/AssayRespVO.java new file mode 100644 index 00000000..9befd30e --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/vo/AssayRespVO.java @@ -0,0 +1,88 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 品位 Response VO") +@Data +@ExcelIgnoreUnannotated +public class AssayRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18214") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "品味类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("品味类型") + private String gradeType; + + @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("订单号") + private String orderNumber; + + @Schema(description = "订单类型;销售/采购/委托加工", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("订单类型;销售/采购/委托加工") + private String orderType; + + @Schema(description = "运单号") + @ExcelProperty("运单号") + private String waybillNumber; + + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("批次号") + private String batchNumber; + + @Schema(description = "小协议号") + @ExcelProperty("小协议号") + private String agreementNumber; + + @Schema(description = "金属元素缩写", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("金属元素缩写") + private String elementAbbreviation; + + @Schema(description = "金属元素编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("金属元素编码") + private String elementNumber; + + @Schema(description = "金属元素名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("金属元素名称") + private String elementName; + + @Schema(description = "检验结果", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检验结果") + private BigDecimal result; + + @Schema(description = "品位单位", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("品位单位") + private String gradeUnit; + + @Schema(description = "小数位数", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("小数位数") + private Long countLocation; + + @Schema(description = "小数位数(ERP)", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("小数位数(ERP)") + private Long countLocationErp; + + @Schema(description = "检验时间") + @ExcelProperty("检验时间") + private LocalDateTime inspectionDatetime; + + @Schema(description = "实验室代码") + @ExcelProperty("实验室代码") + private String laboratoryCode; + + @Schema(description = "实验室名称", example = "王五") + @ExcelProperty("实验室名称") + private String laboratoryName; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/vo/AssaySaveReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/vo/AssaySaveReqVO.java new file mode 100644 index 00000000..fd063685 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/assay/vo/AssaySaveReqVO.java @@ -0,0 +1,77 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 品位新增/修改 Request VO") +@Data +public class AssaySaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18214") + private Long id; + + @Schema(description = "品味类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "品味类型不能为空") + private String gradeType; + + @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "订单号不能为空") + private String orderNumber; + + @Schema(description = "订单类型;销售/采购/委托加工", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "订单类型;销售/采购/委托加工不能为空") + private String orderType; + + @Schema(description = "运单号") + private String waybillNumber; + + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "批次号不能为空") + private String batchNumber; + + @Schema(description = "小协议号") + private String agreementNumber; + + @Schema(description = "金属元素缩写", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "金属元素缩写不能为空") + private String elementAbbreviation; + + @Schema(description = "金属元素编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "金属元素编码不能为空") + private String elementNumber; + + @Schema(description = "金属元素名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "金属元素名称不能为空") + private String elementName; + + @Schema(description = "检验结果", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "检验结果不能为空") + private BigDecimal result; + + @Schema(description = "品位单位", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "品位单位不能为空") + private String gradeUnit; + + @Schema(description = "小数位数", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "小数位数不能为空") + private Long countLocation; + + @Schema(description = "小数位数(ERP)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "小数位数(ERP)不能为空") + private Long countLocationErp; + + @Schema(description = "检验时间") + private LocalDateTime inspectionDatetime; + + @Schema(description = "实验室代码") + private String laboratoryCode; + + @Schema(description = "实验室名称", example = "王五") + private String laboratoryName; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/BillMainController.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/BillMainController.java new file mode 100644 index 00000000..6ddfc308 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/BillMainController.java @@ -0,0 +1,110 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain; + +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmain.BillMainDO; +import cn.iocoder.yudao.module.receivedeliver.service.billmain.BillMainService; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + + +@Tag(name = "管理后台 - 收发货单") +@RestController +@RequestMapping("/sply/bill-main") +@Validated +public class BillMainController implements BusinessControllerMarker { + + + @Resource + private BillMainService billMainService; + + @PostMapping("/create") + @Operation(summary = "创建收发货单") + @PreAuthorize("@ss.hasPermission('sply:bill-main:create')") + public CommonResult createBillMain(@Valid @RequestBody BillMainSaveReqVO createReqVO) { + return success(billMainService.createBillMain(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新收发货单") + @PreAuthorize("@ss.hasPermission('sply:bill-main:update')") + public CommonResult updateBillMain(@Valid @RequestBody BillMainSaveReqVO updateReqVO) { + billMainService.updateBillMain(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除收发货单") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('sply:bill-main:delete')") + public CommonResult deleteBillMain(@RequestParam("id") Long id) { + billMainService.deleteBillMain(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除收发货单") + @PreAuthorize("@ss.hasPermission('sply:bill-main:delete')") + public CommonResult deleteBillMainList(@RequestBody BatchDeleteReqVO req) { + billMainService.deleteBillMainListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得收发货单") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:bill-main:query')") + public CommonResult getBillMain(@RequestParam("id") Long id) { + BillMainDO billMain = billMainService.getBillMain(id); + return success(BeanUtils.toBean(billMain, BillMainRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得收发货单分页") + @PreAuthorize("@ss.hasPermission('sply:bill-main:query')") + public CommonResult> getBillMainPage(@Valid BillMainPageReqVO pageReqVO) { + PageResult pageResult = billMainService.getBillMainPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BillMainRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出收发货单 Excel") + @PreAuthorize("@ss.hasPermission('sply:bill-main:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBillMainExcel(@Valid BillMainPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = billMainService.getBillMainPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "收发货单.xls", "数据", BillMainRespVO.class, + BeanUtils.toBean(list, BillMainRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/vo/BillMainPageReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/vo/BillMainPageReqVO.java new file mode 100644 index 00000000..a40f2443 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/vo/BillMainPageReqVO.java @@ -0,0 +1,124 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 收发货单分页 Request VO") +@Data +public class BillMainPageReqVO extends PageParam { + + @Schema(description = "类型;收货/发货", example = "2") + private String type; + + @Schema(description = "订单号") + private String orderNo; + + @Schema(description = "订单明细主键", example = "10464") + private Long orderDetailId; + + @Schema(description = "收货单号;自动生成") + private String billNumber; + + @Schema(description = "实物物料编码") + private String materialCoding; + + @Schema(description = "实物物料名称", example = "张三") + private String materialName; + + @Schema(description = "实物收发货数量") + private BigDecimal materialQuantity; + + @Schema(description = "总干重") + private BigDecimal dryQuantity; + + @Schema(description = "实物计量单位") + private String materialUom; + + @Schema(description = "金属物料编码") + private String metalCoding; + + @Schema(description = "金属物料名称", example = "王五") + private String metalName; + + @Schema(description = "金属收发货数量") + private BigDecimal metalQuantity; + + @Schema(description = "金属计量单位") + private String metalUom; + + @Schema(description = "工厂名称", example = "芋艿") + private String factoryName; + + @Schema(description = "工厂编码") + private String factoryNumber; + + @Schema(description = "库位名称", example = "芋艿") + private String warehouseName; + + @Schema(description = "库位编码") + private String warehouseNumber; + + @Schema(description = "不含税总金额") + private BigDecimal notTaxAmount; + + @Schema(description = "含税总金额") + private BigDecimal inTaxAmount; + + @Schema(description = "总税额") + private BigDecimal taxAmount; + + @Schema(description = "付款比例") + private BigDecimal paymentRatio; + + @Schema(description = "实付总金额") + private BigDecimal relativityAmount; + + @Schema(description = "过账日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] postingDate; + + @Schema(description = "客商编号") + private String customerNumber; + + @Schema(description = "客商名称", example = "赵六") + private String customerName; + + @Schema(description = "订单类型", example = "1") + private String orderType; + + @Schema(description = "业务类型;原料/成品/服务/发票", example = "1") + private String businessType; + + @Schema(description = "状态", example = "1") + private String status; + + @Schema(description = "小协议号") + private String agreementNumber; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "合同编码") + private String contractNumber; + + @Schema(description = "合同名称", example = "李四") + private String contractName; + + @Schema(description = "合同纸质合同号") + private String paperContractNumber; + + @Schema(description = "是否以金属结算;根据订单类型判断,如果订单为原料,则默认是,如果是服务订单则不显示,默认为否。如铁精矿/烟尘") + private String isMetalSettlement; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/vo/BillMainRespVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/vo/BillMainRespVO.java new file mode 100644 index 00000000..a37b3ae2 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/vo/BillMainRespVO.java @@ -0,0 +1,160 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 收发货单 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BillMainRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14249") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "类型;收货/发货", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("类型;收货/发货") + private String type; + + @Schema(description = "订单号") + @ExcelProperty("订单号") + private String orderNo; + + @Schema(description = "订单明细主键", example = "10464") + @ExcelProperty("订单明细主键") + private Long orderDetailId; + + @Schema(description = "收货单号;自动生成") + @ExcelProperty("收货单号;自动生成") + private String billNumber; + + @Schema(description = "实物物料编码") + @ExcelProperty("实物物料编码") + private String materialCoding; + + @Schema(description = "实物物料名称", example = "张三") + @ExcelProperty("实物物料名称") + private String materialName; + + @Schema(description = "实物收发货数量") + @ExcelProperty("实物收发货数量") + private BigDecimal materialQuantity; + + @Schema(description = "总干重") + @ExcelProperty("总干重") + private BigDecimal dryQuantity; + + @Schema(description = "实物计量单位") + @ExcelProperty("实物计量单位") + private String materialUom; + + @Schema(description = "金属物料编码") + @ExcelProperty("金属物料编码") + private String metalCoding; + + @Schema(description = "金属物料名称", example = "王五") + @ExcelProperty("金属物料名称") + private String metalName; + + @Schema(description = "金属收发货数量") + @ExcelProperty("金属收发货数量") + private BigDecimal metalQuantity; + + @Schema(description = "金属计量单位") + @ExcelProperty("金属计量单位") + private String metalUom; + + @Schema(description = "工厂名称", example = "芋艿") + @ExcelProperty("工厂名称") + private String factoryName; + + @Schema(description = "工厂编码") + @ExcelProperty("工厂编码") + private String factoryNumber; + + @Schema(description = "库位名称", example = "芋艿") + @ExcelProperty("库位名称") + private String warehouseName; + + @Schema(description = "库位编码") + @ExcelProperty("库位编码") + private String warehouseNumber; + + @Schema(description = "不含税总金额") + @ExcelProperty("不含税总金额") + private BigDecimal notTaxAmount; + + @Schema(description = "含税总金额") + @ExcelProperty("含税总金额") + private BigDecimal inTaxAmount; + + @Schema(description = "总税额") + @ExcelProperty("总税额") + private BigDecimal taxAmount; + + @Schema(description = "付款比例") + @ExcelProperty("付款比例") + private BigDecimal paymentRatio; + + @Schema(description = "实付总金额") + @ExcelProperty("实付总金额") + private BigDecimal relativityAmount; + + @Schema(description = "过账日期") + @ExcelProperty("过账日期") + private LocalDateTime postingDate; + + @Schema(description = "客商编号") + @ExcelProperty("客商编号") + private String customerNumber; + + @Schema(description = "客商名称", example = "赵六") + @ExcelProperty("客商名称") + private String customerName; + + @Schema(description = "订单类型", example = "1") + @ExcelProperty("订单类型") + private String orderType; + + @Schema(description = "业务类型;原料/成品/服务/发票", example = "1") + @ExcelProperty("业务类型;原料/成品/服务/发票") + private String businessType; + + @Schema(description = "状态", example = "1") + @ExcelProperty("状态") + private String status; + + @Schema(description = "小协议号") + @ExcelProperty("小协议号") + private String agreementNumber; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "合同编码") + @ExcelProperty("合同编码") + private String contractNumber; + + @Schema(description = "合同名称", example = "李四") + @ExcelProperty("合同名称") + private String contractName; + + @Schema(description = "合同纸质合同号") + @ExcelProperty("合同纸质合同号") + private String paperContractNumber; + + @Schema(description = "是否以金属结算;根据订单类型判断,如果订单为原料,则默认是,如果是服务订单则不显示,默认为否。如铁精矿/烟尘") + @ExcelProperty("是否以金属结算;根据订单类型判断,如果订单为原料,则默认是,如果是服务订单则不显示,默认为否。如铁精矿/烟尘") + private String isMetalSettlement; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/vo/BillMainSaveReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/vo/BillMainSaveReqVO.java new file mode 100644 index 00000000..280f15ae --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmain/vo/BillMainSaveReqVO.java @@ -0,0 +1,125 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo; + +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailSaveReqVO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 收发货单新增/修改 Request VO") +@Data +public class BillMainSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14249") + private Long id; + + @Schema(description = "类型;收货/发货", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "类型;收货/发货不能为空") + private String type; + + @Schema(description = "订单号") + private String orderNo; + + @Schema(description = "订单明细主键", example = "10464") + private Long orderDetailId; + + @Schema(description = "收货单号;自动生成") + private String billNumber; + + @Schema(description = "实物物料编码") + private String materialCoding; + + @Schema(description = "实物物料名称", example = "张三") + private String materialName; + + @Schema(description = "实物收发货数量") + private BigDecimal materialQuantity; + + @Schema(description = "总干重") + private BigDecimal dryQuantity; + + @Schema(description = "实物计量单位") + private String materialUom; + + @Schema(description = "金属物料编码") + private String metalCoding; + + @Schema(description = "金属物料名称", example = "王五") + private String metalName; + + @Schema(description = "金属收发货数量") + private BigDecimal metalQuantity; + + @Schema(description = "金属计量单位") + private String metalUom; + + @Schema(description = "工厂名称", example = "芋艿") + private String factoryName; + + @Schema(description = "工厂编码") + private String factoryNumber; + + @Schema(description = "库位名称", example = "芋艿") + private String warehouseName; + + @Schema(description = "库位编码") + private String warehouseNumber; + + @Schema(description = "不含税总金额") + private BigDecimal notTaxAmount; + + @Schema(description = "含税总金额") + private BigDecimal inTaxAmount; + + @Schema(description = "总税额") + private BigDecimal taxAmount; + + @Schema(description = "付款比例") + private BigDecimal paymentRatio; + + @Schema(description = "实付总金额") + private BigDecimal relativityAmount; + + @Schema(description = "过账日期") + private LocalDateTime postingDate; + + @Schema(description = "客商编号") + private String customerNumber; + + @Schema(description = "客商名称", example = "赵六") + private String customerName; + + @Schema(description = "订单类型", example = "1") + private String orderType; + + @Schema(description = "业务类型;原料/成品/服务/发票", example = "1") + private String businessType; + + @Schema(description = "状态", example = "1") + private String status; + + @Schema(description = "小协议号") + private String agreementNumber; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "合同编码") + private String contractNumber; + + @Schema(description = "合同名称", example = "李四") + private String contractName; + + @Schema(description = "合同纸质合同号") + private String paperContractNumber; + + @Schema(description = "是否以金属结算;根据订单类型判断,如果订单为原料,则默认是,如果是服务订单则不显示,默认为否。如铁精矿/烟尘") + private String isMetalSettlement; + + @Schema(description = "收发货单明细新集合") + private List billMainDetailSaveReqVOS; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/BillMainDetailController.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/BillMainDetailController.java new file mode 100644 index 00000000..c7bdc815 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/BillMainDetailController.java @@ -0,0 +1,110 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail; + +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmaindetail.BillMainDetailDO; +import cn.iocoder.yudao.module.receivedeliver.service.billmaindetail.BillMainDetailService; +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; + + +@Tag(name = "管理后台 - 收发货单明细") +@RestController +@RequestMapping("/sply/bill-main-detail") +@Validated +public class BillMainDetailController implements BusinessControllerMarker { + + + @Resource + private BillMainDetailService billMainDetailService; + + @PostMapping("/create") + @Operation(summary = "创建收发货单明细") + @PreAuthorize("@ss.hasPermission('sply:bill-main-detail:create')") + public CommonResult createBillMainDetail(@Valid @RequestBody BillMainDetailSaveReqVO createReqVO) { + return success(billMainDetailService.createBillMainDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新收发货单明细") + @PreAuthorize("@ss.hasPermission('sply:bill-main-detail:update')") + public CommonResult updateBillMainDetail(@Valid @RequestBody BillMainDetailSaveReqVO updateReqVO) { + billMainDetailService.updateBillMainDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除收发货单明细") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('sply:bill-main-detail:delete')") + public CommonResult deleteBillMainDetail(@RequestParam("id") Long id) { + billMainDetailService.deleteBillMainDetail(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除收发货单明细") + @PreAuthorize("@ss.hasPermission('sply:bill-main-detail:delete')") + public CommonResult deleteBillMainDetailList(@RequestBody BatchDeleteReqVO req) { + billMainDetailService.deleteBillMainDetailListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得收发货单明细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('sply:bill-main-detail:query')") + public CommonResult getBillMainDetail(@RequestParam("id") Long id) { + BillMainDetailDO billMainDetail = billMainDetailService.getBillMainDetail(id); + return success(BeanUtils.toBean(billMainDetail, BillMainDetailRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得收发货单明细分页") + @PreAuthorize("@ss.hasPermission('sply:bill-main-detail:query')") + public CommonResult> getBillMainDetailPage(@Valid BillMainDetailPageReqVO pageReqVO) { + PageResult pageResult = billMainDetailService.getBillMainDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, BillMainDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出收发货单明细 Excel") + @PreAuthorize("@ss.hasPermission('sply:bill-main-detail:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportBillMainDetailExcel(@Valid BillMainDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = billMainDetailService.getBillMainDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "收发货单明细.xls", "数据", BillMainDetailRespVO.class, + BeanUtils.toBean(list, BillMainDetailRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/vo/BillMainDetailPageReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/vo/BillMainDetailPageReqVO.java new file mode 100644 index 00000000..75e13717 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/vo/BillMainDetailPageReqVO.java @@ -0,0 +1,87 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 收发货单明细分页 Request VO") +@Data +public class BillMainDetailPageReqVO extends PageParam { + + @Schema(description = "订单号") + private String orderNo; + + @Schema(description = "收发货单主键", example = "12176") + private Long recordId; + + @Schema(description = "批次号") + private String batchNo; + + @Schema(description = "磅单号") + private String poundNo; + + @Schema(description = "金属元素缩写") + private String elementAbbreviation; + + @Schema(description = "金属元素名称", example = "李四") + private String elementName; + + @Schema(description = "金属元素编码") + private String elementNumber; + + @Schema(description = "品位单位") + private String gradeUnit; + + @Schema(description = "品位类型;暂估/化验/复检/仲裁", example = "1") + private String gradeType; + + @Schema(description = "品位值") + private BigDecimal grade; + + @Schema(description = "金属物料编码") + private String metalNumber; + + @Schema(description = "金属物料名称", example = "芋艿") + private String metalName; + + @Schema(description = "总收货量") + private BigDecimal quantity; + + @Schema(description = "计量单位") + private String uom; + + @Schema(description = "税码") + private String taxNumber; + + @Schema(description = "不含税金额") + private BigDecimal notTaxAmount; + + @Schema(description = "含税金额") + private BigDecimal inTaxAmount; + + @Schema(description = "税额") + private BigDecimal taxAmount; + + @Schema(description = "付款比例") + private BigDecimal paymentRatio; + + @Schema(description = "实付金额") + private BigDecimal relativityAmount; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "状态", example = "2") + private String status; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/vo/BillMainDetailRespVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/vo/BillMainDetailRespVO.java new file mode 100644 index 00000000..ab3d41ae --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/vo/BillMainDetailRespVO.java @@ -0,0 +1,112 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 收发货单明细 Response VO") +@Data +@ExcelIgnoreUnannotated +public class BillMainDetailRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8550") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "订单号") + @ExcelProperty("订单号") + private String orderNo; + + @Schema(description = "收发货单主键", example = "12176") + @ExcelProperty("收发货单主键") + private Long recordId; + + @Schema(description = "批次号") + @ExcelProperty("批次号") + private String batchNo; + + @Schema(description = "磅单号") + @ExcelProperty("磅单号") + private String poundNo; + + @Schema(description = "金属元素缩写") + @ExcelProperty("金属元素缩写") + private String elementAbbreviation; + + @Schema(description = "金属元素名称", example = "李四") + @ExcelProperty("金属元素名称") + private String elementName; + + @Schema(description = "金属元素编码") + @ExcelProperty("金属元素编码") + private String elementNumber; + + @Schema(description = "品位单位") + @ExcelProperty("品位单位") + private String gradeUnit; + + @Schema(description = "品位类型;暂估/化验/复检/仲裁", example = "1") + @ExcelProperty("品位类型;暂估/化验/复检/仲裁") + private String gradeType; + + @Schema(description = "品位值") + @ExcelProperty("品位值") + private BigDecimal grade; + + @Schema(description = "金属物料编码") + @ExcelProperty("金属物料编码") + private String metalNumber; + + @Schema(description = "金属物料名称", example = "芋艿") + @ExcelProperty("金属物料名称") + private String metalName; + + @Schema(description = "总收货量") + @ExcelProperty("总收货量") + private BigDecimal quantity; + + @Schema(description = "计量单位") + @ExcelProperty("计量单位") + private String uom; + + @Schema(description = "税码") + @ExcelProperty("税码") + private String taxNumber; + + @Schema(description = "不含税金额") + @ExcelProperty("不含税金额") + private BigDecimal notTaxAmount; + + @Schema(description = "含税金额") + @ExcelProperty("含税金额") + private BigDecimal inTaxAmount; + + @Schema(description = "税额") + @ExcelProperty("税额") + private BigDecimal taxAmount; + + @Schema(description = "付款比例") + @ExcelProperty("付款比例") + private BigDecimal paymentRatio; + + @Schema(description = "实付金额") + @ExcelProperty("实付金额") + private BigDecimal relativityAmount; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "状态", example = "2") + @ExcelProperty("状态") + private String status; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/vo/BillMainDetailSaveReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/vo/BillMainDetailSaveReqVO.java new file mode 100644 index 00000000..ec947d16 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/billmaindetail/vo/BillMainDetailSaveReqVO.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 收发货单明细新增/修改 Request VO") +@Data +public class BillMainDetailSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8550") + private Long id; + + @Schema(description = "订单号") + private String orderNo; + + @Schema(description = "收发货单主键", example = "12176") + private Long recordId; + + @Schema(description = "批次号") + private String batchNo; + + @Schema(description = "磅单号") + private String poundNo; + + @Schema(description = "金属元素缩写") + private String elementAbbreviation; + + @Schema(description = "金属元素名称", example = "李四") + private String elementName; + + @Schema(description = "金属元素编码") + private String elementNumber; + + @Schema(description = "品位单位") + private String gradeUnit; + + @Schema(description = "品位类型;暂估/化验/复检/仲裁", example = "1") + private String gradeType; + + @Schema(description = "品位值") + private BigDecimal grade; + + @Schema(description = "金属物料编码") + private String metalNumber; + + @Schema(description = "金属物料名称", example = "芋艿") + private String metalName; + + @Schema(description = "总收货量") + private BigDecimal quantity; + + @Schema(description = "计量单位") + private String uom; + + @Schema(description = "税码") + private String taxNumber; + + @Schema(description = "不含税金额") + private BigDecimal notTaxAmount; + + @Schema(description = "含税金额") + private BigDecimal inTaxAmount; + + @Schema(description = "税额") + private BigDecimal taxAmount; + + @Schema(description = "付款比例") + private BigDecimal paymentRatio; + + @Schema(description = "实付金额") + private BigDecimal relativityAmount; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "状态", example = "2") + private String status; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/ForecastController.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/ForecastController.java new file mode 100644 index 00000000..38e9fcaf --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/ForecastController.java @@ -0,0 +1,175 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.http.HttpUtils; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecast.ForecastDO; +import cn.iocoder.yudao.module.receivedeliver.service.forecast.ForecastService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.core.io.ClassPathResource; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; +import java.rmi.ServerException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.IMPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 预报") +@RestController +@RequestMapping("/supply/forecast") +public class ForecastController extends AbstractFileUploadController implements BusinessControllerMarker{ + + @Resource + private ForecastService forecastService; + + @PostMapping("/create") + @Operation(summary = "创建预报") + public CommonResult createForecast(@Valid @RequestBody ForecastSaveReqVO createReqVO) { + return success(forecastService.createForecast(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新预报") + public CommonResult updateForecast(@Valid @RequestBody ForecastSaveReqVO updateReqVO) { + forecastService.updateForecast(updateReqVO); + return success(true); + } + + @PutMapping("/submit") + @Operation(summary = "提交") + public CommonResult submit(@Valid @RequestBody ForecastSaveReqVO updateReqVO) { + forecastService.submit(updateReqVO); + return success(true); + } + + @PutMapping("/submit-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量提交") + public CommonResult submitList(@RequestBody List ids) { + forecastService.submitList(ids); + return success(true); + } + + @PutMapping("/issued") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "下发") + public CommonResult issued(@RequestBody List ids) { + forecastService.issued(ids); + return success(true); + } + + @PutMapping("/close") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "关闭") + public CommonResult close(@RequestBody List ids) { + forecastService.close(ids); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除预报") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deleteForecast(@RequestParam("id") Long id) { + forecastService.deleteForecast(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除预报") + public CommonResult deleteForecastList(@RequestBody BatchDeleteReqVO req) { + forecastService.deleteForecastListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得预报") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getForecast(@RequestParam("id") Long id) { + return success(forecastService.getForecast(id)); + } + + @GetMapping("/page") + @Operation(summary = "获得预报分页") + public CommonResult> getForecastPage(@Valid ForecastPageReqVO pageReqVO) { + PageResult pageResult = forecastService.getForecastPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ForecastRespVO.class)); + } + + @GetMapping("/get-import-template") + @Operation(summary = "获得导入模板") + public void importTemplate(HttpServletResponse response) throws IOException { + ClassPathResource resource = new ClassPathResource("template/ForecastTemplate.xlsx"); + respInfo(response, "预报导入模板.xlsx", resource.getInputStream(), "EXCEL"); + } + + @PostMapping("/import") + @Operation(summary = "导入预报") + @Parameter(name = "file", description = "Excel 文件", required = true) + @ApiAccessLog(operateType = IMPORT) + public CommonResult importForecastExcel(@RequestParam("file") MultipartFile file) throws IOException { + forecastService.importForecastExcel(file); + return success(true); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出预报 Excel") + @ApiAccessLog(operateType = EXPORT) + public void exportForecastExcel(@Valid ForecastPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + InputStream inputStream = forecastService.exportForecastExcel(pageReqVO); + respInfo(response, "预报表.xlsx", inputStream, "EXCEL"); + + } + + @GetMapping("/print") + @Operation(summary = "打印") + public void print() throws IOException { + // TODO 打印 + } + + /** + * 导出文件 + * + * @param response + * @param fileName + * @param inputStream + * @throws IOException + */ + public void respInfo(HttpServletResponse response, String fileName, InputStream inputStream, String fileType) throws IOException { + String type; + switch (fileType) { + case "EXCEL" -> type = "application/vnd.ms-excel"; + case "PDF" -> type = "application/pdf"; + default -> type = null; + } + if (type == null) { + throw new ServerException("不支持的文件类型"); + } + response.addHeader("Content-Disposition", "attachment;filename=" + HttpUtils.encodeUtf8(fileName)); + response.setContentType(type + ";charset=UTF-8"); + if (inputStream != null) { + inputStream.transferTo(response.getOutputStream()); + response.flushBuffer(); + } + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/vo/ForecastPageReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/vo/ForecastPageReqVO.java new file mode 100644 index 00000000..2d02c4ec --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/vo/ForecastPageReqVO.java @@ -0,0 +1,128 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 预报分页 Request VO") +@Data +public class ForecastPageReqVO extends PageParam { + + @Schema(description = "订单主键", example = "9315") + private Long orderId; + + @Schema(description = "预报单号") + private String planNumber; + + @Schema(description = "预报类型", example = "2") + private String planStatus; + + @Schema(description = "物料名称", example = "李四") + private String materialName; + + @Schema(description = "物料编码") + private String materialNumber; + + @Schema(description = "承运商编码") + private String carrierNumber; + + @Schema(description = "承运商名称", example = "芋艿") + private String carrierName; + + @Schema(description = "预报量") + private BigDecimal forecastWet; + + @Schema(description = "计量单位") + private String unit; + + @Schema(description = "运输方式") + private String transportWay; + + @Schema(description = "开始日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] startDate; + + @Schema(description = "结束日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] endDate; + + @Schema(description = "客商名称", example = "张三") + private String customerName; + + @Schema(description = "客商编号") + private String customerNumber; + + @Schema(description = "工厂名称;收发货工厂", example = "芋艿") + private String factoryName; + + @Schema(description = "工厂编码;收发货工厂") + private String factoryNumber; + + @Schema(description = "库位编码;收发货库位") + private String warehouseNumber; + + @Schema(description = "库位名称;收发货库位", example = "李四") + private String warehouseName; + + @Schema(description = "源工厂名称;提货单使用:需要移库的工厂", example = "芋艿") + private String outFactoryName; + + @Schema(description = "源工厂编码;提货单使用:需要移库的工厂") + private String outFactoryNumber; + + @Schema(description = "源库位名称;提货单使用:需要移库的库位", example = "张三") + private String outWarehouseName; + + @Schema(description = "源库位编码;提货单使用:需要移库的库位") + private String outWarehouseNumber; + + @Schema(description = "售达方编码;提货单使用:默认客商编码") + private String salesNumber; + + @Schema(description = "售达方名称;提货单使用:默认客商名称", example = "张三") + private String salesName; + + @Schema(description = "送达方编码;提货单使用:默认客商编码") + private String sendingNumber; + + @Schema(description = "送达方名称;提货单使用:默认客商名称", example = "李四") + private String sendingName; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "状态", example = "2") + private String status; + + @Schema(description = "合同编码") + private String contractNumber; + + @Schema(description = "合同名称", example = "张三") + private String contractName; + + @Schema(description = "合同纸质合同号") + private String paperContractNumber; + + @Schema(description = "订单编码") + private String orderNumber; + + @Schema(description = "SAP订单号") + private String orderSAPNumber; + + @Schema(description = "小协议号") + private String agreementNumber; + + @Schema(description = "小户头号") + private String tenantNumber; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/vo/ForecastRespVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/vo/ForecastRespVO.java new file mode 100644 index 00000000..65dfb490 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/vo/ForecastRespVO.java @@ -0,0 +1,175 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo; + +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementSaveReqVO; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 预报 Response VO") +@Data +@ExcelIgnoreUnannotated +@Accessors(chain = false) +public class ForecastRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11874") + @ExcelProperty("预报编号") + private Long id; + + @Schema(description = "订单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9315") + private Long orderId; + + @Schema(description = "预报单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("预报单号") + private String planNumber; + + @Schema(description = "预报类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("预报类型") + private String planStatus; + + @Schema(description = "物料名称", example = "李四") + @ExcelProperty("物料名称") + private String materialName; + + @Schema(description = "物料编码") + @ExcelProperty("物料编码") + private String materialNumber; + + @Schema(description = "承运商编码") + @ExcelProperty("承运商编码") + private String carrierNumber; + + @Schema(description = "承运商名称", example = "芋艿") + @ExcelProperty("承运商名称") + private String carrierName; + + @Schema(description = "预报量", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("预报量") + private BigDecimal forecastWet; + + @Schema(description = "计量单位") + @ExcelProperty("计量单位") + private String unit; + + @Schema(description = "运输方式") + @ExcelProperty("运输方式") + private String transportWay; + + @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("开始日期") + private LocalDateTime startDate; + + @Schema(description = "结束日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("结束日期") + private LocalDateTime endDate; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("客商名称") + private String customerName; + + @Schema(description = "客商编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("客商编号") + private String customerNumber; + + @Schema(description = "工厂名称;收发货工厂", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("工厂名称") + private String factoryName; + + @Schema(description = "工厂编码;收发货工厂", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("工厂编码") + private String factoryNumber; + + @Schema(description = "库位编码;收发货库位", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("库位编码") + private String warehouseNumber; + + @Schema(description = "库位名称;收发货库位", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("库位名称") + private String warehouseName; + + @Schema(description = "源工厂名称;提货单使用:需要移库的工厂", example = "芋艿") + @ExcelProperty("源工厂名称") + private String outFactoryName; + + @Schema(description = "源工厂编码;提货单使用:需要移库的工厂") + @ExcelProperty("源工厂编码") + private String outFactoryNumber; + + @Schema(description = "源库位名称;提货单使用:需要移库的库位", example = "张三") + @ExcelProperty("源库位名称") + private String outWarehouseName; + + @Schema(description = "源库位编码;提货单使用:需要移库的库位") + @ExcelProperty("源库位编码") + private String outWarehouseNumber; + + @Schema(description = "售达方编码;提货单使用:默认客商编码") + @ExcelProperty("售达方编码") + private String salesNumber; + + @Schema(description = "售达方名称;提货单使用:默认客商名称", example = "张三") + @ExcelProperty("售达方名称") + private String salesName; + + @Schema(description = "送达方编码;提货单使用:默认客商编码") + @ExcelProperty("送达方编码") + private String sendingNumber; + + @Schema(description = "送达方名称;提货单使用:默认客商名称", example = "李四") + @ExcelProperty("送达方名称") + private String sendingName; + + @Schema(description = "备注") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("状态") + private String status; + + @Schema(description = "合同编码") + @ExcelProperty("合同编码") + private String contractNumber; + + @Schema(description = "合同名称", example = "张三") + @ExcelProperty("合同名称") + private String contractName; + + @Schema(description = "合同纸质合同号") + @ExcelProperty("合同纸质合同号") + private String paperContractNumber; + + @Schema(description = "订单编码") + @ExcelProperty("订单编码") + private String orderNumber; + + @Schema(description = "SAP订单号") + @ExcelProperty("SAP订单号") + private String orderSAPNumber; + + @Schema(description = "小协议号") + @ExcelProperty("小协议号") + private String agreementNumber; + + @Schema(description = "小户头号") + @ExcelProperty("小户头号") + private String tenantNumber; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "预报表明细") + private List detailList; + + @Schema(description = "预报品位") + private List elementList; +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/vo/ForecastSaveReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/vo/ForecastSaveReqVO.java new file mode 100644 index 00000000..299ffd85 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecast/vo/ForecastSaveReqVO.java @@ -0,0 +1,153 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo; + +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementSaveReqVO; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 预报新增/修改 Request VO") +@Data +public class ForecastSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11874") + private Long id; + + @Schema(description = "订单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9315") + @NotNull(message = "订单主键不能为空") + private Long orderId; + + @Schema(description = "预报单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "预报单号不能为空") + private String planNumber; + + @Schema(description = "预报类型,字典代码FRCST_TP", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "预报类型不能为空") + private String planStatus; + + @Schema(description = "物料名称", example = "李四") + @NotNull(message = "物料名称") + private String materialName; + + @Schema(description = "物料编码") + @NotNull(message = "物料编码") + private String materialNumber; + + @Schema(description = "承运商编码") + @NotNull(message = "承运商编码") + private String carrierNumber; + + @Schema(description = "承运商名称", example = "芋艿") + @NotNull(message = "承运商名称") + private String carrierName; + + @Schema(description = "预报量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "预报量不能为空") + private BigDecimal forecastWet; + + @Schema(description = "计量单位") + @NotNull(message = "计量单位") + private String unit; + + @Schema(description = "运输方式,字典代码TRP_WY") + @NotNull(message = "运输方式不能为空") + private String transportWay; + + @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "开始日期不能为空") + private LocalDateTime startDate; + + @Schema(description = "结束日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "结束日期不能为空") + private LocalDateTime endDate; + + @Schema(description = "客商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "客商名称不能为空") + private String customerName; + + @Schema(description = "客商编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "客商编号不能为空") + private String customerNumber; + + @Schema(description = "工厂名称;收发货工厂", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "工厂名称;收发货工厂不能为空") + private String factoryName; + + @Schema(description = "工厂编码;收发货工厂", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "工厂编码;收发货工厂不能为空") + private String factoryNumber; + + @Schema(description = "库位编码;收发货库位", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "库位编码;收发货库位不能为空") + private String warehouseNumber; + + @Schema(description = "库位名称;收发货库位", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "库位名称;收发货库位不能为空") + private String warehouseName; + + @Schema(description = "源工厂名称;提货单使用:需要移库的工厂", example = "芋艿") + private String outFactoryName; + + @Schema(description = "源工厂编码;提货单使用:需要移库的工厂") + private String outFactoryNumber; + + @Schema(description = "源库位名称;提货单使用:需要移库的库位", example = "张三") + private String outWarehouseName; + + @Schema(description = "源库位编码;提货单使用:需要移库的库位") + private String outWarehouseNumber; + + @Schema(description = "售达方编码;提货单使用:默认客商编码") + private String salesNumber; + + @Schema(description = "售达方名称;提货单使用:默认客商名称", example = "张三") + private String salesName; + + @Schema(description = "送达方编码;提货单使用:默认客商编码") + private String sendingNumber; + + @Schema(description = "送达方名称;提货单使用:默认客商名称", example = "李四") + private String sendingName; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "状态,字典代码FRCST_STS", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "状态不能为空") + private String status; + + @Schema(description = "合同编码") + private String contractNumber; + + @Schema(description = "合同名称", example = "张三") + private String contractName; + + @Schema(description = "合同纸质合同号") + private String paperContractNumber; + + @Schema(description = "订单编码") + private String orderNumber; + + @Schema(description = "SAP订单号") + private String orderSAPNumber; + + @Schema(description = "小协议号") + private String agreementNumber; + + @Schema(description = "小户头号") + private String tenantNumber; + + @Schema(description = "预报表明细") + private List detailList; + + @Schema(description = "预报品位") + private List elementList; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/ForecastDetailController.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/ForecastDetailController.java new file mode 100644 index 00000000..97aa85cb --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/ForecastDetailController.java @@ -0,0 +1,98 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastdetail.ForecastDetailDO; +import cn.iocoder.yudao.module.receivedeliver.service.forecastdetail.ForecastDetailService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 预报表明细") +@RestController +@RequestMapping("/supply/forecast-detail") +public class ForecastDetailController extends AbstractFileUploadController implements BusinessControllerMarker{ + + @Resource + private ForecastDetailService forecastDetailService; + + @PostMapping("/create") + @Operation(summary = "创建预报表明细") + public CommonResult createForecastDetail(@Valid @RequestBody ForecastDetailSaveReqVO createReqVO) { + return success(forecastDetailService.createForecastDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新预报表明细") + public CommonResult updateForecastDetail(@Valid @RequestBody ForecastDetailSaveReqVO updateReqVO) { + forecastDetailService.updateForecastDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除预报表明细") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deleteForecastDetail(@RequestParam("id") Long id) { + forecastDetailService.deleteForecastDetail(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除预报表明细") + public CommonResult deleteForecastDetailList(@RequestBody BatchDeleteReqVO req) { + forecastDetailService.deleteForecastDetailListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得预报表明细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getForecastDetail(@RequestParam("id") Long id) { + ForecastDetailDO forecastDetail = forecastDetailService.getForecastDetail(id); + return success(BeanUtils.toBean(forecastDetail, ForecastDetailRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得预报表明细分页") + public CommonResult> getForecastDetailPage(@Valid ForecastDetailPageReqVO pageReqVO) { + PageResult pageResult = forecastDetailService.getForecastDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ForecastDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出预报表明细 Excel") + @ApiAccessLog(operateType = EXPORT) + public void exportForecastDetailExcel(@Valid ForecastDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = forecastDetailService.getForecastDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "预报表明细.xls", "数据", ForecastDetailRespVO.class, + BeanUtils.toBean(list, ForecastDetailRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/vo/ForecastDetailPageReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/vo/ForecastDetailPageReqVO.java new file mode 100644 index 00000000..9e204d33 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/vo/ForecastDetailPageReqVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 预报表明细分页 Request VO") +@Data +public class ForecastDetailPageReqVO extends PageParam { + + @Schema(description = "预报主表主键", example = "5783") + private Long forecastId; + + @Schema(description = "预报单号") + private String forecastNumber; + + @Schema(description = "小协议号") + private String agreementNumber; + + @Schema(description = "运单号") + private String waybillNumber; + + @Schema(description = "载重") + private BigDecimal loadWeight; + + @Schema(description = "重净") + private BigDecimal weight; + + @Schema(description = "车牌号") + private String vehicleNumber; + + @Schema(description = "驾驶员姓名", example = "王五") + private String drivingName; + + @Schema(description = "手机号") + private String phone; + + @Schema(description = "类型", example = "2") + private String type; + + @Schema(description = "身份证号") + private String identityNumber; + + @Schema(description = "状态", example = "1") + private String status; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/vo/ForecastDetailRespVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/vo/ForecastDetailRespVO.java new file mode 100644 index 00000000..6f4a12ab --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/vo/ForecastDetailRespVO.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 预报表明细 Response VO") +@Data +@ExcelIgnoreUnannotated +@Accessors(chain = false) +public class ForecastDetailRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15428") + @ExcelProperty("预报明细编号") + private Long id; + + @Schema(description = "预报主表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5783") + @ExcelProperty("预报编号") + private Long forecastId; + + @Schema(description = "预报单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("预报单号") + private String forecastNumber; + + @Schema(description = "小协议号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("小协议号") + private String agreementNumber; + + @Schema(description = "运单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("运单号") + private String waybillNumber; + + @Schema(description = "载重", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("载重") + private BigDecimal loadWeight; + + @Schema(description = "重净", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("重净") + private BigDecimal weight; + + @Schema(description = "车牌号") + @ExcelProperty("车牌号") + private String vehicleNumber; + + @Schema(description = "驾驶员姓名", example = "王五") + @ExcelProperty("驾驶员姓名") + private String drivingName; + + @Schema(description = "手机号") + @ExcelProperty("手机号") + private String phone; + + @Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("类型") + private String type; + + @Schema(description = "身份证号") + @ExcelProperty("身份证号") + private String identityNumber; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("状态") + private String status; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/vo/ForecastDetailSaveReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/vo/ForecastDetailSaveReqVO.java new file mode 100644 index 00000000..e38ddfa2 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastdetail/vo/ForecastDetailSaveReqVO.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 预报表明细新增/修改 Request VO") +@Data +public class ForecastDetailSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15428") + private Long id; + + @Schema(description = "预报主表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5783") + @NotNull(message = "预报主表主键不能为空") + private Long forecastId; + + @Schema(description = "预报单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "预报单号不能为空") + private String forecastNumber; + + @Schema(description = "小协议号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "小协议号不能为空") + private String agreementNumber; + + @Schema(description = "运单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "运单号不能为空") + private String waybillNumber; + + @Schema(description = "载重", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "载重不能为空") + private BigDecimal loadWeight; + + @Schema(description = "重净", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "重净不能为空") + private BigDecimal weight; + + @Schema(description = "车牌号") + private String vehicleNumber; + + @Schema(description = "驾驶员姓名", example = "王五") + private String drivingName; + + @Schema(description = "手机号") + private String phone; + + @Schema(description = "类型,字典代码FRCST_WY", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "类型不能为空") + private String type; + + @Schema(description = "身份证号") + private String identityNumber; + + @Schema(description = "状态,字典代码FRCST_DTL_STS", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "状态不能为空") + private String status; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/ForecastElementController.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/ForecastElementController.java new file mode 100644 index 00000000..b8c3df42 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/ForecastElementController.java @@ -0,0 +1,98 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastelement.ForecastElementDO; +import cn.iocoder.yudao.module.receivedeliver.service.forecastelement.ForecastElementService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 预报品位") +@RestController +@RequestMapping("/supply/forecast-element") +public class ForecastElementController extends AbstractFileUploadController implements BusinessControllerMarker{ + + @Resource + private ForecastElementService forecastElementService; + + @PostMapping("/create") + @Operation(summary = "创建预报品位") + public CommonResult createForecastElement(@Valid @RequestBody ForecastElementSaveReqVO createReqVO) { + return success(forecastElementService.createForecastElement(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新预报品位") + public CommonResult updateForecastElement(@Valid @RequestBody ForecastElementSaveReqVO updateReqVO) { + forecastElementService.updateForecastElement(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除预报品位") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deleteForecastElement(@RequestParam("id") Long id) { + forecastElementService.deleteForecastElement(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除预报品位") + public CommonResult deleteForecastElementList(@RequestBody BatchDeleteReqVO req) { + forecastElementService.deleteForecastElementListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得预报品位") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getForecastElement(@RequestParam("id") Long id) { + ForecastElementDO forecastElement = forecastElementService.getForecastElement(id); + return success(BeanUtils.toBean(forecastElement, ForecastElementRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得预报品位分页") + public CommonResult> getForecastElementPage(@Valid ForecastElementPageReqVO pageReqVO) { + PageResult pageResult = forecastElementService.getForecastElementPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ForecastElementRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出预报品位 Excel") + @ApiAccessLog(operateType = EXPORT) + public void exportForecastElementExcel(@Valid ForecastElementPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = forecastElementService.getForecastElementPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "预报品位.xls", "数据", ForecastElementRespVO.class, + BeanUtils.toBean(list, ForecastElementRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/vo/ForecastElementPageReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/vo/ForecastElementPageReqVO.java new file mode 100644 index 00000000..e89a6603 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/vo/ForecastElementPageReqVO.java @@ -0,0 +1,57 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 预报品位分页 Request VO") +@Data +public class ForecastElementPageReqVO extends PageParam { + + @Schema(description = "关联类型", example = "1") + private String relativityType; + + @Schema(description = "关联主键", example = "7183") + private Long relativityId; + + @Schema(description = "合同纸质合同号") + private String paperContractNumber; + + @Schema(description = "合同名称", example = "李四") + private String contractName; + + @Schema(description = "订单编码") + private String orderNumber; + + @Schema(description = "小协议号") + private String agreementNumber; + + @Schema(description = "金属元素缩写") + private String elementAbbreviation; + + @Schema(description = "金属元素名称", example = "芋艿") + private String elementName; + + @Schema(description = "金属元素编码") + private String elementNumber; + + @Schema(description = "小户头号") + private String tenantNumber; + + @Schema(description = "预估品位值") + private BigDecimal gradeValue; + + @Schema(description = "品位单位") + private String gradeUnit; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/vo/ForecastElementRespVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/vo/ForecastElementRespVO.java new file mode 100644 index 00000000..57f04b34 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/vo/ForecastElementRespVO.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 预报品位 Response VO") +@Data +@ExcelIgnoreUnannotated +@Accessors(chain = false) +public class ForecastElementRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4074") + private Long id; + + @Schema(description = "关联类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private String relativityType; + + @Schema(description = "关联主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7183") + @ExcelProperty("预报明细编号") + private Long relativityId; + + @Schema(description = "合同纸质合同号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("合同纸质合同号") + private String paperContractNumber; + + @Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("合同名称") + private String contractName; + + @Schema(description = "订单编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("订单编码") + private String orderNumber; + + @Schema(description = "小协议号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("小协议号") + private String agreementNumber; + + @Schema(description = "金属元素缩写", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("金属元素缩写") + private String elementAbbreviation; + + @Schema(description = "金属元素名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("金属元素名称") + private String elementName; + + @Schema(description = "金属元素编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("金属元素编码") + private String elementNumber; + + @Schema(description = "小户头号") + @ExcelProperty("小户头号") + private String tenantNumber; + + @Schema(description = "预估品位值", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("预估品位值") + private BigDecimal gradeValue; + + @Schema(description = "品位单位", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("品位单位") + private String gradeUnit; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/vo/ForecastElementSaveReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/vo/ForecastElementSaveReqVO.java new file mode 100644 index 00000000..11c366d9 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/forecastelement/vo/ForecastElementSaveReqVO.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 预报品位新增/修改 Request VO") +@Data +public class ForecastElementSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4074") + private Long id; + + @Schema(description = "关联类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "关联类型不能为空") + private String relativityType; + + @Schema(description = "关联主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7183") + @NotNull(message = "关联主键不能为空") + private Long relativityId; + + @Schema(description = "合同纸质合同号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "合同纸质合同号不能为空") + private String paperContractNumber; + + @Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "合同名称不能为空") + private String contractName; + + @Schema(description = "订单编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "订单编码不能为空") + private String orderNumber; + + @Schema(description = "小协议号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "小协议号不能为空") + private String agreementNumber; + + @Schema(description = "金属元素缩写", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "金属元素缩写不能为空") + private String elementAbbreviation; + + @Schema(description = "金属元素名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "金属元素名称不能为空") + private String elementName; + + @Schema(description = "金属元素编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "金属元素编码不能为空") + private String elementNumber; + + @Schema(description = "小户头号") + private String tenantNumber; + + @Schema(description = "预估品位值", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "预估品位值不能为空") + private BigDecimal gradeValue; + + @Schema(description = "品位单位", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "品位单位不能为空") + private String gradeUnit; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/MeteringController.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/MeteringController.java new file mode 100644 index 00000000..a790b16d --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/MeteringController.java @@ -0,0 +1,98 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.metering; + +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.business.annotation.FileUploadController; +import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController; +import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.metering.MeteringDO; +import cn.iocoder.yudao.module.receivedeliver.service.metering.MeteringService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 计量") +@RestController +@RequestMapping("/supply/metering") +public class MeteringController extends AbstractFileUploadController implements BusinessControllerMarker{ + + @Resource + private MeteringService meteringService; + + @PostMapping("/create") + @Operation(summary = "创建计量") + public CommonResult createMetering(@Valid @RequestBody MeteringSaveReqVO createReqVO) { + return success(meteringService.createMetering(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新计量") + public CommonResult updateMetering(@Valid @RequestBody MeteringSaveReqVO updateReqVO) { + meteringService.updateMetering(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除计量") + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deleteMetering(@RequestParam("id") Long id) { + meteringService.deleteMetering(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除计量") + public CommonResult deleteMeteringList(@RequestBody BatchDeleteReqVO req) { + meteringService.deleteMeteringListByIds(req.getIds()); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得计量") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult getMetering(@RequestParam("id") Long id) { + MeteringDO metering = meteringService.getMetering(id); + return success(BeanUtils.toBean(metering, MeteringRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得计量分页") + public CommonResult> getMeteringPage(@Valid MeteringPageReqVO pageReqVO) { + PageResult pageResult = meteringService.getMeteringPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MeteringRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出计量 Excel") + @PreAuthorize("@ss.hasPermission('sply:metering:export')") + public void exportMeteringExcel(@Valid MeteringPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = meteringService.getMeteringPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "计量.xls", "数据", MeteringRespVO.class, + BeanUtils.toBean(list, MeteringRespVO.class)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/vo/MeteringPageReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/vo/MeteringPageReqVO.java new file mode 100644 index 00000000..46ebcb05 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/vo/MeteringPageReqVO.java @@ -0,0 +1,84 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 计量分页 Request VO") +@Data +public class MeteringPageReqVO extends PageParam { + + @Schema(description = "订单号") + private String orderNumber; + + @Schema(description = "预报明细主键", example = "11310") + private Long forecastDetailId; + + @Schema(description = "小协议号") + private String agreementNumber; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "物料编码") + private String materialNumber; + + @Schema(description = "订单类型;销售/采购/委托加工", example = "2") + private String orderType; + + @Schema(description = "运单号;与预报明细对应") + private String waybillNumber; + + @Schema(description = "批次号") + private String batchNumber; + + @Schema(description = "磅单号") + private String poundNumber; + + @Schema(description = "净重") + private BigDecimal realWeight; + + @Schema(description = "驾驶员名称", example = "王五") + private String drivingName; + + @Schema(description = "计量类型", example = "2") + private String meteringType; + + @Schema(description = "运输方式") + private String transportWay; + + @Schema(description = "车箱号") + private String carriageNumber; + + @Schema(description = "车牌号") + private String vehicleNumber; + + @Schema(description = "进厂日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] intoDate; + + @Schema(description = "出厂日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] outDate; + + @Schema(description = "计量时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] meteringTime; + + @Schema(description = "是否作废") + private String isCancel; + + @Schema(description = "小户头号") + private String tenantNumber; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/vo/MeteringRespVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/vo/MeteringRespVO.java new file mode 100644 index 00000000..0e881205 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/vo/MeteringRespVO.java @@ -0,0 +1,104 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 计量 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MeteringRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4183") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("订单号") + private String orderNumber; + + @Schema(description = "预报明细主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11310") + @ExcelProperty("预报明细主键") + private Long forecastDetailId; + + @Schema(description = "小协议号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("小协议号") + private String agreementNumber; + + @Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("物料名称") + private String materialName; + + @Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("物料编码") + private String materialNumber; + + @Schema(description = "订单类型;销售/采购/委托加工", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("订单类型;销售/采购/委托加工") + private String orderType; + + @Schema(description = "运单号;与预报明细对应", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("运单号;与预报明细对应") + private String waybillNumber; + + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("批次号") + private String batchNumber; + + @Schema(description = "磅单号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("磅单号") + private String poundNumber; + + @Schema(description = "净重", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("净重") + private BigDecimal realWeight; + + @Schema(description = "驾驶员名称", example = "王五") + @ExcelProperty("驾驶员名称") + private String drivingName; + + @Schema(description = "计量类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("计量类型") + private String meteringType; + + @Schema(description = "运输方式") + @ExcelProperty("运输方式") + private String transportWay; + + @Schema(description = "车箱号") + @ExcelProperty("车箱号") + private String carriageNumber; + + @Schema(description = "车牌号") + @ExcelProperty("车牌号") + private String vehicleNumber; + + @Schema(description = "进厂日期") + @ExcelProperty("进厂日期") + private LocalDateTime intoDate; + + @Schema(description = "出厂日期") + @ExcelProperty("出厂日期") + private LocalDateTime outDate; + + @Schema(description = "计量时间") + @ExcelProperty("计量时间") + private LocalDateTime meteringTime; + + @Schema(description = "是否作废") + @ExcelProperty("是否作废") + private String isCancel; + + @Schema(description = "小户头号") + @ExcelProperty("小户头号") + private String tenantNumber; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/vo/MeteringSaveReqVO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/vo/MeteringSaveReqVO.java new file mode 100644 index 00000000..01e80c7b --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/metering/vo/MeteringSaveReqVO.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 计量新增/修改 Request VO") +@Data +public class MeteringSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4183") + private Long id; + + @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "订单号不能为空") + private String orderNumber; + + @Schema(description = "预报明细主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11310") + @NotNull(message = "预报明细主键不能为空") + private Long forecastDetailId; + + @Schema(description = "小协议号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "小协议号不能为空") + private String agreementNumber; + + @Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "物料名称不能为空") + private String materialName; + + @Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "物料编码不能为空") + private String materialNumber; + + @Schema(description = "订单类型;销售/采购/委托加工", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "订单类型;销售/采购/委托加工不能为空") + private String orderType; + + @Schema(description = "运单号;与预报明细对应", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "运单号;与预报明细对应不能为空") + private String waybillNumber; + + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "批次号不能为空") + private String batchNumber; + + @Schema(description = "磅单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "磅单号不能为空") + private String poundNumber; + + @Schema(description = "净重", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "净重不能为空") + private BigDecimal realWeight; + + @Schema(description = "驾驶员名称", example = "王五") + private String drivingName; + + @Schema(description = "计量类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "计量类型不能为空") + private String meteringType; + + @Schema(description = "运输方式") + private String transportWay; + + @Schema(description = "车箱号") + private String carriageNumber; + + @Schema(description = "车牌号") + private String vehicleNumber; + + @Schema(description = "进厂日期") + private LocalDateTime intoDate; + + @Schema(description = "出厂日期") + private LocalDateTime outDate; + + @Schema(description = "计量时间") + private LocalDateTime meteringTime; + + @Schema(description = "是否作废") + private String isCancel; + + @Schema(description = "小户头号") + private String tenantNumber; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/receivedeliver/ReceiveDeliverController.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/receivedeliver/ReceiveDeliverController.java index 911ce724..ee879598 100644 --- a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/receivedeliver/ReceiveDeliverController.java +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/receivedeliver/ReceiveDeliverController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.module.receivedeliver.controller.admin.receivedeliver; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/assay/AssayDO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/assay/AssayDO.java new file mode 100644 index 00000000..89f9bd30 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/assay/AssayDO.java @@ -0,0 +1,115 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.dataobject.assay; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +/** +* 品位 DO +* +* @author 后台管理 +*/ +@TableName("sply_asy") +@KeySequence("sply_asy_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class AssayDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 品味类型 + */ + @TableField("GRD_TP") + private String gradeType; + /** + * 订单号 + */ + @TableField("ORD_NUM") + private String orderNumber; + /** + * 订单类型;销售/采购/委托加工 + */ + @TableField("ORD_TP") + private String orderType; + /** + * 运单号 + */ + @TableField("WYBL_NUM") + private String waybillNumber; + /** + * 批次号 + */ + @TableField("BAT_NUM") + private String batchNumber; + /** + * 小协议号 + */ + @TableField("AGR_NUM") + private String agreementNumber; + /** + * 金属元素缩写 + */ + @TableField("ELEM_ABBR") + private String elementAbbreviation; + /** + * 金属元素编码 + */ + @TableField("ELEM_NUM") + private String elementNumber; + /** + * 金属元素名称 + */ + @TableField("ELEM_NAME") + private String elementName; + /** + * 检验结果 + */ + @TableField("RSLT") + private BigDecimal result; + /** + * 品位单位 + */ + @TableField("GRD_UNT") + private String gradeUnit; + /** + * 小数位数 + */ + @TableField("CNT_LOC") + private Long countLocation; + /** + * 小数位数(ERP) + */ + @TableField("CNT_LOC_ERP") + private Long countLocationErp; + /** + * 检验时间 + */ + @TableField("INSP_DTM") + private LocalDateTime inspectionDatetime; + /** + * 实验室代码 + */ + @TableField("LAB_CD") + private String laboratoryCode; + /** + * 实验室名称 + */ + @TableField("LAB_NAME") + private String laboratoryName; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/billmain/BillMainDO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/billmain/BillMainDO.java new file mode 100644 index 00000000..adb44024 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/billmain/BillMainDO.java @@ -0,0 +1,214 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmain; + +import lombok.*; +import java.util.*; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.time.LocalDateTime; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 收发货单 DO +* +* @author 后台管理 +*/ +@TableName("sply_bll_main") +@KeySequence("sply_bll_main_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BillMainDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 类型;收货/发货 + */ + @TableField("TP") + private String type; + /** + * 订单号 + */ + @TableField("ORD_NO") + private String orderNo; + /** + * 订单明细主键 + */ + @TableField("ORD_DTL_ID") + private Long orderDetailId; + /** + * 收货单号;自动生成 + */ + @TableField("BLL_NUM") + private String billNumber; + /** + * 实物物料编码 + */ + @TableField("MTRL_CDG") + private String materialCoding; + /** + * 实物物料名称 + */ + @TableField("MTRL_NAME") + private String materialName; + /** + * 实物收发货数量 + */ + @TableField("MTRL_QTY") + private BigDecimal materialQuantity; + /** + * 总干重 + */ + @TableField("DRY_QTY") + private BigDecimal dryQuantity; + /** + * 实物计量单位 + */ + @TableField("MTRL_UOM") + private String materialUom; + /** + * 金属物料编码 + */ + @TableField("MTL_CDG") + private String metalCoding; + /** + * 金属物料名称 + */ + @TableField("MTL_NAME") + private String metalName; + /** + * 金属收发货数量 + */ + @TableField("MTL_QTY") + private BigDecimal metalQuantity; + /** + * 金属计量单位 + */ + @TableField("MTL_UOM") + private String metalUom; + /** + * 工厂名称 + */ + @TableField("FACT_NAME") + private String factoryName; + /** + * 工厂编码 + */ + @TableField("FACT_NUM") + private String factoryNumber; + /** + * 库位名称 + */ + @TableField("WRH_NAME") + private String warehouseName; + /** + * 库位编码 + */ + @TableField("WRH_NUM") + private String warehouseNumber; + /** + * 不含税总金额 + */ + @TableField("NT_TAX_AMT") + private BigDecimal notTaxAmount; + /** + * 含税总金额 + */ + @TableField("IN_TAX_AMT") + private BigDecimal inTaxAmount; + /** + * 总税额 + */ + @TableField("TAX_AMT") + private BigDecimal taxAmount; + /** + * 付款比例 + */ + @TableField("PYMT_RTIO") + private BigDecimal paymentRatio; + /** + * 实付总金额 + */ + @TableField("REL_AMT") + private BigDecimal relativityAmount; + /** + * 过账日期 + */ + @TableField("PSTG_DT") + private LocalDateTime postingDate; + /** + * 客商编号 + */ + @TableField("CSTM_NUM") + private String customerNumber; + /** + * 客商名称 + */ + @TableField("CSTM_NAME") + private String customerName; + /** + * 订单类型 + */ + @TableField("ORD_TP") + private String orderType; + /** + * 业务类型;原料/成品/服务/发票 + */ + @TableField("BSN_TP") + private String businessType; + /** + * 状态 + */ + @TableField("STS") + private String status; + /** + * 小协议号 + */ + @TableField("AGR_NUM") + private String agreementNumber; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 合同编码 + */ + @TableField("CTRT_NUM") + private String contractNumber; + /** + * 合同名称 + */ + @TableField("CTRT_NAME") + private String contractName; + /** + * 合同纸质合同号 + */ + @TableField("PPR_CTRT_NUM") + private String paperContractNumber; + /** + * 是否以金属结算;根据订单类型判断,如果订单为原料,则默认"是",如果是服务订单则不显示,默认为否。如铁精矿/烟尘 + */ + @TableField("IS_MTL_STLM") + private String isMetalSettlement; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/billmaindetail/BillMainDetailDO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/billmaindetail/BillMainDetailDO.java new file mode 100644 index 00000000..4aac4b86 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/billmaindetail/BillMainDetailDO.java @@ -0,0 +1,152 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmaindetail; + +import lombok.*; +import java.util.*; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.math.BigDecimal; + import java.time.LocalDateTime; + import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +/** +* 收发货单明细 DO +* +* @author 后台管理 +*/ +@TableName("sply_bll_main_dtl") +@KeySequence("sply_bll_main_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class BillMainDetailDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 订单号 + */ + @TableField("ORD_NO") + private String orderNo; + /** + * 收发货单主键 + */ + @TableField("RCD_ID") + private Long recordId; + /** + * 批次号 + */ + @TableField("BAT_NO") + private String batchNo; + /** + * 磅单号 + */ + @TableField("POD_NO") + private String poundNo; + /** + * 金属元素缩写 + */ + @TableField("ELEM_ABBR") + private String elementAbbreviation; + /** + * 金属元素名称 + */ + @TableField("ELEM_NAME") + private String elementName; + /** + * 金属元素编码 + */ + @TableField("ELEM_NUM") + private String elementNumber; + /** + * 品位单位 + */ + @TableField("GRD_UNT") + private String gradeUnit; + /** + * 品位类型;暂估/化验/复检/仲裁 + */ + @TableField("GRD_TP") + private String gradeType; + /** + * 品位值 + */ + @TableField("GRD") + private BigDecimal grade; + /** + * 金属物料编码 + */ + @TableField("MTL_NUM") + private String metalNumber; + /** + * 金属物料名称 + */ + @TableField("MTL_NAME") + private String metalName; + /** + * 总收货量 + */ + @TableField("QTY") + private BigDecimal quantity; + /** + * 计量单位 + */ + @TableField("UOM") + private String uom; + /** + * 税码 + */ + @TableField("TAX_NUM") + private String taxNumber; + /** + * 不含税金额 + */ + @TableField("NT_TAX_AMT") + private BigDecimal notTaxAmount; + /** + * 含税金额 + */ + @TableField("IN_TAX_AMT") + private BigDecimal inTaxAmount; + /** + * 税额 + */ + @TableField("TAX_AMT") + private BigDecimal taxAmount; + /** + * 付款比例 + */ + @TableField("PYMT_RTIO") + private BigDecimal paymentRatio; + /** + * 实付金额 + */ + @TableField("REL_AMT") + private BigDecimal relativityAmount; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 状态 + */ + @TableField("STS") + private String status; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/forecast/ForecastDO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/forecast/ForecastDO.java new file mode 100644 index 00000000..e60619ce --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/forecast/ForecastDO.java @@ -0,0 +1,210 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecast; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +/** +* 预报 DO +* +* @author 后台管理 +*/ +@TableName("sply_frcst") +@KeySequence("sply_frcst_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** + * 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO + */ +public class ForecastDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 订单主键 + */ + @TableField("ORD_ID") + private Long orderId; + /** + * 预报单号 + */ + @TableField("PLN_NUM") + private String planNumber; + /** + * 预报类型 + */ + @TableField("PLN_STS") + private String planStatus; + /** + * 物料名称 + */ + @TableField("MTRL_NAME") + private String materialName; + /** + * 物料编码 + */ + @TableField("MTRL_NUM") + private String materialNumber; + /** + * 承运商编码 + */ + @TableField("CRR_NUM") + private String carrierNumber; + /** + * 承运商名称 + */ + @TableField("CRR_NAME") + private String carrierName; + /** + * 预报量 + */ + @TableField("FRCST_WET") + private BigDecimal forecastWet; + /** + * 计量单位 + */ + @TableField("UNT") + private String unit; + /** + * 运输方式 + */ + @TableField("TRP_WY") + private String transportWay; + /** + * 开始日期 + */ + @TableField("STRT_DT") + private LocalDateTime startDate; + /** + * 结束日期 + */ + @TableField("END_DT") + private LocalDateTime endDate; + /** + * 客商名称 + */ + @TableField("CSTM_NAME") + private String customerName; + /** + * 客商编号 + */ + @TableField("CSTM_NUM") + private String customerNumber; + /** + * 工厂名称;收发货工厂 + */ + @TableField("FACT_NAME") + private String factoryName; + /** + * 工厂编码;收发货工厂 + */ + @TableField("FACT_NUM") + private String factoryNumber; + /** + * 库位编码;收发货库位 + */ + @TableField("WRH_NUM") + private String warehouseNumber; + /** + * 库位名称;收发货库位 + */ + @TableField("WRH_NAME") + private String warehouseName; + /** + * 源工厂名称;提货单使用:需要移库的工厂 + */ + @TableField("OUT_FACT_NAME") + private String outFactoryName; + /** + * 源工厂编码;提货单使用:需要移库的工厂 + */ + @TableField("OUT_FACT_NUM") + private String outFactoryNumber; + /** + * 源库位名称;提货单使用:需要移库的库位 + */ + @TableField("OUT_WRH_NAME") + private String outWarehouseName; + /** + * 源库位编码;提货单使用:需要移库的库位 + */ + @TableField("OUT_WRH_NUM") + private String outWarehouseNumber; + /** + * 售达方编码;提货单使用:默认客商编码 + */ + @TableField("SALE_NUM") + private String salesNumber; + /** + * 售达方名称;提货单使用:默认客商名称 + */ + @TableField("SALE_NAME") + private String salesName; + /** + * 送达方编码;提货单使用:默认客商编码 + */ + @TableField("SNDG_NUM") + private String sendingNumber; + /** + * 送达方名称;提货单使用:默认客商名称 + */ + @TableField("SNDG_NAME") + private String sendingName; + /** + * 备注 + */ + @TableField("RMK") + private String remark; + /** + * 状态 + */ + @TableField("STS") + private String status; + /** + * 合同编码 + */ + @TableField("CTRT_NUM") + private String contractNumber; + /** + * 合同名称 + */ + @TableField("CTRT_NAME") + private String contractName; + /** + * 合同纸质合同号 + */ + @TableField("PPR_CTRT_NUM") + private String paperContractNumber; + /** + * 订单编码 + */ + @TableField("ORD_NUM") + private String orderNumber; + /** + * SAP订单号 + */ + @TableField("ORD_SAP_NUM") + private String orderSAPNumber; + /** + * 小协议号 + */ + @TableField("AGR_NUM") + private String agreementNumber; + /** + * 小户头号 + */ + @TableField("TNT_NUM") + private String tenantNumber; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/forecastdetail/ForecastDetailDO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/forecastdetail/ForecastDetailDO.java new file mode 100644 index 00000000..7f50760f --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/forecastdetail/ForecastDetailDO.java @@ -0,0 +1,94 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastdetail; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; + +import java.math.BigDecimal; +/** + * 预报表明细 DO + * + * @author 后台管理 + */ +@TableName("sply_frcst_dtl") +@KeySequence("sply_frcst_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** + * 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO + */ +public class ForecastDetailDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 预报主表主键 + */ + @TableField("FRCST_ID") + private Long forecastId; + /** + * 预报单号 + */ + @TableField("FRCST_NUM") + private String forecastNumber; + /** + * 小协议号 + */ + @TableField("AGR_NUM") + private String agreementNumber; + /** + * 运单号 + */ + @TableField("WYBL_NUM") + private String waybillNumber; + /** + * 载重 + */ + @TableField("LAD_WGT") + private BigDecimal loadWeight; + /** + * 重净 + */ + @TableField("WGT") + private BigDecimal weight; + /** + * 车牌号 + */ + @TableField("VHC_NUM") + private String vehicleNumber; + /** + * 驾驶员姓名 + */ + @TableField("DRVG_NAME") + private String drivingName; + /** + * 手机号 + */ + @TableField("PHN") + private String phone; + /** + * 类型 + */ + @TableField("TP") + private String type; + /** + * 身份证号 + */ + @TableField("IDTY_NUM") + private String identityNumber; + /** + * 状态 + */ + @TableField("STS") + private String status; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/forecastelement/ForecastElementDO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/forecastelement/ForecastElementDO.java new file mode 100644 index 00000000..f95bb51c --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/forecastelement/ForecastElementDO.java @@ -0,0 +1,94 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastelement; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; + +import java.math.BigDecimal; +/** +* 预报品位 DO +* +* @author 后台管理 +*/ +@TableName("sply_frcst_elem") +@KeySequence("sply_frcst_elem_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** + * 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO + */ +public class ForecastElementDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 关联类型 + */ + @TableField("REL_TP") + private String relativityType; + /** + * 关联主键 + */ + @TableField("REL_ID") + private Long relativityId; + /** + * 合同纸质合同号 + */ + @TableField("PPR_CTRT_NUM") + private String paperContractNumber; + /** + * 合同名称 + */ + @TableField("CTRT_NAME") + private String contractName; + /** + * 订单编码 + */ + @TableField("ORD_NUM") + private String orderNumber; + /** + * 小协议号 + */ + @TableField("AGR_NUM") + private String agreementNumber; + /** + * 金属元素缩写 + */ + @TableField("ELEM_ABBR") + private String elementAbbreviation; + /** + * 金属元素名称 + */ + @TableField("ELEM_NAME") + private String elementName; + /** + * 金属元素编码 + */ + @TableField("ELEM_NUM") + private String elementNumber; + /** + * 小户头号 + */ + @TableField("TNT_NUM") + private String tenantNumber; + /** + * 预估品位值 + */ + @TableField("GRD_VAL") + private BigDecimal gradeValue; + /** + * 品位单位 + */ + @TableField("GRD_UNT") + private String gradeUnit; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/metering/MeteringDO.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/metering/MeteringDO.java new file mode 100644 index 00000000..01cb9b0c --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/dataobject/metering/MeteringDO.java @@ -0,0 +1,135 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.dataobject.metering; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO; +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +/** +* 计量 DO +* +* @author 后台管理 +*/ +@TableName("sply_mtng") +@KeySequence("sply_mtng_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +/** +* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO +*/ +public class MeteringDO extends BusinessBaseDO { + + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + /** + * 订单号 + */ + @TableField("ORD_NUM") + private String orderNumber; + /** + * 预报明细主键 + */ + @TableField("FRCST_DTL_ID") + private Long forecastDetailId; + /** + * 小协议号 + */ + @TableField("AGR_NUM") + private String agreementNumber; + /** + * 物料名称 + */ + @TableField("MTRL_NAME") + private String materialName; + /** + * 物料编码 + */ + @TableField("MTRL_NUM") + private String materialNumber; + /** + * 订单类型;销售/采购/委托加工 + */ + @TableField("ORD_TP") + private String orderType; + /** + * 运单号;与预报明细对应 + */ + @TableField("WYBL_NUM") + private String waybillNumber; + /** + * 批次号 + */ + @TableField("BAT_NUM") + private String batchNumber; + /** + * 磅单号 + */ + @TableField("POD_NUM") + private String poundNumber; + /** + * 净重 + */ + @TableField("RAL_WGT") + private BigDecimal realWeight; + /** + * 驾驶员名称 + */ + @TableField("DRVG_NAME") + private String drivingName; + /** + * 计量类型 + */ + @TableField("MTNG_TP") + private String meteringType; + /** + * 运输方式 + */ + @TableField("TRP_WY") + private String transportWay; + /** + * 车箱号 + */ + @TableField("CRG_NUM") + private String carriageNumber; + /** + * 车牌号 + */ + @TableField("VHC_NUM") + private String vehicleNumber; + /** + * 进厂日期 + */ + @TableField("INTO_DT") + private LocalDateTime intoDate; + /** + * 出厂日期 + */ + @TableField("OUT_DT") + private LocalDateTime outDate; + /** + * 计量时间 + */ + @TableField("MTNG_TM") + private LocalDateTime meteringTime; + /** + * 是否作废 + */ + @TableField("IS_CNL") + private String isCancel; + /** + * 小户头号 + */ + @TableField("TNT_NUM") + private String tenantNumber; + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/assay/AssayMapper.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/assay/AssayMapper.java new file mode 100644 index 00000000..724fc71a --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/assay/AssayMapper.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.mysql.assay; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssayPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.assay.AssayDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 品位 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface AssayMapper extends BaseMapperX { + + default PageResult selectPage(AssayPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(AssayDO::getGradeType, reqVO.getGradeType()) + .eqIfPresent(AssayDO::getOrderNumber, reqVO.getOrderNumber()) + .eqIfPresent(AssayDO::getOrderType, reqVO.getOrderType()) + .eqIfPresent(AssayDO::getWaybillNumber, reqVO.getWaybillNumber()) + .eqIfPresent(AssayDO::getBatchNumber, reqVO.getBatchNumber()) + .eqIfPresent(AssayDO::getAgreementNumber, reqVO.getAgreementNumber()) + .eqIfPresent(AssayDO::getElementAbbreviation, reqVO.getElementAbbreviation()) + .eqIfPresent(AssayDO::getElementNumber, reqVO.getElementNumber()) + .likeIfPresent(AssayDO::getElementName, reqVO.getElementName()) + .eqIfPresent(AssayDO::getResult, reqVO.getResult()) + .eqIfPresent(AssayDO::getGradeUnit, reqVO.getGradeUnit()) + .eqIfPresent(AssayDO::getCountLocation, reqVO.getCountLocation()) + .eqIfPresent(AssayDO::getCountLocationErp, reqVO.getCountLocationErp()) + .betweenIfPresent(AssayDO::getInspectionDatetime, reqVO.getInspectionDatetime()) + .eqIfPresent(AssayDO::getLaboratoryCode, reqVO.getLaboratoryCode()) + .likeIfPresent(AssayDO::getLaboratoryName, reqVO.getLaboratoryName()) + .betweenIfPresent(AssayDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(AssayDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/billmain/BillMainMapper.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/billmain/BillMainMapper.java new file mode 100644 index 00000000..1961a027 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/billmain/BillMainMapper.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.mysql.billmain; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmain.BillMainDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 收发货单 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BillMainMapper extends BaseMapperX { + + default PageResult selectPage(BillMainPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BillMainDO::getType, reqVO.getType()) + .eqIfPresent(BillMainDO::getOrderNo, reqVO.getOrderNo()) + .eqIfPresent(BillMainDO::getOrderDetailId, reqVO.getOrderDetailId()) + .eqIfPresent(BillMainDO::getBillNumber, reqVO.getBillNumber()) + .eqIfPresent(BillMainDO::getMaterialCoding, reqVO.getMaterialCoding()) + .likeIfPresent(BillMainDO::getMaterialName, reqVO.getMaterialName()) + .eqIfPresent(BillMainDO::getMaterialQuantity, reqVO.getMaterialQuantity()) + .eqIfPresent(BillMainDO::getDryQuantity, reqVO.getDryQuantity()) + .eqIfPresent(BillMainDO::getMaterialUom, reqVO.getMaterialUom()) + .eqIfPresent(BillMainDO::getMetalCoding, reqVO.getMetalCoding()) + .likeIfPresent(BillMainDO::getMetalName, reqVO.getMetalName()) + .eqIfPresent(BillMainDO::getMetalQuantity, reqVO.getMetalQuantity()) + .eqIfPresent(BillMainDO::getMetalUom, reqVO.getMetalUom()) + .likeIfPresent(BillMainDO::getFactoryName, reqVO.getFactoryName()) + .eqIfPresent(BillMainDO::getFactoryNumber, reqVO.getFactoryNumber()) + .likeIfPresent(BillMainDO::getWarehouseName, reqVO.getWarehouseName()) + .eqIfPresent(BillMainDO::getWarehouseNumber, reqVO.getWarehouseNumber()) + .eqIfPresent(BillMainDO::getNotTaxAmount, reqVO.getNotTaxAmount()) + .eqIfPresent(BillMainDO::getInTaxAmount, reqVO.getInTaxAmount()) + .eqIfPresent(BillMainDO::getTaxAmount, reqVO.getTaxAmount()) + .eqIfPresent(BillMainDO::getPaymentRatio, reqVO.getPaymentRatio()) + .eqIfPresent(BillMainDO::getRelativityAmount, reqVO.getRelativityAmount()) + .betweenIfPresent(BillMainDO::getPostingDate, reqVO.getPostingDate()) + .eqIfPresent(BillMainDO::getCustomerNumber, reqVO.getCustomerNumber()) + .likeIfPresent(BillMainDO::getCustomerName, reqVO.getCustomerName()) + .eqIfPresent(BillMainDO::getOrderType, reqVO.getOrderType()) + .eqIfPresent(BillMainDO::getBusinessType, reqVO.getBusinessType()) + .eqIfPresent(BillMainDO::getStatus, reqVO.getStatus()) + .eqIfPresent(BillMainDO::getAgreementNumber, reqVO.getAgreementNumber()) + .eqIfPresent(BillMainDO::getRemark, reqVO.getRemark()) + .eqIfPresent(BillMainDO::getContractNumber, reqVO.getContractNumber()) + .likeIfPresent(BillMainDO::getContractName, reqVO.getContractName()) + .eqIfPresent(BillMainDO::getPaperContractNumber, reqVO.getPaperContractNumber()) + .eqIfPresent(BillMainDO::getIsMetalSettlement, reqVO.getIsMetalSettlement()) + .betweenIfPresent(BillMainDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(BillMainDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/billmaindetail/BillMainDetailMapper.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/billmaindetail/BillMainDetailMapper.java new file mode 100644 index 00000000..f905f3fe --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/billmaindetail/BillMainDetailMapper.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.mysql.billmaindetail; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmaindetail.BillMainDetailDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 收发货单明细 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface BillMainDetailMapper extends BaseMapperX { + + default PageResult selectPage(BillMainDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(BillMainDetailDO::getOrderNo, reqVO.getOrderNo()) + .eqIfPresent(BillMainDetailDO::getRecordId, reqVO.getRecordId()) + .eqIfPresent(BillMainDetailDO::getBatchNo, reqVO.getBatchNo()) + .eqIfPresent(BillMainDetailDO::getPoundNo, reqVO.getPoundNo()) + .eqIfPresent(BillMainDetailDO::getElementAbbreviation, reqVO.getElementAbbreviation()) + .likeIfPresent(BillMainDetailDO::getElementName, reqVO.getElementName()) + .eqIfPresent(BillMainDetailDO::getElementNumber, reqVO.getElementNumber()) + .eqIfPresent(BillMainDetailDO::getGradeUnit, reqVO.getGradeUnit()) + .eqIfPresent(BillMainDetailDO::getGradeType, reqVO.getGradeType()) + .eqIfPresent(BillMainDetailDO::getGrade, reqVO.getGrade()) + .eqIfPresent(BillMainDetailDO::getMetalNumber, reqVO.getMetalNumber()) + .likeIfPresent(BillMainDetailDO::getMetalName, reqVO.getMetalName()) + .eqIfPresent(BillMainDetailDO::getQuantity, reqVO.getQuantity()) + .eqIfPresent(BillMainDetailDO::getUom, reqVO.getUom()) + .eqIfPresent(BillMainDetailDO::getTaxNumber, reqVO.getTaxNumber()) + .eqIfPresent(BillMainDetailDO::getNotTaxAmount, reqVO.getNotTaxAmount()) + .eqIfPresent(BillMainDetailDO::getInTaxAmount, reqVO.getInTaxAmount()) + .eqIfPresent(BillMainDetailDO::getTaxAmount, reqVO.getTaxAmount()) + .eqIfPresent(BillMainDetailDO::getPaymentRatio, reqVO.getPaymentRatio()) + .eqIfPresent(BillMainDetailDO::getRelativityAmount, reqVO.getRelativityAmount()) + .eqIfPresent(BillMainDetailDO::getRemark, reqVO.getRemark()) + .eqIfPresent(BillMainDetailDO::getStatus, reqVO.getStatus()) + .betweenIfPresent(BillMainDetailDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(BillMainDetailDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/forecast/ForecastMapper.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/forecast/ForecastMapper.java new file mode 100644 index 00000000..bd9a90e7 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/forecast/ForecastMapper.java @@ -0,0 +1,59 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.mysql.forecast; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecast.ForecastDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 预报 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ForecastMapper extends BaseMapperX { + + default PageResult selectPage(ForecastPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ForecastDO::getOrderId, reqVO.getOrderId()) + .eqIfPresent(ForecastDO::getPlanNumber, reqVO.getPlanNumber()) + .eqIfPresent(ForecastDO::getPlanStatus, reqVO.getPlanStatus()) + .likeIfPresent(ForecastDO::getMaterialName, reqVO.getMaterialName()) + .eqIfPresent(ForecastDO::getMaterialNumber, reqVO.getMaterialNumber()) + .eqIfPresent(ForecastDO::getCarrierNumber, reqVO.getCarrierNumber()) + .likeIfPresent(ForecastDO::getCarrierName, reqVO.getCarrierName()) + .eqIfPresent(ForecastDO::getForecastWet, reqVO.getForecastWet()) + .eqIfPresent(ForecastDO::getUnit, reqVO.getUnit()) + .eqIfPresent(ForecastDO::getTransportWay, reqVO.getTransportWay()) + .betweenIfPresent(ForecastDO::getStartDate, reqVO.getStartDate()) + .betweenIfPresent(ForecastDO::getEndDate, reqVO.getEndDate()) + .likeIfPresent(ForecastDO::getCustomerName, reqVO.getCustomerName()) + .eqIfPresent(ForecastDO::getCustomerNumber, reqVO.getCustomerNumber()) + .likeIfPresent(ForecastDO::getFactoryName, reqVO.getFactoryName()) + .eqIfPresent(ForecastDO::getFactoryNumber, reqVO.getFactoryNumber()) + .eqIfPresent(ForecastDO::getWarehouseNumber, reqVO.getWarehouseNumber()) + .likeIfPresent(ForecastDO::getWarehouseName, reqVO.getWarehouseName()) + .likeIfPresent(ForecastDO::getOutFactoryName, reqVO.getOutFactoryName()) + .eqIfPresent(ForecastDO::getOutFactoryNumber, reqVO.getOutFactoryNumber()) + .likeIfPresent(ForecastDO::getOutWarehouseName, reqVO.getOutWarehouseName()) + .eqIfPresent(ForecastDO::getOutWarehouseNumber, reqVO.getOutWarehouseNumber()) + .eqIfPresent(ForecastDO::getSalesNumber, reqVO.getSalesNumber()) + .likeIfPresent(ForecastDO::getSalesName, reqVO.getSalesName()) + .eqIfPresent(ForecastDO::getSendingNumber, reqVO.getSendingNumber()) + .likeIfPresent(ForecastDO::getSendingName, reqVO.getSendingName()) + .eqIfPresent(ForecastDO::getRemark, reqVO.getRemark()) + .eqIfPresent(ForecastDO::getStatus, reqVO.getStatus()) + .eqIfPresent(ForecastDO::getContractNumber, reqVO.getContractNumber()) + .likeIfPresent(ForecastDO::getContractName, reqVO.getContractName()) + .eqIfPresent(ForecastDO::getPaperContractNumber, reqVO.getPaperContractNumber()) + .eqIfPresent(ForecastDO::getOrderNumber, reqVO.getOrderNumber()) + .eqIfPresent(ForecastDO::getOrderSAPNumber, reqVO.getOrderSAPNumber()) + .eqIfPresent(ForecastDO::getAgreementNumber, reqVO.getAgreementNumber()) + .eqIfPresent(ForecastDO::getTenantNumber, reqVO.getTenantNumber()) + .betweenIfPresent(ForecastDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(ForecastDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/forecastdetail/ForecastDetailMapper.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/forecastdetail/ForecastDetailMapper.java new file mode 100644 index 00000000..45f3b92e --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/forecastdetail/ForecastDetailMapper.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.mysql.forecastdetail; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastdetail.ForecastDetailDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 预报表明细 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ForecastDetailMapper extends BaseMapperX { + + default PageResult selectPage(ForecastDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ForecastDetailDO::getForecastId, reqVO.getForecastId()) + .eqIfPresent(ForecastDetailDO::getForecastNumber, reqVO.getForecastNumber()) + .eqIfPresent(ForecastDetailDO::getAgreementNumber, reqVO.getAgreementNumber()) + .eqIfPresent(ForecastDetailDO::getWaybillNumber, reqVO.getWaybillNumber()) + .eqIfPresent(ForecastDetailDO::getLoadWeight, reqVO.getLoadWeight()) + .eqIfPresent(ForecastDetailDO::getWeight, reqVO.getWeight()) + .eqIfPresent(ForecastDetailDO::getVehicleNumber, reqVO.getVehicleNumber()) + .likeIfPresent(ForecastDetailDO::getDrivingName, reqVO.getDrivingName()) + .eqIfPresent(ForecastDetailDO::getPhone, reqVO.getPhone()) + .eqIfPresent(ForecastDetailDO::getType, reqVO.getType()) + .eqIfPresent(ForecastDetailDO::getIdentityNumber, reqVO.getIdentityNumber()) + .eqIfPresent(ForecastDetailDO::getStatus, reqVO.getStatus()) + .betweenIfPresent(ForecastDetailDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(ForecastDetailDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/forecastelement/ForecastElementMapper.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/forecastelement/ForecastElementMapper.java new file mode 100644 index 00000000..dd15e80e --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/forecastelement/ForecastElementMapper.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.mysql.forecastelement; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastelement.ForecastElementDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 预报品位 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface ForecastElementMapper extends BaseMapperX { + + default PageResult selectPage(ForecastElementPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ForecastElementDO::getRelativityType, reqVO.getRelativityType()) + .eqIfPresent(ForecastElementDO::getRelativityId, reqVO.getRelativityId()) + .eqIfPresent(ForecastElementDO::getPaperContractNumber, reqVO.getPaperContractNumber()) + .likeIfPresent(ForecastElementDO::getContractName, reqVO.getContractName()) + .eqIfPresent(ForecastElementDO::getOrderNumber, reqVO.getOrderNumber()) + .eqIfPresent(ForecastElementDO::getAgreementNumber, reqVO.getAgreementNumber()) + .eqIfPresent(ForecastElementDO::getElementAbbreviation, reqVO.getElementAbbreviation()) + .likeIfPresent(ForecastElementDO::getElementName, reqVO.getElementName()) + .eqIfPresent(ForecastElementDO::getElementNumber, reqVO.getElementNumber()) + .eqIfPresent(ForecastElementDO::getTenantNumber, reqVO.getTenantNumber()) + .eqIfPresent(ForecastElementDO::getGradeValue, reqVO.getGradeValue()) + .eqIfPresent(ForecastElementDO::getGradeUnit, reqVO.getGradeUnit()) + .betweenIfPresent(ForecastElementDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(ForecastElementDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/metering/MeteringMapper.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/metering/MeteringMapper.java new file mode 100644 index 00000000..fb57c38c --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/dal/mysql/metering/MeteringMapper.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.receivedeliver.dal.mysql.metering; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.metering.MeteringDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 计量 Mapper + * + * @author 后台管理 + */ +@Mapper +public interface MeteringMapper extends BaseMapperX { + + default PageResult selectPage(MeteringPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(MeteringDO::getOrderNumber, reqVO.getOrderNumber()) + .eqIfPresent(MeteringDO::getForecastDetailId, reqVO.getForecastDetailId()) + .eqIfPresent(MeteringDO::getAgreementNumber, reqVO.getAgreementNumber()) + .likeIfPresent(MeteringDO::getMaterialName, reqVO.getMaterialName()) + .eqIfPresent(MeteringDO::getMaterialNumber, reqVO.getMaterialNumber()) + .eqIfPresent(MeteringDO::getOrderType, reqVO.getOrderType()) + .eqIfPresent(MeteringDO::getWaybillNumber, reqVO.getWaybillNumber()) + .eqIfPresent(MeteringDO::getBatchNumber, reqVO.getBatchNumber()) + .eqIfPresent(MeteringDO::getPoundNumber, reqVO.getPoundNumber()) + .eqIfPresent(MeteringDO::getRealWeight, reqVO.getRealWeight()) + .likeIfPresent(MeteringDO::getDrivingName, reqVO.getDrivingName()) + .eqIfPresent(MeteringDO::getMeteringType, reqVO.getMeteringType()) + .eqIfPresent(MeteringDO::getTransportWay, reqVO.getTransportWay()) + .eqIfPresent(MeteringDO::getCarriageNumber, reqVO.getCarriageNumber()) + .eqIfPresent(MeteringDO::getVehicleNumber, reqVO.getVehicleNumber()) + .betweenIfPresent(MeteringDO::getIntoDate, reqVO.getIntoDate()) + .betweenIfPresent(MeteringDO::getOutDate, reqVO.getOutDate()) + .betweenIfPresent(MeteringDO::getMeteringTime, reqVO.getMeteringTime()) + .eqIfPresent(MeteringDO::getIsCancel, reqVO.getIsCancel()) + .eqIfPresent(MeteringDO::getTenantNumber, reqVO.getTenantNumber()) + .betweenIfPresent(MeteringDO::getCreateTime, reqVO.getCreateTime()) + .orderByDesc(MeteringDO::getId)); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/rpc/config/RpcConfiguration.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..acf1a918 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.receivedeliver.framework.rpc.config; + +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "receivedeliverRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/security/config/SecurityConfiguration.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/security/config/SecurityConfiguration.java index a6a93b9c..4931c0c4 100644 --- a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * ReceiveDeliver 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("receiveDeliverSecurityConfiguration") public class SecurityConfiguration { @Bean diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/assay/AssayService.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/assay/AssayService.java new file mode 100644 index 00000000..7d033c32 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/assay/AssayService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.receivedeliver.service.assay; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssayPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssayRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssaySaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.assay.AssayDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 品位 Service 接口 + * + * @author 后台管理 + */ +public interface AssayService { + + /** + * 创建品位 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + AssayRespVO createAssay(@Valid AssaySaveReqVO createReqVO); + + /** + * 更新品位 + * + * @param updateReqVO 更新信息 + */ + void updateAssay(@Valid AssaySaveReqVO updateReqVO); + + /** + * 删除品位 + * + * @param id 编号 + */ + void deleteAssay(Long id); + + /** + * 批量删除品位 + * + * @param ids 编号 + */ + void deleteAssayListByIds(List ids); + + /** + * 获得品位 + * + * @param id 编号 + * @return 品位 + */ + AssayDO getAssay(Long id); + + /** + * 获得品位分页 + * + * @param pageReqVO 分页查询 + * @return 品位分页 + */ + PageResult getAssayPage(AssayPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/assay/AssayServiceImpl.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/assay/AssayServiceImpl.java new file mode 100644 index 00000000..19cc255e --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/assay/AssayServiceImpl.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.receivedeliver.service.assay; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssayPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssayRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.assay.vo.AssaySaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.assay.AssayDO; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.assay.AssayMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.module.receivedeliver.enums.ErrorCodeConstants.*; + +/** + * 品位 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class AssayServiceImpl implements AssayService { + + @Resource + private AssayMapper assayMapper; + + @Override + public AssayRespVO createAssay(AssaySaveReqVO createReqVO) { + // 插入 + AssayDO assay = BeanUtils.toBean(createReqVO, AssayDO.class); + assayMapper.insert(assay); + // 返回 + return BeanUtils.toBean(assay, AssayRespVO.class); + } + + @Override + public void updateAssay(AssaySaveReqVO updateReqVO) { + // 校验存在 + validateAssayExists(updateReqVO.getId()); + // 更新 + AssayDO updateObj = BeanUtils.toBean(updateReqVO, AssayDO.class); + assayMapper.updateById(updateObj); + } + + @Override + public void deleteAssay(Long id) { + // 校验存在 + validateAssayExists(id); + // 删除 + assayMapper.deleteById(id); + } + + @Override + public void deleteAssayListByIds(List ids) { + // 校验存在 + validateAssayExists(ids); + // 删除 + assayMapper.deleteByIds(ids); + } + + private void validateAssayExists(List ids) { + List list = assayMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + // throw exception(ASSAY_NOT_EXISTS); + throw new RuntimeException("品位id不能为空!"); + } + } + + private void validateAssayExists(Long id) { + if (assayMapper.selectById(id) == null) { + //throw exception(ASSAY_NOT_EXISTS); + throw new RuntimeException("品位id不能为空!"); + } + } + + @Override + public AssayDO getAssay(Long id) { + return assayMapper.selectById(id); + } + + @Override + public PageResult getAssayPage(AssayPageReqVO pageReqVO) { + return assayMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmain/BillMainService.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmain/BillMainService.java new file mode 100644 index 00000000..632ddd87 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmain/BillMainService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.receivedeliver.service.billmain; + +import java.util.*; + +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmain.BillMainDO; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 收发货单 Service 接口 + * + * @author 后台管理 + */ +public interface BillMainService { + + /** + * 创建收发货单 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BillMainRespVO createBillMain(@Valid BillMainSaveReqVO createReqVO); + + /** + * 更新收发货单 + * + * @param updateReqVO 更新信息 + */ + void updateBillMain(@Valid BillMainSaveReqVO updateReqVO); + + /** + * 删除收发货单 + * + * @param id 编号 + */ + void deleteBillMain(Long id); + + /** + * 批量删除收发货单 + * + * @param ids 编号 + */ + void deleteBillMainListByIds(List ids); + + /** + * 获得收发货单 + * + * @param id 编号 + * @return 收发货单 + */ + BillMainDO getBillMain(Long id); + + /** + * 获得收发货单分页 + * + * @param pageReqVO 分页查询 + * @return 收发货单分页 + */ + PageResult getBillMainPage(BillMainPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmain/BillMainServiceImpl.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmain/BillMainServiceImpl.java new file mode 100644 index 00000000..44f92e48 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmain/BillMainServiceImpl.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.receivedeliver.service.billmain; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmain.vo.BillMainSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmain.BillMainDO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmaindetail.BillMainDetailDO; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.billmain.BillMainMapper; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.billmaindetail.BillMainDetailMapper; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.receivedeliver.enums.ErrorCodeConstants.BILL_MAIN_NOT_EXISTS; + + +/** + * 收发货单 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BillMainServiceImpl implements BillMainService { + + @Resource + private BillMainMapper billMainMapper; + + @Resource + private BillMainDetailMapper billMainDetailMapper; + + @Override + public BillMainRespVO createBillMain(BillMainSaveReqVO createReqVO) { + // 插入 + BillMainDO billMain = BeanUtils.toBean(createReqVO, BillMainDO.class); + billMainMapper.insert(billMain); + List billMainDetailSaveReqVOS = createReqVO.getBillMainDetailSaveReqVOS(); + if(CollUtil.isEmpty(billMainDetailSaveReqVOS)){ + List billMainDetailDOS = BeanUtils.toBean(billMainDetailSaveReqVOS, BillMainDetailDO.class); + billMainDetailMapper.insertBatch(billMainDetailDOS); + } + // 返回 + return BeanUtils.toBean(billMain, BillMainRespVO.class); + } + + @Override + public void updateBillMain(BillMainSaveReqVO updateReqVO) { + // 校验存在 + validateBillMainExists(updateReqVO.getId()); + // 更新 + BillMainDO updateObj = BeanUtils.toBean(updateReqVO, BillMainDO.class); + billMainMapper.updateById(updateObj); + } + + @Override + public void deleteBillMain(Long id) { + // 校验存在 + validateBillMainExists(id); + // 删除 + billMainMapper.deleteById(id); + } + + @Override + public void deleteBillMainListByIds(List ids) { + // 校验存在 + validateBillMainExists(ids); + // 删除 + billMainMapper.deleteByIds(ids); + } + + private void validateBillMainExists(List ids) { + List list = billMainMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BILL_MAIN_NOT_EXISTS); + } + } + + private void validateBillMainExists(Long id) { + if (billMainMapper.selectById(id) == null) { + throw exception(BILL_MAIN_NOT_EXISTS); + } + } + + @Override + public BillMainDO getBillMain(Long id) { + return billMainMapper.selectById(id); + } + + @Override + public PageResult getBillMainPage(BillMainPageReqVO pageReqVO) { + return billMainMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmaindetail/BillMainDetailService.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmaindetail/BillMainDetailService.java new file mode 100644 index 00000000..d5f4e5a8 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmaindetail/BillMainDetailService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.receivedeliver.service.billmaindetail; + +import java.util.*; + +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmaindetail.BillMainDetailDO; +import jakarta.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 收发货单明细 Service 接口 + * + * @author 后台管理 + */ +public interface BillMainDetailService { + + /** + * 创建收发货单明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + BillMainDetailRespVO createBillMainDetail(@Valid BillMainDetailSaveReqVO createReqVO); + + /** + * 更新收发货单明细 + * + * @param updateReqVO 更新信息 + */ + void updateBillMainDetail(@Valid BillMainDetailSaveReqVO updateReqVO); + + /** + * 删除收发货单明细 + * + * @param id 编号 + */ + void deleteBillMainDetail(Long id); + + /** + * 批量删除收发货单明细 + * + * @param ids 编号 + */ + void deleteBillMainDetailListByIds(List ids); + + /** + * 获得收发货单明细 + * + * @param id 编号 + * @return 收发货单明细 + */ + BillMainDetailDO getBillMainDetail(Long id); + + /** + * 获得收发货单明细分页 + * + * @param pageReqVO 分页查询 + * @return 收发货单明细分页 + */ + PageResult getBillMainDetailPage(BillMainDetailPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmaindetail/BillMainDetailServiceImpl.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmaindetail/BillMainDetailServiceImpl.java new file mode 100644 index 00000000..5c4ecbfa --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/billmaindetail/BillMainDetailServiceImpl.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.receivedeliver.service.billmaindetail; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.billmaindetail.vo.BillMainDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.billmaindetail.BillMainDetailDO; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.billmaindetail.BillMainDetailMapper; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.receivedeliver.enums.ErrorCodeConstants.BILL_MAIN_DETAIL_NOT_EXISTS; + +/** + * 收发货单明细 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class BillMainDetailServiceImpl implements BillMainDetailService { + + @Resource + private BillMainDetailMapper billMainDetailMapper; + + @Override + public BillMainDetailRespVO createBillMainDetail(BillMainDetailSaveReqVO createReqVO) { + // 插入 + BillMainDetailDO billMainDetail = BeanUtils.toBean(createReqVO, BillMainDetailDO.class); + billMainDetailMapper.insert(billMainDetail); + // 返回 + return BeanUtils.toBean(billMainDetail, BillMainDetailRespVO.class); + } + + @Override + public void updateBillMainDetail(BillMainDetailSaveReqVO updateReqVO) { + // 校验存在 + validateBillMainDetailExists(updateReqVO.getId()); + // 更新 + BillMainDetailDO updateObj = BeanUtils.toBean(updateReqVO, BillMainDetailDO.class); + billMainDetailMapper.updateById(updateObj); + } + + @Override + public void deleteBillMainDetail(Long id) { + // 校验存在 + validateBillMainDetailExists(id); + // 删除 + billMainDetailMapper.deleteById(id); + } + + @Override + public void deleteBillMainDetailListByIds(List ids) { + // 校验存在 + validateBillMainDetailExists(ids); + // 删除 + billMainDetailMapper.deleteByIds(ids); + } + + private void validateBillMainDetailExists(List ids) { + List list = billMainDetailMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + throw exception(BILL_MAIN_DETAIL_NOT_EXISTS); + } + } + + private void validateBillMainDetailExists(Long id) { + if (billMainDetailMapper.selectById(id) == null) { + throw exception(BILL_MAIN_DETAIL_NOT_EXISTS); + } + } + + @Override + public BillMainDetailDO getBillMainDetail(Long id) { + return billMainDetailMapper.selectById(id); + } + + @Override + public PageResult getBillMainDetailPage(BillMainDetailPageReqVO pageReqVO) { + return billMainDetailMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecast/ForecastService.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecast/ForecastService.java new file mode 100644 index 00000000..44833a00 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecast/ForecastService.java @@ -0,0 +1,103 @@ +package cn.iocoder.yudao.module.receivedeliver.service.forecast; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecast.ForecastDO; +import jakarta.validation.Valid; +import org.springframework.web.multipart.MultipartFile; + +import java.io.InputStream; +import java.util.List; + +/** + * 预报 Service 接口 + * + * @author 后台管理 + */ +public interface ForecastService { + + /** + * 创建预报 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ForecastRespVO createForecast(@Valid ForecastSaveReqVO createReqVO); + + /** + * 更新预报 + * + * @param updateReqVO 更新信息 + */ + void updateForecast(@Valid ForecastSaveReqVO updateReqVO); + + /** + * 删除预报 + * + * @param id 编号 + */ + void deleteForecast(Long id); + + /** + * 批量删除预报 + * + * @param ids 编号 + */ + void deleteForecastListByIds(List ids); + + /** + * 获得预报 + * + * @param id 编号 + * @return 预报 + */ + ForecastRespVO getForecast(Long id); + + /** + * 获得预报分页 + * + * @param pageReqVO 分页查询 + * @return 预报分页 + */ + PageResult getForecastPage(ForecastPageReqVO pageReqVO); + + /** + * 提交 + * @param updateReqVO + */ + void submit(ForecastSaveReqVO updateReqVO); + + /** + * 批量提交 + * @param ids + */ + void submitList(List ids); + + /** + * 下发 + * @param ids + */ + void issued(List ids); + + /** + * 下发 + * @param ids + */ + void close(List ids); + + /** + * 导入预报 + * @param file + * @return + */ + void importForecastExcel(MultipartFile file); + + /** + * 导出预报 Excel + * @param pageReqVO + * @return + */ + InputStream exportForecastExcel(ForecastPageReqVO pageReqVO); +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecast/ForecastServiceImpl.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecast/ForecastServiceImpl.java new file mode 100644 index 00000000..a17d2326 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecast/ForecastServiceImpl.java @@ -0,0 +1,486 @@ +package cn.iocoder.yudao.module.receivedeliver.service.forecast; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecast.vo.ForecastSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecast.ForecastDO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastdetail.ForecastDetailDO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastelement.ForecastElementDO; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.forecast.ForecastMapper; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.forecastdetail.ForecastDetailMapper; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.forecastelement.ForecastElementMapper; +import cn.iocoder.yudao.module.receivedeliver.enums.*; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelReader; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.read.listener.ReadListener; +import com.alibaba.excel.read.metadata.ReadSheet; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import jakarta.annotation.Resource; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.multipart.MultipartFile; + +import java.io.*; +import java.util.*; +import java.util.stream.Collectors; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.receivedeliver.enums.ErrorCodeConstants.*; + +/** + * 预报 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ForecastServiceImpl implements ForecastService { + + @Resource + private ForecastMapper forecastMapper; + + @Resource + private ForecastDetailMapper forecastDetailMapper; + + @Resource + private ForecastElementMapper forecastElementMapper; + + @Override + @Transactional + public ForecastRespVO createForecast(ForecastSaveReqVO createReqVO) { + // 预报 + ForecastDO forecast = BeanUtils.toBean(createReqVO, ForecastDO.class); + // 预报明细 + List detailList = createReqVO.getDetailList(); + if (detailList == null || detailList.isEmpty()) { + throw exception(PARAMS_NOT_EXISTS); + } + // 预报品位 + List elementList = createReqVO.getElementList(); + if (CollectionUtil.isEmpty(elementList)) { + throw exception(PARAMS_NOT_EXISTS); + } + if (elementList.size() != detailList.size()) { + throw exception(PARAMS_NOT_EXISTS); + } + + // 保存 + forecast.setId(IdWorker.getId()); + List detailDOList = BeanUtils.toBean(detailList, ForecastDetailDO.class); + + for (int i = 0; i < detailDOList.size(); i++) { + ForecastDetailDO forecastDetailDO = detailDOList.get(i); + forecastDetailDO.setForecastId(forecast.getId()); + forecastDetailDO.setId(IdWorker.getId()); + } + + List elementDOList = BeanUtils.toBean(elementList, ForecastElementDO.class); + for (int i = 0; i < elementDOList.size(); i++) { + ForecastElementDO forecastElementDO = elementDOList.get(i); + forecastElementDO.setRelativityType(ForecastElementRelativityTypeEnum.DTL.getCode()); + forecastElementDO.setRelativityId(detailDOList.get(i).getId()); + } + + forecastMapper.insert(forecast); + forecastDetailMapper.insertBatch(detailDOList); + forecastElementMapper.insertBatch(elementDOList); + + // 返回 + ForecastRespVO result = BeanUtils.toBean(forecast, ForecastRespVO.class); + result.setDetailList(BeanUtils.toBean(detailDOList, ForecastDetailRespVO.class)); + result.setElementList(BeanUtils.toBean(elementDOList, ForecastElementRespVO.class)); + return result; + } + + @Override + @Transactional + public void updateForecast(ForecastSaveReqVO updateReqVO) { + if (updateReqVO.getId() == null + || CollectionUtil.isEmpty(updateReqVO.getDetailList()) + || CollectionUtil.isEmpty(updateReqVO.getElementList())) { + throw exception(PARAMS_NOT_EXISTS); + } + + // 删除旧数据 + if (updateReqVO.getId() == null) { + throw exception(PARAMS_NOT_EXISTS); + } + List detailDOList = forecastDetailMapper.selectList( + new LambdaQueryWrapper() + .eq(ForecastDetailDO::getForecastId, updateReqVO.getId())); + List detailIds = detailDOList.stream().map(forecastDetailDO -> forecastDetailDO.getId()).toList(); + forecastElementMapper.delete(new LambdaQueryWrapper().in(ForecastElementDO::getRelativityId, detailIds)); + forecastDetailMapper.deleteByIds(detailIds); + + // 保存新数据 + saveData(Arrays.asList(updateReqVO)); + + } + + @Override + @Transactional + public void deleteForecast(Long id) { + deleteData(Arrays.asList(id)); + } + + @Override + @Transactional + public void deleteForecastListByIds(List ids) { + deleteData(ids); + } + + @Override + public ForecastRespVO getForecast(Long id) { + + ForecastDO forecastDO = forecastMapper.selectById(id); + if (forecastDO == null) { + return null; + } + ForecastRespVO result = BeanUtils.toBean(forecastDO, ForecastRespVO.class); + List detailDOList = forecastDetailMapper.selectList( + new LambdaQueryWrapper() + .in(ForecastDetailDO::getForecastId, id) + .orderByAsc(ForecastDetailDO::getId)); + + List detailIds = detailDOList.stream().map(detailDO -> detailDO.getId()).toList(); + List elementDOList = forecastElementMapper.selectList( + new LambdaQueryWrapper() + .in(ForecastElementDO::getRelativityId, detailIds) + .orderByAsc(ForecastElementDO::getRelativityId)); + + result.setDetailList(BeanUtils.toBean(detailDOList, ForecastDetailRespVO.class)); + result.setElementList(BeanUtils.toBean(elementDOList, ForecastElementRespVO.class)); + return result; + } + + @Override + public PageResult getForecastPage(ForecastPageReqVO pageReqVO) { + return forecastMapper.selectPage(pageReqVO); + } + + @Override + public void submit(ForecastSaveReqVO updateReqVO) { + updateReqVO.setStatus(ForecastStatusEnum.IS_SUBMIT.getCode()); + updateForecast(updateReqVO); + } + + @Override + public void submitList(List ids) { + updateStatus(ids, ForecastStatusEnum.IS_SUBMIT.getCode()); + } + + @Override + public void issued(List ids) { + updateStatus(ids, ForecastStatusEnum.IS_TRNS.getCode()); + } + + @Override + public void close(List ids) { + updateStatus(ids, ForecastStatusEnum.IS_CLOSE.getCode()); + } + + @Override + @Transactional + public void importForecastExcel(MultipartFile file) { + List forecastRespVOList = new ArrayList<>(); + List deatailRespVOList = new ArrayList<>(); + List elementRespVOList = new ArrayList<>(); + // 读取数据 + try (ExcelReader excelReader = EasyExcel.read(file.getInputStream()).build()) { + int[] rowNum = {1, 1, 1}; + ReadSheet readSheet1 = EasyExcel.readSheet(0) + .head(ForecastRespVO.class) + .headRowNumber(2) + .registerReadListener(new ReadListener() { + @Override + public void invoke(ForecastRespVO forecastRespVO, AnalysisContext analysisContext) { + if (StringUtils.isBlank(forecastRespVO.getOrderNumber())) { + throw new ServiceException(500, "第" + rowNum[0] + "行订单编号为空"); + } + // TODO 订单id + forecastRespVO.setOrderId(666L); + // 预报类型 + if (StringUtils.isBlank(forecastRespVO.getPlanStatus())) { + throw new ServiceException(500, "第" + rowNum[0] + "行类型为空"); + } + List planStatusEnum = Arrays.stream(ForecastPlanStatusEnum.values()).filter(obj -> obj.getName().equals(forecastRespVO.getPlanStatus())).toList(); + if (CollectionUtil.isEmpty(planStatusEnum)) { + throw new ServiceException(500, "第" + rowNum[0] + "行类型错误"); + } + forecastRespVO.setPlanStatus(planStatusEnum.get(0).getCode()); + + // 运输方式 + if (StringUtils.isBlank(forecastRespVO.getTransportWay())) { + throw new ServiceException(500, "第" + rowNum[0] + "行运输方式为空"); + } + List transportWayEnum = Arrays.stream(ForecastTransportWayEnum.values()).filter(obj -> obj.getName().equals(forecastRespVO.getTransportWay())).toList(); + if (CollectionUtil.isEmpty(transportWayEnum)) { + throw new ServiceException(500, "第" + rowNum[0] + "行运输方式错误"); + } + forecastRespVO.setTransportWay(transportWayEnum.get(0).getCode()); + + // 预报状态 + if (StringUtils.isBlank(forecastRespVO.getStatus())) { + throw new ServiceException(500, "第" + rowNum[0] + "行状态为空"); + } + List statusEnum = Arrays.stream(ForecastStatusEnum.values()).filter(obj -> obj.getName().equals(forecastRespVO.getStatus())).toList(); + if (CollectionUtil.isEmpty(statusEnum)) { + throw new ServiceException(500, "第" + rowNum[0] + "行状态错误"); + } + forecastRespVO.setStatus(statusEnum.get(0).getCode()); + + forecastRespVOList.add(forecastRespVO); + rowNum[0]++; + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + + } + }) + .build(); + + // 预报明细 + ReadSheet readSheet2 = EasyExcel.readSheet(1) + .head(ForecastDetailRespVO.class) + .headRowNumber(2) + .registerReadListener(new ReadListener() { + @Override + public void invoke(ForecastDetailRespVO forecastDetailRespVO, AnalysisContext analysisContext) { + // 类型 + if (StringUtils.isBlank(forecastDetailRespVO.getType())) { + throw new ServiceException(500, "第" + rowNum[0] + "行类型为空"); + } + List typeEnums = Arrays.stream(ForecastDetailTypeEnum.values()).filter(obj -> obj.getName().equals(forecastDetailRespVO.getType())).toList(); + if (CollectionUtil.isEmpty(typeEnums)) { + throw new ServiceException(500, "第" + rowNum[0] + "行类型错误"); + } + forecastDetailRespVO.setType(typeEnums.get(0).getCode()); + // 类型 + if (StringUtils.isBlank(forecastDetailRespVO.getStatus())) { + throw new ServiceException(500, "第" + rowNum[0] + "行状态为空"); + } + List statusEnums = Arrays.stream(ForecastDetailStatusEnum.values()).filter(obj -> obj.getName().equals(forecastDetailRespVO.getStatus())).toList(); + if (CollectionUtil.isEmpty(statusEnums)) { + throw new ServiceException(500, "第" + rowNum[0] + "行状态错误"); + } + forecastDetailRespVO.setStatus(statusEnums.get(0).getCode()); + + deatailRespVOList.add(forecastDetailRespVO); + rowNum[1]++; + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + + } + }) + .build(); + // 预报品位 + ReadSheet readSheet3 = EasyExcel.readSheet(2) + .head(ForecastElementRespVO.class) + .headRowNumber(2) + .registerReadListener(new ReadListener() { + @Override + public void invoke(ForecastElementRespVO forecastElementRespVO, AnalysisContext analysisContext) { + elementRespVOList.add(forecastElementRespVO); + rowNum[1]++; + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + + } + }) + .build(); + excelReader.read(readSheet1, readSheet2, readSheet3); + } catch (ServiceException e) { + System.out.println("数据错误" + e.getMessage()); + throw e; + } catch (Exception e) { + System.out.println("其他异常:" + e.getMessage()); + throw exception(PARAMS_NOT_EXISTS); + } + if (forecastRespVOList.size() == 0 + || deatailRespVOList.size() == 0 + || elementRespVOList.size() == 0 + || deatailRespVOList.size()!=elementRespVOList.size()) { + throw exception(PARAMS_NOT_EXISTS); + } + + Map> detailRespVOMap = deatailRespVOList.stream().collect(Collectors.groupingBy(ForecastDetailRespVO::getForecastId)); + Map> elementRespVOMap = elementRespVOList.stream().collect(Collectors.groupingBy(ForecastElementRespVO::getRelativityId)); + List forecastSaveReqVOList = new ArrayList<>(); + for (ForecastRespVO forecastRespVO : forecastRespVOList) { + ForecastSaveReqVO forecastSaveReqVO = BeanUtils.toBean(forecastRespVO, ForecastSaveReqVO.class); + forecastSaveReqVO.setId(IdWorker.getId()); + // 预报明细 + List forecastDetailRespVOS = detailRespVOMap.get(forecastRespVO.getId()); + List detailSaveReqVOList = BeanUtils.toBean(forecastDetailRespVOS, ForecastDetailSaveReqVO.class); + detailSaveReqVOList.forEach(detailSaveReqVO -> detailSaveReqVO.setId(IdWorker.getId())); + forecastSaveReqVO.setDetailList(detailSaveReqVOList); + // 预报品位 + List forecastElementRespVOS = elementRespVOMap.get(forecastRespVO.getId()); + forecastSaveReqVO.setElementList(BeanUtils.toBean(forecastElementRespVOS, ForecastElementSaveReqVO.class)); + + forecastSaveReqVOList.add(forecastSaveReqVO); + } + saveData(forecastSaveReqVOList); + + } + + @Override + public InputStream exportForecastExcel(ForecastPageReqVO pageReqVO) { + List list = forecastMapper.selectPage(pageReqVO).getList(); + if (list.isEmpty()) { + return null; + } + List forecastRespVOList = BeanUtils.toBean(list, ForecastRespVO.class); + for (ForecastRespVO forecastRespVO : forecastRespVOList) { + // 预报类型 + List planStatusEnum = Arrays.stream(ForecastPlanStatusEnum.values()).filter(obj -> obj.getName().equals(forecastRespVO.getPlanStatus())).toList(); + if (CollectionUtil.isNotEmpty(planStatusEnum)) { + forecastRespVO.setPlanStatus(planStatusEnum.get(0).getCode()); + } + // 运输方式 + List transportWayEnum = Arrays.stream(ForecastTransportWayEnum.values()).filter(obj -> obj.getName().equals(forecastRespVO.getTransportWay())).toList(); + if (CollectionUtil.isNotEmpty(transportWayEnum)) { + forecastRespVO.setTransportWay(transportWayEnum.get(0).getCode()); + } + // 预报状态 + List statusEnum = Arrays.stream(ForecastStatusEnum.values()).filter(obj -> obj.getName().equals(forecastRespVO.getStatus())).toList(); + if (CollectionUtil.isNotEmpty(statusEnum)) { + forecastRespVO.setStatus(statusEnum.get(0).getCode()); + } + + } + + // 预报明细 + List forecastIdList = list.stream().map(ForecastDO::getId).toList(); + List detailDOList = forecastDetailMapper.selectList(new LambdaQueryWrapper() + .in(ForecastDetailDO::getForecastId, forecastIdList) + .orderByDesc(ForecastDetailDO::getForecastId) + .orderByDesc(ForecastDetailDO::getId)); + List forecastDetailRespVOList = BeanUtils.toBean(detailDOList, ForecastDetailRespVO.class); + + // 预报品位 + List forecastDetailIdList = detailDOList.stream().map(ForecastDetailDO::getId).toList(); + List elementDOList = forecastElementMapper.selectList(new LambdaQueryWrapper() + .in(ForecastElementDO::getRelativityId, forecastDetailIdList) + .orderByDesc(ForecastElementDO::getRelativityId)); + List forecastElementRespVOList = BeanUtils.toBean(elementDOList, ForecastElementRespVO.class); + + // 写入excel + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + try (ExcelWriter excelWriter = EasyExcel.write(outputStream).build()) { + excelWriter.write(forecastRespVOList, EasyExcel.writerSheet(0,"预报").head(ForecastRespVO.class).build()); + excelWriter.write(forecastDetailRespVOList, EasyExcel.writerSheet(1,"预报明细").head(ForecastDetailRespVO.class).build()); + excelWriter.write(forecastElementRespVOList, EasyExcel.writerSheet(2,"预报品位").head(ForecastElementRespVO.class).build()); + } catch (Exception e) { + return null; + } + return new ByteArrayInputStream(outputStream.toByteArray()); + } + + /** + * 编辑状态 + * @param ids + * @param status 状态,FRCST_STS字典 + */ + public void updateStatus(List ids, String status) { + if (CollectionUtil.isEmpty(ids)) { + throw exception(PARAMS_NOT_EXISTS); + } + forecastMapper.update(new LambdaUpdateWrapper() + .in(ForecastDO::getId,ids) + .set(ForecastDO::getStatus, status)); + } + + /** + * 删除数据 + * @param ids + */ + public void deleteData(List ids) { + if (CollectionUtil.isEmpty(ids)) { + throw exception(PARAMS_NOT_EXISTS); + } + List forecastDOList = forecastMapper.selectByIds(ids); + if (CollectionUtil.isEmpty(forecastDOList) || forecastDOList.size() != ids.size()) { + throw exception(PARAMS_NOT_EXISTS); + } + List detailDOList = forecastDetailMapper.selectList( + new LambdaQueryWrapper() + .in(ForecastDetailDO::getForecastId, ids)); + List detailIds = detailDOList.stream().map(forecastDetailDO -> forecastDetailDO.getId()).toList(); + + forecastElementMapper.delete(new LambdaQueryWrapper().in(ForecastElementDO::getRelativityId, detailIds)); + forecastDetailMapper.deleteByIds(detailIds); + forecastMapper.deleteByIds(forecastDOList); + } + + /** + * 保存数据 + * @param forecastSaveReqVOList + */ + public void saveData(List forecastSaveReqVOList) { + if (CollectionUtil.isEmpty(forecastSaveReqVOList)) { + throw exception(PARAMS_NOT_EXISTS); + } + if (forecastSaveReqVOList.stream() + .anyMatch(forecastSaveReqVO -> CollectionUtil.isEmpty(forecastSaveReqVO.getDetailList()) + || CollectionUtil.isEmpty(forecastSaveReqVO.getElementList()) + || forecastSaveReqVO.getDetailList().size() != forecastSaveReqVO.getElementList().size())) { + throw exception(PARAMS_NOT_EXISTS); + } + + List forecastDOList = new ArrayList<>(); + List detailDOList = new ArrayList<>(); + List elementDOList = new ArrayList<>(); + for (ForecastSaveReqVO forecastSaveReqVO : forecastSaveReqVOList) { + // 预报 + ForecastDO forecastDO = BeanUtils.toBean(forecastSaveReqVO, ForecastDO.class); + if (forecastDO.getId() == null) { + forecastDO.setId(IdWorker.getId()); + } + forecastDOList.add(forecastDO); + + List detailList = forecastSaveReqVO.getDetailList(); + List elementList = forecastSaveReqVO.getElementList(); + for (int i = 0; i < detailList.size(); i++) { + // 明细 + ForecastDetailDO forecastDetailDO = BeanUtils.toBean(detailList.get(i), ForecastDetailDO.class); + forecastDetailDO.setId(IdWorker.getId()); + forecastDetailDO.setForecastId(forecastDO.getId()); + detailDOList.add(forecastDetailDO); + + // 预报品位 + ForecastElementDO forecastElementDO = BeanUtils.toBean(elementList.get(i), ForecastElementDO.class); + forecastElementDO.setId(IdWorker.getId()); + forecastElementDO.setRelativityType(ForecastElementRelativityTypeEnum.DTL.getCode()); + forecastElementDO.setRelativityId(forecastDetailDO.getId()); + elementDOList.add(forecastElementDO); + } + } + // 保存 + forecastMapper.insertOrUpdate(forecastDOList); + forecastDetailMapper.insertOrUpdate(detailDOList); + forecastElementMapper.insertOrUpdate(elementDOList); + + } +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastdetail/ForecastDetailService.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastdetail/ForecastDetailService.java new file mode 100644 index 00000000..547ca257 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastdetail/ForecastDetailService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.receivedeliver.service.forecastdetail; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastdetail.ForecastDetailDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 预报表明细 Service 接口 + * + * @author 后台管理 + */ +public interface ForecastDetailService { + + /** + * 创建预报表明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ForecastDetailRespVO createForecastDetail(@Valid ForecastDetailSaveReqVO createReqVO); + + /** + * 更新预报表明细 + * + * @param updateReqVO 更新信息 + */ + void updateForecastDetail(@Valid ForecastDetailSaveReqVO updateReqVO); + + /** + * 删除预报表明细 + * + * @param id 编号 + */ + void deleteForecastDetail(Long id); + + /** + * 批量删除预报表明细 + * + * @param ids 编号 + */ + void deleteForecastDetailListByIds(List ids); + + /** + * 获得预报表明细 + * + * @param id 编号 + * @return 预报表明细 + */ + ForecastDetailDO getForecastDetail(Long id); + + /** + * 获得预报表明细分页 + * + * @param pageReqVO 分页查询 + * @return 预报表明细分页 + */ + PageResult getForecastDetailPage(ForecastDetailPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastdetail/ForecastDetailServiceImpl.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastdetail/ForecastDetailServiceImpl.java new file mode 100644 index 00000000..2ef9e2b7 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastdetail/ForecastDetailServiceImpl.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.receivedeliver.service.forecastdetail; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastdetail.vo.ForecastDetailSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastdetail.ForecastDetailDO; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.forecastdetail.ForecastDetailMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.module.receivedeliver.enums.ErrorCodeConstants.*; + +/** + * 预报表明细 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ForecastDetailServiceImpl implements ForecastDetailService { + + @Resource + private ForecastDetailMapper forecastDetailMapper; + + @Override + public ForecastDetailRespVO createForecastDetail(ForecastDetailSaveReqVO createReqVO) { + // 插入 + ForecastDetailDO forecastDetail = BeanUtils.toBean(createReqVO, ForecastDetailDO.class); + forecastDetailMapper.insert(forecastDetail); + // 返回 + return BeanUtils.toBean(forecastDetail, ForecastDetailRespVO.class); + } + + @Override + public void updateForecastDetail(ForecastDetailSaveReqVO updateReqVO) { + // 校验存在 + validateForecastDetailExists(updateReqVO.getId()); + // 更新 + ForecastDetailDO updateObj = BeanUtils.toBean(updateReqVO, ForecastDetailDO.class); + forecastDetailMapper.updateById(updateObj); + } + + @Override + public void deleteForecastDetail(Long id) { + // 校验存在 + validateForecastDetailExists(id); + // 删除 + forecastDetailMapper.deleteById(id); + } + + @Override + public void deleteForecastDetailListByIds(List ids) { + // 校验存在 + validateForecastDetailExists(ids); + // 删除 + forecastDetailMapper.deleteByIds(ids); + } + + private void validateForecastDetailExists(List ids) { + List list = forecastDetailMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + // throw exception(FORECAST_DETAIL_NOT_EXISTS); + throw new RuntimeException("预报表明细id不能为空!"); + } + } + + private void validateForecastDetailExists(Long id) { + if (forecastDetailMapper.selectById(id) == null) { + // throw exception(FORECAST_DETAIL_NOT_EXISTS); + throw new RuntimeException("预报表明细id不能为空!"); + } + } + + @Override + public ForecastDetailDO getForecastDetail(Long id) { + return forecastDetailMapper.selectById(id); + } + + @Override + public PageResult getForecastDetailPage(ForecastDetailPageReqVO pageReqVO) { + return forecastDetailMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastelement/ForecastElementService.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastelement/ForecastElementService.java new file mode 100644 index 00000000..b512626e --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastelement/ForecastElementService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.receivedeliver.service.forecastelement; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastelement.ForecastElementDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 预报品位 Service 接口 + * + * @author 后台管理 + */ +public interface ForecastElementService { + + /** + * 创建预报品位 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + ForecastElementRespVO createForecastElement(@Valid ForecastElementSaveReqVO createReqVO); + + /** + * 更新预报品位 + * + * @param updateReqVO 更新信息 + */ + void updateForecastElement(@Valid ForecastElementSaveReqVO updateReqVO); + + /** + * 删除预报品位 + * + * @param id 编号 + */ + void deleteForecastElement(Long id); + + /** + * 批量删除预报品位 + * + * @param ids 编号 + */ + void deleteForecastElementListByIds(List ids); + + /** + * 获得预报品位 + * + * @param id 编号 + * @return 预报品位 + */ + ForecastElementDO getForecastElement(Long id); + + /** + * 获得预报品位分页 + * + * @param pageReqVO 分页查询 + * @return 预报品位分页 + */ + PageResult getForecastElementPage(ForecastElementPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastelement/ForecastElementServiceImpl.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastelement/ForecastElementServiceImpl.java new file mode 100644 index 00000000..cd757ecb --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/forecastelement/ForecastElementServiceImpl.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.receivedeliver.service.forecastelement; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.forecastelement.vo.ForecastElementSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.forecastelement.ForecastElementDO; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.forecastelement.ForecastElementMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.module.receivedeliver.enums.ErrorCodeConstants.*; + +/** + * 预报品位 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class ForecastElementServiceImpl implements ForecastElementService { + + @Resource + private ForecastElementMapper forecastElementMapper; + + @Override + public ForecastElementRespVO createForecastElement(ForecastElementSaveReqVO createReqVO) { + // 插入 + ForecastElementDO forecastElement = BeanUtils.toBean(createReqVO, ForecastElementDO.class); + forecastElementMapper.insert(forecastElement); + // 返回 + return BeanUtils.toBean(forecastElement, ForecastElementRespVO.class); + } + + @Override + public void updateForecastElement(ForecastElementSaveReqVO updateReqVO) { + // 校验存在 + validateForecastElementExists(updateReqVO.getId()); + // 更新 + ForecastElementDO updateObj = BeanUtils.toBean(updateReqVO, ForecastElementDO.class); + forecastElementMapper.updateById(updateObj); + } + + @Override + public void deleteForecastElement(Long id) { + // 校验存在 + validateForecastElementExists(id); + // 删除 + forecastElementMapper.deleteById(id); + } + + @Override + public void deleteForecastElementListByIds(List ids) { + // 校验存在 + validateForecastElementExists(ids); + // 删除 + forecastElementMapper.deleteByIds(ids); + } + + private void validateForecastElementExists(List ids) { + List list = forecastElementMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + // throw exception(FORECAST_ELEMENT_NOT_EXISTS); + throw new RuntimeException("预报品位id不能为空!"); + } + } + + private void validateForecastElementExists(Long id) { + if (forecastElementMapper.selectById(id) == null) { + // throw exception(FORECAST_ELEMENT_NOT_EXISTS); + throw new RuntimeException("预报品位id不能为空!"); + } + } + + @Override + public ForecastElementDO getForecastElement(Long id) { + return forecastElementMapper.selectById(id); + } + + @Override + public PageResult getForecastElementPage(ForecastElementPageReqVO pageReqVO) { + return forecastElementMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/metering/MeteringService.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/metering/MeteringService.java new file mode 100644 index 00000000..ab85a289 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/metering/MeteringService.java @@ -0,0 +1,64 @@ +package cn.iocoder.yudao.module.receivedeliver.service.metering; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.metering.MeteringDO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 计量 Service 接口 + * + * @author 后台管理 + */ +public interface MeteringService { + + /** + * 创建计量 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + MeteringRespVO createMetering(@Valid MeteringSaveReqVO createReqVO); + + /** + * 更新计量 + * + * @param updateReqVO 更新信息 + */ + void updateMetering(@Valid MeteringSaveReqVO updateReqVO); + + /** + * 删除计量 + * + * @param id 编号 + */ + void deleteMetering(Long id); + + /** + * 批量删除计量 + * + * @param ids 编号 + */ + void deleteMeteringListByIds(List ids); + + /** + * 获得计量 + * + * @param id 编号 + * @return 计量 + */ + MeteringDO getMetering(Long id); + + /** + * 获得计量分页 + * + * @param pageReqVO 分页查询 + * @return 计量分页 + */ + PageResult getMeteringPage(MeteringPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/metering/MeteringServiceImpl.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/metering/MeteringServiceImpl.java new file mode 100644 index 00000000..e1ee8605 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/service/metering/MeteringServiceImpl.java @@ -0,0 +1,90 @@ +package cn.iocoder.yudao.module.receivedeliver.service.metering; + +import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringPageReqVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringRespVO; +import cn.iocoder.yudao.module.receivedeliver.controller.admin.metering.vo.MeteringSaveReqVO; +import cn.iocoder.yudao.module.receivedeliver.dal.dataobject.metering.MeteringDO; +import cn.iocoder.yudao.module.receivedeliver.dal.mysql.metering.MeteringMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static cn.iocoder.yudao.module.receivedeliver.enums.ErrorCodeConstants.*; + +/** + * 计量 Service 实现类 + * + * @author 后台管理 + */ +@Service +@Validated +public class MeteringServiceImpl implements MeteringService { + + @Resource + private MeteringMapper meteringMapper; + + @Override + public MeteringRespVO createMetering(MeteringSaveReqVO createReqVO) { + // 插入 + MeteringDO metering = BeanUtils.toBean(createReqVO, MeteringDO.class); + meteringMapper.insert(metering); + // 返回 + return BeanUtils.toBean(metering, MeteringRespVO.class); + } + + @Override + public void updateMetering(MeteringSaveReqVO updateReqVO) { + // 校验存在 + validateMeteringExists(updateReqVO.getId()); + // 更新 + MeteringDO updateObj = BeanUtils.toBean(updateReqVO, MeteringDO.class); + meteringMapper.updateById(updateObj); + } + + @Override + public void deleteMetering(Long id) { + // 校验存在 + validateMeteringExists(id); + // 删除 + meteringMapper.deleteById(id); + } + + @Override + public void deleteMeteringListByIds(List ids) { + // 校验存在 + validateMeteringExists(ids); + // 删除 + meteringMapper.deleteByIds(ids); + } + + private void validateMeteringExists(List ids) { + List list = meteringMapper.selectByIds(ids); + if (CollUtil.isEmpty(list) || list.size() != ids.size()) { + // throw exception(METERING_NOT_EXISTS); + throw new RuntimeException("预报品位id不能为空!"); + } + } + + private void validateMeteringExists(Long id) { + if (meteringMapper.selectById(id) == null) { + // throw exception(METERING_NOT_EXISTS); + throw new RuntimeException("预报品位id不能为空!"); + } + } + + @Override + public MeteringDO getMetering(Long id) { + return meteringMapper.selectById(id); + } + + @Override + public PageResult getMeteringPage(MeteringPageReqVO pageReqVO) { + return meteringMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/assay/AssayMapper.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/assay/AssayMapper.xml new file mode 100644 index 00000000..c748a631 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/assay/AssayMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/billmain/BillMainMapper.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/billmain/BillMainMapper.xml new file mode 100644 index 00000000..f2678323 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/billmain/BillMainMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/billmaindetail/BillMainDetailMapper.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/billmaindetail/BillMainDetailMapper.xml new file mode 100644 index 00000000..488f94c1 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/billmaindetail/BillMainDetailMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/forecast/ForecastMapper.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/forecast/ForecastMapper.xml new file mode 100644 index 00000000..72a180f9 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/forecast/ForecastMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/forecastdetail/ForecastDetailMapper.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/forecastdetail/ForecastDetailMapper.xml new file mode 100644 index 00000000..97d7ad7c --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/forecastdetail/ForecastDetailMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/forecastelement/ForecastElementMapper.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/forecastelement/ForecastElementMapper.xml new file mode 100644 index 00000000..fb67b43f --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/forecastelement/ForecastElementMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/metering/MeteringMapper.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/metering/MeteringMapper.xml new file mode 100644 index 00000000..f230fb39 --- /dev/null +++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/mapper/metering/MeteringMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/template/ForecastTemplate.xlsx b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/template/ForecastTemplate.xlsx new file mode 100644 index 00000000..814db69c Binary files /dev/null and b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/template/ForecastTemplate.xlsx differ diff --git a/yudao-module-sell/pom.xml b/yudao-module-sell/pom.xml index b2c3cd23..86c2d287 100644 --- a/yudao-module-sell/pom.xml +++ b/yudao-module-sell/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} diff --git a/yudao-module-sell/yudao-module-sell-server/pom.xml b/yudao-module-sell/yudao-module-sell-server/pom.xml index b53829a2..861372d0 100644 --- a/yudao-module-sell/yudao-module-sell-server/pom.xml +++ b/yudao-module-sell/yudao-module-sell-server/pom.xml @@ -131,21 +131,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/SellServerApplication.java b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/SellServerApplication.java index e08bdc49..5ab3579a 100644 --- a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/SellServerApplication.java +++ b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/SellServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class SellServerApplication { public static void main(String[] args) { diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/controller/admin/sell/SellController.java b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/controller/admin/sell/SellController.java index 6f2a43f7..c3fea3b6 100644 --- a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/controller/admin/sell/SellController.java +++ b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/controller/admin/sell/SellController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.module.sell.controller.admin.sell; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/rpc/config/RpcConfiguration.java b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..8bf6cfe3 --- /dev/null +++ b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.sell.framework.rpc.config; + +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "sellRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/security/config/SecurityConfiguration.java b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/security/config/SecurityConfiguration.java index 48d682e9..d9c76721 100644 --- a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Sell 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("sellSecurityConfiguration") public class SecurityConfiguration { @Bean diff --git a/yudao-module-settle/pom.xml b/yudao-module-settle/pom.xml index 04c6682a..6500d267 100644 --- a/yudao-module-settle/pom.xml +++ b/yudao-module-settle/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - yudao + dsc-supply cn.iocoder.cloud ${revision} diff --git a/yudao-module-settle/yudao-module-settle-server/pom.xml b/yudao-module-settle/yudao-module-settle-server/pom.xml index e1bc2b25..897d4be3 100644 --- a/yudao-module-settle/yudao-module-settle-server/pom.xml +++ b/yudao-module-settle/yudao-module-settle-server/pom.xml @@ -131,21 +131,21 @@ ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - - - repackage - - - - - + + + + + + + + + + + + + + + diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/SettleServerApplication.java b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/SettleServerApplication.java index 9cf67d9f..ec73ef73 100644 --- a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/SettleServerApplication.java +++ b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/SettleServerApplication.java @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * * @author ZT */ -@SpringBootApplication +//@SpringBootApplication public class SettleServerApplication { public static void main(String[] args) { diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/controller/admin/settle/SettleController.java b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/controller/admin/settle/SettleController.java index f84fb403..12f90375 100644 --- a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/controller/admin/settle/SettleController.java +++ b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/controller/admin/settle/SettleController.java @@ -1,12 +1,13 @@ package cn.iocoder.yudao.module.settle.controller.admin.settle; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/rpc/config/RpcConfiguration.java b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/rpc/config/RpcConfiguration.java new file mode 100644 index 00000000..95464fcb --- /dev/null +++ b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/rpc/config/RpcConfiguration.java @@ -0,0 +1,10 @@ +package cn.iocoder.yudao.module.settle.framework.rpc.config; + +import cn.iocoder.yudao.module.system.api.dept.DeptApi; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +@Configuration(value = "settleRpcConfiguration", proxyBeanMethods = false) +@EnableFeignClients(clients = {DeptApi.class}) +public class RpcConfiguration { +} diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/security/config/SecurityConfiguration.java b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/security/config/SecurityConfiguration.java index ad66d653..1e446d81 100644 --- a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/security/config/SecurityConfiguration.java @@ -9,11 +9,9 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH /** - * Settle 模块的 Security 配置 - * - * @author ZT + * Template 模块的 Security 配置 */ -@Configuration(proxyBeanMethods = false) +@Configuration("settleSecurityConfiguration") public class SecurityConfiguration { @Bean