diff --git a/anrui-gateway/src/main/resources/application.yml b/anrui-gateway/src/main/resources/application.yml index 6b80b37e40..3784b8ef93 100644 --- a/anrui-gateway/src/main/resources/application.yml +++ b/anrui-gateway/src/main/resources/application.yml @@ -103,7 +103,30 @@ spring: uri: lb://yxt-base filters: - StripPrefix=1 - + - id: yxt-crm + predicates: + - Path= /yxtcrm/** + uri: lb://yxt-crm + filters: + - StripPrefix=1 + - id: yxt-fms + predicates: + - Path= /fms/** + uri: lb://yxt-fms + filters: + - StripPrefix=1 + - id: yxt-pms + predicates: + - Path= /pms/** + uri: lb://yxt-pms + filters: + - StripPrefix=1 + - id: yxt-sms + predicates: + - Path= /sms/** + uri: lb://yxt-sms + filters: + - StripPrefix=1 ignore: whites: - /portal/v1/regions/treeList diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairinventorybill/AsBusrepairInventorybillDto.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairinventorybill/AsBusrepairInventorybillDto.java index 15ff47bb4a..38b74e0dfb 100644 --- a/yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairinventorybill/AsBusrepairInventorybillDto.java +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairinventorybill/AsBusrepairInventorybillDto.java @@ -22,6 +22,7 @@ public class AsBusrepairInventorybillDto { private String createByName; @ApiModelProperty("操作部门sid") private String createDeptSid; + private String createDeptName; @ApiModelProperty("操作日期") private String createTime; @ApiModelProperty("领料人sid") diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairinventorybilldetail/AsBusrepairInventorybillDetailSDto.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairinventorybilldetail/AsBusrepairInventorybillDetailSDto.java index 1cec229ba8..57ef3ab019 100644 --- a/yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairinventorybilldetail/AsBusrepairInventorybillDetailSDto.java +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairinventorybilldetail/AsBusrepairInventorybillDetailSDto.java @@ -55,7 +55,7 @@ public class AsBusrepairInventorybillDetailSDto { @ApiModelProperty("销售价(元)") private String price; //折扣(0-10,0免费,10不打折) - private Integer discount; + private String discount; //优惠金额(=销售价*(1-折扣*0.1)) private String discountAmount; //金额(销售价-优惠金额) diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairinventorybill/AsBusrepairInventorybillService.java b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairinventorybill/AsBusrepairInventorybillService.java index e12a8bdda4..34f11e1d46 100644 --- a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairinventorybill/AsBusrepairInventorybillService.java +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairinventorybill/AsBusrepairInventorybillService.java @@ -168,6 +168,10 @@ public class AsBusrepairInventorybillService extends MybatisBaseService sitemVoList = asBusrepairBillService.selectSitemList(asBusrepairInventorybill.getSourceBillSid()); - return null; + sitemVoList.removeAll(Collections.singleton(null)); + if (!sitemVoList.isEmpty()) { + inventoryBillDetailsVo.setSitemVoList(sitemVoList); + } + return rb.success().setData(inventoryBillDetailsVo); } } diff --git a/yxt-crm-biz/README.md b/yxt-crm-biz/README.md new file mode 100644 index 0000000000..26ee59c281 --- /dev/null +++ b/yxt-crm-biz/README.md @@ -0,0 +1,3 @@ +yxt-crm-biz + +客户管理后台程序及接口 \ No newline at end of file diff --git a/yxt-crm-biz/pom.xml b/yxt-crm-biz/pom.xml new file mode 100644 index 0000000000..0e5badb0f9 --- /dev/null +++ b/yxt-crm-biz/pom.xml @@ -0,0 +1,134 @@ + + + + + com.yxt + yxt-parent + 0.0.1 + + + 4.0.0 + + yxt-crm-biz + com.yxt.crm + 2.0.1 + + + + com.yxt + yxt-common-base + 0.0.1 + + + + org.springframework.boot + spring-boot-starter-web + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + + mysql + mysql-connector-java + runtime + + + + com.baomidou + mybatis-plus-boot-starter + + + com.baomidou + mybatis-plus-annotation + + + junit + junit + compile + + + + org.projectlombok + lombok + 1.18.26 + true + + + org.springframework.boot + spring-boot-starter-test + test + + + + + cn.dev33 + sa-token-spring-boot-starter + 1.37.0 + + + cn.hutool + hutool-all + 5.8.23 + + + cn.hutool + hutool-core + 5.8.23 + + + com.google.zxing + core + 3.5.2 + + + com.alibaba + easyexcel + 3.3.2 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.5.6 + + + + repackage + + + + + + + + src/main/java + + **/*Mapper.xml + + + + src/main/resources + + **/*.* + + false + + + + + diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/YxtCrmApplication.java b/yxt-crm-biz/src/main/java/com/yxt/crm/YxtCrmApplication.java new file mode 100644 index 0000000000..a921a4fcd3 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/YxtCrmApplication.java @@ -0,0 +1,22 @@ +package com.yxt.crm; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableScheduling; + +@SpringBootApplication(scanBasePackages = { + "com.yxt.crm.config", + "com.yxt.common.base.config", + "com.yxt.crm" +}) +// 启用自带定时任务 +@EnableScheduling +@EnableFeignClients(basePackages = {}) +public class YxtCrmApplication { + + public static void main(String[] args) { + SpringApplication.run(YxtCrmApplication.class, args); + } + +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/apiadmin/AdminHomeRest.java b/yxt-crm-biz/src/main/java/com/yxt/crm/apiadmin/AdminHomeRest.java new file mode 100644 index 0000000000..aa2508eb8e --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/apiadmin/AdminHomeRest.java @@ -0,0 +1,10 @@ +package com.yxt.crm.apiadmin; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController("com.yxt.crm.apiadmin.AdminHomeRest") +@RequestMapping("/apiadmin/home") +public class AdminHomeRest { + +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/apiadmin/CrmCustomerOrgRest.java b/yxt-crm-biz/src/main/java/com/yxt/crm/apiadmin/CrmCustomerOrgRest.java new file mode 100644 index 0000000000..5b53621cd4 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/apiadmin/CrmCustomerOrgRest.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.crm.biz.crmcustomerorg.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: crm(crm)
+ * File: CrmCustomerOrgFeignFallback.java
+ * Class: com.yxt.crm.biz.crmcustomerorg.CrmCustomerOrgRest
+ * Description: 客户单位.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "客户单位") +@RestController +@RequestMapping("/apiadmin/v1/crmcustomerorg") +public class CrmCustomerOrgRest { + + @Autowired + private CrmCustomerOrgService crmCustomerOrgService; + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = crmCustomerOrgService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody CrmCustomerOrgDto dto){ + ResultBean rb = ResultBean.fireFail(); + crmCustomerOrgService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + crmCustomerOrgService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + CrmCustomerOrgDetailsVo vo = crmCustomerOrgService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/apiadmin/CrmCustomerRest.java b/yxt-crm-biz/src/main/java/com/yxt/crm/apiadmin/CrmCustomerRest.java new file mode 100644 index 0000000000..f5aa1d3486 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/apiadmin/CrmCustomerRest.java @@ -0,0 +1,105 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.crm.biz.crmcustomer.*; +import com.yxt.crm.biz.crmcustomerorg.CrmCustomerOrgQuery; +import com.yxt.crm.biz.crmcustomerorg.CrmCustomerOrgVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: crm(crm)
+ * File: CrmCustomerFeignFallback.java
+ * Class: com.yxt.crm.biz.crmcustomer.CrmCustomerRest
+ * Description: 客户.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "客户") +@RestController +@RequestMapping("/apiadmin/v1/crmcustomer") +public class CrmCustomerRest { + + @Autowired + private CrmCustomerService crmCustomerService; + + + @ApiOperation("根据条件分页查询客户信息的列表") + @PostMapping("/customerListPage") + public ResultBean> customerListPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = crmCustomerService.customerListPage(pq); + return rb.success().setData(pv); + } + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = crmCustomerService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody CrmCustomerDto dto) { + ResultBean rb = ResultBean.fireFail(); + crmCustomerService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids) { + ResultBean rb = ResultBean.fireFail(); + crmCustomerService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid) { + ResultBean rb = ResultBean.fireFail(); + CrmCustomerDetailsVo vo = crmCustomerService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomer.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomer.java new file mode 100644 index 0000000000..202dc5a668 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomer.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomer; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomer.java
+ * Class: com.yxt.crm.api.crmcustomer.CrmCustomer
+ * Description: 客户.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户", description = "客户") +@TableName("crm_customer") +public class CrmCustomer extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("客户名称") + private String name; // 客户名称 + @ApiModelProperty("客户编码") + private String customerNo; // 客户编码 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("客户类型") + private String customerTypeKey; // 客户类型 + @ApiModelProperty("客户类型(个人、企业)") + private String customerType; // 客户类型(个人、企业) + @ApiModelProperty("所在单位sid") + private String orgSid; // 所在单位sid + @ApiModelProperty("所在单位") + private String orgName; // 所在单位 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerDetailsVo.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerDetailsVo.java new file mode 100644 index 0000000000..af0868f53e --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerDetailsVo.java @@ -0,0 +1,73 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomer; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomerVo.java
+ * Class: com.yxt.crm.api.crmcustomer.CrmCustomerVo
+ * Description: 客户 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户 视图数据详情", description = "客户 视图数据详情") +public class CrmCustomerDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("客户名称") + private String name; // 客户名称 + @ApiModelProperty("客户编码") + private String customerNo; // 客户编码 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("客户类型") + private String customerTypeKey; // 客户类型 + @ApiModelProperty("客户类型(个人、企业)") + private String customerType; // 客户类型(个人、企业) + @ApiModelProperty("所在单位sid") + private String orgSid; // 所在单位sid + @ApiModelProperty("所在单位") + private String orgName; // 所在单位 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerDto.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerDto.java new file mode 100644 index 0000000000..7cab759339 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerDto.java @@ -0,0 +1,73 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomer; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomerDto.java
+ * Class: com.yxt.crm.api.crmcustomer.CrmCustomerDto
+ * Description: 客户 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户 数据传输对象", description = "客户 数据传输对象") +public class CrmCustomerDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("客户名称") + private String name; // 客户名称 + @ApiModelProperty("客户编码") + private String customerNo; // 客户编码 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("客户类型") + private String customerTypeKey; // 客户类型 + @ApiModelProperty("客户类型(个人、企业)") + private String customerType; // 客户类型(个人、企业) + @ApiModelProperty("所在单位sid") + private String orgSid; // 所在单位sid + @ApiModelProperty("所在单位") + private String orgName; // 所在单位 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerMapper.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerMapper.java new file mode 100644 index 0000000000..f40f42b8d4 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerMapper.java @@ -0,0 +1,68 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomer; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: crm(crm)
+ * File: CrmCustomerMapper.java
+ * Class: com.yxt.crm.biz.crmcustomer.CrmCustomerMapper
+ * Description: 客户.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface CrmCustomerMapper extends BaseMapper { + + //@Update("update crm_customer set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from crm_customer") + List selectListVo(); + + List customerListPage(@Param(Constants.WRAPPER) QueryWrapper qw); + + List customerList(); +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerMapper.xml b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerMapper.xml new file mode 100644 index 0000000000..f79bee4934 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerQuery.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerQuery.java new file mode 100644 index 0000000000..16c7e7dac1 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerQuery.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomer; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomerQuery.java
+ * Class: com.yxt.crm.api.crmcustomer.CrmCustomerQuery
+ * Description: 客户 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户 查询条件", description = "客户 查询条件") +public class CrmCustomerQuery implements Query { + + @ApiModelProperty("客户名称") + private String name; // 客户名称 + @ApiModelProperty("客户编码") + private String customerNo; // 客户编码 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("客户类型") + private String customerTypeKey; // 客户类型 + @ApiModelProperty("客户类型(个人、企业)") + private String customerType; // 客户类型(个人、企业) + @ApiModelProperty("所在单位sid") + private String orgSid; // 所在单位sid + @ApiModelProperty("所在单位") + private String orgName; // 所在单位 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerService.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerService.java new file mode 100644 index 0000000000..6a4144df8f --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerService.java @@ -0,0 +1,291 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomer; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.crm.feign.as.ascustomervehicle.AsCustomerCrmVehVo; +import com.yxt.crm.feign.as.ascustomervehicle.AsCustomerVehicleFeign; +import com.yxt.crm.feign.portal.sysstafforg.SysStaffOrgFeign; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + +/** + * Project: crm(crm)
+ * File: CrmCustomerService.java
+ * Class: com.yxt.crm.biz.crmcustomer.CrmCustomerService
+ * Description: 客户 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class CrmCustomerService extends MybatisBaseService { + + @Resource + private AsCustomerVehicleFeign asCustomerVehicleFeign; + @Autowired + private SysStaffOrgFeign sysStaffOrgFeign; + + private QueryWrapper createQueryWrapper(CrmCustomerQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + CrmCustomerQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(CrmCustomerDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(CrmCustomerDto dto) { + CrmCustomer entity = new CrmCustomer(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(CrmCustomerDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + CrmCustomer entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public CrmCustomerDetailsVo fetchDetailsVoBySid(String sid) { + CrmCustomer entity = fetchBySid(sid); + CrmCustomerDetailsVo vo = new CrmCustomerDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public PagerVo customerListPage(PagerQuery pq) { + PagerVo pagerVo = new PagerVo<>(); + CustomerVehQuery pagerQuery = pq.getParams(); + List nameList = new ArrayList<>(); + List mobileList = new ArrayList<>(); + List orgNameList = new ArrayList<>(); + List vinList = new ArrayList<>(); + List vehVos = asCustomerVehicleFeign.listCustomerVeh().getData(); + if (!vehVos.isEmpty()) { + List customerVos = baseMapper.customerList(); + customerVos.removeAll(Collections.singleton(null)); + if (!customerVos.isEmpty()) { + List result = vehVos.stream() + .map(v -> { + Optional vehVo = customerVos.stream() + .filter(c -> c.getSid().equals(v.getCustomerSid())) + .findFirst(); + if (vehVo.isPresent()) { + CustomerVehVo customerVehVo = new CustomerVehVo(); + if (StringUtils.isNotBlank(vehVo.get().getMobile())) { + customerVehVo.setMobile(vehVo.get().getMobile()); + } else { + customerVehVo.setMobile(""); + } + if (StringUtils.isNotBlank(vehVo.get().getName())) { + customerVehVo.setName(vehVo.get().getName()); + } else { + customerVehVo.setName(""); + } + if (StringUtils.isNotBlank(v.getVehMark())) { + customerVehVo.setVehMark(v.getVehMark()); + } else { + customerVehVo.setVehMark(""); + } + if (StringUtils.isNotBlank(vehVo.get().getSid())) { + customerVehVo.setSid(vehVo.get().getSid()); + } else { + customerVehVo.setSid(""); + } + if (StringUtils.isNotBlank(vehVo.get().getOrgName())) { + customerVehVo.setOrgName(vehVo.get().getOrgName()); + } else { + customerVehVo.setOrgName(""); + } + if (StringUtils.isNotBlank(vehVo.get().getUseOrgSid())) { + customerVehVo.setUseOrgSid(vehVo.get().getUseOrgSid()); + } else { + customerVehVo.setUseOrgSid(""); + } + if (StringUtils.isNotBlank(v.getVinNo())) { + customerVehVo.setVinNo(v.getVinNo()); + } else { + customerVehVo.setVinNo(""); + } + if (StringUtils.isNotBlank(v.getVehModel())) { + customerVehVo.setVehModel(v.getVehModel()); + } else { + customerVehVo.setVehModel(""); + } + if (StringUtils.isNotBlank(v.getVehModelSid())) { + customerVehVo.setVehModelSid(v.getVehModelSid()); + } else { + customerVehVo.setVehModelSid(""); + } + return customerVehVo; + } else { + CustomerVehVo customerVehVo = new CustomerVehVo(); + if (StringUtils.isNotBlank(v.getVehMark())) { + customerVehVo.setVehMark(v.getVehMark()); + } else { + customerVehVo.setVehMark(""); + } + if (StringUtils.isNotBlank(v.getVinNo())) { + customerVehVo.setVinNo(v.getVinNo()); + } else { + customerVehVo.setVinNo(""); + } + if (StringUtils.isNotBlank(v.getVehModel())) { + customerVehVo.setVehModel(v.getVehModel()); + } else { + customerVehVo.setVehModel(""); + } + if (StringUtils.isNotBlank(v.getVehModelSid())) { + customerVehVo.setVehModelSid(v.getVehModelSid()); + } else { + customerVehVo.setVehModelSid(""); + } + customerVehVo.setMobile(""); + customerVehVo.setOrgName(""); + customerVehVo.setSid(""); + customerVehVo.setName(""); + customerVehVo.setUseOrgSid(""); + return customerVehVo; + } + }) + .collect(Collectors.toList()); + + if (StringUtils.isNotBlank(pagerQuery.getOrgPath())) { + String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(pagerQuery.getOrgPath()).getData(); + result = result.stream() + .filter(r -> r.getUseOrgSid().equals(useOrgSid)) + .collect(Collectors.toList()); + } + if (!result.isEmpty()) { + if (StringUtils.isNotBlank(pagerQuery.getVehMark())) { + result = result.stream().filter(r -> r.getVehMark().contains(pagerQuery.getVehMark())) + .collect(Collectors.toList()); + } + if (StringUtils.isNotBlank(pagerQuery.getVinNo())) { + vinList = result.stream().filter(r -> r.getVinNo().contains(pagerQuery.getVinNo())) + .collect(Collectors.toList()); + result = result.stream().filter(vinList::contains).collect(Collectors.toList()); + } + if (StringUtils.isNotBlank(pagerQuery.getName())) { + nameList = result.stream().filter(r -> r.getName().contains(pagerQuery.getName())) + .collect(Collectors.toList()); + result = result.stream().filter(nameList::contains).collect(Collectors.toList()); + } + if (StringUtils.isNotBlank(pagerQuery.getOrgName())) { + orgNameList = result.stream().filter(r -> r.getOrgName().contains(pagerQuery.getOrgName())) + .collect(Collectors.toList()); + result = result.stream().filter(orgNameList::contains).collect(Collectors.toList()); + } + if (StringUtils.isNotBlank(pagerQuery.getMobile())) { + mobileList = result.stream().filter(r -> r.getMobile().contains(pagerQuery.getMobile())) + .collect(Collectors.toList()); + result = result.stream().filter(mobileList::contains).collect(Collectors.toList()); + } + } + if (!result.isEmpty()) { + List lastList = this.pageBySubList(result, (int) pq.getSize(), (int) pq.getCurrent()); + pagerVo.setRecords(lastList); + pagerVo.setTotal(result.size()); + pagerVo.setCurrent(pq.getCurrent()); + pagerVo.setSize(pq.getSize()); + if (result.size() % pq.getSize() != 0L) { + pagerVo.setPages((result.size() / pq.getSize()) + 1); + } else { + pagerVo.setPages(result.size() / pq.getSize()); + } + pagerVo.setMsg("当前共查询到" + result.size() + "条记录"); + } + } + } + return pagerVo; + } + + /** + * 分页方法 + */ + public List pageBySubList(List list, int pagesize, int currentPage) { + int totalcount = list.size(); + int pagecount = 0; + List subList; + int m = totalcount % pagesize; + if (m > 0) { + pagecount = totalcount / pagesize + 1; + } else { + pagecount = totalcount / pagesize; + } + if (m == 0) { + subList = list.subList((currentPage - 1) * pagesize, pagesize * (currentPage)); + } else { + if (currentPage == pagecount) { + subList = list.subList((currentPage - 1) * pagesize, totalcount); + } else { + subList = list.subList((currentPage - 1) * pagesize, pagesize * (currentPage)); + } + } + return subList; + } +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerVo.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerVo.java new file mode 100644 index 0000000000..863ddda64e --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CrmCustomerVo.java @@ -0,0 +1,73 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomer; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomerVo.java
+ * Class: com.yxt.crm.api.crmcustomer.CrmCustomerVo
+ * Description: 客户 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户 视图数据对象", description = "客户 视图数据对象") +public class CrmCustomerVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("客户名称") + private String name; // 客户名称 + @ApiModelProperty("客户编码") + private String customerNo; // 客户编码 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("客户类型") + private String customerTypeKey; // 客户类型 + @ApiModelProperty("客户类型(个人、企业)") + private String customerType; // 客户类型(个人、企业) + @ApiModelProperty("所在单位sid") + private String orgSid; // 所在单位sid + @ApiModelProperty("所在单位") + private String orgName; // 所在单位 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CustomerVehQuery.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CustomerVehQuery.java new file mode 100644 index 0000000000..ffa98fef0e --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CustomerVehQuery.java @@ -0,0 +1,26 @@ +package com.yxt.crm.biz.crmcustomer; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/19 9:56 + */ +@Data +public class CustomerVehQuery implements Query { + @ApiModelProperty("客户名称") + private String name; // 客户名称 + @ApiModelProperty("车辆牌照") + private String vehMark; // 车辆牌照 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("所在单位") + private String orgName; // 所在单位 + private String vinNo; //车架号 + @ApiModelProperty("组织全路径") + private String orgPath; // 组织全路径 + +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CustomerVehVo.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CustomerVehVo.java new file mode 100644 index 0000000000..be7cef4943 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomer/CustomerVehVo.java @@ -0,0 +1,31 @@ +package com.yxt.crm.biz.crmcustomer; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/19 9:57 + */ +@Data +public class CustomerVehVo implements Vo { + + private String sid; + @ApiModelProperty("客户名称") + private String name; // 客户名称 + @ApiModelProperty("车辆牌照") + private String vehMark; // 车辆牌照 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("所在单位") + private String orgName; // 所在单位 + @ApiModelProperty("车型sid") + private String vehModelSid; + @ApiModelProperty("车型") + private String vehModel; + @ApiModelProperty("车架号") + private String vinNo; + private String useOrgSid; +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrg.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrg.java new file mode 100644 index 0000000000..14d5b2825c --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrg.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomerorg; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomerOrg.java
+ * Class: com.yxt.crm.api.crmcustomerorg.CrmCustomerOrg
+ * Description: 客户单位.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户单位", description = "客户单位") +@TableName("crm_customer_org") +public class CrmCustomerOrg extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("单位名称") + private String orgName; // 单位名称 + @ApiModelProperty("单位编码(拼音缩写)") + private String orgCode; // 单位编码(拼音缩写) + @ApiModelProperty("联系人") + private String contacts; // 联系人 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("地址") + private String address; // 地址 + @ApiModelProperty("信用额度") + private Integer creditLimit; // 信用额度 + @ApiModelProperty("排序号") + private Integer sortNo; // 排序号 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgDetailsVo.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgDetailsVo.java new file mode 100644 index 0000000000..639910271f --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgDetailsVo.java @@ -0,0 +1,73 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomerorg; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomerOrgVo.java
+ * Class: com.yxt.crm.api.crmcustomerorg.CrmCustomerOrgVo
+ * Description: 客户单位 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户单位 视图数据详情", description = "客户单位 视图数据详情") +public class CrmCustomerOrgDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("单位名称") + private String orgName; // 单位名称 + @ApiModelProperty("单位编码(拼音缩写)") + private String orgCode; // 单位编码(拼音缩写) + @ApiModelProperty("联系人") + private String contacts; // 联系人 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("地址") + private String address; // 地址 + @ApiModelProperty("信用额度") + private Integer creditLimit; // 信用额度 + @ApiModelProperty("排序号") + private Integer sortNo; // 排序号 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgDto.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgDto.java new file mode 100644 index 0000000000..d387adffdb --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgDto.java @@ -0,0 +1,73 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomerorg; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomerOrgDto.java
+ * Class: com.yxt.crm.api.crmcustomerorg.CrmCustomerOrgDto
+ * Description: 客户单位 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户单位 数据传输对象", description = "客户单位 数据传输对象") +public class CrmCustomerOrgDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("单位名称") + private String orgName; // 单位名称 + @ApiModelProperty("单位编码(拼音缩写)") + private String orgCode; // 单位编码(拼音缩写) + @ApiModelProperty("联系人") + private String contacts; // 联系人 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("地址") + private String address; // 地址 + @ApiModelProperty("信用额度") + private Integer creditLimit; // 信用额度 + @ApiModelProperty("排序号") + private Integer sortNo; // 排序号 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgMapper.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgMapper.java new file mode 100644 index 0000000000..944a8ee9a9 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgMapper.java @@ -0,0 +1,64 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomerorg; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + + +import java.util.List; + +/** + * Project: crm(crm)
+ * File: CrmCustomerOrgMapper.java
+ * Class: com.yxt.crm.biz.crmcustomerorg.CrmCustomerOrgMapper
+ * Description: 客户单位.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface CrmCustomerOrgMapper extends BaseMapper { + + //@Update("update crm_customer_org set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from crm_customer_org") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgMapper.xml b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgMapper.xml new file mode 100644 index 0000000000..5a3b598079 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgQuery.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgQuery.java new file mode 100644 index 0000000000..6be3f4b9ae --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgQuery.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomerorg; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomerOrgQuery.java
+ * Class: com.yxt.crm.api.crmcustomerorg.CrmCustomerOrgQuery
+ * Description: 客户单位 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户单位 查询条件", description = "客户单位 查询条件") +public class CrmCustomerOrgQuery implements Query { + + @ApiModelProperty("单位名称") + private String orgName; // 单位名称 + @ApiModelProperty("单位编码(拼音缩写)") + private String orgCode; // 单位编码(拼音缩写) + @ApiModelProperty("联系人") + private String contacts; // 联系人 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("地址") + private String address; // 地址 + @ApiModelProperty("信用额度") + private Integer creditLimit; // 信用额度 + @ApiModelProperty("排序号") + private Integer sortNo; // 排序号 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgService.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgService.java new file mode 100644 index 0000000000..a5d020ab2f --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgService.java @@ -0,0 +1,104 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomerorg; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: crm(crm)
+ * File: CrmCustomerOrgService.java
+ * Class: com.yxt.crm.biz.crmcustomerorg.CrmCustomerOrgService
+ * Description: 客户单位 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class CrmCustomerOrgService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(CrmCustomerOrgQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + CrmCustomerOrgQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(CrmCustomerOrgDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(CrmCustomerOrgDto dto){ + CrmCustomerOrg entity = new CrmCustomerOrg(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(CrmCustomerOrgDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + CrmCustomerOrg entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public CrmCustomerOrgDetailsVo fetchDetailsVoBySid(String sid){ + CrmCustomerOrg entity = fetchBySid(sid); + CrmCustomerOrgDetailsVo vo = new CrmCustomerOrgDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgVo.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgVo.java new file mode 100644 index 0000000000..d530d648c2 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/crmcustomerorg/CrmCustomerOrgVo.java @@ -0,0 +1,73 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.biz.crmcustomerorg; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: crm(crm)
+ * File: CrmCustomerOrgVo.java
+ * Class: com.yxt.crm.api.crmcustomerorg.CrmCustomerOrgVo
+ * Description: 客户单位 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:06:09
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "客户单位 视图数据对象", description = "客户单位 视图数据对象") +public class CrmCustomerOrgVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("单位名称") + private String orgName; // 单位名称 + @ApiModelProperty("单位编码(拼音缩写)") + private String orgCode; // 单位编码(拼音缩写) + @ApiModelProperty("联系人") + private String contacts; // 联系人 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("地址") + private String address; // 地址 + @ApiModelProperty("信用额度") + private Integer creditLimit; // 信用额度 + @ApiModelProperty("排序号") + private Integer sortNo; // 排序号 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/biz/package-info.java b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/package-info.java new file mode 100644 index 0000000000..09ea0f4f4f --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/biz/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通 仓库管理 项目后台逻辑和接口 + */ +package com.yxt.crm.biz; \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/config/SaTokenConfigure.java b/yxt-crm-biz/src/main/java/com/yxt/crm/config/SaTokenConfigure.java new file mode 100644 index 0000000000..b6565c3e31 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/config/SaTokenConfigure.java @@ -0,0 +1,114 @@ +package com.yxt.crm.config;//package com.yxt.wms.config; +// +//import cn.dev33.satoken.interceptor.SaInterceptor; +//import cn.dev33.satoken.stp.StpUtil; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +// +///** +// * @author wangpengfei +// * @date 2023/5/16 14:43 +// */ +//@Configuration +//public class SaTokenConfigure implements WebMvcConfigurer { +// @Value("${image.url.prefix:http://127.0.0.1:8080/upload/}") +// private String urlPrefix; +// // 注册 Sa-Token 拦截器 +// @Override +// public void addInterceptors(InterceptorRegistry registry) { +// // 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。 +// +// registry.addInterceptor(new SaInterceptor(handler -> StpUtil.checkLogin())) +// .addPathPatterns("/**") +// .excludePathPatterns("/sysuser/doLogin") +// .excludePathPatterns("/lpkgiftcard/gifCardByCustomerSid") +// .excludePathPatterns("/empcardgift/gifCardByCustomerSid") +// .excludePathPatterns("/empcard/getEmpCardByCustomerSid") +// .excludePathPatterns("/lpkgiftcard/getGifCardBySid/**") +// .excludePathPatterns("/empcardgift/getGifCardBySid/**") +// .excludePathPatterns("/empcard/getEmpCardBySid/**") +// .excludePathPatterns("/lpkgiftcard/isSaturAndSun/**") +// .excludePathPatterns("/empcardgift/isSaturAndSun/**") +// .excludePathPatterns("/empcard/isSaturAndSun/**") +// .excludePathPatterns("/lpkgiftcard/getReservationBySid/**") +// .excludePathPatterns("/lpksreservoorder/submission") +// .excludePathPatterns("/lpksreservoorder/exportExcelByStore") +// .excludePathPatterns("/empsreservoorder/createNewUserBagOrder") +// .excludePathPatterns("/lpksreservoorders/submission") +// .excludePathPatterns("/empsreservoorder/ordersList") +// .excludePathPatterns("/empsreservoorder/submission") +// .excludePathPatterns("/empsreservoorder/submissionEmp") +// .excludePathPatterns("/empcardgift/generateCard") +// .excludePathPatterns("/lpkgiftcard/bindCard") +// .excludePathPatterns("/empcard/bindCard") +// .excludePathPatterns("/lpksreservoorder/orderByCardSid/**") +// .excludePathPatterns("/lpksreservoorder/orderListByUserSid/**") +// .excludePathPatterns("/lpksreservoorder/orderDetails/**") +// .excludePathPatterns("/newcomerrecorecord/recommendNewUsers") +// .excludePathPatterns("/newcomerrecorecord/recommendedAssistance") +// .excludePathPatterns("/newcomerrecorecord/recordList/**") +// .excludePathPatterns("/transferrecords/transferRecordsList") +// .excludePathPatterns("/empsreservoorder/createVegeOrder") +// .excludePathPatterns("/empsreservoorder/OrderDetails/**") +// .excludePathPatterns("/empsreservoorder/changePayState/**") +// .excludePathPatterns("/lpkgoods/goodsDetails/**") +// .excludePathPatterns("/lpkstore/getAllStoreByQuery") +// .excludePathPatterns("/vegetablecellar/receiveTransferGoods") +// .excludePathPatterns("/transferrecords/submission") +// .excludePathPatterns("/lpkgiftcard/getCardByBank") +// .excludePathPatterns("/empcard/getEmpCard") +// .excludePathPatterns("/empcardgift/shareEmpCard/**") +// .excludePathPatterns("/empcardgift/generateEmpCardGift") +// .excludePathPatterns("/empcardgift/generateEmpCard") +// .excludePathPatterns("/lpkcustomer/wxSilentLogin") +// .excludePathPatterns("/lpkgiftcard/gifCardsByCustomerSid") +// .excludePathPatterns("/lpkgoods/getAllGiftBag") +// .excludePathPatterns("/appletgiftbag/getGiftBagBySid/**") +// .excludePathPatterns("/appletgiftbag/appletGiftBagList") +// .excludePathPatterns("/lpkgiftcard/cardShareDetail/**") +// .excludePathPatterns("/lpkgiftcard/cardShareGoodsDetail/**") +// .excludePathPatterns("/empcardgift/generateTopEmpCard/**") +// .excludePathPatterns("/empsreservoorder/createOrder") +// .excludePathPatterns("/appletgiftbag/recommendRecord/**") +// //2024-01-17 +// .excludePathPatterns("/lpkgiftcard/getAllGoodsType/**") +// .excludePathPatterns("/appletnotice/getNotice") +// .excludePathPatterns("/empsreservoorder/getPreOrder") +// .excludePathPatterns("/lpkgoods/getAllGoodsType/**") +// .excludePathPatterns("/transferrecords/submission") +// .excludePathPatterns("/vegetablecellar/receiveTransferGoods") +// .excludePathPatterns("/customerstore/isSaturAndSun") +// .excludePathPatterns("/lpkgiftcard/getGoodsByType/**") +// .excludePathPatterns("/lpkgoods/getGoodsTypeAndBrand") +// .excludePathPatterns("/lpkgoods/getGoodsByType") +// .excludePathPatterns("/lpksreservoorders/orderListByUserSid") +// .excludePathPatterns("/appletgiftbag/newUserQuota") +// .excludePathPatterns("/shoppingcart/addShoppingCart") +// .excludePathPatterns("/shoppingcart/getGoodsWeight") +// .excludePathPatterns("/shoppingcart/shoppingCartList") +// .excludePathPatterns("/shoppingcart/delShoppingCart/**") +// .excludePathPatterns("/lpkgoods/vegeCellarTypeList") +// .excludePathPatterns("/vegetablecellar/addGoods/**") +// .excludePathPatterns("/lpkgoods/vegeCellarList") +// .excludePathPatterns("/customerstore/getStoreBySid/**") +// .excludePathPatterns("/lpkgiftcard/bindAllCard") +// .excludePathPatterns("/lpkcustomer/customerInfo/**") +// .excludePathPatterns("/vegetablecellar/saveGoods") +// .excludePathPatterns("/transferrecords/getTransferByCode/**") +// //2024-01-18 +// .excludePathPatterns("/lpkcustomer/getCustomerInfo/**") +// .excludePathPatterns("/lpkcustomer/modifyUserNickName") +// .excludePathPatterns("/lpkcustomer/modifyHeadImage") +// .excludePathPatterns("/upload/**") +// .excludePathPatterns("/lpkcustomer/getPhoneNumber") +// .excludePathPatterns("/lpkcustomer/getRealInfo/**") +// .excludePathPatterns("/lpkcustomer/saveRealInfo") +// .excludePathPatterns("/pms/PmsBrand/getList") +// .excludePathPatterns("/LpkCustomerBank/getBankList") +// .excludePathPatterns("/lpkcustomer/updateCustomerBank") +// .excludePathPatterns("//wxapi/**") +// ; +// } +//} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/config/SaTokenGloableException.java b/yxt-crm-biz/src/main/java/com/yxt/crm/config/SaTokenGloableException.java new file mode 100644 index 0000000000..5bec3ce79d --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/config/SaTokenGloableException.java @@ -0,0 +1,67 @@ +package com.yxt.crm.config; + +import com.yxt.common.base.config.handler.GlobalExceptionHandler; +import com.yxt.common.core.result.ResultBean; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.validation.BindException; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.NoHandlerFoundException; + +/** + * @author dimengzhe + * @date 2020/9/12 3:23 + * @description 全局异常处理 + */ +@RestControllerAdvice +public class SaTokenGloableException extends GlobalExceptionHandler { + + private static final Logger L = LoggerFactory.getLogger(GlobalExceptionHandler.class); + + public SaTokenGloableException() { + } + @ExceptionHandler({Exception.class}) + public ResultBean handleException(Exception e) { + if(null !=e.getMessage()){ + if(e.getMessage().contains("token 无效:")){ + L.error(e.getMessage(), e); + return ResultBean.fireFail().setCode("5000").setMsg("系统异常::" + e.getMessage()); + } + if(e.getMessage().contains("未能读取到有效 token")){ +// L.error(e.getMessage(), e); + return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); + } + } + + L.error(e.getMessage(), e); + return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); + } + @ExceptionHandler({NoHandlerFoundException.class}) + public ResultBean handlerNoFoundException(Exception e) { + L.error(e.getMessage(), e); + return ResultBean.fireFail().setCode("404").setMsg("路径不存在,请检查路径是否正确"); + } + +// @ExceptionHandler({Exception.class}) +// public ResultBean handleException(Exception e) { +// L.error(e.getMessage(), e); +// return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); +// } + + @ExceptionHandler({BindException.class}) + public ResultBean validatedBindException(BindException e) { + L.error(e.getMessage(), e); + String message = ((ObjectError)e.getAllErrors().get(0)).getDefaultMessage(); + return ResultBean.fireFail().setCode("405").setMsg(message); + } + + @ExceptionHandler({MethodArgumentNotValidException.class}) + public ResultBean validExceptionHandler(MethodArgumentNotValidException e) { + L.error(e.getMessage(), e); + String message = e.getBindingResult().getFieldError().getDefaultMessage(); + return ResultBean.fireFail().setCode("405").setMsg(message); + } +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/config/package-info.java b/yxt-crm-biz/src/main/java/com/yxt/crm/config/package-info.java new file mode 100644 index 0000000000..a4a817e32b --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/config/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.crm.config; \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/feign/as/ascustomervehicle/AsCustomerCrmVehVo.java b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/as/ascustomervehicle/AsCustomerCrmVehVo.java new file mode 100644 index 0000000000..fa6ed0f1f4 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/as/ascustomervehicle/AsCustomerCrmVehVo.java @@ -0,0 +1,26 @@ +package com.yxt.crm.feign.as.ascustomervehicle; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @author Fan + * @description + * @date 2024/3/7 14:29 + */ +@Data +public class AsCustomerCrmVehVo { + @ApiModelProperty("客户sid") + private String customerSid; // 客户sid + @ApiModelProperty("车牌号") + private String vehMark; // 车牌号 + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("车型sid") + private String vehModelSid; + @ApiModelProperty("车型") + private String vehModel; +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/feign/as/ascustomervehicle/AsCustomerVehicleFeign.java b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/as/ascustomervehicle/AsCustomerVehicleFeign.java new file mode 100644 index 0000000000..60d4735919 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/as/ascustomervehicle/AsCustomerVehicleFeign.java @@ -0,0 +1,27 @@ +package com.yxt.crm.feign.as.ascustomervehicle; + +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +/** + * @description: 客户车辆信息 + * @author: fzz + * @date: 2024/3/7 + **/ +@FeignClient( + contextId = "yxt-as-AsCustomerVehicle", + name = "yxt-as", + path = "as/v1/ascustomervehicle", + fallback = AsCustomerVehicleFeignFallback.class +) +public interface AsCustomerVehicleFeign { + @ApiOperation("查询数据的列表") + @PostMapping("/listCustomerVeh") + public ResultBean> listCustomerVeh(); +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/feign/as/ascustomervehicle/AsCustomerVehicleFeignFallback.java b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/as/ascustomervehicle/AsCustomerVehicleFeignFallback.java new file mode 100644 index 0000000000..bde9f2b9c1 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/as/ascustomervehicle/AsCustomerVehicleFeignFallback.java @@ -0,0 +1,54 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.crm.feign.as.ascustomervehicle; + +import com.yxt.common.core.result.ResultBean; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * Project: anrui-fin(安瑞财务)
+ * File: FinManufacturerBankFeignFallback.java
+ * Class: com.yxt.anrui.fin.api.finmanufacturerbank.FinManufacturerBankFeignFallback
+ * Description: 公司开户账号表.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-03 15:00:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Component +public class AsCustomerVehicleFeignFallback implements AsCustomerVehicleFeign{ + + + @Override + public ResultBean> listCustomerVeh() { + return null; + } +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/feign/package-info.java b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/package-info.java new file mode 100644 index 0000000000..86b2f3cad1 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.crm.feign; \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/privilege/PrivilegeQuery.java b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/privilege/PrivilegeQuery.java new file mode 100644 index 0000000000..d6a8324ed7 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/privilege/PrivilegeQuery.java @@ -0,0 +1,22 @@ +package com.yxt.crm.feign.portal.privilege; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: 权限角色层级 + * @author: dimengzhe + * @date: 2023/5/23 + **/ +@Data +public class PrivilegeQuery { + + @ApiModelProperty("菜单路由") + private String menuUrl; + @ApiModelProperty("组织全路径sid") + private String orgPath; + @ApiModelProperty("菜单sid") + private String menuSid; + @ApiModelProperty("用户sid") + private String userSid; +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysorganization/SysOrganizationFeign.java b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysorganization/SysOrganizationFeign.java new file mode 100644 index 0000000000..4f6d1eaac2 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysorganization/SysOrganizationFeign.java @@ -0,0 +1,35 @@ +package com.yxt.crm.feign.portal.sysorganization; + +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * Project: anrui_portal(门户建设)
+ * File: SysOrganizationFeign.java
+ * Class: com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign
+ * Description: 组织机构表.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2021-08-03 00:24:28
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "组织机构表") +@FeignClient( + contextId = "anrui-portal-SysOrganization", + name = "anrui-portal", + path = "v1/sysorganization") +public interface SysOrganizationFeign { + + @ApiOperation("获取一条记录 根据sid") + @ResponseBody + @GetMapping("/fetchBySid/{sid}") + public ResultBean fetchBySid(@PathVariable("sid") String sid); +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysorganization/SysOrganizationVo.java b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysorganization/SysOrganizationVo.java new file mode 100644 index 0000000000..295811f65d --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysorganization/SysOrganizationVo.java @@ -0,0 +1,88 @@ +package com.yxt.crm.feign.portal.sysorganization; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * Project: anrui_portal(门户建设)
+ * File: SysOrganizationVo.java
+ * Class: com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo
+ * Description: 组织机构表 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2021-08-03 00:24:28
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@ApiModel(value = "组织机构表 视图数据对象", description = "组织机构表 视图数据对象") +@Data +public class SysOrganizationVo implements Vo { + @ApiModelProperty("部门/组织名称") + private String name; + + @ApiModelProperty("父(部门/组织) sid") + private String psid; + + @ApiModelProperty("联系电话") + private String linkPhone; + + @ApiModelProperty("联系人") + private String linkPerson; + + @ApiModelProperty("部门sid全路径") + private String orgSidPath; + + @ApiModelProperty("排序") + private Integer sort; + + @ApiModelProperty("地址") + private String addrs; + + @ApiModelProperty("地理位置经纬度") + private String jwd; + + @ApiModelProperty("二维码") + private String qrText; + + @ApiModelProperty("限制本部门成员查看通讯录:限制开启后,本部门成员只能看到限定范围内的通讯录不能看到所有通讯录,仅可见自己") + private Integer limitOrgMember; + + @ApiModelProperty("部门编码") + private String orgCode; + @ApiModelProperty("sid") + private String sid; + @ApiModelProperty("子集") + private List children = new ArrayList<>(); + @ApiModelProperty("主管人员名称") + private String zgNames; + @ApiModelProperty("分管人员名称") + private String fgNames; + @ApiModelProperty("主管人员sid") + private String zgStaffSid; + @ApiModelProperty("分管人员sid") + private String fgStaffSid; + @ApiModelProperty("组织简称") + private String orgAbbre; + @ApiModelProperty("是否是部门(0否,1是)") + private Integer isDept; + @ApiModelProperty("组织属性key") + private String orgAttributeKey; + @ApiModelProperty("组织属性value") + private String orgAttributeValue; + @ApiModelProperty("管理层级key") + private String orgLevelKey; + @ApiModelProperty("管理层级value") + private String orgLevelValue; + @ApiModelProperty("其他编码") + private String otherCode; + @ApiModelProperty("主管用户sid") + private String managerSid; +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysstafforg/SysStaffOrgFeign.java b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysstafforg/SysStaffOrgFeign.java new file mode 100644 index 0000000000..719a48186e --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysstafforg/SysStaffOrgFeign.java @@ -0,0 +1,25 @@ +package com.yxt.crm.feign.portal.sysstafforg; + +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * @description: 人员与机构 + * @author: dimengzhe + * @date: 2024/3/6 + **/ +@FeignClient( + contextId = "anrui-portal-SysStaffOrg", + name = "anrui-portal", + path = "v1/sysstafforg") +public interface SysStaffOrgFeign { + + @GetMapping("/getOrgSidByPath") + @ResponseBody + @ApiOperation("根据用户组织全路径获取用户的分公司sid") + ResultBean getOrgSidByPath(@RequestParam("orgPath") String orgPath); +} diff --git a/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysuser/SysUserFeign.java b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysuser/SysUserFeign.java new file mode 100644 index 0000000000..aab255e456 --- /dev/null +++ b/yxt-crm-biz/src/main/java/com/yxt/crm/feign/portal/sysuser/SysUserFeign.java @@ -0,0 +1,22 @@ +package com.yxt.crm.feign.portal.sysuser; + + +import com.yxt.common.core.result.ResultBean; +import com.yxt.crm.feign.portal.privilege.PrivilegeQuery; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +@Api(tags = "用户表") +@FeignClient( + contextId = "anrui-portal-SysUser", + name = "anrui-portal", + path = "v1/sysuser") +public interface SysUserFeign { + + @ApiOperation(value = "查询角色权限的层级获取权限id") + @PostMapping(value = "/selectPrivilegeLevel") + ResultBean selectPrivilegeLevel(@RequestBody PrivilegeQuery query); +} \ No newline at end of file diff --git a/yxt-crm-biz/src/main/resources/application-devv.yml b/yxt-crm-biz/src/main/resources/application-devv.yml new file mode 100644 index 0000000000..604acaf44c --- /dev/null +++ b/yxt-crm-biz/src/main/resources/application-devv.yml @@ -0,0 +1,30 @@ +spring: + datasource: + hikari: + max-lifetime: 500000 + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://39.104.100.138:3306/yxt_crm?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true + username: root + password: yxt_mysql_138 + cloud: + nacos: + discovery: + server-addr: 39.104.100.138:8848 + register-enabled: false + redis: + database: 3 # Redis数据库索引(默认为0) + host: 39.104.100.138 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\\anrui\\upload\\ + url: + prefix: http://192.168.1.106:8111/upload/ diff --git a/yxt-crm-biz/src/main/resources/application-pro.yml b/yxt-crm-biz/src/main/resources/application-pro.yml new file mode 100644 index 0000000000..99f21a03d6 --- /dev/null +++ b/yxt-crm-biz/src/main/resources/application-pro.yml @@ -0,0 +1,27 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://120.46.172.184:3306/yxt_crm?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: '@anrui18033887500' + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\anrui\upload\ + url: + prefix: http://120.46.172.184/api/upload/ diff --git a/yxt-crm-biz/src/main/resources/application-test.yml b/yxt-crm-biz/src/main/resources/application-test.yml new file mode 100644 index 0000000000..a669332ab7 --- /dev/null +++ b/yxt-crm-biz/src/main/resources/application-test.yml @@ -0,0 +1,31 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://172.18.0.4:3306/yxt_crm?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: yxt_mysql_138 + hikari: + minimum-idle: 3 + max-lifetime: 30000 + maximum-pool-size: 10 + cloud: + nacos: + discovery: + server-addr: 172.18.0.5:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 172.18.0.7 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: /home/lzh/docker_data/nginx/html/anrui-system-ui/upload/ + url: + prefix: http://anrui.yyundong.com/upload/ diff --git a/yxt-crm-biz/src/main/resources/application.yml b/yxt-crm-biz/src/main/resources/application.yml new file mode 100644 index 0000000000..486ba0834c --- /dev/null +++ b/yxt-crm-biz/src/main/resources/application.yml @@ -0,0 +1,50 @@ +spring: + application: + name: yxt-crm + profiles: + active: devv +# active: test +# active: pro + messages: + # 国际化资源文件路径 + basename: i18n/messages + servlet: + #上传文件 + multipart: + max-file-size: 50MB + max-request-size: 100MB + devtools: + restart: + # 热部署开关 + enabled: true + +server: + port: 7303 + max-http-header-size: 102400 + undertow: + max-http-post-size: -1 + +#mybatis +mybatis-plus: + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapper-locations: classpath*:**Mapper.xml + global-config: + refresh: true + db-config: + #定义生成ID的类型 + id-type: Auto + db-type: mysql + configuration: + map-underscore-to-camel-case: false + cache-enabled: true + call-setters-on-nulls: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +#rocketmq: +# producer: +# group: yxt-supervise-gf +# name-server: 127.0.0.1:9876 + + + + diff --git a/yxt-crm-biz/src/main/resources/logback-spring.xml b/yxt-crm-biz/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..1a756cd90a --- /dev/null +++ b/yxt-crm-biz/src/main/resources/logback-spring.xml @@ -0,0 +1,50 @@ + + + + + + + + + + %yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n) + + + + + + + + + + + + + + + ${log.base}.log + + ${log.base}.%d{yyyyMMdd}.%i.log.zip + + + + 1MB + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} + -%msg%n + + + + + + + + + + \ No newline at end of file diff --git a/yxt-crm-biz/src/test/java/com/yxt/crm/YxtCrm11ApplicationTests.java b/yxt-crm-biz/src/test/java/com/yxt/crm/YxtCrm11ApplicationTests.java new file mode 100644 index 0000000000..53dbc513a8 --- /dev/null +++ b/yxt-crm-biz/src/test/java/com/yxt/crm/YxtCrm11ApplicationTests.java @@ -0,0 +1,13 @@ +package com.yxt.crm; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class YxtCrm11ApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/yxt-fms-biz/README.md b/yxt-fms-biz/README.md new file mode 100644 index 0000000000..3b700c234f --- /dev/null +++ b/yxt-fms-biz/README.md @@ -0,0 +1,3 @@ +yxt-fms-biz + +财务管理后台程序及接口 \ No newline at end of file diff --git a/yxt-fms-biz/pom.xml b/yxt-fms-biz/pom.xml new file mode 100644 index 0000000000..4d806f64cd --- /dev/null +++ b/yxt-fms-biz/pom.xml @@ -0,0 +1,134 @@ + + + + + com.yxt + yxt-parent + 0.0.1 + + + 4.0.0 + + yxt-fms-biz + com.yxt.fms + 2.0.1 + + + + com.yxt + yxt-common-base + 0.0.1 + + + + org.springframework.boot + spring-boot-starter-web + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + + mysql + mysql-connector-java + runtime + + + + com.baomidou + mybatis-plus-boot-starter + + + com.baomidou + mybatis-plus-annotation + + + junit + junit + compile + + + + org.projectlombok + lombok + 1.18.26 + true + + + org.springframework.boot + spring-boot-starter-test + test + + + + + cn.dev33 + sa-token-spring-boot-starter + 1.37.0 + + + cn.hutool + hutool-all + 5.8.23 + + + cn.hutool + hutool-core + 5.8.23 + + + com.google.zxing + core + 3.5.2 + + + com.alibaba + easyexcel + 3.3.2 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.5.6 + + + + repackage + + + + + + + + src/main/java + + **/*Mapper.xml + + + + src/main/resources + + **/*.* + + false + + + + + diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/YxtFmsBizApplication.java b/yxt-fms-biz/src/main/java/com/yxt/fms/YxtFmsBizApplication.java new file mode 100644 index 0000000000..9257664341 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/YxtFmsBizApplication.java @@ -0,0 +1,22 @@ +package com.yxt.fms; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableScheduling; + +@SpringBootApplication(scanBasePackages = { + "com.yxt.fms.config", + "com.yxt.common.base.config", + "com.yxt.fms" +}) +// 启用自带定时任务 +@EnableScheduling +@EnableFeignClients(basePackages = {}) +public class YxtFmsBizApplication { + + public static void main(String[] args) { + SpringApplication.run(YxtFmsBizApplication.class, args); + } + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/apiadmin/AdminHomeRest.java b/yxt-fms-biz/src/main/java/com/yxt/fms/apiadmin/AdminHomeRest.java new file mode 100644 index 0000000000..db394425c9 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/apiadmin/AdminHomeRest.java @@ -0,0 +1,10 @@ +package com.yxt.fms.apiadmin; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController("com.yxt.fms.apiadmin.AdminHomeRest") +@RequestMapping("/apiadmin/home") +public class AdminHomeRest { + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/apiadmin/FmsPaysettleRest.java b/yxt-fms-biz/src/main/java/com/yxt/fms/apiadmin/FmsPaysettleRest.java new file mode 100644 index 0000000000..53f3346a1c --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/apiadmin/FmsPaysettleRest.java @@ -0,0 +1,109 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.fms.biz.fmspaysettle.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettleFeignFallback.java
+ * Class: biz.biz.fmspaysettle.FmsPaysettleRest
+ * Description: 付款结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "付款结算") +@RestController +@RequestMapping("/apiadmin/v1/fmspaysettle") +public class FmsPaysettleRest { + + @Autowired + private FmsPaysettleService fmsPaysettleService; + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = fmsPaysettleService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody FmsPaysettleDto dto){ + ResultBean rb = ResultBean.fireFail(); + fmsPaysettleService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + fmsPaysettleService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + FmsPaysettleDetailsVo vo = fmsPaysettleService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("采购入库结算") + @PostMapping("/cgrkPay") + public ResultBean cgrkPay(@RequestBody FmsPaysettleCGRKDto dto){ + ResultBean rb = ResultBean.fireFail(); + fmsPaysettleService.cgrkPay(dto); + return rb.success(); + } + + @ApiOperation("根据来源SID获取一条记录") + @GetMapping("/fetchBySourceSid/{sourceBillSid}") + public ResultBean fetchBySourceSid(@PathVariable("sourceBillSid") String sourceBillSid){ + ResultBean rb = ResultBean.fireFail(); + FmsPaysettle paysettle = fmsPaysettleService.fetchBySourceSid(sourceBillSid); + return rb.success().setData(paysettle); + } +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/apiadmin/FmsReceivesettleRest.java b/yxt-fms-biz/src/main/java/com/yxt/fms/apiadmin/FmsReceivesettleRest.java new file mode 100644 index 0000000000..381f852e07 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/apiadmin/FmsReceivesettleRest.java @@ -0,0 +1,121 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.fms.biz.fmspaysettle.FmsPaysettleCGRKDto; +import com.yxt.fms.biz.fmspaysettle.FmsPaysettleCGTKDto; +import com.yxt.fms.biz.fmsreceivesettle.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsReceivesettleFeignFallback.java
+ * Class: biz.biz.fmsreceivesettle.FmsReceivesettleRest
+ * Description: 收款结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "收款结算") +@RestController +@RequestMapping("/apiadmin/v1/fmsreceivesettle") +public class FmsReceivesettleRest { + + @Autowired + private FmsReceivesettleService fmsReceivesettleService; + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = fmsReceivesettleService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody FmsReceivesettleDto dto){ + ResultBean rb = ResultBean.fireFail(); + fmsReceivesettleService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("逻辑删除") + @PostMapping("/updateIsDelete") + public ResultBean updateIsDelete(@RequestParam("sourceSid") String sourceSid){ + ResultBean rb = ResultBean.fireFail(); + fmsReceivesettleService.updateIsDelete(sourceSid); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + fmsReceivesettleService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + FmsReceivesettleDetailsVo vo = fmsReceivesettleService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("采购退库结算") + @PostMapping("/cgtkPay") + public ResultBean cgtkPay(@RequestBody FmsPaysettleCGTKDto dto){ + ResultBean rb = ResultBean.fireFail(); + fmsReceivesettleService.cgtkPay(dto); + return rb.success(); + } + + @ApiOperation("根据来源SID获取一条记录") + @GetMapping("/fetchBySourceSid/{sourceBillSid}") + public ResultBean fetchBySourceSid(@PathVariable("sourceBillSid") String sourceBillSid){ + ResultBean rb = ResultBean.fireFail(); + FmsReceivesettle receivesettle = fmsReceivesettleService.fetchBySourceSid(sourceBillSid); + return rb.success().setData(receivesettle); + } +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettle.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettle.java new file mode 100644 index 0000000000..65a6103540 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettle.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmspaysettle; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettle.java
+ * Class: biz.api.fmspaysettle.FmsPaysettle
+ * Description: 付款结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "付款结算", description = "付款结算") +@TableName("fms_paysettle") +public class FmsPaysettle extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售退货、采购入库)") + private String busTypeValue; // 业务类型value(销售退货、采购入库) + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算方式") + private String otherSettleValue; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleAmount; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleCGRKDto.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleCGRKDto.java new file mode 100644 index 0000000000..7aaf60f168 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleCGRKDto.java @@ -0,0 +1,93 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmspaysettle; + + +import com.yxt.common.core.dto.Dto; +import com.yxt.fms.feign.pms.pmspurchasebill.PmsPurchaseBillDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettleDto.java
+ * Class: biz.api.fmspaysettle.FmsPaysettleDto
+ * Description: 付款结算 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "付款结算 数据传输对象", description = "付款结算 数据传输对象") +public class FmsPaysettleCGRKDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("采购单") + private PmsPurchaseBillDto pmsPurchaseBill; + @ApiModelProperty("创建者") + private String createBySid; + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售退货、采购入库)") + private String busTypeValue; // 业务类型value(销售退货、采购入库) + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private String payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private String prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private String settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private String debts; // 欠款金额 + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 + +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleCGTKDto.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleCGTKDto.java new file mode 100644 index 0000000000..71ec9d5245 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleCGTKDto.java @@ -0,0 +1,94 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmspaysettle; + + +import com.yxt.common.core.dto.Dto; +import com.yxt.fms.feign.pms.pmspurchasebackbill.PmsPurchasebackBillDto; +import com.yxt.fms.feign.pms.pmspurchasebill.PmsPurchaseBillDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettleDto.java
+ * Class: biz.api.fmspaysettle.FmsPaysettleDto
+ * Description: 付款结算 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "付款结算 数据传输对象", description = "付款结算 数据传输对象") +public class FmsPaysettleCGTKDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("采购退货单") + private PmsPurchasebackBillDto pmsPurchasebackBillDto; + @ApiModelProperty("创建者") + private String createBySid; + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售退货、采购入库)") + private String busTypeValue; // 业务类型value(销售退货、采购入库) + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private String payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private String prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private String settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private String debts; // 欠款金额 + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 + +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleDetailsVo.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleDetailsVo.java new file mode 100644 index 0000000000..810075fc5d --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleDetailsVo.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmspaysettle; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettleVo.java
+ * Class: biz.api.fmspaysettle.FmsPaysettleVo
+ * Description: 付款结算 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "付款结算 视图数据详情", description = "付款结算 视图数据详情") +public class FmsPaysettleDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售退货、采购入库)") + private String busTypeValue; // 业务类型value(销售退货、采购入库) + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算方式") + private String otherSettleValue; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleAmount; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleDto.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleDto.java new file mode 100644 index 0000000000..2fccf07bf0 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleDto.java @@ -0,0 +1,96 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmspaysettle; + + +import com.yxt.common.core.dto.Dto; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettleDto.java
+ * Class: biz.api.fmspaysettle.FmsPaysettleDto
+ * Description: 付款结算 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "付款结算 数据传输对象", description = "付款结算 数据传输对象") +public class FmsPaysettleDto implements Dto { + + private String sid; // sid + @ApiModelProperty("创建者") + private String createBySid; + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售退货、采购入库)") + private String busTypeValue; // 业务类型value(销售退货、采购入库) + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private String payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private String prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private String settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算方式") + private String otherSettleValue; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleAmount; // 其他结算金额 + @ApiModelProperty("欠款金额") + private String debts; // 欠款金额 + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleMapper.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleMapper.java new file mode 100644 index 0000000000..1c2dc1eabe --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleMapper.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmspaysettle; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettleMapper.java
+ * Class: biz.biz.fmspaysettle.FmsPaysettleMapper
+ * Description: 付款结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface FmsPaysettleMapper extends BaseMapper { + + //@Update("update fms_paysettle set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from fms_paysettle") + List selectListVo(); + + @Select("select * from fms_paysettle where sourceBillSid =#{sourceBillSid}") + FmsPaysettle fetchBySourceSid(@Param("sourceBillSid") String sourceBillSid); +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleMapper.xml b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleMapper.xml new file mode 100644 index 0000000000..3781ef4ecf --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleQuery.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleQuery.java new file mode 100644 index 0000000000..802e85a2d6 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleQuery.java @@ -0,0 +1,93 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmspaysettle; + + +import com.yxt.common.core.query.Query; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettleQuery.java
+ * Class: biz.api.fmspaysettle.FmsPaysettleQuery
+ * Description: 付款结算 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "付款结算 查询条件", description = "付款结算 查询条件") +public class FmsPaysettleQuery implements Query { + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售退货、采购入库)") + private String busTypeValue; // 业务类型value(销售退货、采购入库) + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleService.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleService.java new file mode 100644 index 0000000000..4a1b70740b --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleService.java @@ -0,0 +1,120 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmspaysettle; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.fms.feign.pms.pmspurchasebill.PmsPurchaseBillDto; +import com.yxt.fms.feign.pms.pmspurchasebill.PmsPurchaseBillFeign; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettleService.java
+ * Class: biz.biz.fmspaysettle.FmsPaysettleService
+ * Description: 付款结算 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class FmsPaysettleService extends MybatisBaseService { + + @Resource + private PmsPurchaseBillFeign pmsPurchaseBillFeign; + + public PagerVo listPageVo(PagerQuery pq) { + FmsPaysettleQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(FmsPaysettleDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(FmsPaysettleDto dto){ + FmsPaysettle entity = new FmsPaysettle(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(FmsPaysettleDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + FmsPaysettle entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public FmsPaysettleDetailsVo fetchDetailsVoBySid(String sid){ + FmsPaysettle entity = fetchBySid(sid); + FmsPaysettleDetailsVo vo = new FmsPaysettleDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void cgrkPay(FmsPaysettleCGRKDto dto) { + PmsPurchaseBillDto pmsPurchaseBillDto = dto.getPmsPurchaseBill(); + String sid = pmsPurchaseBillFeign.save(pmsPurchaseBillDto).getData(); + FmsPaysettleDto fmsPaysettleDto = new FmsPaysettleDto(); + BeanUtil.copyProperties(dto,fmsPaysettleDto); + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + fmsPaysettleDto.setSourceBillSid(sid); + this.insertByDto(fmsPaysettleDto); + return; + } + this.updateByDto(fmsPaysettleDto); + } + + public FmsPaysettle fetchBySourceSid(String sourceBillSid) { + return baseMapper.fetchBySourceSid(sourceBillSid); + } +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleVo.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleVo.java new file mode 100644 index 0000000000..6dcc6730e2 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmspaysettle/FmsPaysettleVo.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmspaysettle; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettleVo.java
+ * Class: biz.api.fmspaysettle.FmsPaysettleVo
+ * Description: 付款结算 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "付款结算 视图数据对象", description = "付款结算 视图数据对象") +public class FmsPaysettleVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售退货、采购入库)") + private String busTypeValue; // 业务类型value(销售退货、采购入库) + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettle.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettle.java new file mode 100644 index 0000000000..938c29b47b --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettle.java @@ -0,0 +1,93 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmsreceivesettle; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsReceivesettle.java
+ * Class: biz.api.fmsreceivesettle.FmsReceivesettle
+ * Description: 收款结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "收款结算", description = "收款结算") +@TableName("fms_receivesettle") +public class FmsReceivesettle extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单号") + private String sourceBillNo; // 来源单号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售出库、采购退货)") + private String busTypeValue; // 业务类型value(销售出库、采购退货) + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 + @ApiModelProperty("应收金额") + private BigDecimal receivableAmount; // 应收金额 + @ApiModelProperty("订金抵扣") + private BigDecimal depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("其他结算金额") + private String otherSettleAmount; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleDetailsVo.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleDetailsVo.java new file mode 100644 index 0000000000..722831d060 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleDetailsVo.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmsreceivesettle; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsReceivesettleVo.java
+ * Class: biz.api.fmsreceivesettle.FmsReceivesettleVo
+ * Description: 收款结算 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "收款结算 视图数据详情", description = "收款结算 视图数据详情") +public class FmsReceivesettleDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单号") + private String sourceBillNo; // 来源单号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售出库、采购退货)") + private String busTypeValue; // 业务类型value(销售出库、采购退货) + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 + @ApiModelProperty("应收金额") + private BigDecimal receivableAmount; // 应收金额 + @ApiModelProperty("订金抵扣") + private BigDecimal depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算方式") + private String otherSettleValue; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleAmount; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleDto.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleDto.java new file mode 100644 index 0000000000..707b4b9d63 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleDto.java @@ -0,0 +1,94 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmsreceivesettle; + + +import com.yxt.common.core.dto.Dto; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsReceivesettleDto.java
+ * Class: biz.api.fmsreceivesettle.FmsReceivesettleDto
+ * Description: 收款结算 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "收款结算 数据传输对象", description = "收款结算 数据传输对象") +public class FmsReceivesettleDto implements Dto { + + private String sid; // sid + @ApiModelProperty("创建者") + private String createBySid; + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单号") + private String sourceBillNo; // 来源单号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售出库、采购退货)") + private String busTypeValue; // 业务类型value(销售出库、采购退货) + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 + @ApiModelProperty("应收金额") + private String receivableAmount; // 应收金额 + @ApiModelProperty("订金抵扣") + private String depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private String settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算方式") + private String otherSettleValue; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleAmount; // 其他结算金额 + @ApiModelProperty("欠款金额") + private String debts; // 欠款金额 + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleMapper.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleMapper.java new file mode 100644 index 0000000000..c5e8efc21c --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleMapper.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmsreceivesettle; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsReceivesettleMapper.java
+ * Class: biz.biz.fmsreceivesettle.FmsReceivesettleMapper
+ * Description: 收款结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface FmsReceivesettleMapper extends BaseMapper { + + //@Update("update fms_receivesettle set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from fms_receivesettle") + List selectListVo(); + + @Select("select * from fms_receivesettle where sourceBillSid =#{sourceBillSid} and isDelete = 0") + FmsReceivesettle fetchBySourceSid(@Param("sourceBillSid") String sourceBillSid); +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleMapper.xml b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleMapper.xml new file mode 100644 index 0000000000..a5098eeafb --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleQuery.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleQuery.java new file mode 100644 index 0000000000..ac50136290 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleQuery.java @@ -0,0 +1,91 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmsreceivesettle; + + +import com.yxt.common.core.query.Query; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsReceivesettleQuery.java
+ * Class: biz.api.fmsreceivesettle.FmsReceivesettleQuery
+ * Description: 收款结算 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "收款结算 查询条件", description = "收款结算 查询条件") +public class FmsReceivesettleQuery implements Query { + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单号") + private String sourceBillNo; // 来源单号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售出库、采购退货)") + private String busTypeValue; // 业务类型value(销售出库、采购退货) + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 + @ApiModelProperty("应收金额") + private BigDecimal receivableAmount; // 应收金额 + @ApiModelProperty("订金抵扣") + private BigDecimal depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleService.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleService.java new file mode 100644 index 0000000000..b986f94ba0 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleService.java @@ -0,0 +1,133 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmsreceivesettle; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.fms.biz.fmspaysettle.FmsPaysettleCGTKDto; +import com.yxt.fms.biz.fmspaysettle.FmsPaysettleDto; +import com.yxt.fms.feign.pms.pmspurchasebackbill.PmsPurchaseBackBillFeign; +import com.yxt.fms.feign.pms.pmspurchasebackbill.PmsPurchasebackBillDto; +import com.yxt.fms.feign.pms.pmspurchasebill.PmsPurchaseBillDto; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsReceivesettleService.java
+ * Class: biz.biz.fmsreceivesettle.FmsReceivesettleService
+ * Description: 收款结算 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class FmsReceivesettleService extends MybatisBaseService { + + @Resource + private PmsPurchaseBackBillFeign pmsPurchaseBackBillFeign; + + public PagerVo listPageVo(PagerQuery pq) { + FmsReceivesettleQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(FmsReceivesettleDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(FmsReceivesettleDto dto) { + FmsReceivesettle entity = new FmsReceivesettle(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(FmsReceivesettleDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + FmsReceivesettle entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public FmsReceivesettleDetailsVo fetchDetailsVoBySid(String sid) { + FmsReceivesettle entity = fetchBySid(sid); + FmsReceivesettleDetailsVo vo = new FmsReceivesettleDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public FmsReceivesettle fetchBySourceSid(String sourceBillSid) { + return baseMapper.fetchBySourceSid(sourceBillSid); + } + + public void cgtkPay(FmsPaysettleCGTKDto dto) { + PmsPurchasebackBillDto pmsPurchasebackBillDto = dto.getPmsPurchasebackBillDto(); + String sid = pmsPurchaseBackBillFeign.save(pmsPurchasebackBillDto).getData(); + FmsReceivesettleDto fmsReceivesettleDto = new FmsReceivesettleDto(); + BeanUtil.copyProperties(dto, fmsReceivesettleDto); + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + fmsReceivesettleDto.setSourceBillSid(sid); + this.insertByDto(fmsReceivesettleDto); + return; + } + this.updateByDto(fmsReceivesettleDto); + } + + public void updateIsDelete(String sourceSid) { + FmsReceivesettle receivesettle = baseMapper.fetchBySourceSid(sourceSid); + if (null != receivesettle) { + receivesettle.setIsDelete(1); + baseMapper.updateById(receivesettle); + } + } +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleVo.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleVo.java new file mode 100644 index 0000000000..98325b79b7 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/fmsreceivesettle/FmsReceivesettleVo.java @@ -0,0 +1,93 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.biz.fmsreceivesettle; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsReceivesettleVo.java
+ * Class: biz.api.fmsreceivesettle.FmsReceivesettleVo
+ * Description: 收款结算 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "收款结算 视图数据对象", description = "收款结算 视图数据对象") +public class FmsReceivesettleVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单号") + private String sourceBillNo; // 来源单号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售出库、采购退货)") + private String busTypeValue; // 业务类型value(销售出库、采购退货) + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 + @ApiModelProperty("应收金额") + private BigDecimal receivableAmount; // 应收金额 + @ApiModelProperty("订金抵扣") + private BigDecimal depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/biz/package-info.java b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/package-info.java new file mode 100644 index 0000000000..4dd9c57576 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/biz/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通 仓库管理 项目后台逻辑和接口 + */ +package com.yxt.fms.biz; \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/config/SaTokenConfigure.java b/yxt-fms-biz/src/main/java/com/yxt/fms/config/SaTokenConfigure.java new file mode 100644 index 0000000000..6a1a45fc8e --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/config/SaTokenConfigure.java @@ -0,0 +1,114 @@ +package com.yxt.fms.config;//package com.yxt.wms.config; +// +//import cn.dev33.satoken.interceptor.SaInterceptor; +//import cn.dev33.satoken.stp.StpUtil; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +// +///** +// * @author wangpengfei +// * @date 2023/5/16 14:43 +// */ +//@Configuration +//public class SaTokenConfigure implements WebMvcConfigurer { +// @Value("${image.url.prefix:http://127.0.0.1:8080/upload/}") +// private String urlPrefix; +// // 注册 Sa-Token 拦截器 +// @Override +// public void addInterceptors(InterceptorRegistry registry) { +// // 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。 +// +// registry.addInterceptor(new SaInterceptor(handler -> StpUtil.checkLogin())) +// .addPathPatterns("/**") +// .excludePathPatterns("/sysuser/doLogin") +// .excludePathPatterns("/lpkgiftcard/gifCardByCustomerSid") +// .excludePathPatterns("/empcardgift/gifCardByCustomerSid") +// .excludePathPatterns("/empcard/getEmpCardByCustomerSid") +// .excludePathPatterns("/lpkgiftcard/getGifCardBySid/**") +// .excludePathPatterns("/empcardgift/getGifCardBySid/**") +// .excludePathPatterns("/empcard/getEmpCardBySid/**") +// .excludePathPatterns("/lpkgiftcard/isSaturAndSun/**") +// .excludePathPatterns("/empcardgift/isSaturAndSun/**") +// .excludePathPatterns("/empcard/isSaturAndSun/**") +// .excludePathPatterns("/lpkgiftcard/getReservationBySid/**") +// .excludePathPatterns("/lpksreservoorder/submission") +// .excludePathPatterns("/lpksreservoorder/exportExcelByStore") +// .excludePathPatterns("/empsreservoorder/createNewUserBagOrder") +// .excludePathPatterns("/lpksreservoorders/submission") +// .excludePathPatterns("/empsreservoorder/ordersList") +// .excludePathPatterns("/empsreservoorder/submission") +// .excludePathPatterns("/empsreservoorder/submissionEmp") +// .excludePathPatterns("/empcardgift/generateCard") +// .excludePathPatterns("/lpkgiftcard/bindCard") +// .excludePathPatterns("/empcard/bindCard") +// .excludePathPatterns("/lpksreservoorder/orderByCardSid/**") +// .excludePathPatterns("/lpksreservoorder/orderListByUserSid/**") +// .excludePathPatterns("/lpksreservoorder/orderDetails/**") +// .excludePathPatterns("/newcomerrecorecord/recommendNewUsers") +// .excludePathPatterns("/newcomerrecorecord/recommendedAssistance") +// .excludePathPatterns("/newcomerrecorecord/recordList/**") +// .excludePathPatterns("/transferrecords/transferRecordsList") +// .excludePathPatterns("/empsreservoorder/createVegeOrder") +// .excludePathPatterns("/empsreservoorder/OrderDetails/**") +// .excludePathPatterns("/empsreservoorder/changePayState/**") +// .excludePathPatterns("/lpkgoods/goodsDetails/**") +// .excludePathPatterns("/lpkstore/getAllStoreByQuery") +// .excludePathPatterns("/vegetablecellar/receiveTransferGoods") +// .excludePathPatterns("/transferrecords/submission") +// .excludePathPatterns("/lpkgiftcard/getCardByBank") +// .excludePathPatterns("/empcard/getEmpCard") +// .excludePathPatterns("/empcardgift/shareEmpCard/**") +// .excludePathPatterns("/empcardgift/generateEmpCardGift") +// .excludePathPatterns("/empcardgift/generateEmpCard") +// .excludePathPatterns("/lpkcustomer/wxSilentLogin") +// .excludePathPatterns("/lpkgiftcard/gifCardsByCustomerSid") +// .excludePathPatterns("/lpkgoods/getAllGiftBag") +// .excludePathPatterns("/appletgiftbag/getGiftBagBySid/**") +// .excludePathPatterns("/appletgiftbag/appletGiftBagList") +// .excludePathPatterns("/lpkgiftcard/cardShareDetail/**") +// .excludePathPatterns("/lpkgiftcard/cardShareGoodsDetail/**") +// .excludePathPatterns("/empcardgift/generateTopEmpCard/**") +// .excludePathPatterns("/empsreservoorder/createOrder") +// .excludePathPatterns("/appletgiftbag/recommendRecord/**") +// //2024-01-17 +// .excludePathPatterns("/lpkgiftcard/getAllGoodsType/**") +// .excludePathPatterns("/appletnotice/getNotice") +// .excludePathPatterns("/empsreservoorder/getPreOrder") +// .excludePathPatterns("/lpkgoods/getAllGoodsType/**") +// .excludePathPatterns("/transferrecords/submission") +// .excludePathPatterns("/vegetablecellar/receiveTransferGoods") +// .excludePathPatterns("/customerstore/isSaturAndSun") +// .excludePathPatterns("/lpkgiftcard/getGoodsByType/**") +// .excludePathPatterns("/lpkgoods/getGoodsTypeAndBrand") +// .excludePathPatterns("/lpkgoods/getGoodsByType") +// .excludePathPatterns("/lpksreservoorders/orderListByUserSid") +// .excludePathPatterns("/appletgiftbag/newUserQuota") +// .excludePathPatterns("/shoppingcart/addShoppingCart") +// .excludePathPatterns("/shoppingcart/getGoodsWeight") +// .excludePathPatterns("/shoppingcart/shoppingCartList") +// .excludePathPatterns("/shoppingcart/delShoppingCart/**") +// .excludePathPatterns("/lpkgoods/vegeCellarTypeList") +// .excludePathPatterns("/vegetablecellar/addGoods/**") +// .excludePathPatterns("/lpkgoods/vegeCellarList") +// .excludePathPatterns("/customerstore/getStoreBySid/**") +// .excludePathPatterns("/lpkgiftcard/bindAllCard") +// .excludePathPatterns("/lpkcustomer/customerInfo/**") +// .excludePathPatterns("/vegetablecellar/saveGoods") +// .excludePathPatterns("/transferrecords/getTransferByCode/**") +// //2024-01-18 +// .excludePathPatterns("/lpkcustomer/getCustomerInfo/**") +// .excludePathPatterns("/lpkcustomer/modifyUserNickName") +// .excludePathPatterns("/lpkcustomer/modifyHeadImage") +// .excludePathPatterns("/upload/**") +// .excludePathPatterns("/lpkcustomer/getPhoneNumber") +// .excludePathPatterns("/lpkcustomer/getRealInfo/**") +// .excludePathPatterns("/lpkcustomer/saveRealInfo") +// .excludePathPatterns("/pms/PmsBrand/getList") +// .excludePathPatterns("/LpkCustomerBank/getBankList") +// .excludePathPatterns("/lpkcustomer/updateCustomerBank") +// .excludePathPatterns("//wxapi/**") +// ; +// } +//} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/config/SaTokenGloableException.java b/yxt-fms-biz/src/main/java/com/yxt/fms/config/SaTokenGloableException.java new file mode 100644 index 0000000000..48df786187 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/config/SaTokenGloableException.java @@ -0,0 +1,67 @@ +package com.yxt.fms.config; + +import com.yxt.common.base.config.handler.GlobalExceptionHandler; +import com.yxt.common.core.result.ResultBean; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.validation.BindException; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.NoHandlerFoundException; + +/** + * @author dimengzhe + * @date 2020/9/12 3:23 + * @description 全局异常处理 + */ +@RestControllerAdvice +public class SaTokenGloableException extends GlobalExceptionHandler { + + private static final Logger L = LoggerFactory.getLogger(GlobalExceptionHandler.class); + + public SaTokenGloableException() { + } + @ExceptionHandler({Exception.class}) + public ResultBean handleException(Exception e) { + if(null !=e.getMessage()){ + if(e.getMessage().contains("token 无效:")){ + L.error(e.getMessage(), e); + return ResultBean.fireFail().setCode("5000").setMsg("系统异常::" + e.getMessage()); + } + if(e.getMessage().contains("未能读取到有效 token")){ +// L.error(e.getMessage(), e); + return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); + } + } + + L.error(e.getMessage(), e); + return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); + } + @ExceptionHandler({NoHandlerFoundException.class}) + public ResultBean handlerNoFoundException(Exception e) { + L.error(e.getMessage(), e); + return ResultBean.fireFail().setCode("404").setMsg("路径不存在,请检查路径是否正确"); + } + +// @ExceptionHandler({Exception.class}) +// public ResultBean handleException(Exception e) { +// L.error(e.getMessage(), e); +// return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); +// } + + @ExceptionHandler({BindException.class}) + public ResultBean validatedBindException(BindException e) { + L.error(e.getMessage(), e); + String message = ((ObjectError)e.getAllErrors().get(0)).getDefaultMessage(); + return ResultBean.fireFail().setCode("405").setMsg(message); + } + + @ExceptionHandler({MethodArgumentNotValidException.class}) + public ResultBean validExceptionHandler(MethodArgumentNotValidException e) { + L.error(e.getMessage(), e); + String message = e.getBindingResult().getFieldError().getDefaultMessage(); + return ResultBean.fireFail().setCode("405").setMsg(message); + } +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/config/package-info.java b/yxt-fms-biz/src/main/java/com/yxt/fms/config/package-info.java new file mode 100644 index 0000000000..d035582e41 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/config/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.fms.config; \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/package-info.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/package-info.java new file mode 100644 index 0000000000..0111e6c42c --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.fms.feign; \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchaseBackBillFeign.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchaseBackBillFeign.java new file mode 100644 index 0000000000..b089f65a76 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchaseBackBillFeign.java @@ -0,0 +1,25 @@ +package com.yxt.fms.feign.pms.pmspurchasebackbill; + +import com.yxt.common.core.result.ResultBean; +import com.yxt.fms.feign.pms.pmspurchasebill.PmsPurchaseBillDto; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/20 + **/ +@FeignClient( + contextId = "yxt-pms-PmsPurchaseBackBill", + name = "yxt-pms", + path = "/apiadmin/pms/pmspurchasebackbill", + fallback = PmsPurchaseBackBillFeignFallback.class) +public interface PmsPurchaseBackBillFeign { + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsPurchasebackBillDto dto); +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchaseBackBillFeignFallback.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchaseBackBillFeignFallback.java new file mode 100644 index 0000000000..f0c31bb719 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchaseBackBillFeignFallback.java @@ -0,0 +1,19 @@ +package com.yxt.fms.feign.pms.pmspurchasebackbill; + +import com.yxt.common.core.result.ResultBean; +import com.yxt.fms.feign.pms.pmspurchasebill.PmsPurchaseBillDto; +import org.springframework.stereotype.Component; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/20 + **/ +@Component +public class PmsPurchaseBackBillFeignFallback implements PmsPurchaseBackBillFeign { + + @Override + public ResultBean save(PmsPurchasebackBillDto dto) { + return null; + } +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackBillDetailsVo.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackBillDetailsVo.java new file mode 100644 index 0000000000..d63b2275f9 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackBillDetailsVo.java @@ -0,0 +1,84 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.feign.pms.pmspurchasebackbill; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillVo.java
+ * Class: com.yxt.pms.api.pmspurchasebackbill.PmsPurchasebackBillVo
+ * Description: 采购退货单据 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据 视图数据详情", description = "采购退货单据 视图数据详情") +public class PmsPurchasebackBillDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("来源单sid(采购单sid)") + private String sourceBillSid; // 来源单sid(采购单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("退误差调整金额") + private BigDecimal backErrorAmount; // 退误差调整金额 + @ApiModelProperty("退优惠金额") + private BigDecimal backDiscountAmount; // 退优惠金额 + @ApiModelProperty("抵扣欠款") + private BigDecimal deductDebts; // 抵扣欠款 + @ApiModelProperty("抵扣单号") + private String deductBillNo; // 抵扣单号 + @ApiModelProperty("转入预付款") + private BigDecimal toPrepayment; // 转入预付款 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("采购退货单明细") + private List pmsPurchasebackDetailList; +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackBillDto.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackBillDto.java new file mode 100644 index 0000000000..656205545e --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackBillDto.java @@ -0,0 +1,85 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.feign.pms.pmspurchasebackbill; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillDto.java
+ * Class: com.yxt.pms.api.pmspurchasebackbill.PmsPurchasebackBillDto
+ * Description: 采购退货单据 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据 数据传输对象", description = "采购退货单据 数据传输对象") +public class PmsPurchasebackBillDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("来源单sid(采购单sid)") + private String sourceBillSid; // 来源单sid(采购单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("退误差调整金额") + private BigDecimal backErrorAmount; // 退误差调整金额 + @ApiModelProperty("退优惠金额") + private BigDecimal backDiscountAmount; // 退优惠金额 + @ApiModelProperty("抵扣欠款") + private BigDecimal deductDebts; // 抵扣欠款 + @ApiModelProperty("抵扣单号") + private String deductBillNo; // 抵扣单号 + @ApiModelProperty("转入预付款") + private BigDecimal toPrepayment; // 转入预付款 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("采购退货单明细") + private List pmsPurchasebackDetailList; + +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackDetailDetailsVo.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackDetailDetailsVo.java new file mode 100644 index 0000000000..7685dc1058 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackDetailDetailsVo.java @@ -0,0 +1,100 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.feign.pms.pmspurchasebackbill; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetailVo.java
+ * Class: com.yxt.pms.api.pmspurchasebackdetail.PmsPurchasebackDetailVo
+ * Description: 采购退货单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据明细 视图数据详情", description = "采购退货单据明细 视图数据详情") +public class PmsPurchasebackDetailDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodsSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String areaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String rackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackDetailDto.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackDetailDto.java new file mode 100644 index 0000000000..fefb26ca5b --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebackbill/PmsPurchasebackDetailDto.java @@ -0,0 +1,100 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.feign.pms.pmspurchasebackbill; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetailDto.java
+ * Class: com.yxt.pms.api.pmspurchasebackdetail.PmsPurchasebackDetailDto
+ * Description: 采购退货单据明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据明细 数据传输对象", description = "采购退货单据明细 数据传输对象") +public class PmsPurchasebackDetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodsSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String areaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String rackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillDetailDto.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillDetailDto.java new file mode 100644 index 0000000000..eefd58ebd3 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillDetailDto.java @@ -0,0 +1,98 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.feign.pms.pmspurchasebill; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailDto.java
+ * Class: com.yxt.pms.api.pmspurchasebilldetail.PmsPurchaseBillDetailDto
+ * Description: 采购单据明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单据明细 数据传输对象", description = "采购单据明细 数据传输对象") +public class PmsPurchaseBillDetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("采购前库存数量") + private BigDecimal currentCount; // 采购前库存数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String warehouseAreaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String warehouseRackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("单位成本(进货价)") + private BigDecimal cost; // 单位成本(进货价) + @ApiModelProperty("采购数量") + private BigDecimal count; // 采购数量 + @ApiModelProperty("税额") + private BigDecimal taxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal taxPrice; // 含税价 + @ApiModelProperty("采购金额") + private BigDecimal amount; // 采购金额 + @ApiModelProperty("销售单价") + private BigDecimal salesPrice; // 销售单价 + @ApiModelProperty("最低零售价") + private BigDecimal minimumSalesPrice; // 最低零售价 + +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillDto.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillDto.java new file mode 100644 index 0000000000..8ee34d0a24 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillDto.java @@ -0,0 +1,108 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.feign.pms.pmspurchasebill; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDto.java
+ * Class: com.yxt.pms.api.pmspurchasebill.PmsPurchaseBillDto
+ * Description: 采购单 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单 数据传输对象", description = "采购单 数据传输对象") +public class PmsPurchaseBillDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("来源单sid(工单sid)") + private String sourceBillSid; // 来源单sid(工单sid) + @ApiModelProperty("来源单编号/外部编号") + private String sourceBillNo; // 来源单编号/外部编号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("采购类型Key") + private String purchaseTypeKey; // 采购类型Key + @ApiModelProperty("采购类型Value(厂家采购、外采、其他)") + private String purchaseTypeValue; // 采购类型Value(厂家采购、外采、其他) + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商联系电话") + private String supplierPhone; // 供应商联系电话 + @ApiModelProperty("票据类型key") + private String billTypeKey; // 票据类型key + @ApiModelProperty("票据类型value(不含税、增值税、普通税、已含增值税)") + private String billTypeValue; // 票据类型value(不含税、增值税、普通税、已含增值税) + @ApiModelProperty("是否需要开发票(是1,否0)") + private Integer isInvoicing; // 是否需要开发票(是1,否0) + @ApiModelProperty("发票号码") + private String invoiceCode; // 发票号码 + @ApiModelProperty("采购员sid(单选)") + private String purchaserSid; // 采购员sid(单选) + @ApiModelProperty("采购员姓名") + private String purchaserName; // 采购员姓名 + @ApiModelProperty("库管员sid(单选)") + private String storekeeperSid; // 库管员sid(单选) + @ApiModelProperty("库管员姓名") + private String storekeeperName; // 库管员姓名 + @ApiModelProperty("运费") + private BigDecimal freight; // 运费 + @ApiModelProperty("优惠金额") + private BigDecimal discountAmount; // 优惠金额 + @ApiModelProperty("应付金额(=采购金额+运费-优惠金额)") + private BigDecimal payableAmount; // 应付金额(=采购金额+运费-优惠金额) + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("采购单商品明细") + private List pmsPurchaseBillDetailList; + @ApiModelProperty("采购单扩展") + private PmsPurchaseBillExtendDto pmsPurchaseBillExtend; +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillExtendDto.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillExtendDto.java new file mode 100644 index 0000000000..b719a17b8e --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillExtendDto.java @@ -0,0 +1,86 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.fms.feign.pms.pmspurchasebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillExtendDto.java
+ * Class: com.yxt.pms.api.pmspurchasebillextend.PmsPurchaseBillExtendDto
+ * Description: 采购单扩展 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单扩展 数据传输对象", description = "采购单扩展 数据传输对象") +public class PmsPurchaseBillExtendDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("采购单sid") + private String purchaseBillSid; // 采购单sid + @ApiModelProperty("加价方式(统一加价率、区间加价率、仓库加价率)") + private String markupType; // 加价方式(统一加价率、区间加价率、仓库加价率) + @ApiModelProperty("进价不同时的价格策略(加权平均、分别计价)") + private String priceStrategy; // 进价不同时的价格策略(加权平均、分别计价) + @ApiModelProperty("临时加价率") + private Integer tempMarkupRate; // 临时加价率 + @ApiModelProperty("误差调整金额") + private BigDecimal errorAmount; // 误差调整金额 + @ApiModelProperty("发货人姓名") + private String shipperName; // 发货人姓名 + @ApiModelProperty("发货人手机") + private String shipperMob; // 发货人手机 + @ApiModelProperty("发货省市区sid") + private String deliveryAreaSid; // 发货省市区sid + @ApiModelProperty("发货详细地址") + private String deliveryAddress; // 发货详细地址 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("到货日期") + private Date arrivalDate; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("付款期限") + private Date paymentTerm; // 付款期限 + @ApiModelProperty("仓库sid") + private String wareHouseSid; // 仓库sid + +} \ No newline at end of file diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillFeign.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillFeign.java new file mode 100644 index 0000000000..2a4cb5d5e6 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillFeign.java @@ -0,0 +1,26 @@ +package com.yxt.fms.feign.pms.pmspurchasebill; + +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/20 + **/ +@FeignClient( + contextId = "yxt-pms-PmsPurchaseBill", + name = "yxt-pms", + path = "/apiadmin/pms/pmspurchasebill", + fallback = PmsPurchaseBillFeignFallback.class) +public interface PmsPurchaseBillFeign { + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsPurchaseBillDto dto); +} diff --git a/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillFeignFallback.java b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillFeignFallback.java new file mode 100644 index 0000000000..7fed4d6f25 --- /dev/null +++ b/yxt-fms-biz/src/main/java/com/yxt/fms/feign/pms/pmspurchasebill/PmsPurchaseBillFeignFallback.java @@ -0,0 +1,18 @@ +package com.yxt.fms.feign.pms.pmspurchasebill; + +import com.yxt.common.core.result.ResultBean; +import org.springframework.stereotype.Component; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/3/20 + **/ +@Component +public class PmsPurchaseBillFeignFallback implements PmsPurchaseBillFeign { + + @Override + public ResultBean save(PmsPurchaseBillDto dto) { + return null; + } +} diff --git a/yxt-fms-biz/src/main/resources/application-devv.yml b/yxt-fms-biz/src/main/resources/application-devv.yml new file mode 100644 index 0000000000..022d83410a --- /dev/null +++ b/yxt-fms-biz/src/main/resources/application-devv.yml @@ -0,0 +1,30 @@ +spring: + datasource: + hikari: + max-lifetime: 500000 + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://39.104.100.138:3306/yxt_fms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true + username: root + password: yxt_mysql_138 + cloud: + nacos: + discovery: + server-addr: 39.104.100.138:8848 + register-enabled: false + redis: + database: 3 # Redis数据库索引(默认为0) + host: 39.104.100.138 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\\anrui\\upload\\ + url: + prefix: http://192.168.1.106:8111/upload/ diff --git a/yxt-fms-biz/src/main/resources/application-pro.yml b/yxt-fms-biz/src/main/resources/application-pro.yml new file mode 100644 index 0000000000..1b0ead5deb --- /dev/null +++ b/yxt-fms-biz/src/main/resources/application-pro.yml @@ -0,0 +1,27 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://120.46.172.184:3306/yxt_fms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: '@anrui18033887500' + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\anrui\upload\ + url: + prefix: http://120.46.172.184/api/upload/ diff --git a/yxt-fms-biz/src/main/resources/application-test.yml b/yxt-fms-biz/src/main/resources/application-test.yml new file mode 100644 index 0000000000..9a6cf88afa --- /dev/null +++ b/yxt-fms-biz/src/main/resources/application-test.yml @@ -0,0 +1,31 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://172.18.0.4:3306/yxt_fms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: yxt_mysql_138 + hikari: + minimum-idle: 3 + max-lifetime: 30000 + maximum-pool-size: 10 + cloud: + nacos: + discovery: + server-addr: 172.18.0.5:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 172.18.0.7 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: /home/lzh/docker_data/nginx/html/anrui-system-ui/upload/ + url: + prefix: http://anrui.yyundong.com/upload/ diff --git a/yxt-fms-biz/src/main/resources/application.yml b/yxt-fms-biz/src/main/resources/application.yml new file mode 100644 index 0000000000..06c54ac208 --- /dev/null +++ b/yxt-fms-biz/src/main/resources/application.yml @@ -0,0 +1,50 @@ +spring: + application: + name: yxt-fms + profiles: + active: devv +# active: test +# active: pro + messages: + # 国际化资源文件路径 + basename: i18n/messages + servlet: + #上传文件 + multipart: + max-file-size: 50MB + max-request-size: 100MB + devtools: + restart: + # 热部署开关 + enabled: true + +server: + port: 7304 + max-http-header-size: 102400 + undertow: + max-http-post-size: -1 + +#mybatis +mybatis-plus: + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapper-locations: classpath*:**Mapper.xml + global-config: + refresh: true + db-config: + #定义生成ID的类型 + id-type: Auto + db-type: mysql + configuration: + map-underscore-to-camel-case: false + cache-enabled: true + call-setters-on-nulls: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +#rocketmq: +# producer: +# group: yxt-supervise-gf +# name-server: 127.0.0.1:9876 + + + + diff --git a/yxt-fms-biz/src/main/resources/logback-spring.xml b/yxt-fms-biz/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..1a756cd90a --- /dev/null +++ b/yxt-fms-biz/src/main/resources/logback-spring.xml @@ -0,0 +1,50 @@ + + + + + + + + + + %yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n) + + + + + + + + + + + + + + + ${log.base}.log + + ${log.base}.%d{yyyyMMdd}.%i.log.zip + + + + 1MB + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} + -%msg%n + + + + + + + + + + \ No newline at end of file diff --git a/yxt-fms-biz/src/test/java/com/yxt/fms/YxtFmsApplicationTests.java b/yxt-fms-biz/src/test/java/com/yxt/fms/YxtFmsApplicationTests.java new file mode 100644 index 0000000000..44fb0db2d4 --- /dev/null +++ b/yxt-fms-biz/src/test/java/com/yxt/fms/YxtFmsApplicationTests.java @@ -0,0 +1,13 @@ +package com.yxt.fms; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class YxtFmsApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/yxt-pms-biz/README.md b/yxt-pms-biz/README.md new file mode 100644 index 0000000000..0cf233c13f --- /dev/null +++ b/yxt-pms-biz/README.md @@ -0,0 +1,3 @@ +yxt-pms-biz + +采购后台程序及接口 \ No newline at end of file diff --git a/yxt-pms-biz/pom.xml b/yxt-pms-biz/pom.xml new file mode 100644 index 0000000000..64632078d0 --- /dev/null +++ b/yxt-pms-biz/pom.xml @@ -0,0 +1,134 @@ + + + + + com.yxt + yxt-parent + 0.0.1 + + + 4.0.0 + + yxt-pms-biz + com.yxt.pms + 2.0.1 + + + + com.yxt + yxt-common-base + 0.0.1 + + + + org.springframework.boot + spring-boot-starter-web + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + + mysql + mysql-connector-java + runtime + + + + com.baomidou + mybatis-plus-boot-starter + + + com.baomidou + mybatis-plus-annotation + + + junit + junit + compile + + + + org.projectlombok + lombok + 1.18.26 + true + + + org.springframework.boot + spring-boot-starter-test + test + + + + + cn.dev33 + sa-token-spring-boot-starter + 1.37.0 + + + cn.hutool + hutool-all + 5.8.23 + + + cn.hutool + hutool-core + 5.8.23 + + + com.google.zxing + core + 3.5.2 + + + com.alibaba + easyexcel + 3.3.2 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.5.6 + + + + repackage + + + + + + + + src/main/java + + **/*Mapper.xml + + + + src/main/resources + + **/*.* + + false + + + + + diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/YxtPmsApplication.java b/yxt-pms-biz/src/main/java/com/yxt/pms/YxtPmsApplication.java new file mode 100644 index 0000000000..2a6404306e --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/YxtPmsApplication.java @@ -0,0 +1,24 @@ +package com.yxt.pms; + + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * @author dimengzhe + */ +@SpringBootApplication(scanBasePackages = { + "com.yxt.pms.config", + "com.yxt.common.base.config", + "com.yxt.pms" +}) +// 启用自带定时任务 +@EnableScheduling +@EnableFeignClients(basePackages = {}) +public class YxtPmsApplication { + public static void main(String[] args) { + SpringApplication.run(YxtPmsApplication.class, args); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchaseBillDetailRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchaseBillDetailRest.java new file mode 100644 index 0000000000..567d0b1d43 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchaseBillDetailRest.java @@ -0,0 +1,106 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.apiadmin.pms; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.pms.biz.pms.pmspurchasebilldetail.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.ibatis.annotations.Delete; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailFeignFallback.java
+ * Class: com.yxt.pms.biz.pmspurchasebilldetail.PmsPurchaseBillDetailRest
+ * Description: 采购单据明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "采购单据明细") +@RestController +@RequestMapping("/apiadmin/pms/pmspurchasebilldetail") +public class PmsPurchaseBillDetailRest { + + @Autowired + private PmsPurchaseBillDetailService pmsPurchaseBillDetailService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = pmsPurchaseBillDetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsPurchaseBillDetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + pmsPurchaseBillDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + pmsPurchaseBillDetailService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + PmsPurchaseBillDetailDetailsVo vo = pmsPurchaseBillDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("采购明细报表") + @PostMapping("/purDetailReForm") + public ResultBean> purDetailReForm(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = pmsPurchaseBillDetailService.purDetailReForm(pq); + return rb.success().setData(pv); + } + + @ApiOperation("采购汇总报表") + @PostMapping("/purSumReForm") + public ResultBean> purSumReForm(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = pmsPurchaseBillDetailService.purSumReForm(pq); + return rb.success().setData(pv); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchaseBillExtendRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchaseBillExtendRest.java new file mode 100644 index 0000000000..f90ce455b8 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchaseBillExtendRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.apiadmin.pms; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.pms.biz.pms.pmspurchasebillextend.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillExtendFeignFallback.java
+ * Class: com.yxt.pms.biz.pmspurchasebillextend.PmsPurchaseBillExtendRest
+ * Description: 采购单扩展.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "采购单扩展") +@RestController +@RequestMapping("/apiadmin/pms/pmspurchasebillextend") +public class PmsPurchaseBillExtendRest { + + @Autowired + private PmsPurchaseBillExtendService pmsPurchaseBillExtendService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = pmsPurchaseBillExtendService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsPurchaseBillExtendDto dto){ + ResultBean rb = ResultBean.fireFail(); + pmsPurchaseBillExtendService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + pmsPurchaseBillExtendService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + PmsPurchaseBillExtendDetailsVo vo = pmsPurchaseBillExtendService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchaseBillRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchaseBillRest.java new file mode 100644 index 0000000000..31307cb7ff --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchaseBillRest.java @@ -0,0 +1,129 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.apiadmin.pms; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.pms.biz.pms.pmspurchasebill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillFeignFallback.java
+ * Class: com.yxt.pms.biz.pmspurchasebill.PmsPurchaseBillRest
+ * Description: 采购单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "采购单") +@RestController +@RequestMapping("/apiadmin/pms/pmspurchasebill") +public class PmsPurchaseBillRest { + + @Autowired + private PmsPurchaseBillService pmsPurchaseBillService; + @Autowired + private HttpServletResponse response; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = pmsPurchaseBillService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("选择原单") + @PostMapping("/choiceBillListPage") + public ResultBean> choiceBillListPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = pmsPurchaseBillService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsPurchaseBillDto dto){ + ResultBean rb = ResultBean.fireFail(); + String sid = pmsPurchaseBillService.saveOrUpdateDto(dto); + return rb.success().setData(sid); + } + + @ApiOperation("反结算") + @PostMapping("/noSettle") + public ResultBean noSettle(@RequestParam("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + pmsPurchaseBillService.updateSettleState(sid); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + pmsPurchaseBillService.delAll(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + PmsPurchaseBillDetailsVo vo = pmsPurchaseBillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("导出") + @PostMapping("/exportExcel") + public void exportExcel(PmsPurchaseBillQuery query) { + //得到所有要导出的数据 + List exportVoList = pmsPurchaseBillService.listExcel(query); + //定义导出的excel名字 + String excelName = "采购单列表"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, PmsPurchaseBillExportVo.class, response); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchasebackBillRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchasebackBillRest.java new file mode 100644 index 0000000000..03ec86798b --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchasebackBillRest.java @@ -0,0 +1,114 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.apiadmin.pms; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.pms.biz.pms.pmspurchasebackbill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillFeignFallback.java
+ * Class: com.yxt.pms.biz.pmspurchasebackbill.PmsPurchasebackBillRest
+ * Description: 采购退货单据.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:47
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "采购退货单据") +@RestController +@RequestMapping("/apiadmin/pms/pmspurchasebackbill") +public class PmsPurchasebackBillRest { + + @Autowired + private PmsPurchasebackBillService pmsPurchasebackBillService; + @Autowired + HttpServletResponse response; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = pmsPurchasebackBillService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsPurchasebackBillDto dto){ + ResultBean rb = ResultBean.fireFail(); + String sid = pmsPurchasebackBillService.saveOrUpdateDto(dto); + return rb.success().setData(sid); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + pmsPurchasebackBillService.delAll(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + PmsPurchasebackBillDetailsVo vo = pmsPurchasebackBillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @PostMapping("/exportExcel") + @ApiOperation(value = "导出") + public void exportExcel(@RequestBody PmsPurchasebackBillQuery query) { + //得到所有要导出的数据 + List exportVoList = pmsPurchasebackBillService.listExcel(query); + //定义导出的excel名字 + String excelName = "出入库查询"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, PmsPurchasebackBillExcelVo.class, response); + + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchasebackDetailRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchasebackDetailRest.java new file mode 100644 index 0000000000..55057437a5 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsPurchasebackDetailRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.apiadmin.pms; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.pms.biz.pms.pmspurchasebackdetail.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetailFeignFallback.java
+ * Class: com.yxt.pms.biz.pmspurchasebackdetail.PmsPurchasebackDetailRest
+ * Description: 采购退货单据明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:47
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "采购退货单据明细") +@RestController +@RequestMapping("/apiadmin/pms/pmspurchasebackdetail") +public class PmsPurchasebackDetailRest { + + @Autowired + private PmsPurchasebackDetailService pmsPurchasebackDetailService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = pmsPurchasebackDetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsPurchasebackDetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + pmsPurchasebackDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + pmsPurchasebackDetailService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + PmsPurchasebackDetailDetailsVo vo = pmsPurchasebackDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierBankRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierBankRest.java new file mode 100644 index 0000000000..d63a378aee --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierBankRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.apiadmin.pms; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.pms.biz.pms.pmssupplierBank.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankFeignFallback.java
+ * Class: com.yxt.base.biz.basesupplierbank.BaseSupplierBankRest
+ * Description: 供应商开户行信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "供应商开户行信息") +@RestController +@RequestMapping("v1/pmssupplierbank") +public class PmsSupplierBankRest { + + @Autowired + private PmsSupplierBankService baseSupplierBankService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = baseSupplierBankService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsSupplierBankDto dto){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierBankService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierBankService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + PmsSupplierBankDetailsVo vo = baseSupplierBankService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierFileRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierFileRest.java new file mode 100644 index 0000000000..8347703e12 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierFileRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.apiadmin.pms; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.pms.biz.pms.pmssupplierfile.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileFeignFallback.java
+ * Class: com.yxt.anrui.as.biz.pmssupplierfile.BaseSupplierFileRest
+ * Description: 供应商附件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "供应商附件") +@RestController +@RequestMapping("v1/pmssupplierfile") +public class PmsSupplierFileRest { + + @Autowired + private PmsSupplierFileService baseSupplierFileService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = baseSupplierFileService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsSupplierFileDto dto){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierFileService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierFileService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + PmsSupplierFileDetailsVo vo = baseSupplierFileService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierInfoRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierInfoRest.java new file mode 100644 index 0000000000..1bab983f8d --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierInfoRest.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.apiadmin.pms; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.pms.biz.pms.pmssupplierinfo.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierInfoFeignFallback.java
+ * Class: com.yxt.anrui.as.biz.pmssupplierinfo.BaseSupplierInfoRest
+ * Description: 供应商信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "供应商信息") +@RestController +@RequestMapping("v1/pmssupplierinfo") +public class PmsSupplierInfoRest { + + @Autowired + private PmsSupplierInfoService pmsSupplierInfoService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = pmsSupplierInfoService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsSupplierInfoDto dto){ + return pmsSupplierInfoService.saveOrUpdateDto(dto); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + pmsSupplierInfoService.delAll(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + PmsSupplierInfoDetailsVo vo = pmsSupplierInfoService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("选择供应商") + @PostMapping("/choiceSupplierInfo") + public ResultBean> choiceSupplierInfo(@RequestParam("createOrgSid") String createOrgSid){ + ResultBean rb = ResultBean.fireFail(); + List baseSupplierInfoChoiceList = pmsSupplierInfoService.choiceSupplierInfo(createOrgSid); + return rb.success().setData(baseSupplierInfoChoiceList); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierTypeRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierTypeRest.java new file mode 100644 index 0000000000..726b46e3c8 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiadmin/pms/PmsSupplierTypeRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.apiadmin.pms; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.pms.biz.pms.pmssuppliertype.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeFeignFallback.java
+ * Class: com.yxt.anrui.as.biz.pmssuppliertype.BaseSupplierTypeRest
+ * Description: 供应商类型.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "供应商类型") +@RestController +@RequestMapping("v1/pmssuppliertype") +public class PmsSupplierTypeRest { + + @Autowired + private PmsSupplierTypeService baseSupplierTypeService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = baseSupplierTypeService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody PmsSupplierTypeDto dto){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierTypeService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + baseSupplierTypeService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + PmsSupplierTypeDetailsVo vo = baseSupplierTypeService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/apiwx/WxHomeRest.java b/yxt-pms-biz/src/main/java/com/yxt/pms/apiwx/WxHomeRest.java new file mode 100644 index 0000000000..8d664dd10c --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/apiwx/WxHomeRest.java @@ -0,0 +1,10 @@ +package com.yxt.pms.apiwx; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController("com.yxt.pms.apiwx.WxHomeRest") +@RequestMapping("/apiwx/home") +public class WxHomeRest { + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/package-info.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/package-info.java new file mode 100644 index 0000000000..968fbb930a --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通 采购 项目后台逻辑和接口 + */ +package com.yxt.pms.biz; \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBill.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBill.java new file mode 100644 index 0000000000..c746e0e1f3 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBill.java @@ -0,0 +1,82 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackbill; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBill.java
+ * Class: com.yxt.pms.api.pmspurchasebackbill.PmsPurchasebackBill
+ * Description: 采购退货单据.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据", description = "采购退货单据") +@TableName("pms_purchaseback_bill") +public class PmsPurchasebackBill extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("来源单sid(采购单sid)") + private String sourceBillSid; // 来源单sid(采购单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("退误差调整金额") + private BigDecimal backErrorAmount; // 退误差调整金额 + @ApiModelProperty("退优惠金额") + private BigDecimal backDiscountAmount; // 退优惠金额 + @ApiModelProperty("抵扣欠款") + private BigDecimal deductDebts; // 抵扣欠款 + @ApiModelProperty("抵扣单号") + private String deductBillNo; // 抵扣单号 + @ApiModelProperty("转入预付款") + private BigDecimal toPrepayment; // 转入预付款 + @ApiModelProperty("欠款状态") + private String arrearsState; + @ApiModelProperty("单据状态") + private String documentState; + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillDetailsVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillDetailsVo.java new file mode 100644 index 0000000000..c29bc9f642 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillDetailsVo.java @@ -0,0 +1,87 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackbill; + + +import com.yxt.common.core.vo.Vo; + +import com.yxt.pms.biz.pms.pmspurchasebackdetail.PmsPurchasebackDetailDetailsVo; +import com.yxt.pms.biz.pms.pmspurchasebackdetail.PmsPurchasebackDetailDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillVo.java
+ * Class: com.yxt.pms.api.pmspurchasebackbill.PmsPurchasebackBillVo
+ * Description: 采购退货单据 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据 视图数据详情", description = "采购退货单据 视图数据详情") +public class PmsPurchasebackBillDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("来源单sid(采购单sid)") + private String sourceBillSid; // 来源单sid(采购单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("退误差调整金额") + private BigDecimal backErrorAmount; // 退误差调整金额 + @ApiModelProperty("退优惠金额") + private BigDecimal backDiscountAmount; // 退优惠金额 + @ApiModelProperty("抵扣欠款") + private BigDecimal deductDebts; // 抵扣欠款 + @ApiModelProperty("抵扣单号") + private String deductBillNo; // 抵扣单号 + @ApiModelProperty("转入预付款") + private BigDecimal toPrepayment; // 转入预付款 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("采购退货单明细") + private List pmsPurchasebackDetailList; +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillDto.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillDto.java new file mode 100644 index 0000000000..c8c6752bf4 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillDto.java @@ -0,0 +1,87 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackbill; + + +import com.yxt.common.core.dto.Dto; + +import com.yxt.pms.biz.pms.pmspurchasebackdetail.PmsPurchasebackDetailDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillDto.java
+ * Class: com.yxt.pms.api.pmspurchasebackbill.PmsPurchasebackBillDto
+ * Description: 采购退货单据 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据 数据传输对象", description = "采购退货单据 数据传输对象") +public class PmsPurchasebackBillDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("来源单sid(采购单sid)") + private String sourceBillSid; // 来源单sid(采购单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("退误差调整金额") + private BigDecimal backErrorAmount; // 退误差调整金额 + @ApiModelProperty("退优惠金额") + private BigDecimal backDiscountAmount; // 退优惠金额 + @ApiModelProperty("抵扣欠款") + private BigDecimal deductDebts; // 抵扣欠款 + @ApiModelProperty("抵扣单号") + private String deductBillNo; // 抵扣单号 + @ApiModelProperty("转入预付款") + private BigDecimal toPrepayment; // 转入预付款 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("采购退货单明细") + private List pmsPurchasebackDetailList; + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillExcelVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillExcelVo.java new file mode 100644 index 0000000000..ea0e2d9d19 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillExcelVo.java @@ -0,0 +1,75 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackbill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.utils.ExportEntityMap; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillVo.java
+ * Class: com.yxt.pms.api.pmspurchasebackbill.PmsPurchasebackBillVo
+ * Description: 采购退货单据 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据 视图数据对象", description = "采购退货单据 视图数据对象") +public class PmsPurchasebackBillExcelVo implements Vo { + + @ExportEntityMap(CnName = "单据编号", EnName = "billNo") + private String billNo; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ExportEntityMap(CnName = "创建时间", EnName = "createTime") + private Date createTime; + @ExportEntityMap(CnName = "来源单编号", EnName = "sourceBillNo") + private String sourceBillNo; + @ExportEntityMap(CnName = "供应商名称", EnName = "supplierName") + private String supplierName; + @ExportEntityMap(CnName = "供应商联系电话", EnName = "supplierPhone") + private String supplierPhone; + @ExportEntityMap(CnName = "采购员姓名", EnName = "purchaserName") + private String purchaserName; + @ExportEntityMap(CnName = "库管员姓名", EnName = "storekeeperName") + private String storekeeperName; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ExportEntityMap(CnName = "结算时间", EnName = "settleTime") + private Date settleTime; + @ExportEntityMap(CnName = "票据类型", EnName = "billTypeValue") + private String billTypeValue; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillMapper.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillMapper.java new file mode 100644 index 0000000000..6ef8aeac03 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillMapper.java @@ -0,0 +1,63 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackbill; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillMapper.java
+ * Class: com.yxt.pms.biz.pmspurchasebackbill.PmsPurchasebackBillMapper
+ * Description: 采购退货单据.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:47
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface PmsPurchasebackBillMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from pms_purchaseback_bill") + List selectListVo(); + + List listExcel(@Param(Constants.WRAPPER) QueryWrapper qw); +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillMapper.xml b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillMapper.xml new file mode 100644 index 0000000000..4c46fbd517 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillMapper.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillQuery.java new file mode 100644 index 0000000000..de58809e6e --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillQuery.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackbill; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillQuery.java
+ * Class: com.yxt.pms.api.pmspurchasebackbill.PmsPurchasebackBillQuery
+ * Description: 采购退货单据 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据 查询条件", description = "采购退货单据 查询条件") +public class PmsPurchasebackBillQuery implements Query { + + @ApiModelProperty("创建开始日期") + private String createStartTime; + @ApiModelProperty("创建结束日期") + private String createEndTime; + @ApiModelProperty("门店sid") + private String createOrgSid; + @ApiModelProperty("单据状态(0未作废,1已作废)") + private String documentState; + @ApiModelProperty("票据类型key") + private String billTypeKey; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("欠款状态(0欠款,1未欠款)") + private String arrearsState; + @ApiModelProperty("其他查询条件") + private String otherQuery; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillService.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillService.java new file mode 100644 index 0000000000..c0274bc344 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillService.java @@ -0,0 +1,181 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackbill; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.pms.biz.pms.pmspurchasebackdetail.PmsPurchasebackDetailDetailsVo; +import com.yxt.pms.biz.pms.pmspurchasebackdetail.PmsPurchasebackDetailDto; +import com.yxt.pms.biz.pms.pmspurchasebackdetail.PmsPurchasebackDetailService; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Collections; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillService.java
+ * Class: com.yxt.pms.biz.pmspurchasebackbill.PmsPurchasebackBillService
+ * Description: 采购退货单据 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:47
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class PmsPurchasebackBillService extends MybatisBaseService { + + @Autowired + private PmsPurchasebackDetailService pmsPurchasebackDetailService; + + public PagerVo listPageVo(PagerQuery pq) { + PmsPurchasebackBillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getCreateOrgSid())){ + qw.eq("ppb.createOrgSid",query.getCreateOrgSid()); + } + if (StringUtils.isNotBlank(query.getDocumentState())){ + qw.eq("ppb.documentState",query.getDocumentState()); + } + if (StringUtils.isNotBlank(query.getBillTypeKey())){ + qw.eq("pb.billTypeKey",query.getBillTypeKey()); + } + if (StringUtils.isNotBlank(query.getSupplierSid())){ + qw.eq("pb.supplierSid",query.getSupplierSid()); + } + if (StringUtils.isNotBlank(query.getArrearsState())){ + qw.eq("ppb.arrearsState",query.getArrearsState()); + } + if (StringUtils.isNotBlank(query.getOtherQuery())){ + qw.and(wrapper -> wrapper.like("ppb.billNo", query.getOtherQuery()).or().like("pb.supplierPhone", query.getOtherQuery()).or().like("ppb.remarks",query.getOtherQuery())); + } + String createStartTime = query.getCreateStartTime(); + String createEndTime = query.getCreateEndTime(); + qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (pb.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(createEndTime), "date_format (pb.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" + ); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public String saveOrUpdateDto(PmsPurchasebackBillDto dto){ + String dtoSid = dto.getSid(); + List pmsPurchasebackDetailList = dto.getPmsPurchasebackDetailList(); + if (StringUtils.isBlank(dtoSid)) { + String sid = this.insertByDto(dto); + for (PmsPurchasebackDetailDto pmsPurchasebackDetailDto : pmsPurchasebackDetailList) { + pmsPurchasebackDetailDto.setBillSid(sid); + pmsPurchasebackDetailService.saveOrUpdateDto(pmsPurchasebackDetailDto); + } + return sid; + } + this.updateByDto(dto); + pmsPurchasebackDetailService.delByMainSid(dtoSid); + for (PmsPurchasebackDetailDto pmsPurchasebackDetailDto : pmsPurchasebackDetailList) { + pmsPurchasebackDetailDto.setBillSid(dtoSid); + pmsPurchasebackDetailService.saveOrUpdateDto(pmsPurchasebackDetailDto); + } + return dtoSid; + } + + public String insertByDto(PmsPurchasebackBillDto dto){ + PmsPurchasebackBill entity = new PmsPurchasebackBill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return entity.getSid(); + } + + public void updateByDto(PmsPurchasebackBillDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + PmsPurchasebackBill entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public PmsPurchasebackBillDetailsVo fetchDetailsVoBySid(String sid){ + PmsPurchasebackBill entity = fetchBySid(sid); + PmsPurchasebackBillDetailsVo vo = new PmsPurchasebackBillDetailsVo(); + BeanUtil.copyProperties(entity, vo); + List pmsPurchasebackDetailDetailsVos = pmsPurchasebackDetailService.selByMainSid(sid); + vo.setPmsPurchasebackDetailList(pmsPurchasebackDetailDetailsVos); + return vo; + } + + public void delAll(String[] sids) { + delBySids(sids); + for (String sid : sids) { + pmsPurchasebackDetailService.delByMainSid(sid); + } + } + + public List listExcel(PmsPurchasebackBillQuery query) { + QueryWrapper qw = new QueryWrapper<>(); + if (query != null){ + if (StringUtils.isNotBlank(query.getCreateOrgSid())){ + qw.eq("ppb.createOrgSid",query.getCreateOrgSid()); + } + if (StringUtils.isNotBlank(query.getDocumentState())){ + qw.eq("ppb.documentState",query.getDocumentState()); + } + if (StringUtils.isNotBlank(query.getBillTypeKey())){ + qw.eq("pb.billTypeKey",query.getBillTypeKey()); + } + if (StringUtils.isNotBlank(query.getSupplierSid())){ + qw.eq("pb.supplierSid",query.getSupplierSid()); + } + if (StringUtils.isNotBlank(query.getArrearsState())){ + qw.eq("ppb.arrearsState",query.getArrearsState()); + } + if (StringUtils.isNotBlank(query.getOtherQuery())){ + qw.and(wrapper -> wrapper.like("ppb.billNo", query.getOtherQuery()).or().like("pb.supplierPhone", query.getOtherQuery()).or().like("ppb.remarks",query.getOtherQuery())); + } + String createStartTime = query.getCreateStartTime(); + String createEndTime = query.getCreateEndTime(); + qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (pb.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(createEndTime), "date_format (pb.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" + ); + } + List list = baseMapper.listExcel(qw); + list.removeAll(Collections.singleton(null)); + return list; + } +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillVo.java new file mode 100644 index 0000000000..8544ee1aa0 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillVo.java @@ -0,0 +1,78 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackbill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackBillVo.java
+ * Class: com.yxt.pms.api.pmspurchasebackbill.PmsPurchasebackBillVo
+ * Description: 采购退货单据 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据 视图数据对象", description = "采购退货单据 视图数据对象") +public class PmsPurchasebackBillVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("单据编号") + private String billNo; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("创建时间") + private Date createTime; + @ApiModelProperty("来源单编号") + private String sourceBillNo; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商联系电话") + private String supplierPhone; + @ApiModelProperty("采购员姓名") + private String purchaserName; + @ApiModelProperty("库管员姓名") + private String storekeeperName; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; + @ApiModelProperty("票据类型value(不含税、增值税、普通税、已含增值税)") + private String billTypeValue; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetail.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetail.java new file mode 100644 index 0000000000..48ac61fc04 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetail.java @@ -0,0 +1,100 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackdetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetail.java
+ * Class: com.yxt.pms.api.pmspurchasebackdetail.PmsPurchasebackDetail
+ * Description: 采购退货单据明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据明细", description = "采购退货单据明细") +@TableName("pms_purchaseback_detail") +public class PmsPurchasebackDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodsSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String areaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String rackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDetailsVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDetailsVo.java new file mode 100644 index 0000000000..12b3a34616 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDetailsVo.java @@ -0,0 +1,101 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackdetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetailVo.java
+ * Class: com.yxt.pms.api.pmspurchasebackdetail.PmsPurchasebackDetailVo
+ * Description: 采购退货单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据明细 视图数据详情", description = "采购退货单据明细 视图数据详情") +public class PmsPurchasebackDetailDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodsSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String areaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String rackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDto.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDto.java new file mode 100644 index 0000000000..1a3dfce4f2 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDto.java @@ -0,0 +1,101 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackdetail; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetailDto.java
+ * Class: com.yxt.pms.api.pmspurchasebackdetail.PmsPurchasebackDetailDto
+ * Description: 采购退货单据明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据明细 数据传输对象", description = "采购退货单据明细 数据传输对象") +public class PmsPurchasebackDetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodsSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String areaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String rackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailMapper.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailMapper.java new file mode 100644 index 0000000000..7d248f9411 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackdetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetailMapper.java
+ * Class: com.yxt.pms.biz.pmspurchasebackdetail.PmsPurchasebackDetailMapper
+ * Description: 采购退货单据明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:47
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface PmsPurchasebackDetailMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from pms_purchaseback_detail") + List selectListVo(); + + @Delete("delete from pms_purchaseback_detail where billSid = #{dtoSid}") + void delByMainSid(String dtoSid); + + @Select("select * from pms_purchaseback_detail where billSid = #{billSid}") + List selByMainSid(String billSid); +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailMapper.xml b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailMapper.xml new file mode 100644 index 0000000000..6c6a1a31b2 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailQuery.java new file mode 100644 index 0000000000..3eb8a39182 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailQuery.java @@ -0,0 +1,99 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackdetail; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetailQuery.java
+ * Class: com.yxt.pms.api.pmspurchasebackdetail.PmsPurchasebackDetailQuery
+ * Description: 采购退货单据明细 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据明细 查询条件", description = "采购退货单据明细 查询条件") +public class PmsPurchasebackDetailQuery implements Query { + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodsSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String areaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String rackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailService.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailService.java new file mode 100644 index 0000000000..3b69d1d5b7 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailService.java @@ -0,0 +1,105 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackdetail; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetailService.java
+ * Class: com.yxt.pms.biz.pmspurchasebackdetail.PmsPurchasebackDetailService
+ * Description: 采购退货单据明细 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:47
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class PmsPurchasebackDetailService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + PmsPurchasebackDetailQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(PmsPurchasebackDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(PmsPurchasebackDetailDto dto){ + PmsPurchasebackDetail entity = new PmsPurchasebackDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(PmsPurchasebackDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + PmsPurchasebackDetail entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public PmsPurchasebackDetailDetailsVo fetchDetailsVoBySid(String sid){ + PmsPurchasebackDetail entity = fetchBySid(sid); + PmsPurchasebackDetailDetailsVo vo = new PmsPurchasebackDetailDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void delByMainSid(String dtoSid) { + baseMapper.delByMainSid(dtoSid); + } + + public List selByMainSid(String billSid) { + return baseMapper.selByMainSid(billSid); + } +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailVo.java new file mode 100644 index 0000000000..87a8cb89f6 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailVo.java @@ -0,0 +1,101 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebackdetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchasebackDetailVo.java
+ * Class: com.yxt.pms.api.pmspurchasebackdetail.PmsPurchasebackDetailVo
+ * Description: 采购退货单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 16:16:12
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购退货单据明细 视图数据对象", description = "采购退货单据明细 视图数据对象") +public class PmsPurchasebackDetailVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodsSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String areaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String rackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBill.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBill.java new file mode 100644 index 0000000000..7c4a845f47 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBill.java @@ -0,0 +1,96 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebill; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBill.java
+ * Class: com.yxt.pms.api.pmspurchasebill.PmsPurchaseBill
+ * Description: 采购单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单", description = "采购单") +@TableName("pms_purchase_bill") +public class PmsPurchaseBill extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("来源单sid(工单sid)") + private String sourceBillSid; + @ApiModelProperty("来源单编号/外部编号") + private String sourceBillNo; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("采购类型Key") + private String purchaseTypeKey; + @ApiModelProperty("采购类型Value(厂家采购、外采、其他)") + private String purchaseTypeValue; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商联系电话") + private String supplierPhone; + @ApiModelProperty("采购员sid(单选)") + private String purchaserSid; + @ApiModelProperty("采购员姓名") + private String purchaserName; + @ApiModelProperty("预计到货日期") + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm:ss", + timezone = "GMT+8" + ) + private Date deliveryDate; + @ApiModelProperty("运费") + private BigDecimal freight; + @ApiModelProperty("优惠金额") + private BigDecimal discountAmount; + @ApiModelProperty("应付金额(=采购金额+运费-优惠金额)") + private BigDecimal payableAmount; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDetailsVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDetailsVo.java new file mode 100644 index 0000000000..94654c19df --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDetailsVo.java @@ -0,0 +1,109 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; + +import com.yxt.pms.biz.pms.pmspurchasebilldetail.PmsPurchaseBillDetailDetailsVo; +import com.yxt.pms.biz.pms.pmspurchasebilldetail.PmsPurchaseBillDetailDto; +import com.yxt.pms.biz.pms.pmspurchasebillextend.PmsPurchaseBillExtendDetailsVo; +import com.yxt.pms.biz.pms.pmspurchasebillextend.PmsPurchaseBillExtendDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillVo.java
+ * Class: com.yxt.pms.api.pmspurchasebill.PmsPurchaseBillVo
+ * Description: 采购单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单 视图数据详情", description = "采购单 视图数据详情") +public class PmsPurchaseBillDetailsVo implements Vo { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("来源单sid(工单sid)") + private String sourceBillSid; + @ApiModelProperty("来源单编号/外部编号") + private String sourceBillNo; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("采购类型Key") + private String purchaseTypeKey; + @ApiModelProperty("采购类型Value(厂家采购、外采、其他)") + private String purchaseTypeValue; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商联系电话") + private String supplierPhone; + @ApiModelProperty("采购员sid(单选)") + private String purchaserSid; + @ApiModelProperty("采购员姓名") + private String purchaserName; + @ApiModelProperty("预计到货日期") + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm:ss", + timezone = "GMT+8" + ) + private Date deliveryDate; + @ApiModelProperty("运费") + private BigDecimal freight; + @ApiModelProperty("优惠金额") + private BigDecimal discountAmount; + @ApiModelProperty("应付金额(=采购金额+运费-优惠金额)") + private BigDecimal payableAmount; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("采购单商品明细") + private List pmsPurchaseBillDetailList; + @ApiModelProperty("采购单扩展") + private PmsPurchaseBillExtendDetailsVo pmsPurchaseBillExtend; +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDto.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDto.java new file mode 100644 index 0000000000..d2cf2e575f --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDto.java @@ -0,0 +1,107 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; + +import com.yxt.pms.biz.pms.pmspurchasebilldetail.PmsPurchaseBillDetailDto; +import com.yxt.pms.biz.pms.pmspurchasebillextend.PmsPurchaseBillExtendDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDto.java
+ * Class: com.yxt.pms.api.pmspurchasebill.PmsPurchaseBillDto
+ * Description: 采购单 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单 数据传输对象", description = "采购单 数据传输对象") +public class PmsPurchaseBillDto implements Dto { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("来源单sid(工单sid)") + private String sourceBillSid; + @ApiModelProperty("来源单编号/外部编号") + private String sourceBillNo; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("采购类型Key") + private String purchaseTypeKey; + @ApiModelProperty("采购类型Value(厂家采购、外采、其他)") + private String purchaseTypeValue; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商联系电话") + private String supplierPhone; + @ApiModelProperty("采购员sid(单选)") + private String purchaserSid; + @ApiModelProperty("采购员姓名") + private String purchaserName; + @ApiModelProperty("预计到货日期") + @JsonFormat( + pattern = "yyyy-MM-dd HH:mm:ss", + timezone = "GMT+8" + ) + private Date deliveryDate; + @ApiModelProperty("运费") + private BigDecimal freight; + @ApiModelProperty("优惠金额") + private BigDecimal discountAmount; + @ApiModelProperty("应付金额(=采购金额+运费-优惠金额)") + private BigDecimal payableAmount; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("采购单商品明细") + private List pmsPurchaseBillDetailList; + @ApiModelProperty("采购单扩展") + private PmsPurchaseBillExtendDto pmsPurchaseBillExtend; +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillExportVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillExportVo.java new file mode 100644 index 0000000000..f33216c2f5 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillExportVo.java @@ -0,0 +1,80 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.utils.ExportEntityMap; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillVo.java
+ * Class: com.yxt.pms.api.pmspurchasebill.PmsPurchaseBillVo
+ * Description: 采购单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +public class PmsPurchaseBillExportVo { + + @ApiModelProperty("单据编号") + @ExportEntityMap(CnName = "单据编号", EnName = "billNo") + private String billNo; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("创建时间") + @ExportEntityMap(CnName = "创建时间", EnName = "createTime") + private Date createTime; + @ApiModelProperty("制单人姓名") + @ExportEntityMap(CnName = "制单人姓名", EnName = "createByName") + private String createByName; + @ApiModelProperty("供应商名称") + @ExportEntityMap(CnName = "供应商名称", EnName = "supplierName") + private String supplierName; + @ApiModelProperty("供应商联系电话") + @ExportEntityMap(CnName = "供应商联系电话", EnName = "supplierPhone") + private String supplierPhone; + @ApiModelProperty("库管员姓名") + @ExportEntityMap(CnName = "库管员姓名", EnName = "storekeeperName") + private String storekeeperName; + @ApiModelProperty("结算标志") + @ExportEntityMap(CnName = "结算标志", EnName = "settleState") + private String settleState; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + @ExportEntityMap(CnName = "结算时间", EnName = "settleTime") + private Date settleTime; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillMapper.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillMapper.java new file mode 100644 index 0000000000..db1a455be6 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebill; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillMapper.java
+ * Class: com.yxt.pms.biz.pmspurchasebill.PmsPurchaseBillMapper
+ * Description: 采购单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface PmsPurchaseBillMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from pms_purchase_bill") + List selectListVo(); + + @Update("update pms_purchase_bill set settleState = '0' where sid = #{sid}") + void updateSettleState(String sid); + + List exportList(@Param(Constants.WRAPPER) QueryWrapper qw); +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillMapper.xml b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillMapper.xml new file mode 100644 index 0000000000..3ec9ee5bf2 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillQuery.java new file mode 100644 index 0000000000..3552ec1cad --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillQuery.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebill; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillQuery.java
+ * Class: com.yxt.pms.api.pmspurchasebill.PmsPurchaseBillQuery
+ * Description: 采购单 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单 查询条件", description = "采购单 查询条件") +public class PmsPurchaseBillQuery implements Query { + + @ApiModelProperty("创建开始日期") + private String createStartTime; + @ApiModelProperty("创建结束日期") + private String createEndTime; + @ApiModelProperty("门店sid") + private String createOrgSid; + @ApiModelProperty("票据类型key") + private String billTypeKey; + @ApiModelProperty("供应商sid") + private String supplierSid; + @ApiModelProperty("结算状态(0未结算,1已结算)") + private String settleState; + @ApiModelProperty("欠款状态(0欠款,1未欠款)") + private String arrearsState; + @ApiModelProperty("单据状态(0未作废,1已作废)") + private String documentState; + @ApiModelProperty("其他查询条件") + private String otherQuery; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillService.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillService.java new file mode 100644 index 0000000000..160152bc9d --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillService.java @@ -0,0 +1,207 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebill; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.core.result.ResultBean; +import com.yxt.pms.biz.pms.pmspurchasebilldetail.PmsPurchaseBillDetailDetailsVo; +import com.yxt.pms.biz.pms.pmspurchasebilldetail.PmsPurchaseBillDetailDto; +import com.yxt.pms.biz.pms.pmspurchasebilldetail.PmsPurchaseBillDetailService; +import com.yxt.pms.biz.pms.pmspurchasebillextend.PmsPurchaseBillExtendDetailsVo; +import com.yxt.pms.biz.pms.pmspurchasebillextend.PmsPurchaseBillExtendDto; +import com.yxt.pms.biz.pms.pmspurchasebillextend.PmsPurchaseBillExtendService; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillService.java
+ * Class: com.yxt.pms.biz.pmspurchasebill.PmsPurchaseBillService
+ * Description: 采购单 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class PmsPurchaseBillService extends MybatisBaseService { + + @Autowired + private PmsPurchaseBillDetailService pmsPurchaseBillDetailService; + @Autowired + private PmsPurchaseBillExtendService pmsPurchaseBillExtendService; + + public PagerVo listPageVo(PagerQuery pq) { + PmsPurchaseBillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getCreateOrgSid())){ + qw.eq("pb.createOrgSid",query.getCreateOrgSid()); + } + if (StringUtils.isNotBlank(query.getBillTypeKey())){ + qw.eq("pb.billTypeKey",query.getBillTypeKey()); + } + if (StringUtils.isNotBlank(query.getSupplierSid())){ + qw.eq("pb.supplierSid",query.getSupplierSid()); + } + if (StringUtils.isNotBlank(query.getSettleState())){ + qw.eq("pb.settleState",query.getSettleState()); + } + if (StringUtils.isNotBlank(query.getArrearsState())){ + qw.eq("pb.arrearsState",query.getArrearsState()); + } + if (StringUtils.isNotBlank(query.getDocumentState())){ + qw.eq("pb.documentState",query.getDocumentState()); + } + if (StringUtils.isNotBlank(query.getOtherQuery())){ + qw.and(wrapper -> wrapper.like("pb.billNo", query.getOtherQuery()).or().like("pb.supplierPhone", query.getOtherQuery()).or().like("pb.remarks",query.getOtherQuery())); + } + String createStartTime = query.getCreateStartTime(); + String createEndTime = query.getCreateEndTime(); + qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (pb.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(createEndTime), "date_format (pb.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" + ); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public String saveOrUpdateDto(PmsPurchaseBillDto dto){ + String dtoSid = dto.getSid(); + List pmsPurchaseBillDetailList = dto.getPmsPurchaseBillDetailList(); + PmsPurchaseBillExtendDto pmsPurchaseBillExtend = dto.getPmsPurchaseBillExtend(); + if (StringUtils.isBlank(dtoSid)) { + String sid = this.insertByDto(dto); + for (PmsPurchaseBillDetailDto pmsPurchaseBillDetailDto : pmsPurchaseBillDetailList) { + pmsPurchaseBillDetailDto.setBillSid(sid); + pmsPurchaseBillDetailService.saveOrUpdateDto(pmsPurchaseBillDetailDto); + } + pmsPurchaseBillExtend.setPurchaseBillSid(sid); + pmsPurchaseBillExtendService.saveOrUpdateDto(pmsPurchaseBillExtend); + return sid; + } + this.updateByDto(dto); + pmsPurchaseBillDetailService.delByMainSid(dtoSid); + pmsPurchaseBillExtendService.delByMainSid(dtoSid); + for (PmsPurchaseBillDetailDto pmsPurchaseBillDetailDto : pmsPurchaseBillDetailList) { + pmsPurchaseBillDetailDto.setBillSid(dtoSid); + pmsPurchaseBillDetailService.saveOrUpdateDto(pmsPurchaseBillDetailDto); + } + pmsPurchaseBillExtend.setPurchaseBillSid(dtoSid); + pmsPurchaseBillExtendService.saveOrUpdateDto(pmsPurchaseBillExtend); + return dtoSid; + } + + public String insertByDto(PmsPurchaseBillDto dto){ + PmsPurchaseBill entity = new PmsPurchaseBill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return entity.getSid(); + } + + public void updateByDto(PmsPurchaseBillDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + PmsPurchaseBill entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public PmsPurchaseBillDetailsVo fetchDetailsVoBySid(String sid){ + PmsPurchaseBill entity = fetchBySid(sid); + PmsPurchaseBillDetailsVo vo = new PmsPurchaseBillDetailsVo(); + BeanUtil.copyProperties(entity, vo); + List pmsPurchaseBillDetailDetailsVos = pmsPurchaseBillDetailService.selByMainSid(sid); + vo.setPmsPurchaseBillDetailList(pmsPurchaseBillDetailDetailsVos); + PmsPurchaseBillExtendDetailsVo pmsPurchaseBillExtendDetailsVo = pmsPurchaseBillExtendService.selByMainSid(sid); + vo.setPmsPurchaseBillExtend(pmsPurchaseBillExtendDetailsVo); + return vo; + } + + public void delAll(String[] sids) { + delBySids(sids); + for (String sid : sids) { + pmsPurchaseBillDetailService.delByMainSid(sid); + pmsPurchaseBillExtendService.delByMainSid(sid); + } + } + + public void updateSettleState(String sid) { + baseMapper.updateSettleState(sid); + } + + public List listExcel(PmsPurchaseBillQuery query) { + QueryWrapper qw = new QueryWrapper<>(); + if (query != null) { + if (StringUtils.isNotBlank(query.getCreateOrgSid())){ + qw.eq("pb.createOrgSid",query.getCreateOrgSid()); + } + if (StringUtils.isNotBlank(query.getBillTypeKey())){ + qw.eq("pb.billTypeKey",query.getBillTypeKey()); + } + if (StringUtils.isNotBlank(query.getSupplierSid())){ + qw.eq("pb.supplierSid",query.getSupplierSid()); + } + if (StringUtils.isNotBlank(query.getSettleState())){ + qw.eq("pb.settleState",query.getSettleState()); + } + if (StringUtils.isNotBlank(query.getArrearsState())){ + qw.eq("pb.arrearsState",query.getArrearsState()); + } + if (StringUtils.isNotBlank(query.getDocumentState())){ + qw.eq("pb.documentState",query.getDocumentState()); + } + if (StringUtils.isNotBlank(query.getOtherQuery())){ + qw.and(wrapper -> wrapper.like("pb.billNo", query.getOtherQuery()).or().like("pb.supplierPhone", query.getOtherQuery()).or().like("pb.remarks",query.getOtherQuery())); + } + String createStartTime = query.getCreateStartTime(); + String createEndTime = query.getCreateEndTime(); + qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (pb.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(createEndTime), "date_format (pb.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" + ); + } + List exportVoList = baseMapper.exportList(qw); + exportVoList.removeAll(Collections.singleton(null)); + return exportVoList; + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillVo.java new file mode 100644 index 0000000000..dbd1504259 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillVo.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillVo.java
+ * Class: com.yxt.pms.api.pmspurchasebill.PmsPurchaseBillVo
+ * Description: 采购单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单 视图数据对象", description = "采购单 视图数据对象") +public class PmsPurchaseBillVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("单据编号") + private String billNo; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("创建时间") + private Date createTime; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商联系电话") + private String supplierPhone; + @ApiModelProperty("库管员姓名") + private String storekeeperName; + @ApiModelProperty("结算标志") + private String settleState; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseChoiceBillVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseChoiceBillVo.java new file mode 100644 index 0000000000..eddf679d9a --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseChoiceBillVo.java @@ -0,0 +1,98 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillVo.java
+ * Class: com.yxt.pms.api.pmspurchasebill.PmsPurchaseBillVo
+ * Description: 采购单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单 视图数据对象", description = "采购单 视图数据对象") +public class PmsPurchaseChoiceBillVo implements Vo { + + private String sid; // sid + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("创建时间") + private Date createTime; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商联系电话") + private String supplierPhone; + @ApiModelProperty("采购员姓名") + private String purchaserName; + @ApiModelProperty("库管员姓名") + private String storekeeperName; + @ApiModelProperty("结算标志") + private String settleState; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; + @ApiModelProperty("票据类型value(不含税、增值税、普通税、已含增值税)") + private String billTypeValue; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("发票号码") + private String invoiceCode; + @ApiModelProperty("发票信息") + private String invoiceInfo; + + @ApiModelProperty("采购数量") + private BigDecimal count; + @ApiModelProperty("单台进货价") + private BigDecimal cost; + @ApiModelProperty("总体进货价") + private BigDecimal costCount; + @ApiModelProperty("税额") + private BigDecimal taxAmount; + @ApiModelProperty("含税价") + private BigDecimal taxPrice; // 含税价 + @ApiModelProperty("采购金额") + private BigDecimal amount; // 采购金额 + @ApiModelProperty("销售单价") + private BigDecimal salesPrice; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetail.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetail.java new file mode 100644 index 0000000000..31ab513f7a --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetail.java @@ -0,0 +1,100 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetail.java
+ * Class: com.yxt.pms.api.pmspurchasebilldetail.PmsPurchaseBillDetail
+ * Description: 采购单据明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单据明细", description = "采购单据明细") +@TableName("pms_purchase_bill_detail") +public class PmsPurchaseBillDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("采购前库存数量") + private BigDecimal currentCount; // 采购前库存数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String warehouseAreaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String warehouseRackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("单位成本(进货价)") + private BigDecimal cost; // 单位成本(进货价) + @ApiModelProperty("采购数量") + private BigDecimal count; // 采购数量 + @ApiModelProperty("税额") + private BigDecimal taxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal taxPrice; // 含税价 + @ApiModelProperty("采购金额") + private BigDecimal amount; // 采购金额 + @ApiModelProperty("销售单价") + private BigDecimal salesPrice; // 销售单价 + @ApiModelProperty("最低零售价") + private BigDecimal minimumSalesPrice; // 最低零售价 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDetailsVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDetailsVo.java new file mode 100644 index 0000000000..1a35a5121b --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDetailsVo.java @@ -0,0 +1,99 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailVo.java
+ * Class: com.yxt.pms.api.pmspurchasebilldetail.PmsPurchaseBillDetailVo
+ * Description: 采购单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单据明细 视图数据详情", description = "采购单据明细 视图数据详情") +public class PmsPurchaseBillDetailDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("采购前库存数量") + private BigDecimal currentCount; // 采购前库存数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String warehouseAreaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String warehouseRackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("单位成本(进货价)") + private BigDecimal cost; // 单位成本(进货价) + @ApiModelProperty("采购数量") + private BigDecimal count; // 采购数量 + @ApiModelProperty("税额") + private BigDecimal taxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal taxPrice; // 含税价 + @ApiModelProperty("采购金额") + private BigDecimal amount; // 采购金额 + @ApiModelProperty("销售单价") + private BigDecimal salesPrice; // 销售单价 + @ApiModelProperty("最低零售价") + private BigDecimal minimumSalesPrice; // 最低零售价 + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDto.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDto.java new file mode 100644 index 0000000000..529da00155 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDto.java @@ -0,0 +1,99 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailDto.java
+ * Class: com.yxt.pms.api.pmspurchasebilldetail.PmsPurchaseBillDetailDto
+ * Description: 采购单据明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单据明细 数据传输对象", description = "采购单据明细 数据传输对象") +public class PmsPurchaseBillDetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("采购前库存数量") + private BigDecimal currentCount; // 采购前库存数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String warehouseAreaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String warehouseRackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("单位成本(进货价)") + private BigDecimal cost; // 单位成本(进货价) + @ApiModelProperty("采购数量") + private BigDecimal count; // 采购数量 + @ApiModelProperty("税额") + private BigDecimal taxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal taxPrice; // 含税价 + @ApiModelProperty("采购金额") + private BigDecimal amount; // 采购金额 + @ApiModelProperty("销售单价") + private BigDecimal salesPrice; // 销售单价 + @ApiModelProperty("最低零售价") + private BigDecimal minimumSalesPrice; // 最低零售价 + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailMapper.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailMapper.java new file mode 100644 index 0000000000..7e854d8bc5 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailMapper.java @@ -0,0 +1,75 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailMapper.java
+ * Class: com.yxt.pms.biz.pmspurchasebilldetail.PmsPurchaseBillDetailMapper
+ * Description: 采购单据明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface PmsPurchaseBillDetailMapper extends BaseMapper { + + //@Update("update pms_purchase_bill_detail set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from pms_purchase_bill_detail") + List selectListVo(); + + @Delete("delete from pms_purchase_bill_detail where billSid = #{dtoSid}") + void delByMainSid(String dtoSid); + + @Select("select * from pms_purchase_bill_detail where billSid = #{billSid}") + List selByMainSid(String billSid); + + IPage purDetailReForm(IPage page, QueryWrapper qw); + + IPage purSumReForm(IPage page, QueryWrapper qw); +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailMapper.xml b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailMapper.xml new file mode 100644 index 0000000000..49ab9765ab --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailQuery.java new file mode 100644 index 0000000000..4d4077c76d --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailQuery.java @@ -0,0 +1,99 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailQuery.java
+ * Class: com.yxt.pms.api.pmspurchasebilldetail.PmsPurchaseBillDetailQuery
+ * Description: 采购单据明细 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单据明细 查询条件", description = "采购单据明细 查询条件") +public class PmsPurchaseBillDetailQuery implements Query { + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("采购前库存数量") + private BigDecimal currentCount; // 采购前库存数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String warehouseAreaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String warehouseRackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("单位成本(进货价)") + private BigDecimal cost; // 单位成本(进货价) + @ApiModelProperty("采购数量") + private BigDecimal count; // 采购数量 + @ApiModelProperty("税额") + private BigDecimal taxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal taxPrice; // 含税价 + @ApiModelProperty("采购金额") + private BigDecimal amount; // 采购金额 + @ApiModelProperty("销售单价") + private BigDecimal salesPrice; // 销售单价 + @ApiModelProperty("最低零售价") + private BigDecimal minimumSalesPrice; // 最低零售价 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailReportQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailReportQuery.java new file mode 100644 index 0000000000..5d8265072e --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailReportQuery.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + + +import com.yxt.common.core.query.Query; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailVo.java
+ * Class: com.yxt.pms.api.pmspurchasebilldetail.PmsPurchaseBillDetailVo
+ * Description: 采购单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单据明细 视图数据对象", description = "采购单据明细 视图数据对象") +public class PmsPurchaseBillDetailReportQuery implements Query { + + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("商品名称") + private String goodsSpuName; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailReportVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailReportVo.java new file mode 100644 index 0000000000..5a6bf51327 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailReportVo.java @@ -0,0 +1,77 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailVo.java
+ * Class: com.yxt.pms.api.pmspurchasebilldetail.PmsPurchaseBillDetailVo
+ * Description: 采购单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单据明细 视图数据对象", description = "采购单据明细 视图数据对象") +public class PmsPurchaseBillDetailReportVo implements Vo { + + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("单位成本(进货价)") + private BigDecimal cost; + @ApiModelProperty("总体单位成本(进货价)") + private BigDecimal costCount; + @ApiModelProperty("税额") + private BigDecimal taxAmount; + @ApiModelProperty("税额合计") + private BigDecimal taxAmountCount; + @ApiModelProperty("含税价") + private BigDecimal taxPrice; + @ApiModelProperty("采购数量") + private BigDecimal count; + @ApiModelProperty("退货数量") + private BigDecimal retreatCount; + @ApiModelProperty("采购金额") + private BigDecimal amount; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("单位") + private String unit; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailService.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailService.java new file mode 100644 index 0000000000..7c2cbbfadc --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailService.java @@ -0,0 +1,148 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailService.java
+ * Class: com.yxt.pms.biz.pmspurchasebilldetail.PmsPurchaseBillDetailService
+ * Description: 采购单据明细 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class PmsPurchaseBillDetailService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + PmsPurchaseBillDetailQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(PmsPurchaseBillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(PmsPurchaseBillDetailDto dto){ + PmsPurchaseBillDetail entity = new PmsPurchaseBillDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(PmsPurchaseBillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + PmsPurchaseBillDetail entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public PmsPurchaseBillDetailDetailsVo fetchDetailsVoBySid(String sid){ + PmsPurchaseBillDetail entity = fetchBySid(sid); + PmsPurchaseBillDetailDetailsVo vo = new PmsPurchaseBillDetailDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void delByMainSid(String dtoSid) { + baseMapper.delByMainSid(dtoSid); + } + + public List selByMainSid(String billSid) { + return baseMapper.selByMainSid(billSid); + } + + public PagerVo purDetailReForm(PagerQuery pq) { + PmsPurchaseBillDetailReportQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getWarehouseName())){ + qw.like("pdd.warehouseName",query.getWarehouseName()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuCode())){ + qw.like("pdd.goodsSkuCode",query.getGoodsSkuCode()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuOwnSpec())){ + qw.like("pdd.goodsSkuOwnSpec",query.getGoodsSkuOwnSpec()); + } + if (StringUtils.isNotBlank(query.getGoodsSpuName())){ + qw.like("pdd.goodsSpuName",query.getGoodsSpuName()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.purDetailReForm(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public PagerVo purSumReForm(PagerQuery pq) { + PmsPurchaseBillDetailReportQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getWarehouseName())){ + qw.like("pdd.warehouseName",query.getWarehouseName()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuCode())){ + qw.like("pdd.goodsSkuCode",query.getGoodsSkuCode()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuOwnSpec())){ + qw.like("pdd.goodsSkuOwnSpec",query.getGoodsSkuOwnSpec()); + } + if (StringUtils.isNotBlank(query.getGoodsSpuName())){ + qw.like("pdd.goodsSpuName",query.getGoodsSpuName()); + } + qw.groupBy("pdd.goodsSkuCode"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.purSumReForm(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailSumVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailSumVo.java new file mode 100644 index 0000000000..583583f4b0 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailSumVo.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailVo.java
+ * Class: com.yxt.pms.api.pmspurchasebilldetail.PmsPurchaseBillDetailVo
+ * Description: 采购单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单据明细 视图数据对象", description = "采购单据明细 视图数据对象") +public class PmsPurchaseBillDetailSumVo implements Vo { + + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; + @ApiModelProperty("单位") + private String unit; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("采购数量") + private BigDecimal count; + @ApiModelProperty("采购金额") + private BigDecimal amount; + @ApiModelProperty("退货数量") + private BigDecimal retreatCount; + @ApiModelProperty("退货金额") + private BigDecimal backAmount; + @ApiModelProperty("门店") + private String useOrgName; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailVo.java new file mode 100644 index 0000000000..74f1b7f425 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailVo.java @@ -0,0 +1,101 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebilldetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillDetailVo.java
+ * Class: com.yxt.pms.api.pmspurchasebilldetail.PmsPurchaseBillDetailVo
+ * Description: 采购单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单据明细 视图数据对象", description = "采购单据明细 视图数据对象") +public class PmsPurchaseBillDetailVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格型号") + private String goodsSkuOwnSpec; // 规格型号 + @ApiModelProperty("采购前库存数量") + private BigDecimal currentCount; // 采购前库存数量 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("库区/货位sid") + private String warehouseAreaSid; // 库区/货位sid + @ApiModelProperty("库区名称") + private String warehouseAreaName; // 库区名称 + @ApiModelProperty("货架sid") + private String warehouseRackSid; // 货架sid + @ApiModelProperty("货架名称") + private String warehouseRackName; // 货架名称 + @ApiModelProperty("单位成本(进货价)") + private BigDecimal cost; // 单位成本(进货价) + @ApiModelProperty("采购数量") + private BigDecimal count; // 采购数量 + @ApiModelProperty("税额") + private BigDecimal taxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal taxPrice; // 含税价 + @ApiModelProperty("采购金额") + private BigDecimal amount; // 采购金额 + @ApiModelProperty("销售单价") + private BigDecimal salesPrice; // 销售单价 + @ApiModelProperty("最低零售价") + private BigDecimal minimumSalesPrice; // 最低零售价 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtend.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtend.java new file mode 100644 index 0000000000..896e1c5a54 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtend.java @@ -0,0 +1,86 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebillextend; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillExtend.java
+ * Class: com.yxt.pms.api.pmspurchasebillextend.PmsPurchaseBillExtend
+ * Description: 采购单扩展.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单扩展", description = "采购单扩展") +@TableName("pms_purchase_bill_extend") +public class PmsPurchaseBillExtend extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("采购单sid") + private String purchaseBillSid; // 采购单sid + @ApiModelProperty("加价方式(统一加价率、区间加价率、仓库加价率)") + private String markupType; // 加价方式(统一加价率、区间加价率、仓库加价率) + @ApiModelProperty("进价不同时的价格策略(加权平均、分别计价)") + private String priceStrategy; // 进价不同时的价格策略(加权平均、分别计价) + @ApiModelProperty("临时加价率") + private Integer tempMarkupRate; // 临时加价率 + @ApiModelProperty("误差调整金额") + private BigDecimal errorAmount; // 误差调整金额 + @ApiModelProperty("发货人姓名") + private String shipperName; // 发货人姓名 + @ApiModelProperty("发货人手机") + private String shipperMob; // 发货人手机 + @ApiModelProperty("发货省市区sid") + private String deliveryAreaSid; // 发货省市区sid + @ApiModelProperty("发货详细地址") + private String deliveryAddress; // 发货详细地址 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("到货日期") + private Date arrivalDate; // 到货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("付款期限") + private Date paymentTerm; // 付款期限 + @ApiModelProperty("仓库sid") + private String wareHouseSid; // 仓库sid + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendDetailsVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendDetailsVo.java new file mode 100644 index 0000000000..be5a05d964 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendDetailsVo.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebillextend; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillExtendVo.java
+ * Class: com.yxt.pms.api.pmspurchasebillextend.PmsPurchaseBillExtendVo
+ * Description: 采购单扩展 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单扩展 视图数据详情", description = "采购单扩展 视图数据详情") +public class PmsPurchaseBillExtendDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("采购单sid") + private String purchaseBillSid; // 采购单sid + @ApiModelProperty("加价方式(统一加价率、区间加价率、仓库加价率)") + private String markupType; // 加价方式(统一加价率、区间加价率、仓库加价率) + @ApiModelProperty("进价不同时的价格策略(加权平均、分别计价)") + private String priceStrategy; // 进价不同时的价格策略(加权平均、分别计价) + @ApiModelProperty("临时加价率") + private Integer tempMarkupRate; // 临时加价率 + @ApiModelProperty("误差调整金额") + private BigDecimal errorAmount; // 误差调整金额 + @ApiModelProperty("发货人姓名") + private String shipperName; // 发货人姓名 + @ApiModelProperty("发货人手机") + private String shipperMob; // 发货人手机 + @ApiModelProperty("发货省市区sid") + private String deliveryAreaSid; // 发货省市区sid + @ApiModelProperty("发货详细地址") + private String deliveryAddress; // 发货详细地址 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("到货日期") + private Date arrivalDateStart; // 到货日期 + private Date arrivalDateEnd; // 到货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("付款期限") + private Date paymentTermStart; // 付款期限 + private Date paymentTermEnd; // 付款期限 + @ApiModelProperty("仓库sid") + private String wareHouseSid; // 仓库sid + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendDto.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendDto.java new file mode 100644 index 0000000000..69ac54d7f3 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendDto.java @@ -0,0 +1,87 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebillextend; + + +import com.yxt.common.core.dto.Dto; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillExtendDto.java
+ * Class: com.yxt.pms.api.pmspurchasebillextend.PmsPurchaseBillExtendDto
+ * Description: 采购单扩展 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单扩展 数据传输对象", description = "采购单扩展 数据传输对象") +public class PmsPurchaseBillExtendDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("采购单sid") + private String purchaseBillSid; // 采购单sid + @ApiModelProperty("加价方式(统一加价率、区间加价率、仓库加价率)") + private String markupType; // 加价方式(统一加价率、区间加价率、仓库加价率) + @ApiModelProperty("进价不同时的价格策略(加权平均、分别计价)") + private String priceStrategy; // 进价不同时的价格策略(加权平均、分别计价) + @ApiModelProperty("临时加价率") + private Integer tempMarkupRate; // 临时加价率 + @ApiModelProperty("误差调整金额") + private BigDecimal errorAmount; // 误差调整金额 + @ApiModelProperty("发货人姓名") + private String shipperName; // 发货人姓名 + @ApiModelProperty("发货人手机") + private String shipperMob; // 发货人手机 + @ApiModelProperty("发货省市区sid") + private String deliveryAreaSid; // 发货省市区sid + @ApiModelProperty("发货详细地址") + private String deliveryAddress; // 发货详细地址 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("到货日期") + private Date arrivalDate; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("付款期限") + private Date paymentTerm; // 付款期限 + @ApiModelProperty("仓库sid") + private String wareHouseSid; // 仓库sid + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendMapper.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendMapper.java new file mode 100644 index 0000000000..38c1a1b0e6 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebillextend; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillExtendMapper.java
+ * Class: com.yxt.pms.biz.pmspurchasebillextend.PmsPurchaseBillExtendMapper
+ * Description: 采购单扩展.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface PmsPurchaseBillExtendMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from pms_purchase_bill_extend") + List selectListVo(); + + @Delete("delete from pms_purchase_bill_extend where purchaseBillSid = #{dtoSid}") + void delByMainSid(String dtoSid); + + @Select("select * from pms_purchase_bill_extend where purchaseBillSid = #{billSid}") + PmsPurchaseBillExtendDetailsVo selByMainSid(String billSid); +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendMapper.xml b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendMapper.xml new file mode 100644 index 0000000000..a42d5b2c6e --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendQuery.java new file mode 100644 index 0000000000..44fc863bf3 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendQuery.java @@ -0,0 +1,87 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebillextend; + + +import com.yxt.common.core.query.Query; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillExtendQuery.java
+ * Class: com.yxt.pms.api.pmspurchasebillextend.PmsPurchaseBillExtendQuery
+ * Description: 采购单扩展 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单扩展 查询条件", description = "采购单扩展 查询条件") +public class PmsPurchaseBillExtendQuery implements Query { + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("采购单sid") + private String purchaseBillSid; // 采购单sid + @ApiModelProperty("加价方式(统一加价率、区间加价率、仓库加价率)") + private String markupType; // 加价方式(统一加价率、区间加价率、仓库加价率) + @ApiModelProperty("进价不同时的价格策略(加权平均、分别计价)") + private String priceStrategy; // 进价不同时的价格策略(加权平均、分别计价) + @ApiModelProperty("临时加价率") + private Integer tempMarkupRate; // 临时加价率 + @ApiModelProperty("误差调整金额") + private BigDecimal errorAmount; // 误差调整金额 + @ApiModelProperty("发货人姓名") + private String shipperName; // 发货人姓名 + @ApiModelProperty("发货人手机") + private String shipperMob; // 发货人手机 + @ApiModelProperty("发货省市区sid") + private String deliveryAreaSid; // 发货省市区sid + @ApiModelProperty("发货详细地址") + private String deliveryAddress; // 发货详细地址 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("到货日期") + private Date arrivalDateStart; // 到货日期 + private Date arrivalDateEnd; // 到货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("付款期限") + private Date paymentTermStart; // 付款期限 + private Date paymentTermEnd; // 付款期限 + @ApiModelProperty("仓库sid") + private String wareHouseSid; // 仓库sid + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendService.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendService.java new file mode 100644 index 0000000000..16685a4c88 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendService.java @@ -0,0 +1,103 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebillextend; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillExtendService.java
+ * Class: com.yxt.pms.biz.pmspurchasebillextend.PmsPurchaseBillExtendService
+ * Description: 采购单扩展 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class PmsPurchaseBillExtendService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + PmsPurchaseBillExtendQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(PmsPurchaseBillExtendDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(PmsPurchaseBillExtendDto dto){ + PmsPurchaseBillExtend entity = new PmsPurchaseBillExtend(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(PmsPurchaseBillExtendDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + PmsPurchaseBillExtend entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public PmsPurchaseBillExtendDetailsVo fetchDetailsVoBySid(String sid){ + PmsPurchaseBillExtend entity = fetchBySid(sid); + PmsPurchaseBillExtendDetailsVo vo = new PmsPurchaseBillExtendDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void delByMainSid(String dtoSid) { + baseMapper.delByMainSid(dtoSid); + } + + public PmsPurchaseBillExtendDetailsVo selByMainSid(String billSid) { + return baseMapper.selByMainSid(billSid); + } +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendVo.java new file mode 100644 index 0000000000..fef51e2088 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebillextend/PmsPurchaseBillExtendVo.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmspurchasebillextend; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-pms(采购)
+ * File: PmsPurchaseBillExtendVo.java
+ * Class: com.yxt.pms.api.pmspurchasebillextend.PmsPurchaseBillExtendVo
+ * Description: 采购单扩展 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-19 13:51:46
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单扩展 视图数据对象", description = "采购单扩展 视图数据对象") +public class PmsPurchaseBillExtendVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("采购单sid") + private String purchaseBillSid; // 采购单sid + @ApiModelProperty("加价方式(统一加价率、区间加价率、仓库加价率)") + private String markupType; // 加价方式(统一加价率、区间加价率、仓库加价率) + @ApiModelProperty("进价不同时的价格策略(加权平均、分别计价)") + private String priceStrategy; // 进价不同时的价格策略(加权平均、分别计价) + @ApiModelProperty("临时加价率") + private Integer tempMarkupRate; // 临时加价率 + @ApiModelProperty("误差调整金额") + private BigDecimal errorAmount; // 误差调整金额 + @ApiModelProperty("发货人姓名") + private String shipperName; // 发货人姓名 + @ApiModelProperty("发货人手机") + private String shipperMob; // 发货人手机 + @ApiModelProperty("发货省市区sid") + private String deliveryAreaSid; // 发货省市区sid + @ApiModelProperty("发货详细地址") + private String deliveryAddress; // 发货详细地址 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("到货日期") + private Date arrivalDateStart; // 到货日期 + private Date arrivalDateEnd; // 到货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("付款期限") + private Date paymentTermStart; // 付款期限 + private Date paymentTermEnd; // 付款期限 + @ApiModelProperty("仓库sid") + private String wareHouseSid; // 仓库sid + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBank.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBank.java new file mode 100644 index 0000000000..bf552b45df --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBank.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierBank; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBank.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBank
+ * Description: 供应商开户行信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息", description = "供应商开户行信息") +@TableName("base_supplier_bank") +public class PmsSupplierBank extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankDetailsVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankDetailsVo.java new file mode 100644 index 0000000000..0ebee42074 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankDetailsVo.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierBank; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankVo.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankVo
+ * Description: 供应商开户行信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息 视图数据详情", description = "供应商开户行信息 视图数据详情") +public class PmsSupplierBankDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankDto.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankDto.java new file mode 100644 index 0000000000..6d851d1484 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankDto.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierBank; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankDto.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankDto
+ * Description: 供应商开户行信息 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息 数据传输对象", description = "供应商开户行信息 数据传输对象") +public class PmsSupplierBankDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankMapper.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankMapper.java new file mode 100644 index 0000000000..3bd36f6293 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierBank; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankMapper.java
+ * Class: com.yxt.base.biz.basesupplierbank.BaseSupplierBankMapper
+ * Description: 供应商开户行信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface PmsSupplierBankMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from yxt_base.base_supplier_bank") + List selectListVo(); + + @Delete("delete from yxt_base.base_supplier_bank where supplierSid = #{supplierSid}") + int deleteBySupplierSid(String supplierSid); + + @Select("select * from yxt_base.base_supplier_bank where supplierSid = #{supplierSid}") + List selectBySupplierSid(String supplierSid); +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankMapper.xml b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankMapper.xml new file mode 100644 index 0000000000..8d99e33d5a --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankQuery.java new file mode 100644 index 0000000000..fddbb1183a --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankQuery.java @@ -0,0 +1,74 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierBank; + + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankQuery.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankQuery
+ * Description: 供应商开户行信息 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息 查询条件", description = "供应商开户行信息 查询条件") +public class PmsSupplierBankQuery implements Query { + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankService.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankService.java new file mode 100644 index 0000000000..e4a6f97d2a --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankService.java @@ -0,0 +1,104 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierBank; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankService.java
+ * Class: com.yxt.base.biz.basesupplierbank.BaseSupplierBankService
+ * Description: 供应商开户行信息 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class PmsSupplierBankService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + PmsSupplierBankQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(PmsSupplierBankDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(PmsSupplierBankDto dto){ + PmsSupplierBank entity = new PmsSupplierBank(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(PmsSupplierBankDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + PmsSupplierBank entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public PmsSupplierBankDetailsVo fetchDetailsVoBySid(String sid){ + PmsSupplierBank entity = fetchBySid(sid); + PmsSupplierBankDetailsVo vo = new PmsSupplierBankDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public int deleteBySupplierSid(String supplierSid) { + return baseMapper.deleteBySupplierSid(supplierSid); + } + + public List selectBySupplierSid(String supplierSid) { + return baseMapper.selectBySupplierSid(supplierSid); + } +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankVo.java new file mode 100644 index 0000000000..5161bc1c5d --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierBank/PmsSupplierBankVo.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierBank; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierBankVo.java
+ * Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankVo
+ * Description: 供应商开户行信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商开户行信息 视图数据对象", description = "供应商开户行信息 视图数据对象") +public class PmsSupplierBankVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("开户行") + private String bankName; // 开户行 + @ApiModelProperty("开户行帐号") + private String bankAccount; // 开户行帐号 + @ApiModelProperty("账户名称") + private String accountName; // 账户名称 + @ApiModelProperty("账户类型key") + private String dueBankKey; // 账户类型key + @ApiModelProperty("账户类型value") + private String dueBankValue; // 账户类型value + @ApiModelProperty("银行网点") + private String bankingOutlets; // 银行网点 + @ApiModelProperty("开户行地址") + private String bankAddress; // 开户行地址 + @ApiModelProperty("联行号") + private String paymentLines; // 联行号 + @ApiModelProperty("银行代码") + private String swiftCode; // 银行代码 + @ApiModelProperty("币种") + private String currency; // 币种 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFile.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFile.java new file mode 100644 index 0000000000..2f729be078 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFile.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierfile; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFile.java
+ * Class: com.yxt.anrui.as.api.pmssupplierfile.BaseSupplierFile
+ * Description: 供应商附件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件", description = "供应商附件") +@TableName("base_supplier_file") +public class PmsSupplierFile extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileDetailsVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileDetailsVo.java new file mode 100644 index 0000000000..f5b48efdbb --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileDetailsVo.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierfile; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileVo.java
+ * Class: com.yxt.anrui.as.api.pmssupplierfile.BaseSupplierFileVo
+ * Description: 供应商附件 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件 视图数据详情", description = "供应商附件 视图数据详情") +public class PmsSupplierFileDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileDto.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileDto.java new file mode 100644 index 0000000000..5d8d7d7e6b --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileDto.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierfile; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileDto.java
+ * Class: com.yxt.anrui.as.api.pmssupplierfile.BaseSupplierFileDto
+ * Description: 供应商附件 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件 数据传输对象", description = "供应商附件 数据传输对象") +public class PmsSupplierFileDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileMapper.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileMapper.java new file mode 100644 index 0000000000..3b1b2bbca2 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierfile; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileMapper.java
+ * Class: com.yxt.anrui.as.biz.pmssupplierfile.BaseSupplierFileMapper
+ * Description: 供应商附件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface PmsSupplierFileMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from yxt_base.base_supplier_file") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileMapper.xml b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileMapper.xml new file mode 100644 index 0000000000..fb597c7421 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileQuery.java new file mode 100644 index 0000000000..8d6af3a477 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileQuery.java @@ -0,0 +1,64 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierfile; + + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileQuery.java
+ * Class: com.yxt.anrui.as.api.pmssupplierfile.BaseSupplierFileQuery
+ * Description: 供应商附件 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件 查询条件", description = "供应商附件 查询条件") +public class PmsSupplierFileQuery implements Query { + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileService.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileService.java new file mode 100644 index 0000000000..66f4cff0fb --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileService.java @@ -0,0 +1,94 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierfile; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileService.java
+ * Class: com.yxt.anrui.as.biz.pmssupplierfile.BaseSupplierFileService
+ * Description: 供应商附件 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class PmsSupplierFileService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + PmsSupplierFileQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(PmsSupplierFileDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(PmsSupplierFileDto dto){ + PmsSupplierFile entity = new PmsSupplierFile(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(PmsSupplierFileDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + PmsSupplierFile entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public PmsSupplierFileDetailsVo fetchDetailsVoBySid(String sid){ + PmsSupplierFile entity = fetchBySid(sid); + PmsSupplierFileDetailsVo vo = new PmsSupplierFileDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileVo.java new file mode 100644 index 0000000000..46f6ba4eca --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierfile/PmsSupplierFileVo.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierfile; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierFileVo.java
+ * Class: com.yxt.anrui.as.api.pmssupplierfile.BaseSupplierFileVo
+ * Description: 供应商附件 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商附件 视图数据对象", description = "供应商附件 视图数据对象") +public class PmsSupplierFileVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("文件名") + private String fileName; // 文件名 + @ApiModelProperty("文件类型") + private String fileType; // 文件类型 + @ApiModelProperty("关联业务对象sid") + private String linkSid; // 关联业务对象sid + @ApiModelProperty("附件类型") + private String attachType; // 附件类型 + @ApiModelProperty("文件大小") + private String fileSize; // 文件大小 + @ApiModelProperty("文件的路径") + private String filePath; // 文件的路径 + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfo.java new file mode 100644 index 0000000000..5b6747c4ef --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfo.java @@ -0,0 +1,116 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierinfo; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfo.java
+ * Class: com.yxt.base.api.pmssupplierinfo.BaseSupplierInfo
+ * Description: 供应商信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息", description = "供应商信息") +@TableName("base_supplier_info") +public class PmsSupplierInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("编码") + private String supplierCode; // 编码 + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商名称拼音") + private String supplierPY; // 供应商名称拼音 + @ApiModelProperty("供应商类型sid") + private String supplierTypeSid; // 供应商类型sid + @ApiModelProperty("供应商类型") + private String supplierTypeName; // 供应商类型 + @ApiModelProperty("省sid") + private String provinceSid; // 省sid + @ApiModelProperty("province") + private String province; // + @ApiModelProperty("市sid") + private String citySid; // 市sid + @ApiModelProperty("city") + private String city; // + @ApiModelProperty("收货县区sid") + private String countySid; // 收货县区sid + @ApiModelProperty("county") + private String county; // + @ApiModelProperty("详细地址") + private String address; // 详细地址 + @ApiModelProperty("手机") + private String contactMobile; // 手机 + @ApiModelProperty("电话") + private String contactTelePhone; // 电话 + @ApiModelProperty("联系人") + private String contactName; // 联系人 + @ApiModelProperty("传真") + private String fax; // 传真 + @ApiModelProperty("邮编") + private String zipCode; // 邮编 + @ApiModelProperty("电子邮件") + private String email; // 电子邮件 + @ApiModelProperty("网址") + private String website; // 网址 + @ApiModelProperty("开票公司名称") + private String billingCompanyName; // 开票公司名称 + @ApiModelProperty("税号") + private String registNum; // 税号 + @ApiModelProperty("法人") + private String legalName; // 法人 + @ApiModelProperty("采购员") + private String purchaser; // 采购员 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("开票类型key") + private String billingTypeKey; // 开票类型key + @ApiModelProperty("开票类型value") + private String billingTypeValue; // 开票类型value + @ApiModelProperty("税率") + private BigDecimal taxRate; + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoChoice.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoChoice.java new file mode 100644 index 0000000000..c3380ac972 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoChoice.java @@ -0,0 +1,54 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierinfo; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoVo.java
+ * Class: com.yxt.base.api.pmssupplierinfo.BaseSupplierInfoVo
+ * Description: 供应商信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 视图数据对象", description = "供应商信息 视图数据对象") +public class PmsSupplierInfoChoice implements Vo { + + private String sid; + @ApiModelProperty("供应商名称") + private String supplierName; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoDetailsVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoDetailsVo.java new file mode 100644 index 0000000000..19bb07efa1 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoDetailsVo.java @@ -0,0 +1,119 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierinfo; + + +import com.yxt.common.core.vo.Vo; +import com.yxt.pms.biz.pms.pmssupplierBank.PmsSupplierBankDetailsVo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoVo.java
+ * Class: com.yxt.base.api.pmssupplierinfo.BaseSupplierInfoVo
+ * Description: 供应商信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 视图数据详情", description = "供应商信息 视图数据详情") +public class PmsSupplierInfoDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("编码") + private String supplierCode; // 编码 + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商名称拼音") + private String supplierPY; // 供应商名称拼音 + @ApiModelProperty("供应商类型sid") + private String supplierTypeSid; // 供应商类型sid + @ApiModelProperty("供应商类型") + private String supplierTypeName; // 供应商类型 + @ApiModelProperty("省sid") + private String provinceSid; // 省sid + @ApiModelProperty("province") + private String province; // + @ApiModelProperty("市sid") + private String citySid; // 市sid + @ApiModelProperty("city") + private String city; // + @ApiModelProperty("收货县区sid") + private String countySid; // 收货县区sid + @ApiModelProperty("county") + private String county; // + @ApiModelProperty("详细地址") + private String address; // 详细地址 + @ApiModelProperty("手机") + private String contactMobile; // 手机 + @ApiModelProperty("电话") + private String contactTelePhone; // 电话 + @ApiModelProperty("联系人") + private String contactName; // 联系人 + @ApiModelProperty("传真") + private String fax; // 传真 + @ApiModelProperty("邮编") + private String zipCode; // 邮编 + @ApiModelProperty("电子邮件") + private String email; // 电子邮件 + @ApiModelProperty("网址") + private String website; // 网址 + @ApiModelProperty("开票公司名称") + private String billingCompanyName; // 开票公司名称 + @ApiModelProperty("税号") + private String registNum; // 税号 + @ApiModelProperty("法人") + private String legalName; // 法人 + @ApiModelProperty("采购员") + private String purchaser; // 采购员 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("开票类型key") + private String billingTypeKey; // 开票类型key + @ApiModelProperty("开票类型value") + private String billingTypeValue; // 开票类型value + @ApiModelProperty("税率") + private BigDecimal taxRate; + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("供应商开户行") + private List pmsSupplierBankList; +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoDto.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoDto.java new file mode 100644 index 0000000000..7641fb0f76 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoDto.java @@ -0,0 +1,119 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierinfo; + + +import com.yxt.common.core.dto.Dto; +import com.yxt.pms.biz.pms.pmssupplierBank.PmsSupplierBankDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoDto.java
+ * Class: com.yxt.base.api.pmssupplierinfo.BaseSupplierInfoDto
+ * Description: 供应商信息 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 数据传输对象", description = "供应商信息 数据传输对象") +public class PmsSupplierInfoDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("编码") + private String supplierCode; // 编码 + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("供应商名称拼音") + private String supplierPY; // 供应商名称拼音 + @ApiModelProperty("供应商类型sid") + private String supplierTypeSid; // 供应商类型sid + @ApiModelProperty("供应商类型") + private String supplierTypeName; // 供应商类型 + @ApiModelProperty("省sid") + private String provinceSid; // 省sid + @ApiModelProperty("province") + private String province; // + @ApiModelProperty("市sid") + private String citySid; // 市sid + @ApiModelProperty("city") + private String city; // + @ApiModelProperty("收货县区sid") + private String countySid; // 收货县区sid + @ApiModelProperty("county") + private String county; // + @ApiModelProperty("详细地址") + private String address; // 详细地址 + @ApiModelProperty("手机") + private String contactMobile; // 手机 + @ApiModelProperty("电话") + private String contactTelePhone; // 电话 + @ApiModelProperty("联系人") + private String contactName; // 联系人 + @ApiModelProperty("传真") + private String fax; // 传真 + @ApiModelProperty("邮编") + private String zipCode; // 邮编 + @ApiModelProperty("电子邮件") + private String email; // 电子邮件 + @ApiModelProperty("网址") + private String website; // 网址 + @ApiModelProperty("开票公司名称") + private String billingCompanyName; // 开票公司名称 + @ApiModelProperty("税号") + private String registNum; // 税号 + @ApiModelProperty("法人") + private String legalName; // 法人 + @ApiModelProperty("采购员") + private String purchaser; // 采购员 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("开票类型key") + private String billingTypeKey; // 开票类型key + @ApiModelProperty("开票类型value") + private String billingTypeValue; // 开票类型value + @ApiModelProperty("税率") + private BigDecimal taxRate; + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("开户行信息") + private List pmsSupplierBankList; +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoMapper.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoMapper.java new file mode 100644 index 0000000000..f3939fc4d2 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierinfo; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierInfoMapper.java
+ * Class: com.yxt.anrui.as.biz.pmssupplierinfo.BaseSupplierInfoMapper
+ * Description: 供应商信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface PmsSupplierInfoMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from yxt_base.base_supplier_info") + List selectListVo(); + + @Update("update yxt_base.base_supplier_info set isDelete = '1' where sid = #{sid}") + int updateBySidIsDelete(String sid); + + @Select("select * from yxt_base.base_supplier_info") + List choiceSupplierInfo(String createOrgSid); +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoMapper.xml b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoMapper.xml new file mode 100644 index 0000000000..5dce245bdc --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoQuery.java new file mode 100644 index 0000000000..fc217dd000 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoQuery.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierinfo; + + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoQuery.java
+ * Class: com.yxt.base.api.pmssupplierinfo.BaseSupplierInfoQuery
+ * Description: 供应商信息 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 查询条件", description = "供应商信息 查询条件") +public class PmsSupplierInfoQuery implements Query { + + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商类型") + private String supplierTypeName; + @ApiModelProperty("电话") + private String contactTelePhone; + @ApiModelProperty("联系人") + private String contactName; + + @ApiModelProperty("其他查询条件") + private String otherQuery; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoService.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoService.java new file mode 100644 index 0000000000..20a22fb897 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoService.java @@ -0,0 +1,162 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierinfo; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.pms.biz.pms.pmssupplierBank.PmsSupplierBank; +import com.yxt.pms.biz.pms.pmssupplierBank.PmsSupplierBankDetailsVo; +import com.yxt.pms.biz.pms.pmssupplierBank.PmsSupplierBankDto; +import com.yxt.pms.biz.pms.pmssupplierBank.PmsSupplierBankService; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-pms(仓储基础信息供应商)
+ * File: PmsSupplierInfoService.java
+ * Class: com.yxt.anrui.as.biz.pmssupplierinfo.PmsSupplierInfoService
+ * Description: 供应商信息 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class PmsSupplierInfoService extends MybatisBaseService { + + @Autowired + private PmsSupplierBankService pmsSupplierBankService; + + public PagerVo listPageVo(PagerQuery pq) { + PmsSupplierInfoQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper(); + if (StringUtils.isNotBlank(query.getSupplierName())){ + qw.like("supplierName",query.getSupplierName()); + } + if (StringUtils.isNotBlank(query.getSupplierTypeName())){ + qw.like("supplierTypeName",query.getSupplierTypeName()); + } + if (StringUtils.isNotBlank(query.getContactTelePhone())){ + qw.like("contactTelePhone",query.getContactTelePhone()); + } + if (StringUtils.isNotBlank(query.getContactName())){ + qw.like("contactName",query.getContactName()); + } + if (StringUtils.isNotBlank(query.getOtherQuery())){ + qw.and(wrapper -> wrapper.like("supplierName", query.getOtherQuery()).or().like("supplierPY", query.getOtherQuery()).or().like("contactTelePhone",query.getOtherQuery())); + } + qw.eq("isDelete",0); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean saveOrUpdateDto(PmsSupplierInfoDto dto){ + ResultBean rb = ResultBean.fireFail(); + String dtoSid = dto.getSid(); + List pmsSupplierBankDtoList = dto.getPmsSupplierBankList(); + if (pmsSupplierBankDtoList == null || pmsSupplierBankDtoList.size() == 0){ + return rb.setMsg("开户行信息不能为空"); + } + if (StringUtils.isBlank(dtoSid)) { + String sid = this.insertByDto(dto); + for (PmsSupplierBankDto pmsSupplierBankDto : pmsSupplierBankDtoList) { + pmsSupplierBankDto.setSupplierSid(sid); + pmsSupplierBankService.saveOrUpdateDto(pmsSupplierBankDto); + } + return rb.success(); + } + this.updateByDto(dto); + for (PmsSupplierBankDto pmsSupplierBankDto : pmsSupplierBankDtoList) { + String bankSid = pmsSupplierBankDto.getSid(); + if(StringUtils.isNotBlank(bankSid)){ + PmsSupplierBank pmsSupplierBank = pmsSupplierBankService.fetchBySid(bankSid); + BeanUtil.copyProperties(pmsSupplierBankDto,pmsSupplierBank,"sid"); + pmsSupplierBank.setSupplierSid(dtoSid); + pmsSupplierBankService.updateById(pmsSupplierBank); + }else{ + PmsSupplierBank pmsSupplierBank = new PmsSupplierBank(); + BeanUtil.copyProperties(pmsSupplierBankDto,pmsSupplierBank,"sid"); + pmsSupplierBank.setSupplierSid(dtoSid); + pmsSupplierBankService.insert(pmsSupplierBank); + } + } + return rb.success(); + } + + public String insertByDto(PmsSupplierInfoDto dto){ + PmsSupplierInfo entity = new PmsSupplierInfo(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return entity.getSid(); + } + + public void updateByDto(PmsSupplierInfoDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + PmsSupplierInfo entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public PmsSupplierInfoDetailsVo fetchDetailsVoBySid(String sid){ + PmsSupplierInfo entity = fetchBySid(sid); + PmsSupplierInfoDetailsVo vo = new PmsSupplierInfoDetailsVo(); + BeanUtil.copyProperties(entity, vo); + List pmsSupplierBankDetailsVos = pmsSupplierBankService.selectBySupplierSid(sid); + vo.setPmsSupplierBankList(pmsSupplierBankDetailsVos); + return vo; + } + + public void delAll(String[] sids) { + for (String sid : sids) { + //删除厂商基础信息 + int count = baseMapper.updateBySidIsDelete(sid); + //删除厂商开户行信息 + int i = pmsSupplierBankService.deleteBySupplierSid(sid); + } + } + + public List choiceSupplierInfo(String createOrgSid) { + List pmsSupplierInfoChoiceList = baseMapper.choiceSupplierInfo(createOrgSid); + return pmsSupplierInfoChoiceList; + } +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoVo.java new file mode 100644 index 0000000000..c1d4fc04cb --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssupplierinfo/PmsSupplierInfoVo.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssupplierinfo; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(供应商管理)
+ * File: BaseSupplierInfoVo.java
+ * Class: com.yxt.base.api.pmssupplierinfo.BaseSupplierInfoVo
+ * Description: 供应商信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-18 13:33:13
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商信息 视图数据对象", description = "供应商信息 视图数据对象") +public class PmsSupplierInfoVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商名称") + private String supplierName; + @ApiModelProperty("供应商类型") + private String supplierTypeName; + @ApiModelProperty("详细地址") + private String address; + @ApiModelProperty("电话") + private String contactTelePhone; + @ApiModelProperty("联系人") + private String contactName; + @ApiModelProperty("手机") + private String contactMobile; +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierType.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierType.java new file mode 100644 index 0000000000..6c7dd825e9 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierType.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssuppliertype; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierType.java
+ * Class: com.yxt.anrui.as.api.pmssuppliertype.BaseSupplierType
+ * Description: 供应商类型.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型", description = "供应商类型") +@TableName("base_supplier_type") +public class PmsSupplierType extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeDetailsVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeDetailsVo.java new file mode 100644 index 0000000000..59dad8c216 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeDetailsVo.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssuppliertype; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeVo.java
+ * Class: com.yxt.anrui.as.api.pmssuppliertype.BaseSupplierTypeVo
+ * Description: 供应商类型 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型 视图数据详情", description = "供应商类型 视图数据详情") +public class PmsSupplierTypeDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeDto.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeDto.java new file mode 100644 index 0000000000..ba95a93384 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeDto.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssuppliertype; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeDto.java
+ * Class: com.yxt.anrui.as.api.pmssuppliertype.BaseSupplierTypeDto
+ * Description: 供应商类型 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型 数据传输对象", description = "供应商类型 数据传输对象") +public class PmsSupplierTypeDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeMapper.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeMapper.java new file mode 100644 index 0000000000..0d8b88caa6 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssuppliertype; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeMapper.java
+ * Class: com.yxt.anrui.as.biz.pmssuppliertype.BaseSupplierTypeMapper
+ * Description: 供应商类型.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface PmsSupplierTypeMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from base_supplier_type") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeMapper.xml b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeMapper.xml new file mode 100644 index 0000000000..ef8e17505b --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeQuery.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeQuery.java new file mode 100644 index 0000000000..881500874c --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeQuery.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssuppliertype; + + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeQuery.java
+ * Class: com.yxt.anrui.as.api.pmssuppliertype.BaseSupplierTypeQuery
+ * Description: 供应商类型 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型 查询条件", description = "供应商类型 查询条件") +public class PmsSupplierTypeQuery implements Query { + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeService.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeService.java new file mode 100644 index 0000000000..f102202a8d --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeService.java @@ -0,0 +1,94 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssuppliertype; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeService.java
+ * Class: com.yxt.anrui.as.biz.pmssuppliertype.BaseSupplierTypeService
+ * Description: 供应商类型 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class PmsSupplierTypeService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + PmsSupplierTypeQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(PmsSupplierTypeDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(PmsSupplierTypeDto dto){ + PmsSupplierType entity = new PmsSupplierType(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(PmsSupplierTypeDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + PmsSupplierType entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public PmsSupplierTypeDetailsVo fetchDetailsVoBySid(String sid){ + PmsSupplierType entity = fetchBySid(sid); + PmsSupplierTypeDetailsVo vo = new PmsSupplierTypeDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeVo.java b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeVo.java new file mode 100644 index 0000000000..79c9c6a9fa --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmssuppliertype/PmsSupplierTypeVo.java @@ -0,0 +1,62 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.pms.biz.pms.pmssuppliertype; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-base(仓储基础信息供应商)
+ * File: BaseSupplierTypeVo.java
+ * Class: com.yxt.anrui.as.api.pmssuppliertype.BaseSupplierTypeVo
+ * Description: 供应商类型 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-13 16:51:56
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "供应商类型 视图数据对象", description = "供应商类型 视图数据对象") +public class PmsSupplierTypeVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("供应商类型名称") + private String supplierTypeName; // 供应商类型名称 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/config/SaTokenConfigure.java b/yxt-pms-biz/src/main/java/com/yxt/pms/config/SaTokenConfigure.java new file mode 100644 index 0000000000..73c4dd28cb --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/config/SaTokenConfigure.java @@ -0,0 +1,114 @@ +//package com.yxt.pms.config; +// +//import cn.dev33.satoken.interceptor.SaInterceptor; +//import cn.dev33.satoken.stp.StpUtil; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +// +///** +// * @author wangpengfei +// * @date 2023/5/16 14:43 +// */ +//@Configuration +//public class SaTokenConfigure implements WebMvcConfigurer { +// @Value("${image.url.prefix:http://127.0.0.1:8080/upload/}") +// private String urlPrefix; +// // 注册 Sa-Token 拦截器 +// @Override +// public void addInterceptors(InterceptorRegistry registry) { +// // 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。 +// +// registry.addInterceptor(new SaInterceptor(handler -> StpUtil.checkLogin())) +// .addPathPatterns("/**") +// .excludePathPatterns("/sysuser/doLogin") +// .excludePathPatterns("/lpkgiftcard/gifCardByCustomerSid") +// .excludePathPatterns("/empcardgift/gifCardByCustomerSid") +// .excludePathPatterns("/empcard/getEmpCardByCustomerSid") +// .excludePathPatterns("/lpkgiftcard/getGifCardBySid/**") +// .excludePathPatterns("/empcardgift/getGifCardBySid/**") +// .excludePathPatterns("/empcard/getEmpCardBySid/**") +// .excludePathPatterns("/lpkgiftcard/isSaturAndSun/**") +// .excludePathPatterns("/empcardgift/isSaturAndSun/**") +// .excludePathPatterns("/empcard/isSaturAndSun/**") +// .excludePathPatterns("/lpkgiftcard/getReservationBySid/**") +// .excludePathPatterns("/lpksreservoorder/submission") +// .excludePathPatterns("/lpksreservoorder/exportExcelByStore") +// .excludePathPatterns("/empsreservoorder/createNewUserBagOrder") +// .excludePathPatterns("/lpksreservoorders/submission") +// .excludePathPatterns("/empsreservoorder/ordersList") +// .excludePathPatterns("/empsreservoorder/submission") +// .excludePathPatterns("/empsreservoorder/submissionEmp") +// .excludePathPatterns("/empcardgift/generateCard") +// .excludePathPatterns("/lpkgiftcard/bindCard") +// .excludePathPatterns("/empcard/bindCard") +// .excludePathPatterns("/lpksreservoorder/orderByCardSid/**") +// .excludePathPatterns("/lpksreservoorder/orderListByUserSid/**") +// .excludePathPatterns("/lpksreservoorder/orderDetails/**") +// .excludePathPatterns("/newcomerrecorecord/recommendNewUsers") +// .excludePathPatterns("/newcomerrecorecord/recommendedAssistance") +// .excludePathPatterns("/newcomerrecorecord/recordList/**") +// .excludePathPatterns("/transferrecords/transferRecordsList") +// .excludePathPatterns("/empsreservoorder/createVegeOrder") +// .excludePathPatterns("/empsreservoorder/OrderDetails/**") +// .excludePathPatterns("/empsreservoorder/changePayState/**") +// .excludePathPatterns("/lpkgoods/goodsDetails/**") +// .excludePathPatterns("/lpkstore/getAllStoreByQuery") +// .excludePathPatterns("/vegetablecellar/receiveTransferGoods") +// .excludePathPatterns("/transferrecords/submission") +// .excludePathPatterns("/lpkgiftcard/getCardByBank") +// .excludePathPatterns("/empcard/getEmpCard") +// .excludePathPatterns("/empcardgift/shareEmpCard/**") +// .excludePathPatterns("/empcardgift/generateEmpCardGift") +// .excludePathPatterns("/empcardgift/generateEmpCard") +// .excludePathPatterns("/lpkcustomer/wxSilentLogin") +// .excludePathPatterns("/lpkgiftcard/gifCardsByCustomerSid") +// .excludePathPatterns("/lpkgoods/getAllGiftBag") +// .excludePathPatterns("/appletgiftbag/getGiftBagBySid/**") +// .excludePathPatterns("/appletgiftbag/appletGiftBagList") +// .excludePathPatterns("/lpkgiftcard/cardShareDetail/**") +// .excludePathPatterns("/lpkgiftcard/cardShareGoodsDetail/**") +// .excludePathPatterns("/empcardgift/generateTopEmpCard/**") +// .excludePathPatterns("/empsreservoorder/createOrder") +// .excludePathPatterns("/appletgiftbag/recommendRecord/**") +// //2024-01-17 +// .excludePathPatterns("/lpkgiftcard/getAllGoodsType/**") +// .excludePathPatterns("/appletnotice/getNotice") +// .excludePathPatterns("/empsreservoorder/getPreOrder") +// .excludePathPatterns("/lpkgoods/getAllGoodsType/**") +// .excludePathPatterns("/transferrecords/submission") +// .excludePathPatterns("/vegetablecellar/receiveTransferGoods") +// .excludePathPatterns("/customerstore/isSaturAndSun") +// .excludePathPatterns("/lpkgiftcard/getGoodsByType/**") +// .excludePathPatterns("/lpkgoods/getGoodsTypeAndBrand") +// .excludePathPatterns("/lpkgoods/getGoodsByType") +// .excludePathPatterns("/lpksreservoorders/orderListByUserSid") +// .excludePathPatterns("/appletgiftbag/newUserQuota") +// .excludePathPatterns("/shoppingcart/addShoppingCart") +// .excludePathPatterns("/shoppingcart/getGoodsWeight") +// .excludePathPatterns("/shoppingcart/shoppingCartList") +// .excludePathPatterns("/shoppingcart/delShoppingCart/**") +// .excludePathPatterns("/lpkgoods/vegeCellarTypeList") +// .excludePathPatterns("/vegetablecellar/addGoods/**") +// .excludePathPatterns("/lpkgoods/vegeCellarList") +// .excludePathPatterns("/customerstore/getStoreBySid/**") +// .excludePathPatterns("/lpkgiftcard/bindAllCard") +// .excludePathPatterns("/lpkcustomer/customerInfo/**") +// .excludePathPatterns("/vegetablecellar/saveGoods") +// .excludePathPatterns("/transferrecords/getTransferByCode/**") +// //2024-01-18 +// .excludePathPatterns("/lpkcustomer/getCustomerInfo/**") +// .excludePathPatterns("/lpkcustomer/modifyUserNickName") +// .excludePathPatterns("/lpkcustomer/modifyHeadImage") +// .excludePathPatterns("/upload/**") +// .excludePathPatterns("/lpkcustomer/getPhoneNumber") +// .excludePathPatterns("/lpkcustomer/getRealInfo/**") +// .excludePathPatterns("/lpkcustomer/saveRealInfo") +// .excludePathPatterns("/pms/PmsBrand/getList") +// .excludePathPatterns("/LpkCustomerBank/getBankList") +// .excludePathPatterns("/lpkcustomer/updateCustomerBank") +// .excludePathPatterns("//wxapi/**") +// ; +// } +//} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/config/SaTokenGloableException.java b/yxt-pms-biz/src/main/java/com/yxt/pms/config/SaTokenGloableException.java new file mode 100644 index 0000000000..7d42afb7e3 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/config/SaTokenGloableException.java @@ -0,0 +1,67 @@ +package com.yxt.pms.config; + +import com.yxt.common.base.config.handler.GlobalExceptionHandler; +import com.yxt.common.core.result.ResultBean; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.validation.BindException; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.NoHandlerFoundException; + +/** + * @author dimengzhe + * @date 2020/9/12 3:23 + * @description 全局异常处理 + */ +@RestControllerAdvice +public class SaTokenGloableException extends GlobalExceptionHandler { + + private static final Logger L = LoggerFactory.getLogger(GlobalExceptionHandler.class); + + public SaTokenGloableException() { + } + @ExceptionHandler({Exception.class}) + public ResultBean handleException(Exception e) { + if(null !=e.getMessage()){ + if(e.getMessage().contains("token 无效:")){ + L.error(e.getMessage(), e); + return ResultBean.fireFail().setCode("5000").setMsg("系统异常::" + e.getMessage()); + } + if(e.getMessage().contains("未能读取到有效 token")){ +// L.error(e.getMessage(), e); + return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); + } + } + + L.error(e.getMessage(), e); + return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); + } + @ExceptionHandler({NoHandlerFoundException.class}) + public ResultBean handlerNoFoundException(Exception e) { + L.error(e.getMessage(), e); + return ResultBean.fireFail().setCode("404").setMsg("路径不存在,请检查路径是否正确"); + } + +// @ExceptionHandler({Exception.class}) +// public ResultBean handleException(Exception e) { +// L.error(e.getMessage(), e); +// return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); +// } + + @ExceptionHandler({BindException.class}) + public ResultBean validatedBindException(BindException e) { + L.error(e.getMessage(), e); + String message = ((ObjectError)e.getAllErrors().get(0)).getDefaultMessage(); + return ResultBean.fireFail().setCode("405").setMsg(message); + } + + @ExceptionHandler({MethodArgumentNotValidException.class}) + public ResultBean validExceptionHandler(MethodArgumentNotValidException e) { + L.error(e.getMessage(), e); + String message = e.getBindingResult().getFieldError().getDefaultMessage(); + return ResultBean.fireFail().setCode("405").setMsg(message); + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/config/package-info.java b/yxt-pms-biz/src/main/java/com/yxt/pms/config/package-info.java new file mode 100644 index 0000000000..b0b186aa60 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/config/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.pms.config; \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/feign/package-info.java b/yxt-pms-biz/src/main/java/com/yxt/pms/feign/package-info.java new file mode 100644 index 0000000000..bec0d08c58 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/feign/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.pms.feign; \ No newline at end of file diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/utils/DoubleUtils.java b/yxt-pms-biz/src/main/java/com/yxt/pms/utils/DoubleUtils.java new file mode 100644 index 0000000000..1ded41750a --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/utils/DoubleUtils.java @@ -0,0 +1,93 @@ +package com.yxt.pms.utils; + +import java.math.BigDecimal; + +/** + * @author wangpengfei + * @date 2024/1/24 8:53 + */ +public class DoubleUtils { + + /** + * 对double数据进行取精度. + * @param value double数据. + * @param scale 精度位数(保留的小数位数). + * @param roundingMode 精度取值方式. + * @return 精度计算后的数据. + */ + public static double round(double value, int scale, + int roundingMode) { + BigDecimal bd = BigDecimal.valueOf(value); + bd = bd.setScale(scale, roundingMode); + double d = bd.doubleValue(); + bd = null; + return d; + } + + + /** + * double 相加 + * @param d1 + * @param d2 + * @return + */ + public static double sum(double d1,double d2){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.add(bd2).doubleValue(); + } + + + /** + * double 相减 + * @param d1 + * @param d2 + * @return + */ + public static double sub(double d1,double d2){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.subtract(bd2).doubleValue(); + } + + /** + * double 乘法 + * @param d1 + * @param d2 + * @return + */ + public static double mul(double d1, double d2){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.multiply(bd2).doubleValue(); + } + + + /** + * double 除法 + * @param d1 + * @param d2 + * @param scale 四舍五入 小数点位数 + * @return + */ + public static double div(double d1,double d2,int scale){ + BigDecimal bd1 = BigDecimal.valueOf(d1); + BigDecimal bd2 = BigDecimal.valueOf(d2); + return bd1.divide + (bd2,scale,BigDecimal.ROUND_HALF_UP).doubleValue(); + } + /** + * 去除多余.0 + * @param num + * @return + */ + public static String removeZeros(String num) { + if (num.indexOf(".") > 0) { + // 去掉多余的0 + num = num.replaceAll("0+?$", ""); + // 如果最后一位是. 则去掉 + num = num.replaceAll("[.]$", ""); + } + return num; + } +} diff --git a/yxt-pms-biz/src/main/java/com/yxt/pms/utils/StyleUtils.java b/yxt-pms-biz/src/main/java/com/yxt/pms/utils/StyleUtils.java new file mode 100644 index 0000000000..1a96191b20 --- /dev/null +++ b/yxt-pms-biz/src/main/java/com/yxt/pms/utils/StyleUtils.java @@ -0,0 +1,89 @@ +package com.yxt.pms.utils; + +import com.alibaba.excel.write.metadata.style.WriteCellStyle; +import com.alibaba.excel.write.metadata.style.WriteFont; +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.VerticalAlignment; + +/** + * @author wangpengfei + * @date 2023/12/16 22:14 + */ +public class StyleUtils { /** + * 标题样式 + * @return + */ +public static WriteCellStyle getHeadStyle(){ + // 头的策略 + WriteCellStyle headWriteCellStyle = new WriteCellStyle(); + // 背景颜色 +// headWriteCellStyle.setFillForegroundColor(IndexedColors.LIGHT_TURQUOISE1.getIndex()); +// headWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND); + + // 字体 + WriteFont headWriteFont = new WriteFont(); + headWriteFont.setFontName("宋体");//设置字体名字 + headWriteFont.setFontHeightInPoints((short)14);//设置字体大小 + headWriteFont.setBold(true);//字体加粗 + headWriteCellStyle.setWriteFont(headWriteFont); //在样式用应用设置的字体; + + // 样式 + headWriteCellStyle.setBorderBottom(BorderStyle.THIN);//设置底边框; + headWriteCellStyle.setBottomBorderColor((short) 0);//设置底边框颜色; + headWriteCellStyle.setBorderLeft(BorderStyle.THIN); //设置左边框; + headWriteCellStyle.setLeftBorderColor((short) 0);//设置左边框颜色; + headWriteCellStyle.setBorderRight(BorderStyle.THIN);//设置右边框; + headWriteCellStyle.setRightBorderColor((short) 0);//设置右边框颜色; + headWriteCellStyle.setBorderTop(BorderStyle.THIN);//设置顶边框; + headWriteCellStyle.setTopBorderColor((short) 0); //设置顶边框颜色; + + headWriteCellStyle.setWrapped(true); //设置自动换行; + + headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);//设置水平对齐的样式为居中对齐; + headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); //设置垂直对齐的样式为居中对齐; + headWriteCellStyle.setShrinkToFit(true);//设置文本收缩至合适 + + return headWriteCellStyle; +} + + + /** + * 内容样式 + * @return + */ + public static WriteCellStyle getContentStyle(){ + // 内容的策略 + WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); + + // 背景绿色 + // 这里需要指定 FillPatternType 为FillPatternType.SOLID_FOREGROUND 不然无法显示背景颜色.头默认了 FillPatternType所以可以不指定 +// contentWriteCellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); +// contentWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND); + + // 设置字体 + WriteFont contentWriteFont = new WriteFont(); + contentWriteFont.setFontHeightInPoints((short) 12);//设置字体大小 + contentWriteFont.setFontName("宋体"); //设置字体名字 + contentWriteCellStyle.setWriteFont(contentWriteFont);//在样式用应用设置的字体; + + //设置样式; + contentWriteCellStyle.setBorderBottom(BorderStyle.THIN);//设置底边框; + contentWriteCellStyle.setBottomBorderColor((short) 0);//设置底边框颜色; + contentWriteCellStyle.setBorderLeft(BorderStyle.THIN); //设置左边框; + contentWriteCellStyle.setLeftBorderColor((short) 0);//设置左边框颜色; + contentWriteCellStyle.setBorderRight(BorderStyle.THIN);//设置右边框; + contentWriteCellStyle.setRightBorderColor((short) 0);//设置右边框颜色; + contentWriteCellStyle.setBorderTop(BorderStyle.THIN);//设置顶边框; + contentWriteCellStyle.setTopBorderColor((short) 0); ///设置顶边框颜色; + + contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);// 水平居中 + contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中 + contentWriteCellStyle.setWrapped(true); //设置自动换行; + +// contentWriteCellStyle.setShrinkToFit(true);//设置文本收缩至合适 + + return contentWriteCellStyle; + } + +} diff --git a/yxt-pms-biz/src/main/resources/application-devv.yml b/yxt-pms-biz/src/main/resources/application-devv.yml new file mode 100644 index 0000000000..ec6e247bbd --- /dev/null +++ b/yxt-pms-biz/src/main/resources/application-devv.yml @@ -0,0 +1,30 @@ +spring: + datasource: + hikari: + max-lifetime: 500000 + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://39.104.100.138:3306/yxt_pms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true + username: root + password: yxt_mysql_138 + cloud: + nacos: + discovery: + server-addr: 39.104.100.138:8848 + register-enabled: false + redis: + database: 3 # Redis数据库索引(默认为0) + host: 39.104.100.138 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\\anrui\\upload\\ + url: + prefix: http://192.168.1.106:8111/upload/ diff --git a/yxt-pms-biz/src/main/resources/application-pro.yml b/yxt-pms-biz/src/main/resources/application-pro.yml new file mode 100644 index 0000000000..ab15e4284f --- /dev/null +++ b/yxt-pms-biz/src/main/resources/application-pro.yml @@ -0,0 +1,27 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://120.46.172.184:3306/yxt_pms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: '@anrui18033887500' + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\anrui\upload\ + url: + prefix: http://120.46.172.184/api/upload/ diff --git a/yxt-pms-biz/src/main/resources/application-test.yml b/yxt-pms-biz/src/main/resources/application-test.yml new file mode 100644 index 0000000000..2e66a6de3e --- /dev/null +++ b/yxt-pms-biz/src/main/resources/application-test.yml @@ -0,0 +1,31 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://172.18.0.4:3306/yxt_pms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: yxt_mysql_138 + hikari: + minimum-idle: 3 + max-lifetime: 30000 + maximum-pool-size: 10 + cloud: + nacos: + discovery: + server-addr: 172.18.0.5:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 172.18.0.7 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: /home/lzh/docker_data/nginx/html/anrui-system-ui/upload/ + url: + prefix: http://anrui.yyundong.com/upload/ diff --git a/yxt-pms-biz/src/main/resources/application.yml b/yxt-pms-biz/src/main/resources/application.yml new file mode 100644 index 0000000000..b9e6f8bb87 --- /dev/null +++ b/yxt-pms-biz/src/main/resources/application.yml @@ -0,0 +1,50 @@ +spring: + application: + name: yxt-pms + profiles: + active: devv +# active: test +# active: pro + messages: + # 国际化资源文件路径 + basename: i18n/messages + servlet: + #上传文件 + multipart: + max-file-size: 50MB + max-request-size: 100MB + devtools: + restart: + # 热部署开关 + enabled: true + +server: + port: 7306 + max-http-header-size: 102400 + undertow: + max-http-post-size: -1 + +#mybatis +mybatis-plus: + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapper-locations: classpath*:**Mapper.xml + global-config: + refresh: true + db-config: + #定义生成ID的类型 + id-type: Auto + db-type: mysql + configuration: + map-underscore-to-camel-case: false + cache-enabled: true + call-setters-on-nulls: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +#rocketmq: +# producer: +# group: yxt-supervise-gf +# name-server: 127.0.0.1:9876 + + + + diff --git a/yxt-pms-biz/src/main/resources/logback-spring.xml b/yxt-pms-biz/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..431358ce95 --- /dev/null +++ b/yxt-pms-biz/src/main/resources/logback-spring.xml @@ -0,0 +1,50 @@ + + + + + + + + + + %yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n) + + + + + + + + + + + + + + + ${log.pms}.log + + ${log.pms}.%d{yyyyMMdd}.%i.log.zip + + + + 1MB + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} + -%msg%n + + + + + + + + + + \ No newline at end of file diff --git a/yxt-pms-biz/src/test/java/com/yxt/pms/YxtPmsApplicationTest.java b/yxt-pms-biz/src/test/java/com/yxt/pms/YxtPmsApplicationTest.java new file mode 100644 index 0000000000..24154cd2c2 --- /dev/null +++ b/yxt-pms-biz/src/test/java/com/yxt/pms/YxtPmsApplicationTest.java @@ -0,0 +1,24 @@ +package com.yxt.pms; + +import cn.hutool.core.util.IdUtil; +import org.junit.Test; + +import java.util.UUID; + +public class YxtPmsApplicationTest { + + @Test + public void test() { + System.out.println(IdUtil.nanoId()); + System.out.println(IdUtil.getSnowflakeNextId()); + + UUID uuid = UUID.randomUUID(); + String uniqueID = uuid.toString().replaceAll("-", "").substring(0, 16).replaceAll("\\D", ""); + System.out.println(uniqueID); + } +} + +//do3KW8XIUSyu4vg_zTXdm +// 1727231267909320704 +//uw0AotdmQTlIxKlA2V8_O +// 1727231437887668224 diff --git a/yxt-sms-biz/README.md b/yxt-sms-biz/README.md new file mode 100644 index 0000000000..159b8f9a4f --- /dev/null +++ b/yxt-sms-biz/README.md @@ -0,0 +1,2 @@ +yxt-sms-biz +销售管理后台程序及接口 \ No newline at end of file diff --git a/yxt-sms-biz/pom.xml b/yxt-sms-biz/pom.xml new file mode 100644 index 0000000000..36e4e31d43 --- /dev/null +++ b/yxt-sms-biz/pom.xml @@ -0,0 +1,134 @@ + + + + + com.yxt + yxt-parent + 0.0.1 + + + 4.0.0 + + yxt-sms-biz + com.yxt.sms + 2.0.1 + + + + com.yxt + yxt-common-base + 0.0.1 + + + + org.springframework.boot + spring-boot-starter-web + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + + mysql + mysql-connector-java + runtime + + + + com.baomidou + mybatis-plus-boot-starter + + + com.baomidou + mybatis-plus-annotation + + + junit + junit + compile + + + + org.projectlombok + lombok + 1.18.26 + true + + + org.springframework.boot + spring-boot-starter-test + test + + + + + cn.dev33 + sa-token-spring-boot-starter + 1.37.0 + + + cn.hutool + hutool-all + 5.8.23 + + + cn.hutool + hutool-core + 5.8.23 + + + com.google.zxing + core + 3.5.2 + + + com.alibaba + easyexcel + 3.3.2 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.5.6 + + + + repackage + + + + + + + + src/main/java + + **/*Mapper.xml + + + + src/main/resources + + **/*.* + + false + + + + + diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/YxtSmsBizApplication.java b/yxt-sms-biz/src/main/java/com/yxt/sms/YxtSmsBizApplication.java new file mode 100644 index 0000000000..bcdbeefe9c --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/YxtSmsBizApplication.java @@ -0,0 +1,22 @@ +package com.yxt.sms; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableScheduling; + +@SpringBootApplication(scanBasePackages = { + "com.yxt.sms.config", + "com.yxt.common.base.config", + "com.yxt.sms" +}) +// 启用自带定时任务 +@EnableScheduling +@EnableFeignClients(basePackages = {}) +public class YxtSmsBizApplication { + + public static void main(String[] args) { + SpringApplication.run(YxtSmsBizApplication.class, args); + } + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/AdminHomeRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/AdminHomeRest.java new file mode 100644 index 0000000000..2a669a60a0 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/AdminHomeRest.java @@ -0,0 +1,10 @@ +package com.yxt.sms.apiadmin; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController("com.yxt.sms.apiadmin.AdminHomeRest") +@RequestMapping("/apiadmin/home") +public class AdminHomeRest { + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyBillDetailRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyBillDetailRest.java new file mode 100644 index 0000000000..73e0270872 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyBillDetailRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smspricestrategybilldetail.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillDetailFeignFallback.java
+ * Class: com.yxt.sms.biz.smspricestrategybilldetail.SmsPricestrategyBillDetailRest
+ * Description: 价格策略申请明细.
+ * Copyright: Copyright (c) 20ll
+ * Company: https://gitee.com/liuzp3l5
+ * Makedate: 2024-03-28 l4:29:38
+ * + * @author liupopo + * @version l.0 + * @since l.0 + */ +@Api(tags = "价格策略申请明细") +@RestController +@RequestMapping("/apiadmin/sms/smspricestrategybilldetail") +public class SmsPricestrategyBillDetailRest { + + @Autowired + private SmsPricestrategyBillDetailService smsPricestrategyBillDetailService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsPricestrategyBillDetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsPricestrategyBillDetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsPricestrategyBillDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsPricestrategyBillDetailService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsPricestrategyBillDetailDetailsVo vo = smsPricestrategyBillDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyBillGoodstypedetailRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyBillGoodstypedetailRest.java new file mode 100644 index 0000000000..a00751731c --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyBillGoodstypedetailRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smspricestrategybillgoodstypedetail.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillGoodstypedetailFeignFallback.java
+ * Class: com.yxt.sms.biz.smspricestrategybillgoodstypedetail.SmsPricestrategyBillGoodstypedetailRest
+ * Description: 价格策略商品类别明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "价格策略商品类别明细") +@RestController +@RequestMapping("/apiadmin/sms/smspricestrategybillgoodstypedetail") +public class SmsPricestrategyBillGoodstypedetailRest { + + @Autowired + private SmsPricestrategyBillGoodstypedetailService smsPricestrategyBillGoodstypedetailService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsPricestrategyBillGoodstypedetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsPricestrategyBillGoodstypedetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsPricestrategyBillGoodstypedetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsPricestrategyBillGoodstypedetailService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsPricestrategyBillGoodstypedetailDetailsVo vo = smsPricestrategyBillGoodstypedetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyBillRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyBillRest.java new file mode 100644 index 0000000000..7cd106a359 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyBillRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smspricestrategybill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillFeignFallback.java
+ * Class: com.yxt.sms.biz.smspricestrategybill.SmsPricestrategyBillRest
+ * Description: 价格策略申请.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:29:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "价格策略申请") +@RestController +@RequestMapping("/apiadmin/sms/smspricestrategybill") +public class SmsPricestrategyBillRest { + + @Autowired + private SmsPricestrategyBillService smsPricestrategyBillService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsPricestrategyBillService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsPricestrategyBillDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsPricestrategyBillService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsPricestrategyBillService.delAll(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsPricestrategyBillDetailsVo vo = smsPricestrategyBillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyRest.java new file mode 100644 index 0000000000..630dd46b22 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsPricestrategyRest.java @@ -0,0 +1,89 @@ + /********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smspricestrategy.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyFeignFallback.java
+ * Class: com.yxt.sms.biz.smspricestrategy.SmsPricestrategyRest
+ * Description: 价格策略.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:29:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "价格策略") +@RestController +@RequestMapping("/apiadmin/sms/smspricestrategy") +public class SmsPricestrategyRest { + + @Autowired + private SmsPricestrategyService smsPricestrategyService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsPricestrategyService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsPricestrategyDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsPricestrategyService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsPricestrategyService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsPricestrategyDetailsVo vo = smsPricestrategyService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillDetailRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillDetailRest.java new file mode 100644 index 0000000000..272ffa63a1 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillDetailRest.java @@ -0,0 +1,96 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smssalesbilldetail.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * Project: sms(sms)
+ * File: SmsSalesBillDetailFeignFallback.java
+ * Class: com.yxt.sms.apiadmin.SmsSalesBillDetailRest
+ * Description: 销售单-商品清单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "销售单-商品清单") +@RestController +@RequestMapping("/apiadmin/v1/smssalesbilldetail") +public class SmsSalesBillDetailRest { + + @Autowired + private SmsSalesBillDetailService smsSalesBillDetailService; + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesBillDetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsSalesBillDetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsSalesBillDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsSalesBillDetailService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsSalesBillDetailDetailsVo vo = smsSalesBillDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillExtendRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillExtendRest.java new file mode 100644 index 0000000000..7e70788b0f --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillExtendRest.java @@ -0,0 +1,96 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smssalesbillextend.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * Project: sms(sms)
+ * File: SmsSalesBillExtendFeignFallback.java
+ * Class: com.yxt.sms.apiadmin.SmsSalesBillExtendRest
+ * Description: 销售单扩展.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "销售单扩展") +@RestController +@RequestMapping("/apiadmin/v1/smssalesbillextend") +public class SmsSalesBillExtendRest { + + @Autowired + private SmsSalesBillExtendService smsSalesBillExtendService; + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesBillExtendService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsSalesBillExtendDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsSalesBillExtendService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsSalesBillExtendService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsSalesBillExtendDetailsVo vo = smsSalesBillExtendService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillInvoiceRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillInvoiceRest.java new file mode 100644 index 0000000000..ef3a50c4f4 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillInvoiceRest.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smssalesbillinvoice.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillInvoiceFeignFallback.java
+ * Class: com.yxt.sms.apiadmin.SmsSalesBillInvoiceRest
+ * Description: 销售单-发票.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "销售单-发票") +@RestController +@RequestMapping("/apiadmin/v1/smssalesbillinvoice") +public class SmsSalesBillInvoiceRest { + + @Autowired + private SmsSalesBillInvoiceService smsSalesBillInvoiceService; + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesBillInvoiceService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsSalesBillInvoiceDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsSalesBillInvoiceService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsSalesBillInvoiceService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsSalesBillInvoiceDetailsVo vo = smsSalesBillInvoiceService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillRest.java new file mode 100644 index 0000000000..382b152809 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillRest.java @@ -0,0 +1,169 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smssalesbill.*; +import com.yxt.sms.biz.smssalesbill.report.*; +import com.yxt.sms.biz.smssalesbilldetail.SmsSalesBillDetailService; +import com.yxt.sms.biz.smssalesbillinvoice.SmsSalesBillInvoiceService; +import com.yxt.sms.feign.wms.wmsinventory.WmsInventorySalesQuery; +import com.yxt.sms.feign.wms.wmsinventory.WmsInventorySalesVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + + +/** + * Project: sms(sms)
+ * File: SmsSalesBillFeignFallback.java
+ * Class: com.yxt.sms.apiadmin.SmsSalesBillRest
+ * Description: 销售单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "销售单") +@RestController +@RequestMapping("/apiadmin/v1/smssalesbill") +public class SmsSalesBillRest { + + @Autowired + private SmsSalesBillService smsSalesBillService; + @Autowired + private SmsSalesBillDetailService smsSalesBillDetailService; + @Autowired + private SmsSalesBillInvoiceService smsSalesBillInvoiceService; + @Autowired + HttpServletResponse response; + + @ApiOperation("销售价趋势报表") + @PostMapping("/goodsTrendReport") + public ResultBean> goodsTrendReport(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesBillService.goodsTrendReport(pq); + return rb.success().setData(pv); + } + + @ApiOperation("销售明细-商品") + @PostMapping("/goodsDetailsReport") + public ResultBean> goodsDetailsReport(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesBillService.goodsDetailsReport(pq); + return rb.success().setData(pv); + } + + @ApiOperation("销售汇总-商品") + @PostMapping("/goodsTotalsReport") + public ResultBean> goodsTotalsReport(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesBillService.goodsTotalsReport(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("销售开单选择商品分页列表") + @PostMapping("/listPageSales") + public ResultBean> listPageSales(@RequestBody PagerQuery pq) { + return smsSalesBillService.listPageSales(pq); + } + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesBillService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsSalesBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = smsSalesBillService.saveOrUpdateDto(dto); + return rb.success().setData(sid); + } + + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids) { + ResultBean rb = ResultBean.fireFail(); + smsSalesBillService.delBySids(sids); + for (String sid : sids) { + smsSalesBillInvoiceService.delByMainSid(sid); + smsSalesBillDetailService.delByMainSid(sid); + } + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid) { + ResultBean rb = ResultBean.fireFail(); + SmsSalesBillDetailsVo vo = smsSalesBillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @PostMapping("/exportExcel") + @ApiOperation(value = "导出") + public void exportExcel(@RequestBody SmsSalesBillQuery query) { + //得到所有要导出的数据 + List exportVoList = smsSalesBillService.listExcel(query); + //定义导出的excel名字 + String excelName = "销售单列表"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, SmsSalesBillExportVo.class, response); + + } + + @ApiOperation("结算") + @PostMapping("/settlement") + public ResultBean settlement(@RequestBody SmsSalesBillDto dto) { + return smsSalesBillService.settlement(dto); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillSettleRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillSettleRest.java new file mode 100644 index 0000000000..2677108859 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesBillSettleRest.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smssalesbillsettle.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillSettleFeignFallback.java
+ * Class: com.yxt.sms.apiadmin.SmsSalesBillSettleRest
+ * Description: 采购单-结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "采购单-结算") +@RestController +@RequestMapping("/apiadmin/v1/smssalesbillsettle") +public class SmsSalesBillSettleRest { + + @Autowired + private SmsSalesBillSettleService smsSalesBillSettleService; + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesBillSettleService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsSalesBillSettleDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsSalesBillSettleService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsSalesBillSettleService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsSalesBillSettleDetailsVo vo = smsSalesBillSettleService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesReturnDetailRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesReturnDetailRest.java new file mode 100644 index 0000000000..0882137e35 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesReturnDetailRest.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smssalesreturndetail.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnDetailFeignFallback.java
+ * Class: com.yxt.sms.apiadmin.SmsSalesReturnDetailRest
+ * Description: 销售退货单据明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "销售退货单据明细") +@RestController +@RequestMapping("/apiadmin/v1/smssalesreturndetail") +public class SmsSalesReturnDetailRest { + + @Autowired + private SmsSalesReturnDetailService smsSalesReturnDetailService; + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesReturnDetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsSalesReturnDetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsSalesReturnDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsSalesReturnDetailService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsSalesReturnDetailDetailsVo vo = smsSalesReturnDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesReturnRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesReturnRest.java new file mode 100644 index 0000000000..274d2d8cf6 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesReturnRest.java @@ -0,0 +1,148 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.base.utils.ExportExcelUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smssalesbill.SmsSalesBillExportVo; +import com.yxt.sms.biz.smssalesbill.SmsSalesBillQuery; +import com.yxt.sms.biz.smssalesreturn.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnFeignFallback.java
+ * Class: com.yxt.sms.apiadmin.SmsSalesReturnRest
+ * Description: 销售退货单据.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "销售退货单据") +@RestController +@RequestMapping("/apiadmin/v1/smssalesreturn") +public class SmsSalesReturnRest { + + @Autowired + private SmsSalesReturnService smsSalesReturnService; + @Autowired + HttpServletResponse response; + + @ApiOperation("退货单查询原单列表") + @PostMapping("/listPageReturn") + public ResultBean> listPageReturn(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesReturnService.listPageReturn(pq); + return rb.success().setData(pv); + } + + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesReturnService.listPageVo(pq); + return rb.success().setData(pv); + } + + @PostMapping("/exportExcel") + @ApiOperation(value = "导出") + public void exportExcel(@RequestBody SmsSalesReturnQuery query) { + //得到所有要导出的数据 + List exportVoList = smsSalesReturnService.listExcel(query); + //定义导出的excel名字 + String excelName = "销售退货单列表"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, SmsSalesBillReturnExportVo.class, response); + + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsSalesReturnDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsSalesReturnService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("作废") + @PostMapping("/invalid") + public ResultBean invalid(@RequestParam("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + smsSalesReturnService.invalid(sid); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsSalesReturnService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsSalesReturnDetailsVo vo = smsSalesReturnService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + + @ApiOperation("退货开单初始化") + @GetMapping("/returnBillInit/{sid}") + public ResultBean returnBillInit(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsSalesInsertVo vo = smsSalesReturnService.returnBillInit(sid); + return rb.success().setData(vo); + } + + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesReturnSettleRest.java b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesReturnSettleRest.java new file mode 100644 index 0000000000..0cba51f7bd --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/apiadmin/SmsSalesReturnSettleRest.java @@ -0,0 +1,96 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.sms.biz.smssalesreturnsettle.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * Project: sdad(asdgag)
+ * File: SmsSalesReturnSettleFeignFallback.java
+ * Class: sms.biz.smssalesreturnsettle.SmsSalesReturnSettleRest
+ * Description: 退货单-结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-27 09:58:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "退货单-结算") +@RestController +@RequestMapping("/apiadmin/v1/smssalesreturnsettle") +public class SmsSalesReturnSettleRest { + + @Autowired + private SmsSalesReturnSettleService smsSalesReturnSettleService; + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = smsSalesReturnSettleService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody SmsSalesReturnSettleDto dto){ + ResultBean rb = ResultBean.fireFail(); + smsSalesReturnSettleService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + smsSalesReturnSettleService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + SmsSalesReturnSettleDetailsVo vo = smsSalesReturnSettleService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/package-info.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/package-info.java new file mode 100644 index 0000000000..be76b2f7b5 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通 仓库管理 项目后台逻辑和接口 + */ +package com.yxt.sms.biz; \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategy.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategy.java new file mode 100644 index 0000000000..50f9c2ec1f --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategy.java @@ -0,0 +1,74 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategy; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategy.java
+ * Class: com.yxt.sms.api.smspricestrategy.SmsPricestrategy
+ * Description: 价格策略.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略", description = "价格策略") +@TableName("sms_pricestrategy") +public class SmsPricestrategy extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + @ApiModelProperty("区间起始") + private Integer rangestart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyDetailsVo.java new file mode 100644 index 0000000000..133c922123 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyDetailsVo.java @@ -0,0 +1,75 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategy; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyVo.java
+ * Class: com.yxt.sms.api.smspricestrategy.SmsPricestrategyVo
+ * Description: 价格策略 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略 视图数据详情", description = "价格策略 视图数据详情") +public class SmsPricestrategyDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + @ApiModelProperty("区间起始") + private Integer rangestart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyDto.java new file mode 100644 index 0000000000..2923a0a894 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyDto.java @@ -0,0 +1,74 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategy; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyDto.java
+ * Class: com.yxt.sms.api.smspricestrategy.SmsPricestrategyDto
+ * Description: 价格策略 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略 数据传输对象", description = "价格策略 数据传输对象") +public class SmsPricestrategyDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + @ApiModelProperty("区间起始") + private Integer rangestart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyMapper.java new file mode 100644 index 0000000000..4cd05477ee --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategy; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyMapper.java
+ * Class: com.yxt.sms.biz.smspricestrategy.SmsPricestrategyMapper
+ * Description: 价格策略.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsPricestrategyMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_pricestrategy") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyMapper.xml new file mode 100644 index 0000000000..31a915dea7 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyQuery.java new file mode 100644 index 0000000000..31e15922ce --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyQuery.java @@ -0,0 +1,73 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategy; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyQuery.java
+ * Class: com.yxt.sms.api.smspricestrategy.SmsPricestrategyQuery
+ * Description: 价格策略 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略 查询条件", description = "价格策略 查询条件") +public class SmsPricestrategyQuery implements Query { + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + @ApiModelProperty("区间起始") + private Integer rangestart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyService.java new file mode 100644 index 0000000000..e109b220c2 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyService.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategy; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyService.java
+ * Class: com.yxt.sms.biz.smspricestrategy.SmsPricestrategyService
+ * Description: 价格策略 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsPricestrategyService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + SmsPricestrategyQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsPricestrategyDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(SmsPricestrategyDto dto){ + SmsPricestrategy entity = new SmsPricestrategy(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsPricestrategyDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsPricestrategy entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsPricestrategyDetailsVo fetchDetailsVoBySid(String sid){ + SmsPricestrategy entity = fetchBySid(sid); + SmsPricestrategyDetailsVo vo = new SmsPricestrategyDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyVo.java new file mode 100644 index 0000000000..5f588a3ef1 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategy/SmsPricestrategyVo.java @@ -0,0 +1,75 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategy; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyVo.java
+ * Class: com.yxt.sms.api.smspricestrategy.SmsPricestrategyVo
+ * Description: 价格策略 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略 视图数据对象", description = "价格策略 视图数据对象") +public class SmsPricestrategyVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + @ApiModelProperty("区间起始") + private Integer rangestart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBill.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBill.java new file mode 100644 index 0000000000..f2fd231ed8 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBill.java @@ -0,0 +1,68 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybill; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBill.java
+ * Class: com.yxt.sms.api.smspricestrategybill.SmsPricestrategyBill
+ * Description: 价格策略申请.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请", description = "价格策略申请") +@TableName("sms_pricestrategy_bill") +public class SmsPricestrategyBill extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("发起部门sid") + private String createDeptsid; // 发起部门sid + @ApiModelProperty("发起部门名称") + private String createDeptName; // 发起部门名称 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillDetailsVo.java new file mode 100644 index 0000000000..3b241ecf93 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillDetailsVo.java @@ -0,0 +1,74 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybill; + + +import com.yxt.common.core.vo.Vo; + +import com.yxt.sms.biz.smspricestrategybilldetail.SmsPricestrategyBillDetailDetailsVo; +import com.yxt.sms.biz.smspricestrategybilldetail.SmsPricestrategyBillDetailDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillVo.java
+ * Class: com.yxt.sms.api.smspricestrategybill.SmsPricestrategyBillVo
+ * Description: 价格策略申请 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请 视图数据详情", description = "价格策略申请 视图数据详情") +public class SmsPricestrategyBillDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("发起部门sid") + private String createDeptsid; // 发起部门sid + @ApiModelProperty("发起部门名称") + private String createDeptName; // 发起部门名称 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 + @ApiModelProperty("价格策略明细") + private List smsPricestrategyBillDetailList; +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillDto.java new file mode 100644 index 0000000000..450127196f --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillDto.java @@ -0,0 +1,73 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybill; + + +import com.yxt.common.core.dto.Dto; + +import com.yxt.sms.biz.smspricestrategybilldetail.SmsPricestrategyBillDetailDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillDto.java
+ * Class: com.yxt.sms.api.smspricestrategybill.SmsPricestrategyBillDto
+ * Description: 价格策略申请 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请 数据传输对象", description = "价格策略申请 数据传输对象") +public class SmsPricestrategyBillDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("发起部门sid") + private String createDeptsid; // 发起部门sid + @ApiModelProperty("发起部门名称") + private String createDeptName; // 发起部门名称 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 + @ApiModelProperty("价格策略明细") + private List smsPricestrategyBillDetailList; +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillMapper.java new file mode 100644 index 0000000000..47f911ec93 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybill; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillMapper.java
+ * Class: com.yxt.sms.biz.smspricestrategybill.SmsPricestrategyBillMapper
+ * Description: 价格策略申请.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsPricestrategyBillMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_pricestrategy_bill") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillMapper.xml new file mode 100644 index 0000000000..06be465299 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillQuery.java new file mode 100644 index 0000000000..1b5cf53384 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillQuery.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybill; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillQuery.java
+ * Class: com.yxt.sms.api.smspricestrategybill.SmsPricestrategyBillQuery
+ * Description: 价格策略申请 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请 查询条件", description = "价格策略申请 查询条件") +public class SmsPricestrategyBillQuery implements Query { + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("发起部门sid") + private String createDeptsid; // 发起部门sid + @ApiModelProperty("发起部门名称") + private String createDeptName; // 发起部门名称 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillService.java new file mode 100644 index 0000000000..9a9a01df8b --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillService.java @@ -0,0 +1,124 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybill; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.sms.biz.smspricestrategybilldetail.SmsPricestrategyBillDetailDetailsVo; +import com.yxt.sms.biz.smspricestrategybilldetail.SmsPricestrategyBillDetailDto; +import com.yxt.sms.biz.smspricestrategybilldetail.SmsPricestrategyBillDetailService; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillService.java
+ * Class: com.yxt.sms.biz.smspricestrategybill.SmsPricestrategyBillService
+ * Description: 价格策略申请 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsPricestrategyBillService extends MybatisBaseService { + + @Autowired + private SmsPricestrategyBillDetailService smsPricestrategyBillDetailService; + + public PagerVo listPageVo(PagerQuery pq) { + SmsPricestrategyBillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsPricestrategyBillDto dto){ + String dtoSid = dto.getSid(); + List smsPricestrategyBillDetailList = dto.getSmsPricestrategyBillDetailList(); + if (StringUtils.isBlank(dtoSid)) { + String sid = this.insertByDto(dto); + for (SmsPricestrategyBillDetailDto smsPricestrategyBillDetailDto : smsPricestrategyBillDetailList) { + smsPricestrategyBillDetailDto.setMainSid(sid); + smsPricestrategyBillDetailService.saveOrUpdateDto(smsPricestrategyBillDetailDto); + } + return; + } + this.updateByDto(dto); + smsPricestrategyBillDetailService.delByMainSid(dtoSid); + for (SmsPricestrategyBillDetailDto smsPricestrategyBillDetailDto : smsPricestrategyBillDetailList) { + smsPricestrategyBillDetailDto.setMainSid(dtoSid); + smsPricestrategyBillDetailService.saveOrUpdateDto(smsPricestrategyBillDetailDto); + } + } + + public String insertByDto(SmsPricestrategyBillDto dto){ + SmsPricestrategyBill entity = new SmsPricestrategyBill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return entity.getSid(); + } + + public void updateByDto(SmsPricestrategyBillDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsPricestrategyBill entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsPricestrategyBillDetailsVo fetchDetailsVoBySid(String sid){ + SmsPricestrategyBill entity = fetchBySid(sid); + SmsPricestrategyBillDetailsVo vo = new SmsPricestrategyBillDetailsVo(); + BeanUtil.copyProperties(entity, vo); + List smsPricestrategyBillDetailDetailsVos = smsPricestrategyBillDetailService.selByMainSid(sid); + vo.setSmsPricestrategyBillDetailList(smsPricestrategyBillDetailDetailsVos); + return vo; + } + + public void delAll(String[] sids) { + delBySids(sids); + for (String sid : sids) { + smsPricestrategyBillDetailService.delByMainSid(sid); + } + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillVo.java new file mode 100644 index 0000000000..e6bb0615aa --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybill/SmsPricestrategyBillVo.java @@ -0,0 +1,69 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybill; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillVo.java
+ * Class: com.yxt.sms.api.smspricestrategybill.SmsPricestrategyBillVo
+ * Description: 价格策略申请 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请 视图数据对象", description = "价格策略申请 视图数据对象") +public class SmsPricestrategyBillVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("发起部门sid") + private String createDeptsid; // 发起部门sid + @ApiModelProperty("发起部门名称") + private String createDeptName; // 发起部门名称 + @ApiModelProperty("组织sid") + private String useOrgSid; // 组织sid + @ApiModelProperty("组织名称") + private String useOrgName; // 组织名称 + @ApiModelProperty("组织全路径") + private String orgSidPath; // 组织全路径 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetail.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetail.java new file mode 100644 index 0000000000..12cf83eb91 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetail.java @@ -0,0 +1,64 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybilldetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillDetail.java
+ * Class: com.yxt.sms.api.smspricestrategybilldetail.SmsPricestrategyBillDetail
+ * Description: 价格策略申请明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请明细", description = "价格策略申请明细") +@TableName("sms_pricestrategy_bill_detail") +public class SmsPricestrategyBillDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("申请单sid") + private String mainSid; // 申请单sid + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailDetailsVo.java new file mode 100644 index 0000000000..e5191fdb9b --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailDetailsVo.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybilldetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillDetailVo.java
+ * Class: com.yxt.sms.api.smspricestrategybilldetail.SmsPricestrategyBillDetailVo
+ * Description: 价格策略申请明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请明细 视图数据详情", description = "价格策略申请明细 视图数据详情") +public class SmsPricestrategyBillDetailDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("申请单sid") + private String mainSid; // 申请单sid + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailDto.java new file mode 100644 index 0000000000..4e37a0bd6f --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailDto.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybilldetail; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillDetailDto.java
+ * Class: com.yxt.sms.api.smspricestrategybilldetail.SmsPricestrategyBillDetailDto
+ * Description: 价格策略申请明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请明细 数据传输对象", description = "价格策略申请明细 数据传输对象") +public class SmsPricestrategyBillDetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("申请单sid") + private String mainSid; // 申请单sid + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailMapper.java new file mode 100644 index 0000000000..de15750032 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybilldetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillDetailMapper.java
+ * Class: com.yxt.sms.biz.smspricestrategybilldetail.SmsPricestrategyBillDetailMapper
+ * Description: 价格策略申请明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsPricestrategyBillDetailMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_pricestrategy_bill_detail") + List selectListVo(); + + @Delete("delete from sms_pricestrategy_bill_detail where mainSid = #{mainSid}") + void delByMainSid(String mainSid); + + @Select("select * from sms_pricestrategy_bill_detail where mainSid = #{mainSid}") + List selByMainSid(String mainSid); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailMapper.xml new file mode 100644 index 0000000000..0a7479d5c1 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailQuery.java new file mode 100644 index 0000000000..961c95c796 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailQuery.java @@ -0,0 +1,63 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybilldetail; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillDetailQuery.java
+ * Class: com.yxt.sms.api.smspricestrategybilldetail.SmsPricestrategyBillDetailQuery
+ * Description: 价格策略申请明细 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请明细 查询条件", description = "价格策略申请明细 查询条件") +public class SmsPricestrategyBillDetailQuery implements Query { + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("申请单sid") + private String mainSid; // 申请单sid + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailService.java new file mode 100644 index 0000000000..786fbd9da7 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailService.java @@ -0,0 +1,105 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybilldetail; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillDetailService.java
+ * Class: com.yxt.sms.biz.smspricestrategybilldetail.SmsPricestrategyBillDetailService
+ * Description: 价格策略申请明细 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsPricestrategyBillDetailService extends MybatisBaseService { + + public PagerVo listPageVo(PagerQuery pq) { + SmsPricestrategyBillDetailQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsPricestrategyBillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(SmsPricestrategyBillDetailDto dto){ + SmsPricestrategyBillDetail entity = new SmsPricestrategyBillDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsPricestrategyBillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsPricestrategyBillDetail entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsPricestrategyBillDetailDetailsVo fetchDetailsVoBySid(String sid){ + SmsPricestrategyBillDetail entity = fetchBySid(sid); + SmsPricestrategyBillDetailDetailsVo vo = new SmsPricestrategyBillDetailDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void delByMainSid(String mainSid) { + baseMapper.delByMainSid(mainSid); + } + + public List selByMainSid(String mainSid) { + return baseMapper.selByMainSid(mainSid); + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailVo.java new file mode 100644 index 0000000000..3b3de045f9 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybilldetail/SmsPricestrategyBillDetailVo.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybilldetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillDetailVo.java
+ * Class: com.yxt.sms.api.smspricestrategybilldetail.SmsPricestrategyBillDetailVo
+ * Description: 价格策略申请明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略申请明细 视图数据对象", description = "价格策略申请明细 视图数据对象") +public class SmsPricestrategyBillDetailVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("申请单sid") + private String mainSid; // 申请单sid + @ApiModelProperty("商品类别sid") + private String goodsTypeSid; // 商品类别sid + @ApiModelProperty("商品类别名称") + private String goodsTypeName; // 商品类别名称 + @ApiModelProperty("价格策略类别(固定比例0、价格区间1)") + private Integer strategyType; // 价格策略类别(固定比例0、价格区间1) + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetail.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetail.java new file mode 100644 index 0000000000..964e2249f6 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetail.java @@ -0,0 +1,64 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybillgoodstypedetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillGoodstypedetail.java
+ * Class: com.yxt.sms.api.smspricestrategybillgoodstypedetail.SmsPricestrategyBillGoodstypedetail
+ * Description: 价格策略商品类别明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略商品类别明细", description = "价格策略商品类别明细") +@TableName("sms_pricestrategy_bill_goodstypedetail") +public class SmsPricestrategyBillGoodstypedetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("业务sid") + private String detailSid; // 业务sid + @ApiModelProperty("区间起始") + private Integer rangeStart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailDetailsVo.java new file mode 100644 index 0000000000..0142dc2e5b --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailDetailsVo.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybillgoodstypedetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillGoodstypedetailVo.java
+ * Class: com.yxt.sms.api.smspricestrategybillgoodstypedetail.SmsPricestrategyBillGoodstypedetailVo
+ * Description: 价格策略商品类别明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略商品类别明细 视图数据详情", description = "价格策略商品类别明细 视图数据详情") +public class SmsPricestrategyBillGoodstypedetailDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("业务sid") + private String detailSid; // 业务sid + @ApiModelProperty("区间起始") + private Integer rangeStart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailDto.java new file mode 100644 index 0000000000..0d4f35e42e --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailDto.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybillgoodstypedetail; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillGoodstypedetailDto.java
+ * Class: com.yxt.sms.api.smspricestrategybillgoodstypedetail.SmsPricestrategyBillGoodstypedetailDto
+ * Description: 价格策略商品类别明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略商品类别明细 数据传输对象", description = "价格策略商品类别明细 数据传输对象") +public class SmsPricestrategyBillGoodstypedetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("业务sid") + private String detailSid; // 业务sid + @ApiModelProperty("区间起始") + private Integer rangeStart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailMapper.java new file mode 100644 index 0000000000..ad61f5e39b --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybillgoodstypedetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillGoodstypedetailMapper.java
+ * Class: com.yxt.sms.biz.smspricestrategybillgoodstypedetail.SmsPricestrategyBillGoodstypedetailMapper
+ * Description: 价格策略商品类别明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsPricestrategyBillGoodstypedetailMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_pricestrategy_bill_goodstypedetail") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailMapper.xml new file mode 100644 index 0000000000..f90897fc64 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailQuery.java new file mode 100644 index 0000000000..7b818892f0 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailQuery.java @@ -0,0 +1,63 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybillgoodstypedetail; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillGoodstypedetailQuery.java
+ * Class: com.yxt.sms.api.smspricestrategybillgoodstypedetail.SmsPricestrategyBillGoodstypedetailQuery
+ * Description: 价格策略商品类别明细 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略商品类别明细 查询条件", description = "价格策略商品类别明细 查询条件") +public class SmsPricestrategyBillGoodstypedetailQuery implements Query { + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("业务sid") + private String detailSid; // 业务sid + @ApiModelProperty("区间起始") + private Integer rangeStart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailService.java new file mode 100644 index 0000000000..deb6e4c175 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailService.java @@ -0,0 +1,101 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybillgoodstypedetail; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillGoodstypedetailService.java
+ * Class: com.yxt.sms.biz.smspricestrategybillgoodstypedetail.SmsPricestrategyBillGoodstypedetailService
+ * Description: 价格策略商品类别明细 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsPricestrategyBillGoodstypedetailService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(SmsPricestrategyBillGoodstypedetailQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + SmsPricestrategyBillGoodstypedetailQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsPricestrategyBillGoodstypedetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(SmsPricestrategyBillGoodstypedetailDto dto){ + SmsPricestrategyBillGoodstypedetail entity = new SmsPricestrategyBillGoodstypedetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsPricestrategyBillGoodstypedetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsPricestrategyBillGoodstypedetail entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsPricestrategyBillGoodstypedetailDetailsVo fetchDetailsVoBySid(String sid){ + SmsPricestrategyBillGoodstypedetail entity = fetchBySid(sid); + SmsPricestrategyBillGoodstypedetailDetailsVo vo = new SmsPricestrategyBillGoodstypedetailDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailVo.java new file mode 100644 index 0000000000..e9cd21ac7a --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smspricestrategybillgoodstypedetail/SmsPricestrategyBillGoodstypedetailVo.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smspricestrategybillgoodstypedetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-sms(价格策略)
+ * File: SmsPricestrategyBillGoodstypedetailVo.java
+ * Class: com.yxt.sms.api.smspricestrategybillgoodstypedetail.SmsPricestrategyBillGoodstypedetailVo
+ * Description: 价格策略商品类别明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-28 14:32:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "价格策略商品类别明细 视图数据对象", description = "价格策略商品类别明细 视图数据对象") +public class SmsPricestrategyBillGoodstypedetailVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("业务sid") + private String detailSid; // 业务sid + @ApiModelProperty("区间起始") + private Integer rangeStart; // 区间起始 + @ApiModelProperty("区间截止") + private Integer rangeEnd; // 区间截止 + @ApiModelProperty("加价比例") + private Integer markupRate; // 加价比例 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SalesGoodsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SalesGoodsVo.java new file mode 100644 index 0000000000..8ed0cfc2fa --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SalesGoodsVo.java @@ -0,0 +1,55 @@ +package com.yxt.sms.biz.smssalesbill; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/3/19 15:18 + */ +@Data +public class SalesGoodsVo { + + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目(自费、保内等)") + private String subject; // 科目(自费、保内等) + @ApiModelProperty("销售前库存数量") + private String currentCount; // 销售前库存数量 + @ApiModelProperty("销售价") + private String price; // 销售价 + @ApiModelProperty("数量") + private String count; // 数量 + @ApiModelProperty("折扣(0-10,0免费,10不打折)") + private String discount; // 折扣(0-10,0免费,10不打折) + @ApiModelProperty("优惠金额(=销售价*(折扣*0.1))") + private String discountAmount; // 优惠金额(=销售价*(折扣*0.1)) + @ApiModelProperty("金额(销售价-优惠金额)") + private String amount; // 金额(销售价-优惠金额) + @ApiModelProperty("已出库数量(仓储中具体出库数量)") + private String outboundCount; // 已出库数量(仓储中具体出库数量) + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SalesInvoiceVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SalesInvoiceVo.java new file mode 100644 index 0000000000..6ae691a69a --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SalesInvoiceVo.java @@ -0,0 +1,29 @@ +package com.yxt.sms.biz.smssalesbill; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/3/19 15:14 + */ +@Data +public class SalesInvoiceVo { + + @ApiModelProperty("是否需要开发票(是1,否0)") + private String isInvoicing; // 是否需要开发票(是1,否0) + @ApiModelProperty("发票类型") + private String invoiceType; // 发票类型 + @ApiModelProperty("开票名称") + private String invoiceTitle; // 开票名称 + @ApiModelProperty("税号") + private String taxpayerNo; // 税号 + @ApiModelProperty("发票号码") + private String invoiceCode; // 发票号码 + @ApiModelProperty("税率") + private String taxRate; // 税率 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SettlementVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SettlementVo.java new file mode 100644 index 0000000000..72874bd0ea --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SettlementVo.java @@ -0,0 +1,45 @@ +package com.yxt.sms.biz.smssalesbill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author Fan + * @description + * @date 2024/3/20 15:42 + */ +@Data +public class SettlementVo { + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("应收金额(总计金额-优惠-优惠券-积分抵扣)") + private String receivableAmount; // 应收金额(总计金额-优惠-优惠券-积分抵扣) + @ApiModelProperty("订金抵扣") + private String depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private String settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private String debts; // 欠款金额 + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBill.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBill.java new file mode 100644 index 0000000000..6ed24589da --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBill.java @@ -0,0 +1,98 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbill; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBill.java
+ * Class: com.yxt.sms.api.smssalesbill.SmsSalesBill
+ * Description: 销售单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单", description = "销售单") +@TableName("sms_sales_bill") +public class SmsSalesBill extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目") + private String subject; // 科目 + @ApiModelProperty("销售用户sid单选)(销售用户sid)") + private String salesUserSid; // 销售用户sid单选)(销售用户sid) + @ApiModelProperty("销售姓名") + private String salesName; // 销售姓名 + @ApiModelProperty("条形码") + private String barCode; // 条形码 + @ApiModelProperty("快捷备注(选择)") + private String shotRemarks; // 快捷备注(选择) + @ApiModelProperty("备注(打印)") + private String printRemarks; // 备注(打印) + @ApiModelProperty("整体优惠金额") + private BigDecimal discountAmount; // 整体优惠金额 + @ApiModelProperty("整体优惠券") + private BigDecimal coupon; // 整体优惠券 + @ApiModelProperty("积分抵扣") + private BigDecimal scoreDeduct; // 积分抵扣 + @ApiModelProperty("客户sid") + private String customerSid; // 客户sid + @ApiModelProperty("客户名称") + private String customerName; // 客户名称 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("车辆牌照") + private String vehMark; // 车辆牌照 + @ApiModelProperty("客户单位") + private String customerOrg; // 客户单位 + @ApiModelProperty("会员卡sid") + private String memberCardSid; // 会员卡sid + @ApiModelProperty("会员卡号") + private String memberCardNumber; // 会员卡号 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillDetailsVo.java new file mode 100644 index 0000000000..d571b3bd99 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillDetailsVo.java @@ -0,0 +1,99 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbill; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillVo.java
+ * Class: com.yxt.sms.api.smssalesbill.SmsSalesBillVo
+ * Description: 销售单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单 视图数据详情", description = "销售单 视图数据详情") +public class SmsSalesBillDetailsVo implements Vo { + + private String sid; // sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("创建者") + private String createBySid; + @ApiModelProperty("客户sid") + private String customerSid; // 客户sid + @ApiModelProperty("客户名称") + private String customerName; // 客户名称 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("车牌号") + private String vehMark; // 车牌号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目") + private String subject; // 科目 + @ApiModelProperty("销售用户sid单选)(销售用户sid)") + private String salesUserSid; // 销售用户sid单选)(销售用户sid) + @ApiModelProperty("销售姓名") + private String salesName; // 销售姓名 + @ApiModelProperty("条形码") + private String barCode; // 条形码 + @ApiModelProperty("快捷备注(选择)") + private String shotRemarks; // 快捷备注(选择) + @ApiModelProperty("备注(打印)") + private String printRemarks; // 备注(打印) + @ApiModelProperty("整体优惠金额") + private String discountAmount; // 整体优惠金额 + @ApiModelProperty("整体优惠券") + private String coupon; // 整体优惠券 + @ApiModelProperty("积分抵扣") + private String scoreDeduct; // 积分抵扣 + private SalesInvoiceVo invoiceVo = new SalesInvoiceVo(); //发票信息 + private List goodsVos = new ArrayList<>(); //商品信息 + private SettlementVo settlementVo = new SettlementVo(); //结算信息 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillDto.java new file mode 100644 index 0000000000..22042e180e --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillDto.java @@ -0,0 +1,99 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbill; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillDto.java
+ * Class: com.yxt.sms.api.smssalesbill.SmsSalesBillDto
+ * Description: 销售单 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单 数据传输对象", description = "销售单 数据传输对象") +public class SmsSalesBillDto implements Dto { + + private String sid; // sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("创建者") + private String createBySid; + @ApiModelProperty("客户sid") + private String customerSid; // 客户sid + @ApiModelProperty("客户名称") + private String customerName; // 客户名称 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("车牌号") + private String vehMark; // 车牌号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目") + private String subject; // 科目 + @ApiModelProperty("销售用户sid单选)(销售用户sid)") + private String salesUserSid; // 销售用户sid单选)(销售用户sid) + @ApiModelProperty("销售姓名") + private String salesName; // 销售姓名 + @ApiModelProperty("条形码") + private String barCode; // 条形码 + @ApiModelProperty("快捷备注(选择)") + private String shotRemarks; // 快捷备注(选择) + @ApiModelProperty("备注(打印)") + private String printRemarks; // 备注(打印) + @ApiModelProperty("整体优惠金额") + private String discountAmount; // 整体优惠金额 + @ApiModelProperty("整体优惠券") + private String coupon; // 整体优惠券 + @ApiModelProperty("积分抵扣") + private String scoreDeduct; // 积分抵扣 + private SalesInvoiceVo invoiceVo = new SalesInvoiceVo(); //发票信息 + private List goodsVos = new ArrayList<>(); //商品信息 + private SettlementVo settlementVo = new SettlementVo(); //结算信息 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillExportVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillExportVo.java new file mode 100644 index 0000000000..284f76ce87 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillExportVo.java @@ -0,0 +1,38 @@ +package com.yxt.sms.biz.smssalesbill; + +import com.yxt.common.core.utils.ExportEntityMap; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/20 9:52 + */ +@Data +public class SmsSalesBillExportVo { + + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "单据状态", EnName = "state") + private String state; + @ExportEntityMap(CnName = "制单时间", EnName = "createTime") + private String createTime; + @ExportEntityMap(CnName = "制单人姓名", EnName = "createByName") + private String createByName; // 制单人姓名 + @ExportEntityMap(CnName = "单据编号", EnName = "billNo") + private String billNo; // 单据编号 + @ExportEntityMap(CnName = "服务顾问", EnName = "salesName") + private String salesName; // 销售姓名 + @ExportEntityMap(CnName = "快捷备注", EnName = "shotRemarks") + private String shotRemarks; // 快捷备注(选择) + @ExportEntityMap(CnName = "备注(打印)", EnName = "printRemarks") + private String printRemarks; // 备注(打印) + @ExportEntityMap(CnName = "客户名称", EnName = "customerName") + private String customerName; // 客户名称 + @ExportEntityMap(CnName = "联系电话", EnName = "mobile") + private String mobile; // 联系电话 + @ExportEntityMap(CnName = "车辆牌照", EnName = "vehMark") + private String vehMark; // 车辆牌照 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillMapper.java new file mode 100644 index 0000000000..5e17ad6bca --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillMapper.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbill; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.sms.biz.smssalesbill.report.SmsSalesBillGoodsDetailsReportVo; +import com.yxt.sms.biz.smssalesbill.report.SmsSalesGoodsTotalsVo; +import com.yxt.sms.biz.smssalesbill.report.SmsSalesTrendVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillMapper.java
+ * Class: com.yxt.sms.biz.smssalesbill.SmsSalesBillMapper
+ * Description: 销售单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsSalesBillMapper extends BaseMapper { + + //@Update("update sms_sales_bill set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_sales_bill") + List selectListVo(); + + List listExcel(@Param(Constants.WRAPPER)QueryWrapper qw); + + IPage goodsDetailsReport(IPage page,@Param(Constants.WRAPPER) QueryWrapper qw); + + IPage goodsTotalsReport(IPage page,@Param(Constants.WRAPPER) QueryWrapper qw); + + IPage goodsTrendReport(IPage page,@Param(Constants.WRAPPER) QueryWrapper qw); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillMapper.xml new file mode 100644 index 0000000000..235a5ff027 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillMapper.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillQuery.java new file mode 100644 index 0000000000..0a59bd5386 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillQuery.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbill; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillQuery.java
+ * Class: com.yxt.sms.api.smssalesbill.SmsSalesBillQuery
+ * Description: 销售单 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单 查询条件", description = "销售单 查询条件") +public class SmsSalesBillQuery implements Query { + +// @ApiModelProperty("制单人姓名") +// private String createByName; // 制单人姓名 +// @ApiModelProperty("单据编号") +// private String billNo; // 单据编号 +// @ApiModelProperty("销售姓名") +// private String salesName; // 销售姓名 +// @ApiModelProperty("客户名称") +// private String customerName; // 客户名称 +// @ApiModelProperty("联系电话") +// private String mobile; // 联系电话 + + private String queryName; + private String startDate; + private String endDate; + + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillService.java new file mode 100644 index 0000000000..d5e3bf85af --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillService.java @@ -0,0 +1,367 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbill; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.sms.biz.smssalesbill.report.*; +import com.yxt.sms.biz.smssalesbilldetail.SmsSalesBillDetail; +import com.yxt.sms.biz.smssalesbilldetail.SmsSalesBillDetailService; +import com.yxt.sms.biz.smssalesbillinvoice.SmsSalesBillInvoice; +import com.yxt.sms.biz.smssalesbillinvoice.SmsSalesBillInvoiceService; +import com.yxt.sms.biz.smssalesbillsettle.SmsSalesBillSettle; +import com.yxt.sms.biz.smssalesbillsettle.SmsSalesBillSettleService; +import com.yxt.sms.feign.fms.fmsreceivesettle.FmsReceivesettle; +import com.yxt.sms.feign.fms.fmsreceivesettle.FmsReceivesettleDto; +import com.yxt.sms.feign.fms.fmsreceivesettle.FmsReceivesettleFeign; +import com.yxt.sms.feign.wms.wmsinventory.*; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillService.java
+ * Class: com.yxt.sms.biz.smssalesbill.SmsSalesBillService
+ * Description: 销售单 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsSalesBillService extends MybatisBaseService { + + @Autowired + private SmsSalesBillDetailService smsSalesBillDetailService; + @Autowired + private SmsSalesBillInvoiceService smsSalesBillInvoiceService; + @Resource + private WmsInventoryFeign wmsInventoryFeign; + @Autowired + private SmsSalesBillSettleService smsSalesBillSettleService; + @Resource + private FmsReceivesettleFeign fmsReceivesettleFeign; + + private QueryWrapper createQueryWrapper(SmsSalesBillQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getQueryName())) { + qw.and(wrapper -> wrapper.like("createByName", query.getQueryName()) + .or().like("billNo", query.getQueryName()) + .or().like("salesName", query.getQueryName()) + .or().like("customerName", query.getQueryName()) + .or().like("mobile", query.getQueryName()) + .or().like("vehMark", query.getQueryName()) + ); + } + String startDate = query.getStartDate(); + String endDate = query.getEndDate(); + qw.apply(StringUtils.isNotEmpty(startDate), "date_format (createTime,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(endDate), "date_format (createTime,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')" + ); + qw.eq("1", "1"); + qw.orderByDesc("createTime"); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + SmsSalesBillQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + @Transactional(rollbackFor = Exception.class) + public String saveOrUpdateDto(SmsSalesBillDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + SmsSalesBill entity = new SmsSalesBill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + SalesInvoiceVo invoiceVo = dto.getInvoiceVo(); + if (null != invoiceVo) { + SmsSalesBillInvoice invoice = new SmsSalesBillInvoice(); + BeanUtil.copyProperties(invoiceVo, invoice, "id", "sid"); + invoice.setBillSid(entity.getSid()); + smsSalesBillInvoiceService.insert(invoice); + } + List goodsVos = dto.getGoodsVos(); + if (!goodsVos.isEmpty()) { + for (SalesGoodsVo goodsVo : goodsVos) { + SmsSalesBillDetail salesBillDetail = new SmsSalesBillDetail(); + BeanUtil.copyProperties(goodsVo, salesBillDetail, "id", "sid"); + salesBillDetail.setBillSid(entity.getSid()); + smsSalesBillDetailService.insert(salesBillDetail); + } + } + return entity.getSid(); + } + SmsSalesBill smsSalesBill = fetchBySid(dtoSid); + if (null != smsSalesBill) { + BeanUtil.copyProperties(dto, smsSalesBill, "id", "sid"); + baseMapper.updateById(smsSalesBill); + smsSalesBillDetailService.delByMainSid(dtoSid); + smsSalesBillInvoiceService.delByMainSid(dtoSid); + SalesInvoiceVo invoiceVo = dto.getInvoiceVo(); + if (null != invoiceVo) { + SmsSalesBillInvoice invoice = new SmsSalesBillInvoice(); + BeanUtil.copyProperties(invoiceVo, invoice, "id", "sid"); + invoice.setBillSid(dtoSid); + smsSalesBillInvoiceService.insert(invoice); + } + List goodsVos = dto.getGoodsVos(); + if (!goodsVos.isEmpty()) { + for (SalesGoodsVo goodsVo : goodsVos) { + SmsSalesBillDetail salesBillDetail = new SmsSalesBillDetail(); + BeanUtil.copyProperties(goodsVo, salesBillDetail, "id", "sid"); + salesBillDetail.setBillSid(dtoSid); + smsSalesBillDetailService.insert(salesBillDetail); + } + } + } + return dtoSid; + } + + public void insertByDto(SmsSalesBillDto dto) { + SmsSalesBill entity = new SmsSalesBill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsSalesBillDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsSalesBill entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsSalesBillDetailsVo fetchDetailsVoBySid(String sid) { + SmsSalesBill entity = fetchBySid(sid); + SmsSalesBillDetailsVo vo = new SmsSalesBillDetailsVo(); + List goodsVos = new ArrayList<>(); //商品信息 + if (null != entity) { + BeanUtil.copyProperties(entity, vo); + List billDetailList = smsSalesBillDetailService.fetchByMainSid(sid); + if (!billDetailList.isEmpty()) { + for (SmsSalesBillDetail smsSalesBillDetail : billDetailList) { + SalesGoodsVo salesGoodsVo = new SalesGoodsVo(); + BeanUtil.copyProperties(smsSalesBillDetail, salesGoodsVo); + goodsVos.add(salesGoodsVo); + } + vo.setGoodsVos(goodsVos); + } + SalesInvoiceVo invoiceVo = new SalesInvoiceVo(); + SmsSalesBillInvoice smsSalesBillInvoice = smsSalesBillInvoiceService.fetchByMainSid(sid); + if (null != smsSalesBillInvoice) { + BeanUtil.copyProperties(smsSalesBillInvoice, invoiceVo); + vo.setInvoiceVo(invoiceVo); + } + SettlementVo settlementVo = new SettlementVo(); + FmsReceivesettle receivesettle = fmsReceivesettleFeign.fetchBySourceSid(sid).getData(); + if (null != receivesettle) { + BeanUtil.copyProperties(receivesettle, settlementVo); + vo.setSettlementVo(settlementVo); + } + } + return vo; + } + + + public List listExcel(SmsSalesBillQuery query) { + QueryWrapper qw = createQueryWrapper(query); + List list = baseMapper.listExcel(qw); + return list; + } + + public ResultBean> listPageSales(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pagerVo = new PagerVo<>(); + PagerQuery pagerQuery = new PagerQuery<>(); + BeanUtil.copyProperties(pq, pagerQuery); + PagerVo voPagerVo = wmsInventoryFeign.listPageSales(pagerQuery).getData(); + if (null != voPagerVo) { + BeanUtil.copyProperties(voPagerVo, pagerVo); + } + return rb.success().setData(pagerVo); + } + + public ResultBean settlement(SmsSalesBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = saveOrUpdateDto(dto); + if (StringUtils.isNotBlank(sid)) { + SettlementVo settlementVo = dto.getSettlementVo(); + FmsReceivesettleDto settle = new FmsReceivesettleDto(); + BeanUtil.copyProperties(settlementVo, settle, "id", "sid"); + if (StringUtils.isNotBlank(dto.getBillNo())) { + settle.setSourceBillNo(dto.getBillNo()); + } + settle.setBusTypeKey("001"); + settle.setBusTypeValue("销售出库"); + settle.setSourceBillSid(sid); + fmsReceivesettleFeign.save(settle); + SmsSalesBill smsSalesBill = fetchBySid(sid); + smsSalesBill.setState(0); + baseMapper.updateById(smsSalesBill); + List billDetailList = smsSalesBillDetailService.fetchByMainSid(sid); + if (!billDetailList.isEmpty()) { + for (SmsSalesBillDetail salesBillDetail : billDetailList) { + WmsUpdateCountQuery countQuery = new WmsUpdateCountQuery(); + countQuery.setSid(salesBillDetail.getInventorySid()); + countQuery.setCount(salesBillDetail.getCount()); + countQuery.setAddOrReduce(1); + wmsInventoryFeign.updateInventoryCount(countQuery); + } + } + } + return rb.success(); + } + + public PagerVo goodsDetailsReport(PagerQuery pq) { + SmsSalesBillGoodsDetailsReportQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getUseOrgSid())) { + qw.eq("s.useOrgSid",query.getUseOrgSid()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("d.goodsSkuCode",query.getGoodsSkuCode()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuTitle())) { + qw.like("d.goodsSkuTitle",query.getGoodsSkuTitle()); + } + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("d.goodsSpuName",query.getGoodsSpuName()); + } + if (StringUtils.isNotBlank(query.getWarehouse())) { + qw.like("d.warehouse",query.getWarehouse()); + } + String startDate = query.getStartDate(); + String endDate = query.getEndDate(); + qw.apply(StringUtils.isNotEmpty(startDate), "date_format (s.createTime,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(endDate), "date_format (s.createTime,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')" + ); + qw.eq("s.state","0"); + qw.orderByDesc("s.createTime"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.goodsDetailsReport(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public PagerVo goodsTotalsReport(PagerQuery pq) { + SmsSalesGoodsTotalsQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getUseOrgSid())) { + qw.eq("s.useOrgSid",query.getUseOrgSid()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("d.goodsSkuCode",query.getGoodsSkuCode()); + } + if (StringUtils.isNotBlank(query.getGoodsSkuTitle())) { + qw.like("d.goodsSkuTitle",query.getGoodsSkuTitle()); + } + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("d.goodsSpuName",query.getGoodsSpuName()); + } + if (StringUtils.isNotBlank(query.getWarehouse())) { + qw.like("d.warehouse",query.getWarehouse()); + } + String startDate = query.getStartDate(); + String endDate = query.getEndDate(); + qw.apply(StringUtils.isNotEmpty(startDate), "date_format (s.createTime,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(endDate), "date_format (s.createTime,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')" + ); + qw.eq("s.state","0"); + qw.orderByDesc("s.createTime"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.goodsTotalsReport(page, qw); + List records = pagging.getRecords(); + records.removeAll(Collections.singleton(null)); + if (!records.isEmpty()) { + for (SmsSalesGoodsTotalsVo record : records) { + WmsInventory inventory = wmsInventoryFeign.fetchEntityBySid(record.getInventorySid()).getData(); + if (null != inventory) { + if (null != inventory.getCount()) { + record.setNowCount(inventory.getCount().toString()); + } + if (StringUtils.isNotBlank(inventory.getGoodsSkuOwnSpec())) { + record.setGoodsSkuOwnSpec(inventory.getGoodsSkuOwnSpec()); + } + } + } + } + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public PagerVo goodsTrendReport(PagerQuery pq) { + SmsSalesTrendQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getUseOrgSid())) { + qw.eq("s.useOrgSid",query.getUseOrgSid()); + } + if (StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("d.goodsSpuName",query.getGoodsSpuName()); + } else { + PagerVo pagerVo = new PagerVo<>(); + return pagerVo; + } + String startDate = query.getStartDate(); + String endDate = query.getEndDate(); + qw.apply(StringUtils.isNotEmpty(startDate), "date_format (s.createTime,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(endDate), "date_format (s.createTime,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')" + ); + qw.eq("s.state","0"); + qw.orderByDesc("s.createTime"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.goodsTrendReport(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillVo.java new file mode 100644 index 0000000000..2abfb0340c --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsSalesBillVo.java @@ -0,0 +1,74 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbill; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillVo.java
+ * Class: com.yxt.sms.api.smssalesbill.SmsSalesBillVo
+ * Description: 销售单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单 视图数据对象", description = "销售单 视图数据对象") +public class SmsSalesBillVo implements Vo { + + private String sid; // sid + + private String createTime; + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("销售姓名") + private String salesName; // 销售姓名 + @ApiModelProperty("快捷备注(选择)") + private String shotRemarks; // 快捷备注(选择) + @ApiModelProperty("备注(打印)") + private String printRemarks; // 备注(打印) + @ApiModelProperty("客户名称") + private String customerName; // 客户名称 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("车辆牌照") + private String vehMark; // 车辆牌照 + private String state; +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsWmsInventorySalesQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsWmsInventorySalesQuery.java new file mode 100644 index 0000000000..b76d007156 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsWmsInventorySalesQuery.java @@ -0,0 +1,16 @@ +package com.yxt.sms.biz.smssalesbill; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/20 15:14 + */ +@Data +public class SmsWmsInventorySalesQuery implements Query { + + private String queryName; //名称 + private String useOrgSid; +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsWmsInventorySalesVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsWmsInventorySalesVo.java new file mode 100644 index 0000000000..762a0dc879 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/SmsWmsInventorySalesVo.java @@ -0,0 +1,29 @@ +package com.yxt.sms.biz.smssalesbill; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/20 15:14 + */ +@Data +public class SmsWmsInventorySalesVo implements Vo { + + private String inventorySid; + private String goodsID; + private String goodSpuSid;//商品基础信息sid + private String goodsSpuName;//商品名称 + private String goodsSkuSid;//商品Skusid + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String unit;//计量单位 + private String currentCount;//库存数量 + private String warehouseSid;//仓库sid + private String warehouse;//仓库名称 + private String price;//销售价 + +} + + diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesBillGoodsDetailsReportQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesBillGoodsDetailsReportQuery.java new file mode 100644 index 0000000000..a24a759cb0 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesBillGoodsDetailsReportQuery.java @@ -0,0 +1,26 @@ +package com.yxt.sms.biz.smssalesbill.report; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/7 15:29 + */ +@Data +public class SmsSalesBillGoodsDetailsReportQuery implements Query { + + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + private String startDate; + private String endDate; + private String useOrgSid; +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesBillGoodsDetailsReportVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesBillGoodsDetailsReportVo.java new file mode 100644 index 0000000000..e6186fb244 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesBillGoodsDetailsReportVo.java @@ -0,0 +1,43 @@ +package com.yxt.sms.biz.smssalesbill.report; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/4/7 15:28 + */ +@Data +public class SmsSalesBillGoodsDetailsReportVo implements Vo { + + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("科目(自费、保内等)") + private String subject; // 科目(自费、保内等) + @ApiModelProperty("销售前库存数量") + private String currentCount; // 销售前库存数量 + @ApiModelProperty("销售价") + private String price; // 销售价 + @ApiModelProperty("数量") + private String count; // 数量 + @ApiModelProperty("折扣(0-10,0免费,10不打折)") + private String discount; // 折扣(0-10,0免费,10不打折) + @ApiModelProperty("优惠金额(=销售价*(折扣*0.1))") + private String discountAmount; // 优惠金额(=销售价*(折扣*0.1)) + @ApiModelProperty("金额(销售价-优惠金额)") + private String amount; // 金额(销售价-优惠金额) + @ApiModelProperty("已出库数量(仓储中具体出库数量)") + private String outboundCount; // 已出库数量(仓储中具体出库数量) +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesGoodsTotalsQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesGoodsTotalsQuery.java new file mode 100644 index 0000000000..886700785c --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesGoodsTotalsQuery.java @@ -0,0 +1,25 @@ +package com.yxt.sms.biz.smssalesbill.report; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/8 16:17 + */ +@Data +public class SmsSalesGoodsTotalsQuery implements Query { + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + private String startDate; + private String endDate; + private String useOrgSid; +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesGoodsTotalsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesGoodsTotalsVo.java new file mode 100644 index 0000000000..544a2cd22c --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesGoodsTotalsVo.java @@ -0,0 +1,40 @@ +package com.yxt.sms.biz.smssalesbill.report; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/4/8 16:17 + */ +@Data +public class SmsSalesGoodsTotalsVo implements Vo { + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("科目(自费、保内等)") + private String subject; // 科目(自费、保内等) + @ApiModelProperty("数量") + private String count; // 数量 + @ApiModelProperty("金额(销售价-优惠金额)") + private String amount; // 金额(销售价-优惠金额) + @ApiModelProperty("退货数量") + private String backCount; // 退货数量 + @ApiModelProperty("退货金额") + private String backAmount; // 退货金额 + private String goodsSkuOwnSpec;//规格型号 + private String nowCount;//库存数量 + private String inventorySid; + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesTrendQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesTrendQuery.java new file mode 100644 index 0000000000..9141c6819d --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesTrendQuery.java @@ -0,0 +1,20 @@ +package com.yxt.sms.biz.smssalesbill.report; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/8 17:06 + */ +@Data +public class SmsSalesTrendQuery implements Query { + + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + private String startDate; + private String endDate; + private String useOrgSid; +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesTrendVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesTrendVo.java new file mode 100644 index 0000000000..d24baec0c3 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbill/report/SmsSalesTrendVo.java @@ -0,0 +1,30 @@ +package com.yxt.sms.biz.smssalesbill.report; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/4/8 17:06 + */ +@Data +public class SmsSalesTrendVo implements Vo { + + + @ApiModelProperty("客户名称") + private String customerName; // 客户名称 + @ApiModelProperty("车辆牌照") + private String vehMark; // 车辆牌照 + @ApiModelProperty("销售价") + private String price; // 销售价 + @ApiModelProperty("数量") + private String count; // 数量 + @ApiModelProperty("金额(销售价-优惠金额)") + private String amount; // 金额(销售价-优惠金额) + private String createTime; + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetail.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetail.java new file mode 100644 index 0000000000..b10a5f620b --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetail.java @@ -0,0 +1,96 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbilldetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillDetail.java
+ * Class: com.yxt.sms.api.smssalesbilldetail.SmsSalesBillDetail
+ * Description: 销售单-商品清单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-商品清单", description = "销售单-商品清单") +@TableName("sms_sales_bill_detail") +public class SmsSalesBillDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目(自费、保内等)") + private String subject; // 科目(自费、保内等) + @ApiModelProperty("销售前库存数量") + private BigDecimal currentCount; // 销售前库存数量 + @ApiModelProperty("销售价") + private BigDecimal price; // 销售价 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("折扣(0-10,0免费,10不打折)") + private Integer discount; // 折扣(0-10,0免费,10不打折) + @ApiModelProperty("优惠金额(=销售价*(折扣*0.1))") + private BigDecimal discountAmount; // 优惠金额(=销售价*(折扣*0.1)) + @ApiModelProperty("金额(销售价-优惠金额)") + private BigDecimal amount; // 金额(销售价-优惠金额) + @ApiModelProperty("已出库数量(仓储中具体出库数量)") + private BigDecimal outboundCount; // 已出库数量(仓储中具体出库数量) + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailDetailsVo.java new file mode 100644 index 0000000000..6f100dea3d --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailDetailsVo.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbilldetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillDetailVo.java
+ * Class: com.yxt.sms.api.smssalesbilldetail.SmsSalesBillDetailVo
+ * Description: 销售单-商品清单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-商品清单 视图数据详情", description = "销售单-商品清单 视图数据详情") +public class SmsSalesBillDetailDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目(自费、保内等)") + private String subject; // 科目(自费、保内等) + @ApiModelProperty("销售前库存数量") + private BigDecimal currentCount; // 销售前库存数量 + @ApiModelProperty("销售价") + private BigDecimal price; // 销售价 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("折扣(0-10,0免费,10不打折)") + private Integer discount; // 折扣(0-10,0免费,10不打折) + @ApiModelProperty("优惠金额(=销售价*(折扣*0.1))") + private BigDecimal discountAmount; // 优惠金额(=销售价*(折扣*0.1)) + @ApiModelProperty("金额(销售价-优惠金额)") + private BigDecimal amount; // 金额(销售价-优惠金额) + @ApiModelProperty("已出库数量(仓储中具体出库数量)") + private BigDecimal outboundCount; // 已出库数量(仓储中具体出库数量) + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailDto.java new file mode 100644 index 0000000000..fab612f79a --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailDto.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbilldetail; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillDetailDto.java
+ * Class: com.yxt.sms.api.smssalesbilldetail.SmsSalesBillDetailDto
+ * Description: 销售单-商品清单 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-商品清单 数据传输对象", description = "销售单-商品清单 数据传输对象") +public class SmsSalesBillDetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目(自费、保内等)") + private String subject; // 科目(自费、保内等) + @ApiModelProperty("销售前库存数量") + private BigDecimal currentCount; // 销售前库存数量 + @ApiModelProperty("销售价") + private BigDecimal price; // 销售价 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("折扣(0-10,0免费,10不打折)") + private Integer discount; // 折扣(0-10,0免费,10不打折) + @ApiModelProperty("优惠金额(=销售价*(折扣*0.1))") + private BigDecimal discountAmount; // 优惠金额(=销售价*(折扣*0.1)) + @ApiModelProperty("金额(销售价-优惠金额)") + private BigDecimal amount; // 金额(销售价-优惠金额) + @ApiModelProperty("已出库数量(仓储中具体出库数量)") + private BigDecimal outboundCount; // 已出库数量(仓储中具体出库数量) + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailMapper.java new file mode 100644 index 0000000000..fc08888c93 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailMapper.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbilldetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillDetailMapper.java
+ * Class: com.yxt.sms.biz.smssalesbilldetail.SmsSalesBillDetailMapper
+ * Description: 销售单-商品清单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsSalesBillDetailMapper extends BaseMapper { + + //@Update("update sms_sales_bill_detail set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_sales_bill_detail") + List selectListVo(); + + @Select("select * from sms_sales_bill_detail where billSid =#{mainSid}") + List fetchByMainSid(@Param("mainSid") String mainSid); + + @Delete("DELETE FROM sms_sales_bill_detail WHERE billSid =#{mainSid}") + void delByMainSid(@Param("mainSid") String mainSid); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailMapper.xml new file mode 100644 index 0000000000..8681230e06 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailQuery.java new file mode 100644 index 0000000000..cedc5cda74 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailQuery.java @@ -0,0 +1,95 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbilldetail; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillDetailQuery.java
+ * Class: com.yxt.sms.api.smssalesbilldetail.SmsSalesBillDetailQuery
+ * Description: 销售单-商品清单 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-商品清单 查询条件", description = "销售单-商品清单 查询条件") +public class SmsSalesBillDetailQuery implements Query { + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目(自费、保内等)") + private String subject; // 科目(自费、保内等) + @ApiModelProperty("销售前库存数量") + private BigDecimal currentCount; // 销售前库存数量 + @ApiModelProperty("销售价") + private BigDecimal price; // 销售价 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("折扣(0-10,0免费,10不打折)") + private Integer discount; // 折扣(0-10,0免费,10不打折) + @ApiModelProperty("优惠金额(=销售价*(折扣*0.1))") + private BigDecimal discountAmount; // 优惠金额(=销售价*(折扣*0.1)) + @ApiModelProperty("金额(销售价-优惠金额)") + private BigDecimal amount; // 金额(销售价-优惠金额) + @ApiModelProperty("已出库数量(仓储中具体出库数量)") + private BigDecimal outboundCount; // 已出库数量(仓储中具体出库数量) + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailService.java new file mode 100644 index 0000000000..832ac69460 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailService.java @@ -0,0 +1,113 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbilldetail; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillDetailService.java
+ * Class: com.yxt.sms.biz.smssalesbilldetail.SmsSalesBillDetailService
+ * Description: 销售单-商品清单 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsSalesBillDetailService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(SmsSalesBillDetailQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public List fetchByMainSid(String mainSid) { + return baseMapper.fetchByMainSid(mainSid); + } + + public void delByMainSid(String mainSid) { + baseMapper.delByMainSid(mainSid); + } + + public PagerVo listPageVo(PagerQuery pq) { + SmsSalesBillDetailQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsSalesBillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(SmsSalesBillDetailDto dto){ + SmsSalesBillDetail entity = new SmsSalesBillDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsSalesBillDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsSalesBillDetail entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsSalesBillDetailDetailsVo fetchDetailsVoBySid(String sid){ + SmsSalesBillDetail entity = fetchBySid(sid); + SmsSalesBillDetailDetailsVo vo = new SmsSalesBillDetailDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailVo.java new file mode 100644 index 0000000000..401edb84d5 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbilldetail/SmsSalesBillDetailVo.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbilldetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillDetailVo.java
+ * Class: com.yxt.sms.api.smssalesbilldetail.SmsSalesBillDetailVo
+ * Description: 销售单-商品清单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-商品清单 视图数据对象", description = "销售单-商品清单 视图数据对象") +public class SmsSalesBillDetailVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目(自费、保内等)") + private String subject; // 科目(自费、保内等) + @ApiModelProperty("销售前库存数量") + private BigDecimal currentCount; // 销售前库存数量 + @ApiModelProperty("销售价") + private BigDecimal price; // 销售价 + @ApiModelProperty("数量") + private BigDecimal count; // 数量 + @ApiModelProperty("折扣(0-10,0免费,10不打折)") + private Integer discount; // 折扣(0-10,0免费,10不打折) + @ApiModelProperty("优惠金额(=销售价*(折扣*0.1))") + private BigDecimal discountAmount; // 优惠金额(=销售价*(折扣*0.1)) + @ApiModelProperty("金额(销售价-优惠金额)") + private BigDecimal amount; // 金额(销售价-优惠金额) + @ApiModelProperty("已出库数量(仓储中具体出库数量)") + private BigDecimal outboundCount; // 已出库数量(仓储中具体出库数量) + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtend.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtend.java new file mode 100644 index 0000000000..8d5fd13efb --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtend.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillextend; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillExtend.java
+ * Class: com.yxt.sms.api.smssalesbillextend.SmsSalesBillExtend
+ * Description: 销售单扩展.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单扩展", description = "销售单扩展") +@TableName("sms_sales_bill_extend") +public class SmsSalesBillExtend extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("销售单sid") + private String billSid; // 销售单sid + @ApiModelProperty("收货人姓名") + private String shipperName; // 收货人姓名 + @ApiModelProperty("收货人手机") + private String shipperMob; // 收货人手机 + @ApiModelProperty("收货省sid") + private String deliveryProvinceSid; // 收货省sid + @ApiModelProperty("收货省") + private String deliveryProvince; // 收货省 + @ApiModelProperty("收货市sid") + private String deliveryCitySid; // 收货市sid + @ApiModelProperty("收货市") + private String deliveryCity; // 收货市 + @ApiModelProperty("收货县区sid") + private String deliveryCountySid; // 收货县区sid + @ApiModelProperty("收货县区") + private String deliveryCounty; // 收货县区 + @ApiModelProperty("收货详细地址") + private String deliveryAddress; // 收货详细地址 + @ApiModelProperty("买家留言") + private String buyerMessage; // 买家留言 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendDetailsVo.java new file mode 100644 index 0000000000..9cf00cdd43 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendDetailsVo.java @@ -0,0 +1,77 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillextend; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillExtendVo.java
+ * Class: com.yxt.sms.api.smssalesbillextend.SmsSalesBillExtendVo
+ * Description: 销售单扩展 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单扩展 视图数据详情", description = "销售单扩展 视图数据详情") +public class SmsSalesBillExtendDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("销售单sid") + private String billSid; // 销售单sid + @ApiModelProperty("收货人姓名") + private String shipperName; // 收货人姓名 + @ApiModelProperty("收货人手机") + private String shipperMob; // 收货人手机 + @ApiModelProperty("收货省sid") + private String deliveryProvinceSid; // 收货省sid + @ApiModelProperty("收货省") + private String deliveryProvince; // 收货省 + @ApiModelProperty("收货市sid") + private String deliveryCitySid; // 收货市sid + @ApiModelProperty("收货市") + private String deliveryCity; // 收货市 + @ApiModelProperty("收货县区sid") + private String deliveryCountySid; // 收货县区sid + @ApiModelProperty("收货县区") + private String deliveryCounty; // 收货县区 + @ApiModelProperty("收货详细地址") + private String deliveryAddress; // 收货详细地址 + @ApiModelProperty("买家留言") + private String buyerMessage; // 买家留言 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendDto.java new file mode 100644 index 0000000000..2570470447 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendDto.java @@ -0,0 +1,77 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillextend; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillExtendDto.java
+ * Class: com.yxt.sms.api.smssalesbillextend.SmsSalesBillExtendDto
+ * Description: 销售单扩展 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单扩展 数据传输对象", description = "销售单扩展 数据传输对象") +public class SmsSalesBillExtendDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("销售单sid") + private String billSid; // 销售单sid + @ApiModelProperty("收货人姓名") + private String shipperName; // 收货人姓名 + @ApiModelProperty("收货人手机") + private String shipperMob; // 收货人手机 + @ApiModelProperty("收货省sid") + private String deliveryProvinceSid; // 收货省sid + @ApiModelProperty("收货省") + private String deliveryProvince; // 收货省 + @ApiModelProperty("收货市sid") + private String deliveryCitySid; // 收货市sid + @ApiModelProperty("收货市") + private String deliveryCity; // 收货市 + @ApiModelProperty("收货县区sid") + private String deliveryCountySid; // 收货县区sid + @ApiModelProperty("收货县区") + private String deliveryCounty; // 收货县区 + @ApiModelProperty("收货详细地址") + private String deliveryAddress; // 收货详细地址 + @ApiModelProperty("买家留言") + private String buyerMessage; // 买家留言 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendMapper.java new file mode 100644 index 0000000000..db6c517f3f --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendMapper.java @@ -0,0 +1,63 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillextend; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillExtendMapper.java
+ * Class: com.yxt.sms.biz.smssalesbillextend.SmsSalesBillExtendMapper
+ * Description: 销售单扩展.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsSalesBillExtendMapper extends BaseMapper { + + //@Update("update sms_sales_bill_extend set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_sales_bill_extend") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendMapper.xml new file mode 100644 index 0000000000..99d908f6eb --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendQuery.java new file mode 100644 index 0000000000..58671b6740 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendQuery.java @@ -0,0 +1,75 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillextend; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillExtendQuery.java
+ * Class: com.yxt.sms.api.smssalesbillextend.SmsSalesBillExtendQuery
+ * Description: 销售单扩展 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单扩展 查询条件", description = "销售单扩展 查询条件") +public class SmsSalesBillExtendQuery implements Query { + + @ApiModelProperty("销售单sid") + private String billSid; // 销售单sid + @ApiModelProperty("收货人姓名") + private String shipperName; // 收货人姓名 + @ApiModelProperty("收货人手机") + private String shipperMob; // 收货人手机 + @ApiModelProperty("收货省sid") + private String deliveryProvinceSid; // 收货省sid + @ApiModelProperty("收货省") + private String deliveryProvince; // 收货省 + @ApiModelProperty("收货市sid") + private String deliveryCitySid; // 收货市sid + @ApiModelProperty("收货市") + private String deliveryCity; // 收货市 + @ApiModelProperty("收货县区sid") + private String deliveryCountySid; // 收货县区sid + @ApiModelProperty("收货县区") + private String deliveryCounty; // 收货县区 + @ApiModelProperty("收货详细地址") + private String deliveryAddress; // 收货详细地址 + @ApiModelProperty("买家留言") + private String buyerMessage; // 买家留言 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendService.java new file mode 100644 index 0000000000..bd58633156 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendService.java @@ -0,0 +1,104 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillextend; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillExtendService.java
+ * Class: com.yxt.sms.biz.smssalesbillextend.SmsSalesBillExtendService
+ * Description: 销售单扩展 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsSalesBillExtendService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(SmsSalesBillExtendQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + SmsSalesBillExtendQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsSalesBillExtendDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(SmsSalesBillExtendDto dto){ + SmsSalesBillExtend entity = new SmsSalesBillExtend(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsSalesBillExtendDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsSalesBillExtend entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsSalesBillExtendDetailsVo fetchDetailsVoBySid(String sid){ + SmsSalesBillExtend entity = fetchBySid(sid); + SmsSalesBillExtendDetailsVo vo = new SmsSalesBillExtendDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendVo.java new file mode 100644 index 0000000000..f3aceaab8f --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillextend/SmsSalesBillExtendVo.java @@ -0,0 +1,77 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillextend; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillExtendVo.java
+ * Class: com.yxt.sms.api.smssalesbillextend.SmsSalesBillExtendVo
+ * Description: 销售单扩展 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单扩展 视图数据对象", description = "销售单扩展 视图数据对象") +public class SmsSalesBillExtendVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("销售单sid") + private String billSid; // 销售单sid + @ApiModelProperty("收货人姓名") + private String shipperName; // 收货人姓名 + @ApiModelProperty("收货人手机") + private String shipperMob; // 收货人手机 + @ApiModelProperty("收货省sid") + private String deliveryProvinceSid; // 收货省sid + @ApiModelProperty("收货省") + private String deliveryProvince; // 收货省 + @ApiModelProperty("收货市sid") + private String deliveryCitySid; // 收货市sid + @ApiModelProperty("收货市") + private String deliveryCity; // 收货市 + @ApiModelProperty("收货县区sid") + private String deliveryCountySid; // 收货县区sid + @ApiModelProperty("收货县区") + private String deliveryCounty; // 收货县区 + @ApiModelProperty("收货详细地址") + private String deliveryAddress; // 收货详细地址 + @ApiModelProperty("买家留言") + private String buyerMessage; // 买家留言 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoice.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoice.java new file mode 100644 index 0000000000..39d56695c3 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoice.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillinvoice; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillInvoice.java
+ * Class: com.yxt.sms.api.smssalesbillinvoice.SmsSalesBillInvoice
+ * Description: 销售单-发票.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-发票", description = "销售单-发票") +@TableName("sms_sales_bill_invoice") +public class SmsSalesBillInvoice extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("是否需要开发票(是1,否0)") + private Integer isInvoicing; // 是否需要开发票(是1,否0) + @ApiModelProperty("发票类型") + private String invoiceType; // 发票类型 + @ApiModelProperty("开票名称") + private String invoiceTitle; // 开票名称 + @ApiModelProperty("税号") + private String taxpayerNo; // 税号 + @ApiModelProperty("发票号码") + private String invoiceCode; // 发票号码 + @ApiModelProperty("税率") + private BigDecimal taxRate; // 税率 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceDetailsVo.java new file mode 100644 index 0000000000..029f6a20e7 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceDetailsVo.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillinvoice; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillInvoiceVo.java
+ * Class: com.yxt.sms.api.smssalesbillinvoice.SmsSalesBillInvoiceVo
+ * Description: 销售单-发票 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-发票 视图数据详情", description = "销售单-发票 视图数据详情") +public class SmsSalesBillInvoiceDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("是否需要开发票(是1,否0)") + private Integer isInvoicing; // 是否需要开发票(是1,否0) + @ApiModelProperty("发票类型") + private String invoiceType; // 发票类型 + @ApiModelProperty("开票名称") + private String invoiceTitle; // 开票名称 + @ApiModelProperty("税号") + private String taxpayerNo; // 税号 + @ApiModelProperty("发票号码") + private String invoiceCode; // 发票号码 + @ApiModelProperty("税率") + private BigDecimal taxRate; // 税率 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceDto.java new file mode 100644 index 0000000000..ad840a1c69 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceDto.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillinvoice; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillInvoiceDto.java
+ * Class: com.yxt.sms.api.smssalesbillinvoice.SmsSalesBillInvoiceDto
+ * Description: 销售单-发票 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-发票 数据传输对象", description = "销售单-发票 数据传输对象") +public class SmsSalesBillInvoiceDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("是否需要开发票(是1,否0)") + private Integer isInvoicing; // 是否需要开发票(是1,否0) + @ApiModelProperty("发票类型") + private String invoiceType; // 发票类型 + @ApiModelProperty("开票名称") + private String invoiceTitle; // 开票名称 + @ApiModelProperty("税号") + private String taxpayerNo; // 税号 + @ApiModelProperty("发票号码") + private String invoiceCode; // 发票号码 + @ApiModelProperty("税率") + private BigDecimal taxRate; // 税率 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceMapper.java new file mode 100644 index 0000000000..604d1691b9 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceMapper.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillinvoice; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillInvoiceMapper.java
+ * Class: com.yxt.sms.biz.smssalesbillinvoice.SmsSalesBillInvoiceMapper
+ * Description: 销售单-发票.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsSalesBillInvoiceMapper extends BaseMapper { + + //@Update("update sms_sales_bill_invoice set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_sales_bill_invoice") + List selectListVo(); + + @Select("select * from sms_sales_bill_invoice where billSid =#{mainSid}") + SmsSalesBillInvoice fetchByMainSid(@Param("mainSid") String mainSid); + + @Delete("DELETE FROM sms_sales_bill_invoice WHERE billSid =#{mainSid}") + void delByMainSid(@Param("mainSid") String mainSid); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceMapper.xml new file mode 100644 index 0000000000..03a9976c2c --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceQuery.java new file mode 100644 index 0000000000..5c1af56cf0 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceQuery.java @@ -0,0 +1,69 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillinvoice; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillInvoiceQuery.java
+ * Class: com.yxt.sms.api.smssalesbillinvoice.SmsSalesBillInvoiceQuery
+ * Description: 销售单-发票 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-发票 查询条件", description = "销售单-发票 查询条件") +public class SmsSalesBillInvoiceQuery implements Query { + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("是否需要开发票(是1,否0)") + private Integer isInvoicing; // 是否需要开发票(是1,否0) + @ApiModelProperty("发票类型") + private String invoiceType; // 发票类型 + @ApiModelProperty("开票名称") + private String invoiceTitle; // 开票名称 + @ApiModelProperty("税号") + private String taxpayerNo; // 税号 + @ApiModelProperty("发票号码") + private String invoiceCode; // 发票号码 + @ApiModelProperty("税率") + private BigDecimal taxRate; // 税率 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceService.java new file mode 100644 index 0000000000..8362a98aa7 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceService.java @@ -0,0 +1,110 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillinvoice; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillInvoiceService.java
+ * Class: com.yxt.sms.biz.smssalesbillinvoice.SmsSalesBillInvoiceService
+ * Description: 销售单-发票 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsSalesBillInvoiceService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(SmsSalesBillInvoiceQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + public SmsSalesBillInvoice fetchByMainSid(String mainSid) { + return baseMapper.fetchByMainSid(mainSid); + } + + public void delByMainSid(String mainSid) { + baseMapper.delByMainSid(mainSid); + } + public PagerVo listPageVo(PagerQuery pq) { + SmsSalesBillInvoiceQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsSalesBillInvoiceDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(SmsSalesBillInvoiceDto dto){ + SmsSalesBillInvoice entity = new SmsSalesBillInvoice(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsSalesBillInvoiceDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsSalesBillInvoice entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsSalesBillInvoiceDetailsVo fetchDetailsVoBySid(String sid){ + SmsSalesBillInvoice entity = fetchBySid(sid); + SmsSalesBillInvoiceDetailsVo vo = new SmsSalesBillInvoiceDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceVo.java new file mode 100644 index 0000000000..582109f2ba --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillinvoice/SmsSalesBillInvoiceVo.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillinvoice; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillInvoiceVo.java
+ * Class: com.yxt.sms.api.smssalesbillinvoice.SmsSalesBillInvoiceVo
+ * Description: 销售单-发票 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:44
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售单-发票 视图数据对象", description = "销售单-发票 视图数据对象") +public class SmsSalesBillInvoiceVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("工单sid") + private String billSid; // 工单sid + @ApiModelProperty("是否需要开发票(是1,否0)") + private Integer isInvoicing; // 是否需要开发票(是1,否0) + @ApiModelProperty("发票类型") + private String invoiceType; // 发票类型 + @ApiModelProperty("开票名称") + private String invoiceTitle; // 开票名称 + @ApiModelProperty("税号") + private String taxpayerNo; // 税号 + @ApiModelProperty("发票号码") + private String invoiceCode; // 发票号码 + @ApiModelProperty("税率") + private BigDecimal taxRate; // 税率 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettle.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettle.java new file mode 100644 index 0000000000..9a6d9cf20a --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettle.java @@ -0,0 +1,86 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillsettle; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillSettle.java
+ * Class: com.yxt.sms.api.smssalesbillsettle.SmsSalesBillSettle
+ * Description: 采购单-结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单-结算", description = "采购单-结算") +@TableName("sms_sales_bill_settle") +public class SmsSalesBillSettle extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("应收金额(总计金额-优惠-优惠券-积分抵扣)") + private BigDecimal receivableAmount; // 应收金额(总计金额-优惠-优惠券-积分抵扣) + @ApiModelProperty("订金抵扣") + private BigDecimal depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; // 结算时间 + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleDetailsVo.java new file mode 100644 index 0000000000..40824adb2b --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleDetailsVo.java @@ -0,0 +1,88 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillsettle; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillSettleVo.java
+ * Class: com.yxt.sms.api.smssalesbillsettle.SmsSalesBillSettleVo
+ * Description: 采购单-结算 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单-结算 视图数据详情", description = "采购单-结算 视图数据详情") +public class SmsSalesBillSettleDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("应收金额(总计金额-优惠-优惠券-积分抵扣)") + private BigDecimal receivableAmount; // 应收金额(总计金额-优惠-优惠券-积分抵扣) + @ApiModelProperty("订金抵扣") + private BigDecimal depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleDto.java new file mode 100644 index 0000000000..3eccd5a1f3 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleDto.java @@ -0,0 +1,88 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillsettle; + + +import com.yxt.common.core.dto.Dto; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillSettleDto.java
+ * Class: com.yxt.sms.api.smssalesbillsettle.SmsSalesBillSettleDto
+ * Description: 采购单-结算 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单-结算 数据传输对象", description = "采购单-结算 数据传输对象") +public class SmsSalesBillSettleDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("应收金额(总计金额-优惠-优惠券-积分抵扣)") + private BigDecimal receivableAmount; // 应收金额(总计金额-优惠-优惠券-积分抵扣) + @ApiModelProperty("订金抵扣") + private BigDecimal depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleMapper.java new file mode 100644 index 0000000000..a132f85577 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleMapper.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillsettle; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillSettleMapper.java
+ * Class: com.yxt.sms.biz.smssalesbillsettle.SmsSalesBillSettleMapper
+ * Description: 采购单-结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsSalesBillSettleMapper extends BaseMapper { + + //@Update("update sms_sales_bill_settle set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_sales_bill_settle") + List selectListVo(); + @Select("select * from sms_sales_bill_settle where sourceBillSid =#{sid}") + SmsSalesBillSettle fetchByMainSid(String sid); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleMapper.xml new file mode 100644 index 0000000000..e30d2822f6 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleQuery.java new file mode 100644 index 0000000000..038666c2d5 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleQuery.java @@ -0,0 +1,83 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillsettle; + + +import com.yxt.common.core.query.Query; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillSettleQuery.java
+ * Class: com.yxt.sms.api.smssalesbillsettle.SmsSalesBillSettleQuery
+ * Description: 采购单-结算 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单-结算 查询条件", description = "采购单-结算 查询条件") +public class SmsSalesBillSettleQuery implements Query { + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("应收金额(总计金额-优惠-优惠券-积分抵扣)") + private BigDecimal receivableAmount; // 应收金额(总计金额-优惠-优惠券-积分抵扣) + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleService.java new file mode 100644 index 0000000000..f99b476fc1 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleService.java @@ -0,0 +1,108 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillsettle; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillSettleService.java
+ * Class: com.yxt.sms.biz.smssalesbillsettle.SmsSalesBillSettleService
+ * Description: 采购单-结算 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsSalesBillSettleService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(SmsSalesBillSettleQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + SmsSalesBillSettleQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsSalesBillSettleDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(SmsSalesBillSettleDto dto){ + SmsSalesBillSettle entity = new SmsSalesBillSettle(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsSalesBillSettleDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsSalesBillSettle entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsSalesBillSettleDetailsVo fetchDetailsVoBySid(String sid){ + SmsSalesBillSettle entity = fetchBySid(sid); + SmsSalesBillSettleDetailsVo vo = new SmsSalesBillSettleDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public SmsSalesBillSettle fetchByMainSid(String sid) { + return baseMapper.fetchByMainSid(sid); + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleVo.java new file mode 100644 index 0000000000..7f8ec14d90 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesbillsettle/SmsSalesBillSettleVo.java @@ -0,0 +1,88 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesbillsettle; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sms(sms)
+ * File: SmsSalesBillSettleVo.java
+ * Class: com.yxt.sms.api.smssalesbillsettle.SmsSalesBillSettleVo
+ * Description: 采购单-结算 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "采购单-结算 视图数据对象", description = "采购单-结算 视图数据对象") +public class SmsSalesBillSettleVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("应收金额(总计金额-优惠-优惠券-积分抵扣)") + private BigDecimal receivableAmount; // 应收金额(总计金额-优惠-优惠券-积分抵扣) + @ApiModelProperty("订金抵扣") + private BigDecimal depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SalesGoodsReturnVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SalesGoodsReturnVo.java new file mode 100644 index 0000000000..7ae8ccfa0d --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SalesGoodsReturnVo.java @@ -0,0 +1,67 @@ +package com.yxt.sms.biz.smssalesreturn; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/3/25 15:00 + */ +@Data +public class SalesGoodsReturnVo { + + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品ID") + private String goodsID; // 商品ID + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库名称") + private String warehouse; // 仓库名称 + @ApiModelProperty("科目sid") + private String subjectSid; // 科目sid + @ApiModelProperty("科目(自费、保内等)") + private String subject; // 科目(自费、保内等) + @ApiModelProperty("销售前库存数量") + private String currentCount; // 销售前库存数量 + @ApiModelProperty("销售价") + private String price; // 销售价 + @ApiModelProperty("数量") + private String count; // 数量 + @ApiModelProperty("折扣(0-10,0免费,10不打折)") + private String discount; // 折扣(0-10,0免费,10不打折) + @ApiModelProperty("优惠金额(=销售价*(折扣*0.1))") + private String discountAmount; // 优惠金额(=销售价*(折扣*0.1)) + @ApiModelProperty("金额(销售价-优惠金额)") + private String amount; // 金额(销售价-优惠金额) + @ApiModelProperty("已出库数量(仓储中具体出库数量)") + private String outboundCount; // 已出库数量(仓储中具体出库数量) + //----------退货信息----------- + @ApiModelProperty("已退数量") + private String returnedCount; // 已出库数量(仓储中具体出库数量) + @ApiModelProperty("退货数量") + private String backCount; // 退货数量 + @ApiModelProperty("税额") + private String maxAmount; // 税额 + @ApiModelProperty("含税价") + private String maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private String backAmount; // 退货金额 + + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsReturnSettleVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsReturnSettleVo.java new file mode 100644 index 0000000000..172f88c593 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsReturnSettleVo.java @@ -0,0 +1,51 @@ +package com.yxt.sms.biz.smssalesreturn; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author Fan + * @description + * @date 2024/3/27 10:04 + */ +@Data +public class SmsReturnSettleVo { + +// @ApiModelProperty("创建者") +// private String createBySid; +// @ApiModelProperty("结算人姓名") +// private String createByName; // 结算人姓名 +// @ApiModelProperty("来源单sid(销售单sid)") +// private String sourceBillSid; // 来源单sid(销售单sid) +// @ApiModelProperty("来源单编号") +// private String sourceBillNo; // 来源单编号 + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private String payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private String prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private String settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private String debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesBillReturnExportVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesBillReturnExportVo.java new file mode 100644 index 0000000000..e12404fb2e --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesBillReturnExportVo.java @@ -0,0 +1,42 @@ +package com.yxt.sms.biz.smssalesreturn; + +import com.yxt.common.core.utils.ExportEntityMap; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/20 9:52 + */ +@Data +public class SmsSalesBillReturnExportVo { + + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "单据状态", EnName = "state") + private String state; + @ExportEntityMap(CnName = "制单时间", EnName = "createTime") + private String createTime; + @ExportEntityMap(CnName = "制单人姓名", EnName = "createByName") + private String createByName; // 制单人姓名 + @ExportEntityMap(CnName = "单据编号", EnName = "billNo") + private String billNo; // 单据编号 + @ExportEntityMap(CnName = "源编号", EnName = "sourceBillNo") + private String sourceBillNo; // 源编号 + @ExportEntityMap(CnName = "服务顾问", EnName = "salesName") + private String salesName; // 销售姓名 + @ExportEntityMap(CnName = "客户名称", EnName = "customerName") + private String customerName; // 客户名称 + @ExportEntityMap(CnName = "联系电话", EnName = "mobile") + private String mobile; // 联系电话 + @ExportEntityMap(CnName = "车辆牌照", EnName = "vehMark") + private String vehMark; // 车辆牌照 + @ExportEntityMap(CnName = "退优惠金额", EnName = "backDiscountAmount") + private String backDiscountAmount; // 退优惠金额 + @ExportEntityMap(CnName = "抵扣欠款", EnName = "deductDebts") + private String deductDebts; // 抵扣欠款 + @ExportEntityMap(CnName = "客户单位", EnName = "customerOrg") + private String customerOrg; // 客户单位 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesBillReturnQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesBillReturnQuery.java new file mode 100644 index 0000000000..bd41ff0dfd --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesBillReturnQuery.java @@ -0,0 +1,17 @@ +package com.yxt.sms.biz.smssalesreturn; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/25 13:31 + */ +@Data +public class SmsSalesBillReturnQuery implements Query { + + private String queryName; + private String startDate; + private String endDate; +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesBillReturnVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesBillReturnVo.java new file mode 100644 index 0000000000..c03d050245 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesBillReturnVo.java @@ -0,0 +1,39 @@ +package com.yxt.sms.biz.smssalesreturn; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @author Fan + * @description + * @date 2024/3/21 16:36 + */ +@Data +public class SmsSalesBillReturnVo { + + private String sid; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人") + private String createByName; + @ApiModelProperty("制单时间") + private String createTime; + @ApiModelProperty("客户姓名") + private String customerName; + @ApiModelProperty("联系方式") + private String mobile; + @ApiModelProperty("备注(打印)") + private String printRemarks; + @ApiModelProperty("服务顾问") + private String salesName; + @ApiModelProperty("快捷备注") + private String shotRemarks; + @ApiModelProperty("单据状态(1登记,0结算)") + private String state; + @ApiModelProperty("车牌号") + private String vehMark; + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesInsertVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesInsertVo.java new file mode 100644 index 0000000000..32775620e0 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesInsertVo.java @@ -0,0 +1,72 @@ +package com.yxt.sms.biz.smssalesreturn; + +import com.yxt.sms.biz.smssalesbill.SalesGoodsVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @author Fan + * @description + * @date 2024/3/22 16:35 + */ +@Data +public class SmsSalesInsertVo { + + private String sid; + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建者") + private String createBySid; + + @ApiModelProperty("原单sid") + private String billSid; + @ApiModelProperty("来源单编号") + private String sourceBillNo; + @ApiModelProperty("客户名称") + private String customerName; // 客户名称 + @ApiModelProperty("服务顾问") + private String salesName; // 销售姓名 + @ApiModelProperty("车辆牌照") + private String vehMark; // 车辆牌照 + @ApiModelProperty("客户单位") + private String customerOrg; // 客户单位 + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 + @ApiModelProperty("科目") + private String subject; // 科目 + + + @ApiModelProperty("合计金额") + private String amountAll; // 合计金额 + @ApiModelProperty("材料费") + private String materialCosts; // 材料费 + @ApiModelProperty("税额") + private String maxAmount; // 税额 + + @ApiModelProperty("应收金额") + private String receivableAmount; // 应收金额 + @ApiModelProperty("合计优惠") + private String discount; // 合计优惠 + @ApiModelProperty("已收金额") + private String receivedAmount; // 已收金额 + @ApiModelProperty("欠款") + private String debts; // 欠款 + private List billGoods = new ArrayList<>();//原单商品列表 + private List returnGoods = new ArrayList<>(); //退货商品列表 + private SmsReturnSettleVo settleVo = new SmsReturnSettleVo(); //退货单结算对象 + @ApiModelProperty("退优惠金额") + private String backDiscountAmount; // 退优惠金额 + @ApiModelProperty("抵扣欠款") + private String deductDebts; // 抵扣欠款 + + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturn.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturn.java new file mode 100644 index 0000000000..3693cd75a6 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturn.java @@ -0,0 +1,78 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturn; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturn.java
+ * Class: com.yxt.sms.api.smssalesreturn.SmsSalesReturn
+ * Description: 销售退货单据.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据", description = "销售退货单据") +@TableName("sms_sales_return") +public class SmsSalesReturn extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("退误差调整金额") + private BigDecimal backErrorAmount; // 退误差调整金额 + @ApiModelProperty("退优惠金额") + private BigDecimal backDiscountAmount; // 退优惠金额 + @ApiModelProperty("抵扣欠款") + private BigDecimal deductDebts; // 抵扣欠款 + @ApiModelProperty("抵扣单号") + private String deductBillNo; // 抵扣单号 + @ApiModelProperty("转入预付款") + private BigDecimal toPrepayment; // 转入预付款 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnDetailsGoodsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnDetailsGoodsVo.java new file mode 100644 index 0000000000..5b380f95c9 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnDetailsGoodsVo.java @@ -0,0 +1,44 @@ +package com.yxt.sms.biz.smssalesreturn; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/3/25 16:31 + */ +@Data +public class SmsSalesReturnDetailsGoodsVo { + + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String specification; // 规格 + @ApiModelProperty("退货前的库存数量") + private String currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("已退数量") + private String returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private String backCount; // 退货数量 + @ApiModelProperty("税额") + private String maxAmount; // 税额 + @ApiModelProperty("含税价") + private String maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private String backAmount; // 退货金额 +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnDetailsVo.java new file mode 100644 index 0000000000..37006d434d --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnDetailsVo.java @@ -0,0 +1,68 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturn; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnVo.java
+ * Class: com.yxt.sms.api.smssalesreturn.SmsSalesReturnVo
+ * Description: 销售退货单据 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据 视图数据详情", description = "销售退货单据 视图数据详情") +public class SmsSalesReturnDetailsVo implements Vo { + + private String sid; // sid + @ApiModelProperty("客户名称") + private String customerName; // 客户名称 + @ApiModelProperty("车辆牌照") + private String vehMark; // 车辆牌照 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + private List goodsVos = new ArrayList<>(); + + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnDto.java new file mode 100644 index 0000000000..01022a0dad --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnDto.java @@ -0,0 +1,108 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturn; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnDto.java
+ * Class: com.yxt.sms.api.smssalesreturn.SmsSalesReturnDto
+ * Description: 销售退货单据 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据 数据传输对象", description = "销售退货单据 数据传输对象") +public class SmsSalesReturnDto implements Dto { + private String sid; + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建者") + private String createBySid; + + + @ApiModelProperty("原单sid") + private String billSid; + @ApiModelProperty("来源单编号") + private String sourceBillNo; + @ApiModelProperty("客户名称") + private String customerName; // 客户名称 + @ApiModelProperty("服务顾问") + private String salesName; // 销售姓名 + @ApiModelProperty("车辆牌照") + private String vehMark; // 车辆牌照 + @ApiModelProperty("客户单位") + private String customerOrg; // 客户单位 + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 + @ApiModelProperty("科目") + private String subject; // 科目 + + + @ApiModelProperty("合计金额") + private String amountAll; // 合计金额 + @ApiModelProperty("材料费") + private String materialCosts; // 材料费 + @ApiModelProperty("税额") + private String maxAmount; // 税额 + + @ApiModelProperty("应收金额") + private String receivableAmount; // 应收金额 + @ApiModelProperty("合计优惠") + private String discount; // 合计优惠 + @ApiModelProperty("已收金额") + private String receivedAmount; // 已收金额 + @ApiModelProperty("欠款") + private String debts; // 欠款 + private List billGoods = new ArrayList<>();//原单商品列表 + private List returnGoods = new ArrayList<>(); //退货商品列表 + private SmsReturnSettleVo settleVo = new SmsReturnSettleVo(); //退货单结算对象 + @ApiModelProperty("退优惠金额") + private String backDiscountAmount; // 退优惠金额 + @ApiModelProperty("抵扣欠款") + private String deductDebts; // 抵扣欠款 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnMapper.java new file mode 100644 index 0000000000..1296bc5fef --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnMapper.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturn; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.sms.biz.smssalesbill.SmsSalesBill; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnMapper.java
+ * Class: com.yxt.sms.biz.smssalesreturn.SmsSalesReturnMapper
+ * Description: 销售退货单据.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsSalesReturnMapper extends BaseMapper { + + //@Update("update sms_sales_return set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_sales_return") + List selectListVo(); + + IPage listPageReturn(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + String selRetunGoodsNum(@Param("sid") String sid,@Param("inventorySid") String inventorySid); + + List listExcel(@Param(Constants.WRAPPER)QueryWrapper qw); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnMapper.xml new file mode 100644 index 0000000000..48276dd4ba --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnQuery.java new file mode 100644 index 0000000000..8c2fecbe55 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnQuery.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturn; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnQuery.java
+ * Class: com.yxt.sms.api.smssalesreturn.SmsSalesReturnQuery
+ * Description: 销售退货单据 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据 查询条件", description = "销售退货单据 查询条件") +public class SmsSalesReturnQuery implements Query { + + private String queryName; + private String startDate; + private String endDate; + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnService.java new file mode 100644 index 0000000000..0de0501ca1 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnService.java @@ -0,0 +1,365 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturn; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.sms.biz.smssalesbill.*; +import com.yxt.sms.biz.smssalesbilldetail.SmsSalesBillDetail; +import com.yxt.sms.biz.smssalesbilldetail.SmsSalesBillDetailService; +import com.yxt.sms.biz.smssalesbillinvoice.SmsSalesBillInvoice; +import com.yxt.sms.biz.smssalesbillinvoice.SmsSalesBillInvoiceService; +import com.yxt.sms.biz.smssalesbillsettle.SmsSalesBillSettle; +import com.yxt.sms.biz.smssalesbillsettle.SmsSalesBillSettleService; +import com.yxt.sms.biz.smssalesreturndetail.SmsSalesReturnDetail; +import com.yxt.sms.biz.smssalesreturndetail.SmsSalesReturnDetailService; +import com.yxt.sms.biz.smssalesreturnsettle.SmsSalesReturnSettle; +import com.yxt.sms.biz.smssalesreturnsettle.SmsSalesReturnSettleService; +import com.yxt.sms.feign.fms.fmspaysettle.FmsPaysettleDto; +import com.yxt.sms.feign.fms.fmspaysettle.FmsPaysettleFeign; +import com.yxt.sms.feign.wms.wmsinventory.WmsInventoryFeign; +import com.yxt.sms.feign.wms.wmsinventory.WmsUpdateCountQuery; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnService.java
+ * Class: com.yxt.sms.biz.smssalesreturn.SmsSalesReturnService
+ * Description: 销售退货单据 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsSalesReturnService extends MybatisBaseService { + + @Autowired + private SmsSalesBillService smsSalesBillService; + @Autowired + private SmsSalesBillDetailService smsSalesBillDetailService; + @Autowired + private SmsSalesBillInvoiceService smsSalesBillInvoiceService; + @Autowired + private SmsSalesBillSettleService smsSalesBillSettleService; + @Autowired + private SmsSalesReturnDetailService smsSalesReturnDetailService; + @Resource + private WmsInventoryFeign wmsInventoryFeign; + @Autowired + private SmsSalesReturnSettleService smsSalesReturnSettleService; + @Resource + private FmsPaysettleFeign fmsPaysettleFeign; + + private QueryWrapper createQueryWrapper(SmsSalesReturnQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getQueryName())) { + qw.and(wrapper -> wrapper.like("r.createByName", query.getQueryName()) + .or().like("r.billNo", query.getQueryName()) + .or().like("b.salesName", query.getQueryName()) + .or().like("b.customerName", query.getQueryName()) + .or().like("b.mobile", query.getQueryName()) + .or().like("b.vehMark", query.getQueryName()) + .or().like("r.sourceBillNo", query.getQueryName()) + ); + } + if (StringUtils.isNotBlank(query.getUseOrgSid())) { + qw.eq("r.useOrgSid", query.getUseOrgSid()); + } + String startDate = query.getStartDate(); + String endDate = query.getEndDate(); + qw.apply(StringUtils.isNotEmpty(startDate), "date_format (r.createTime,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(endDate), "date_format (r.createTime,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')" + ); + qw.eq("1", "1"); + qw.orderByDesc("r.createTime"); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + SmsSalesReturnQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + @Transactional(rollbackFor = Exception.class) + public void saveOrUpdateDto(SmsSalesReturnDto dto) { + if (null != dto) { + SmsSalesReturn entity = new SmsSalesReturn(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + entity.setSourceBillSid(dto.getBillSid()); + baseMapper.insert(entity); + List returnGoods = dto.getReturnGoods(); + if (!returnGoods.isEmpty()) { + for (SalesGoodsReturnVo returnGood : returnGoods) { + SmsSalesReturnDetail detail = new SmsSalesReturnDetail(); + BeanUtil.copyProperties(returnGood, detail); + detail.setBillSid(entity.getSid()); + smsSalesReturnDetailService.insert(detail); + WmsUpdateCountQuery countQuery = new WmsUpdateCountQuery(); + countQuery.setSid(returnGood.getInventorySid()); + countQuery.setCount(new BigDecimal(returnGood.getBackCount())); + countQuery.setAddOrReduce(0); + wmsInventoryFeign.updateInventoryCount(countQuery); + } + } + SmsReturnSettleVo settleVo = dto.getSettleVo(); + if (null != settleVo) { + FmsPaysettleDto settle = new FmsPaysettleDto(); + BeanUtil.copyProperties(settleVo, settle, "id", "sid"); + if (StringUtils.isNotBlank(dto.getCreateByName())) { + settle.setCreateByName(dto.getCreateByName()); + } + if (StringUtils.isNotBlank(dto.getCreateBySid())) { + settle.setCreateBySid(dto.getCreateBySid()); + } + if (StringUtils.isNotBlank(entity.getSid())) { + settle.setSourceBillSid(entity.getSid()); + } + if (StringUtils.isNotBlank(entity.getBillNo())) { + settle.setSourceBillNo(entity.getBillNo()); + } + settle.setBusTypeValue("销售退货"); + settle.setBusTypeKey("001"); + fmsPaysettleFeign.save(settle); + } + + } + } + + public void insertByDto(SmsSalesReturnDto dto) { + SmsSalesReturn entity = new SmsSalesReturn(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsSalesReturnDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsSalesReturn entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsSalesReturnDetailsVo fetchDetailsVoBySid(String sid) { + SmsSalesReturnDetailsVo vo = new SmsSalesReturnDetailsVo(); + SmsSalesReturn entity = fetchBySid(sid); + if (null != entity) { + vo.setSid(sid); + vo.setBillNo(entity.getBillNo()); + SmsSalesBill smsSalesBill = smsSalesBillService.fetchBySid(entity.getSourceBillSid()); + if (null != smsSalesBill) { + if (StringUtils.isNotBlank(smsSalesBill.getCustomerName())) { + vo.setCustomerName(smsSalesBill.getCustomerName()); + } + if (StringUtils.isNotBlank(smsSalesBill.getVehMark())) { + vo.setVehMark(smsSalesBill.getVehMark()); + } + if (StringUtils.isNotBlank(smsSalesBill.getMobile())) { + vo.setMobile(smsSalesBill.getMobile()); + } + } + List goodsVos = new ArrayList<>(); + List details = smsSalesReturnDetailService.fetchByBillSid(sid); + if (!details.isEmpty()) { + for (SmsSalesReturnDetail detail : details) { + SmsSalesReturnDetailsGoodsVo goodsVo = new SmsSalesReturnDetailsGoodsVo(); + BeanUtil.copyProperties(detail, goodsVo); + goodsVos.add(goodsVo); + } + vo.setGoodsVos(goodsVos); + } + } + return vo; + } + + public SmsSalesInsertVo returnBillInit(String sid) { + SmsSalesInsertVo vo = new SmsSalesInsertVo(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + SmsSalesBill smsSalesBill = smsSalesBillService.fetchBySid(sid); + if (null != smsSalesBill) { + vo.setBillSid(sid); + vo.setSourceBillNo(smsSalesBill.getBillNo()); + //客户名称 + if (StringUtils.isNotBlank(smsSalesBill.getCustomerName())) { + vo.setCustomerName(smsSalesBill.getCustomerName()); + } + //车牌号 + if (StringUtils.isNotBlank(smsSalesBill.getVehMark())) { + vo.setVehMark(smsSalesBill.getVehMark()); + } + //客户单位 + if (StringUtils.isNotBlank(smsSalesBill.getCustomerOrg())) { + vo.setCustomerOrg(smsSalesBill.getCustomerOrg()); + } + //科目 + if (StringUtils.isNotBlank(smsSalesBill.getSubject())) { + vo.setSubject(smsSalesBill.getSubject()); + } + //原单商品列表 + List billGoods = new ArrayList<>(); + //材料费 + BigDecimal materialCosts = new BigDecimal(0); + //合计优惠 + BigDecimal discount = new BigDecimal(0); + List billDetailList = smsSalesBillDetailService.fetchByMainSid(sid); + if (!billDetailList.isEmpty()) { + for (SmsSalesBillDetail salesBillDetail : billDetailList) { + if (null != salesBillDetail.getPrice()) { + materialCosts = salesBillDetail.getPrice().add(materialCosts); + } + if (null != salesBillDetail.getDiscountAmount()) { + discount = salesBillDetail.getDiscountAmount().add(discount); + } + SalesGoodsReturnVo salesGoodsVo = new SalesGoodsReturnVo(); + BeanUtil.copyProperties(salesBillDetail, salesGoodsVo); + //查询对应销售单已退商品数量 + String count = baseMapper.selRetunGoodsNum(sid, salesBillDetail.getInventorySid()); + if (StringUtils.isNotBlank(count)) { + salesGoodsVo.setReturnedCount(count); + } + billGoods.add(salesGoodsVo); + } + vo.setBillGoods(billGoods); + } + vo.setMaterialCosts(materialCosts.toString()); + vo.setDiscount(discount.toString()); + //税额 + BigDecimal maxAmount = new BigDecimal(0); + SmsSalesBillInvoice invoice = smsSalesBillInvoiceService.fetchByMainSid(sid); + if (null != invoice) { + if (null != invoice.getTaxRate()) { + maxAmount = materialCosts.multiply(invoice.getTaxRate()).multiply(new BigDecimal(0.01)).setScale(2, BigDecimal.ROUND_UP); + vo.setMaxAmount(maxAmount.toString()); + } + } + // 合计金额 + BigDecimal amountAll = new BigDecimal(0); + amountAll = maxAmount.add(materialCosts); + vo.setAmountAll(amountAll.toString()); + //已收金额 + BigDecimal receivedAmount = new BigDecimal(0); + //欠款 + BigDecimal debts = new BigDecimal(0); + // 应收金额 + BigDecimal receivableAmount = new BigDecimal(0); + //结算时间 + SmsSalesBillSettle settle = smsSalesBillSettleService.fetchByMainSid(sid); + if (null != settle) { + vo.setSettleTime(sdf.format(settle.getSettleTime())); + if (null != settle.getSettleAmount()) { + receivedAmount = settle.getSettleAmount(); + } + if (null != settle.getDebts()) { + debts = settle.getDebts(); + } + if (null != settle.getReceivableAmount()) { + receivableAmount = settle.getReceivableAmount(); + } + } + vo.setReceivedAmount(receivedAmount.toString()); + vo.setDebts(debts.toString()); + vo.setReceivableAmount(receivableAmount.toString()); + } + return vo; + } + + public PagerVo listPageReturn(PagerQuery pq) { + SmsSalesBillReturnQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getQueryName())) { + qw.and(wrapper -> wrapper.like("b.createByName", query.getQueryName()) + .or().like("b.billNo", query.getQueryName()) + .or().like("b.salesName", query.getQueryName()) + .or().like("b.customerName", query.getQueryName()) + .or().like("b.mobile", query.getQueryName()) + .or().like("b.vehMark", query.getQueryName()) + ); + } + String startDate = query.getStartDate(); + String endDate = query.getEndDate(); + qw.apply(StringUtils.isNotEmpty(startDate), "date_format (s.settleTime,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(endDate), "date_format (s.settleTime,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')" + ); + qw.eq("b.`state`", "0"); + qw.orderByDesc("s.settleTime"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPageReturn(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void invalid(String sid) { + SmsSalesReturn smsSalesReturn = fetchBySid(sid); + if (null != smsSalesReturn) { + smsSalesReturn.setState(1); + baseMapper.updateById(smsSalesReturn); + List smsSalesReturnDetails = smsSalesReturnDetailService.fetchByBillSid(sid); + if (!smsSalesReturnDetails.isEmpty()) { + for (SmsSalesReturnDetail smsSalesReturnDetail : smsSalesReturnDetails) { + WmsUpdateCountQuery countQuery = new WmsUpdateCountQuery(); + countQuery.setSid(smsSalesReturnDetail.getInventorySid()); + countQuery.setCount(smsSalesReturnDetail.getBackCount()); + countQuery.setAddOrReduce(1); + wmsInventoryFeign.updateInventoryCount(countQuery); + } + } + } + } + + public List listExcel(SmsSalesReturnQuery query) { + QueryWrapper qw = createQueryWrapper(query); + List list = baseMapper.listExcel(qw); + return list; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnVo.java new file mode 100644 index 0000000000..79fd8f805e --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturn/SmsSalesReturnVo.java @@ -0,0 +1,91 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturn; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnVo.java
+ * Class: com.yxt.sms.api.smssalesreturn.SmsSalesReturnVo
+ * Description: 销售退货单据 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据 视图数据对象", description = "销售退货单据 视图数据对象") +public class SmsSalesReturnVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("开单时间") + private String createTime; // 制单人姓名 +// @ApiModelProperty("来源单sid(销售单sid)") +// private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + // @ApiModelProperty("退误差调整金额") +// private String backErrorAmount; // 退误差调整金额 + @ApiModelProperty("退优惠金额") + private String backDiscountAmount; // 退优惠金额 + @ApiModelProperty("抵扣欠款") + private String deductDebts; // 抵扣欠款 + // @ApiModelProperty("抵扣单号") +// private String deductBillNo; // 抵扣单号 +// @ApiModelProperty("转入预付款") +// private String toPrepayment; // 转入预付款 + @ApiModelProperty("客户名称") + private String customerName; // 客户名称 + @ApiModelProperty("联系电话") + private String mobile; // 联系电话 + @ApiModelProperty("车辆牌照") + private String vehMark; // 车辆牌照 + @ApiModelProperty("客户单位") + private String customerOrg; // 客户单位 + @ApiModelProperty("销售姓名") + private String salesName; // 销售姓名 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + private String state; +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetail.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetail.java new file mode 100644 index 0000000000..2be7fa639f --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetail.java @@ -0,0 +1,86 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturndetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnDetail.java
+ * Class: com.yxt.sms.api.smssalesreturndetail.SmsSalesReturnDetail
+ * Description: 销售退货单据明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据明细", description = "销售退货单据明细") +@TableName("sms_sales_return_detail") +public class SmsSalesReturnDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String specification; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailDetailsVo.java new file mode 100644 index 0000000000..cf924cfac7 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailDetailsVo.java @@ -0,0 +1,87 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturndetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnDetailVo.java
+ * Class: com.yxt.sms.api.smssalesreturndetail.SmsSalesReturnDetailVo
+ * Description: 销售退货单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据明细 视图数据详情", description = "销售退货单据明细 视图数据详情") +public class SmsSalesReturnDetailDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String specification; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailDto.java new file mode 100644 index 0000000000..2af7fe1ac0 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailDto.java @@ -0,0 +1,87 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturndetail; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnDetailDto.java
+ * Class: com.yxt.sms.api.smssalesreturndetail.SmsSalesReturnDetailDto
+ * Description: 销售退货单据明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据明细 数据传输对象", description = "销售退货单据明细 数据传输对象") +public class SmsSalesReturnDetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String specification; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailMapper.java new file mode 100644 index 0000000000..dde7789877 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailMapper.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturndetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnDetailMapper.java
+ * Class: com.yxt.sms.biz.smssalesreturndetail.SmsSalesReturnDetailMapper
+ * Description: 销售退货单据明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsSalesReturnDetailMapper extends BaseMapper { + + //@Update("update sms_sales_return_detail set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_sales_return_detail") + List selectListVo(); + @Select("select * from sms_sales_return_detail where billSid = #{billSid}") + List fetchByBillSid(@Param("billSid") String billSid); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailMapper.xml new file mode 100644 index 0000000000..ed58e272b7 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailQuery.java new file mode 100644 index 0000000000..c3e9ba7f9f --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailQuery.java @@ -0,0 +1,85 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturndetail; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnDetailQuery.java
+ * Class: com.yxt.sms.api.smssalesreturndetail.SmsSalesReturnDetailQuery
+ * Description: 销售退货单据明细 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据明细 查询条件", description = "销售退货单据明细 查询条件") +public class SmsSalesReturnDetailQuery implements Query { + + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String specification; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailService.java new file mode 100644 index 0000000000..ff8e3775fb --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailService.java @@ -0,0 +1,108 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturndetail; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnDetailService.java
+ * Class: com.yxt.sms.biz.smssalesreturndetail.SmsSalesReturnDetailService
+ * Description: 销售退货单据明细 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsSalesReturnDetailService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(SmsSalesReturnDetailQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public List fetchByBillSid(String billSid) { + return baseMapper.fetchByBillSid(billSid); + } + + public PagerVo listPageVo(PagerQuery pq) { + SmsSalesReturnDetailQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsSalesReturnDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(SmsSalesReturnDetailDto dto){ + SmsSalesReturnDetail entity = new SmsSalesReturnDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsSalesReturnDetailDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsSalesReturnDetail entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsSalesReturnDetailDetailsVo fetchDetailsVoBySid(String sid){ + SmsSalesReturnDetail entity = fetchBySid(sid); + SmsSalesReturnDetailDetailsVo vo = new SmsSalesReturnDetailDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailVo.java new file mode 100644 index 0000000000..d8775eeb93 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturndetail/SmsSalesReturnDetailVo.java @@ -0,0 +1,87 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturndetail; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: sms(sms)
+ * File: SmsSalesReturnDetailVo.java
+ * Class: com.yxt.sms.api.smssalesreturndetail.SmsSalesReturnDetailVo
+ * Description: 销售退货单据明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-15 17:24:45
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "销售退货单据明细 视图数据对象", description = "销售退货单据明细 视图数据对象") +public class SmsSalesReturnDetailVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("单据sid") + private String billSid; // 单据sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品基础信息Sid") + private String goodSpuSid; // 商品基础信息Sid + @ApiModelProperty("商品名称") + private String goodsSpuName; // 商品名称 + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; // 商品Skusid + @ApiModelProperty("商品Sku名称") + private String goodsSkuTitle; // 商品Sku名称 + @ApiModelProperty("商品编码(图号)") + private String goodsSkuCode; // 商品编码(图号) + @ApiModelProperty("规格") + private String specification; // 规格 + @ApiModelProperty("退货前的库存数量") + private BigDecimal currentCount; // 退货前的库存数量 + @ApiModelProperty("计量单位") + private String unit; // 计量单位 + @ApiModelProperty("已退数量") + private BigDecimal returnedCount; // 已退数量 + @ApiModelProperty("退货数量") + private BigDecimal backCount; // 退货数量 + @ApiModelProperty("税额") + private BigDecimal maxAmount; // 税额 + @ApiModelProperty("含税价") + private BigDecimal maxPrice; // 含税价 + @ApiModelProperty("退货金额") + private BigDecimal backAmount; // 退货金额 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettle.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettle.java new file mode 100644 index 0000000000..6a56883174 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettle.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturnsettle; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sdad(asdgag)
+ * File: SmsSalesReturnSettle.java
+ * Class: sms.api.smssalesreturnsettle.SmsSalesReturnSettle
+ * Description: 退货单-结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-27 09:58:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "退货单-结算", description = "退货单-结算") +@TableName("sms_sales_return_settle") +public class SmsSalesReturnSettle extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; // 结算时间 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleDetailsVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleDetailsVo.java new file mode 100644 index 0000000000..b1c8578434 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleDetailsVo.java @@ -0,0 +1,91 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturnsettle; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sdad(asdgag)
+ * File: SmsSalesReturnSettleVo.java
+ * Class: sms.api.smssalesreturnsettle.SmsSalesReturnSettleVo
+ * Description: 退货单-结算 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-27 09:58:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "退货单-结算 视图数据详情", description = "退货单-结算 视图数据详情") +public class SmsSalesReturnSettleDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleDto.java new file mode 100644 index 0000000000..33b0945bb1 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleDto.java @@ -0,0 +1,91 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturnsettle; + + +import com.yxt.common.core.dto.Dto; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sdad(asdgag)
+ * File: SmsSalesReturnSettleDto.java
+ * Class: sms.api.smssalesreturnsettle.SmsSalesReturnSettleDto
+ * Description: 退货单-结算 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-27 09:58:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "退货单-结算 数据传输对象", description = "退货单-结算 数据传输对象") +public class SmsSalesReturnSettleDto implements Dto { + + private String sid; // sid + @ApiModelProperty("创建者") + private String createBySid; + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; // 结算时间 + +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleMapper.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleMapper.java new file mode 100644 index 0000000000..9185adeb38 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleMapper.java @@ -0,0 +1,63 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturnsettle; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: sdad(asdgag)
+ * File: SmsSalesReturnSettleMapper.java
+ * Class: sms.biz.smssalesreturnsettle.SmsSalesReturnSettleMapper
+ * Description: 退货单-结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-27 09:58:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface SmsSalesReturnSettleMapper extends BaseMapper { + + //@Update("update sms_sales_return_settle set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from sms_sales_return_settle") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleMapper.xml b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleMapper.xml new file mode 100644 index 0000000000..345a81a1aa --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleQuery.java new file mode 100644 index 0000000000..8bee4cb48d --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleQuery.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturnsettle; + + +import com.yxt.common.core.query.Query; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sdad(asdgag)
+ * File: SmsSalesReturnSettleQuery.java
+ * Class: sms.api.smssalesreturnsettle.SmsSalesReturnSettleQuery
+ * Description: 退货单-结算 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-27 09:58:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "退货单-结算 查询条件", description = "退货单-结算 查询条件") +public class SmsSalesReturnSettleQuery implements Query { + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleService.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleService.java new file mode 100644 index 0000000000..f2fc7b2186 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleService.java @@ -0,0 +1,104 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturnsettle; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; + +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: sdad(asdgag)
+ * File: SmsSalesReturnSettleService.java
+ * Class: sms.biz.smssalesreturnsettle.SmsSalesReturnSettleService
+ * Description: 退货单-结算 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-27 09:58:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class SmsSalesReturnSettleService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(SmsSalesReturnSettleQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + SmsSalesReturnSettleQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(SmsSalesReturnSettleDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(SmsSalesReturnSettleDto dto){ + SmsSalesReturnSettle entity = new SmsSalesReturnSettle(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(SmsSalesReturnSettleDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + SmsSalesReturnSettle entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public SmsSalesReturnSettleDetailsVo fetchDetailsVoBySid(String sid){ + SmsSalesReturnSettle entity = fetchBySid(sid); + SmsSalesReturnSettleDetailsVo vo = new SmsSalesReturnSettleDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleVo.java new file mode 100644 index 0000000000..2cb93cb7cd --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/biz/smssalesreturnsettle/SmsSalesReturnSettleVo.java @@ -0,0 +1,91 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.biz.smssalesreturnsettle; + + +import com.yxt.common.core.vo.Vo; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.math.BigDecimal; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: sdad(asdgag)
+ * File: SmsSalesReturnSettleVo.java
+ * Class: sms.api.smssalesreturnsettle.SmsSalesReturnSettleVo
+ * Description: 退货单-结算 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-27 09:58:24
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "退货单-结算 视图数据对象", description = "退货单-结算 视图数据对象") +public class SmsSalesReturnSettleVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid(销售单sid)") + private String sourceBillSid; // 来源单sid(销售单sid) + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTimeStart; // 结算时间 + private Date settleTimeEnd; // 结算时间 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/config/SaTokenConfigure.java b/yxt-sms-biz/src/main/java/com/yxt/sms/config/SaTokenConfigure.java new file mode 100644 index 0000000000..db57faf2e3 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/config/SaTokenConfigure.java @@ -0,0 +1,114 @@ +package com.yxt.sms.config;//package com.yxt.wms.config; +// +//import cn.dev33.satoken.interceptor.SaInterceptor; +//import cn.dev33.satoken.stp.StpUtil; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +// +///** +// * @author wangpengfei +// * @date 2023/5/16 14:43 +// */ +//@Configuration +//public class SaTokenConfigure implements WebMvcConfigurer { +// @Value("${image.url.prefix:http://127.0.0.1:8080/upload/}") +// private String urlPrefix; +// // 注册 Sa-Token 拦截器 +// @Override +// public void addInterceptors(InterceptorRegistry registry) { +// // 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。 +// +// registry.addInterceptor(new SaInterceptor(handler -> StpUtil.checkLogin())) +// .addPathPatterns("/**") +// .excludePathPatterns("/sysuser/doLogin") +// .excludePathPatterns("/lpkgiftcard/gifCardByCustomerSid") +// .excludePathPatterns("/empcardgift/gifCardByCustomerSid") +// .excludePathPatterns("/empcard/getEmpCardByCustomerSid") +// .excludePathPatterns("/lpkgiftcard/getGifCardBySid/**") +// .excludePathPatterns("/empcardgift/getGifCardBySid/**") +// .excludePathPatterns("/empcard/getEmpCardBySid/**") +// .excludePathPatterns("/lpkgiftcard/isSaturAndSun/**") +// .excludePathPatterns("/empcardgift/isSaturAndSun/**") +// .excludePathPatterns("/empcard/isSaturAndSun/**") +// .excludePathPatterns("/lpkgiftcard/getReservationBySid/**") +// .excludePathPatterns("/lpksreservoorder/submission") +// .excludePathPatterns("/lpksreservoorder/exportExcelByStore") +// .excludePathPatterns("/empsreservoorder/createNewUserBagOrder") +// .excludePathPatterns("/lpksreservoorders/submission") +// .excludePathPatterns("/empsreservoorder/ordersList") +// .excludePathPatterns("/empsreservoorder/submission") +// .excludePathPatterns("/empsreservoorder/submissionEmp") +// .excludePathPatterns("/empcardgift/generateCard") +// .excludePathPatterns("/lpkgiftcard/bindCard") +// .excludePathPatterns("/empcard/bindCard") +// .excludePathPatterns("/lpksreservoorder/orderByCardSid/**") +// .excludePathPatterns("/lpksreservoorder/orderListByUserSid/**") +// .excludePathPatterns("/lpksreservoorder/orderDetails/**") +// .excludePathPatterns("/newcomerrecorecord/recommendNewUsers") +// .excludePathPatterns("/newcomerrecorecord/recommendedAssistance") +// .excludePathPatterns("/newcomerrecorecord/recordList/**") +// .excludePathPatterns("/transferrecords/transferRecordsList") +// .excludePathPatterns("/empsreservoorder/createVegeOrder") +// .excludePathPatterns("/empsreservoorder/OrderDetails/**") +// .excludePathPatterns("/empsreservoorder/changePayState/**") +// .excludePathPatterns("/lpkgoods/goodsDetails/**") +// .excludePathPatterns("/lpkstore/getAllStoreByQuery") +// .excludePathPatterns("/vegetablecellar/receiveTransferGoods") +// .excludePathPatterns("/transferrecords/submission") +// .excludePathPatterns("/lpkgiftcard/getCardByBank") +// .excludePathPatterns("/empcard/getEmpCard") +// .excludePathPatterns("/empcardgift/shareEmpCard/**") +// .excludePathPatterns("/empcardgift/generateEmpCardGift") +// .excludePathPatterns("/empcardgift/generateEmpCard") +// .excludePathPatterns("/lpkcustomer/wxSilentLogin") +// .excludePathPatterns("/lpkgiftcard/gifCardsByCustomerSid") +// .excludePathPatterns("/lpkgoods/getAllGiftBag") +// .excludePathPatterns("/appletgiftbag/getGiftBagBySid/**") +// .excludePathPatterns("/appletgiftbag/appletGiftBagList") +// .excludePathPatterns("/lpkgiftcard/cardShareDetail/**") +// .excludePathPatterns("/lpkgiftcard/cardShareGoodsDetail/**") +// .excludePathPatterns("/empcardgift/generateTopEmpCard/**") +// .excludePathPatterns("/empsreservoorder/createOrder") +// .excludePathPatterns("/appletgiftbag/recommendRecord/**") +// //2024-01-17 +// .excludePathPatterns("/lpkgiftcard/getAllGoodsType/**") +// .excludePathPatterns("/appletnotice/getNotice") +// .excludePathPatterns("/empsreservoorder/getPreOrder") +// .excludePathPatterns("/lpkgoods/getAllGoodsType/**") +// .excludePathPatterns("/transferrecords/submission") +// .excludePathPatterns("/vegetablecellar/receiveTransferGoods") +// .excludePathPatterns("/customerstore/isSaturAndSun") +// .excludePathPatterns("/lpkgiftcard/getGoodsByType/**") +// .excludePathPatterns("/lpkgoods/getGoodsTypeAndBrand") +// .excludePathPatterns("/lpkgoods/getGoodsByType") +// .excludePathPatterns("/lpksreservoorders/orderListByUserSid") +// .excludePathPatterns("/appletgiftbag/newUserQuota") +// .excludePathPatterns("/shoppingcart/addShoppingCart") +// .excludePathPatterns("/shoppingcart/getGoodsWeight") +// .excludePathPatterns("/shoppingcart/shoppingCartList") +// .excludePathPatterns("/shoppingcart/delShoppingCart/**") +// .excludePathPatterns("/lpkgoods/vegeCellarTypeList") +// .excludePathPatterns("/vegetablecellar/addGoods/**") +// .excludePathPatterns("/lpkgoods/vegeCellarList") +// .excludePathPatterns("/customerstore/getStoreBySid/**") +// .excludePathPatterns("/lpkgiftcard/bindAllCard") +// .excludePathPatterns("/lpkcustomer/customerInfo/**") +// .excludePathPatterns("/vegetablecellar/saveGoods") +// .excludePathPatterns("/transferrecords/getTransferByCode/**") +// //2024-01-18 +// .excludePathPatterns("/lpkcustomer/getCustomerInfo/**") +// .excludePathPatterns("/lpkcustomer/modifyUserNickName") +// .excludePathPatterns("/lpkcustomer/modifyHeadImage") +// .excludePathPatterns("/upload/**") +// .excludePathPatterns("/lpkcustomer/getPhoneNumber") +// .excludePathPatterns("/lpkcustomer/getRealInfo/**") +// .excludePathPatterns("/lpkcustomer/saveRealInfo") +// .excludePathPatterns("/pms/PmsBrand/getList") +// .excludePathPatterns("/LpkCustomerBank/getBankList") +// .excludePathPatterns("/lpkcustomer/updateCustomerBank") +// .excludePathPatterns("//wxapi/**") +// ; +// } +//} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/config/SaTokenGloableException.java b/yxt-sms-biz/src/main/java/com/yxt/sms/config/SaTokenGloableException.java new file mode 100644 index 0000000000..715f8628c6 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/config/SaTokenGloableException.java @@ -0,0 +1,67 @@ +package com.yxt.sms.config; + +import com.yxt.common.base.config.handler.GlobalExceptionHandler; +import com.yxt.common.core.result.ResultBean; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.validation.BindException; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.NoHandlerFoundException; + +/** + * @author dimengzhe + * @date 2020/9/12 3:23 + * @description 全局异常处理 + */ +@RestControllerAdvice +public class SaTokenGloableException extends GlobalExceptionHandler { + + private static final Logger L = LoggerFactory.getLogger(GlobalExceptionHandler.class); + + public SaTokenGloableException() { + } + @ExceptionHandler({Exception.class}) + public ResultBean handleException(Exception e) { + if(null !=e.getMessage()){ + if(e.getMessage().contains("token 无效:")){ + L.error(e.getMessage(), e); + return ResultBean.fireFail().setCode("5000").setMsg("系统异常::" + e.getMessage()); + } + if(e.getMessage().contains("未能读取到有效 token")){ +// L.error(e.getMessage(), e); + return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); + } + } + + L.error(e.getMessage(), e); + return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); + } + @ExceptionHandler({NoHandlerFoundException.class}) + public ResultBean handlerNoFoundException(Exception e) { + L.error(e.getMessage(), e); + return ResultBean.fireFail().setCode("404").setMsg("路径不存在,请检查路径是否正确"); + } + +// @ExceptionHandler({Exception.class}) +// public ResultBean handleException(Exception e) { +// L.error(e.getMessage(), e); +// return ResultBean.fireFail().setMsg("系统异常::" + e.getMessage()); +// } + + @ExceptionHandler({BindException.class}) + public ResultBean validatedBindException(BindException e) { + L.error(e.getMessage(), e); + String message = ((ObjectError)e.getAllErrors().get(0)).getDefaultMessage(); + return ResultBean.fireFail().setCode("405").setMsg(message); + } + + @ExceptionHandler({MethodArgumentNotValidException.class}) + public ResultBean validExceptionHandler(MethodArgumentNotValidException e) { + L.error(e.getMessage(), e); + String message = e.getBindingResult().getFieldError().getDefaultMessage(); + return ResultBean.fireFail().setCode("405").setMsg(message); + } +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/config/package-info.java b/yxt-sms-biz/src/main/java/com/yxt/sms/config/package-info.java new file mode 100644 index 0000000000..c8b04d2aa1 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/config/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.sms.config; \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmspaysettle/FmsPaysettle.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmspaysettle/FmsPaysettle.java new file mode 100644 index 0000000000..a4fbb5f472 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmspaysettle/FmsPaysettle.java @@ -0,0 +1,93 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.feign.fms.fmspaysettle; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsPaysettle.java
+ * Class: biz.api.fmspaysettle.FmsPaysettle
+ * Description: 付款结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "付款结算", description = "付款结算") +@TableName("fms_paysettle") +public class FmsPaysettle extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售退货、采购入库)") + private String busTypeValue; // 业务类型value(销售退货、采购入库) + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private BigDecimal payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private BigDecimal prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; // 结算时间 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmspaysettle/FmsPaysettleDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmspaysettle/FmsPaysettleDto.java new file mode 100644 index 0000000000..b13080e9f3 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmspaysettle/FmsPaysettleDto.java @@ -0,0 +1,51 @@ +package com.yxt.sms.feign.fms.fmspaysettle; + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/3 13:44 + */ +@Data +public class FmsPaysettleDto implements Dto { + private String sid; // sid + @ApiModelProperty("创建者") + private String createBySid; + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单编号") + private String sourceBillNo; // 来源单编号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售退货、采购入库)") + private String busTypeValue; // 业务类型value(销售退货、采购入库) + @ApiModelProperty("收款人编号") + private String payeeNo; // 收款人编号 + @ApiModelProperty("收款人名称") + private String payeeName; // 收款人名称 + @ApiModelProperty("收款人银行账号") + private String payeeBankAccount; // 收款人银行账号 + @ApiModelProperty("应付金额") + private String payableAmount; // 应付金额 + @ApiModelProperty("预付款抵扣") + private String prepaymentdeductAmount; // 预付款抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private String settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private String debts; // 欠款金额 + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmspaysettle/FmsPaysettleFeign.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmspaysettle/FmsPaysettleFeign.java new file mode 100644 index 0000000000..43cf7f31af --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmspaysettle/FmsPaysettleFeign.java @@ -0,0 +1,32 @@ +package com.yxt.sms.feign.fms.fmspaysettle; + +import com.yxt.common.core.result.ResultBean; +import com.yxt.sms.feign.wms.wmsinventory.WmsInventoryFeignFallback; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * @author Fan + * @description 付款结算 + * @date 2024/4/3 13:42 + */ +@FeignClient( + contextId = "yxt-fms-FmsPaysettle", + name = "yxt-fms", + path = "apiadmin/v1/fmspaysettle", + fallback = WmsInventoryFeignFallback.class +) +public interface FmsPaysettleFeign { + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody FmsPaysettleDto dto); + + @ApiOperation("根据来源SID获取一条记录") + @GetMapping("/fetchBySourceSid/{sid}") + public ResultBean fetchBySourceSid(@PathVariable("sourceBillSid") String sourceBillSid); +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmsreceivesettle/FmsReceivesettle.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmsreceivesettle/FmsReceivesettle.java new file mode 100644 index 0000000000..f43b94d805 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmsreceivesettle/FmsReceivesettle.java @@ -0,0 +1,91 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.feign.fms.fmsreceivesettle; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-fms(yxt-fms)
+ * File: FmsReceivesettle.java
+ * Class: biz.api.fmsreceivesettle.FmsReceivesettle
+ * Description: 收款结算.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 17:04:33
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "收款结算", description = "收款结算") +@TableName("fms_receivesettle") +public class FmsReceivesettle extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单号") + private String sourceBillNo; // 来源单号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售出库、采购退货)") + private String busTypeValue; // 业务类型value(销售出库、采购退货) + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 + @ApiModelProperty("应收金额") + private BigDecimal receivableAmount; // 应收金额 + @ApiModelProperty("订金抵扣") + private BigDecimal depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private BigDecimal settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private BigDecimal debts; // 欠款金额 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结算时间") + private Date settleTime; // 结算时间 + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmsreceivesettle/FmsReceivesettleDto.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmsreceivesettle/FmsReceivesettleDto.java new file mode 100644 index 0000000000..a7900d9694 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmsreceivesettle/FmsReceivesettleDto.java @@ -0,0 +1,49 @@ +package com.yxt.sms.feign.fms.fmsreceivesettle; + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/3 13:44 + */ +@Data +public class FmsReceivesettleDto implements Dto { + private String sid; // sid + @ApiModelProperty("创建者") + private String createBySid; + @ApiModelProperty("结算人姓名") + private String createByName; // 结算人姓名 + @ApiModelProperty("来源单sid") + private String sourceBillSid; // 来源单sid + @ApiModelProperty("来源单号") + private String sourceBillNo; // 来源单号 + @ApiModelProperty("业务类型key") + private String busTypeKey; // 业务类型key + @ApiModelProperty("业务类型value(销售出库、采购退货)") + private String busTypeValue; // 业务类型value(销售出库、采购退货) + @ApiModelProperty("付款人编号") + private String payerNo; // 付款人编号 + @ApiModelProperty("付款人名称") + private String payerName; // 付款人名称 + @ApiModelProperty("应收金额") + private String receivableAmount; // 应收金额 + @ApiModelProperty("订金抵扣") + private String depositdeductAmount; // 订金抵扣 + @ApiModelProperty("结算方式key") + private String settleKey; // 结算方式key + @ApiModelProperty("结算方式value") + private String settleValue; // 结算方式value + @ApiModelProperty("结算金额") + private String settleAmount; // 结算金额 + @ApiModelProperty("其他结算方式") + private String otherSettleKey; // 其他结算方式 + @ApiModelProperty("其他结算金额") + private String otherSettleValue; // 其他结算金额 + @ApiModelProperty("欠款金额") + private String debts; // 欠款金额 + @ApiModelProperty("结算时间") + private String settleTime; // 结算时间 +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmsreceivesettle/FmsReceivesettleFeign.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmsreceivesettle/FmsReceivesettleFeign.java new file mode 100644 index 0000000000..5116a479a2 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/fms/fmsreceivesettle/FmsReceivesettleFeign.java @@ -0,0 +1,32 @@ +package com.yxt.sms.feign.fms.fmsreceivesettle; + +import com.yxt.common.core.result.ResultBean; +import com.yxt.sms.feign.wms.wmsinventory.WmsInventoryFeignFallback; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * @author Fan + * @description 收款结算 + * @date 2024/4/3 13:42 + */ +@FeignClient( + contextId = "yxt-fms-FmsReceivesettle", + name = "yxt-fms", + path = "apiadmin/v1/fmsreceivesettle", + fallback = WmsInventoryFeignFallback.class +) +public interface FmsReceivesettleFeign { + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody FmsReceivesettleDto dto); + + @ApiOperation("根据来源SID获取一条记录") + @GetMapping("/fetchBySourceSid/{sid}") + public ResultBean fetchBySourceSid(@PathVariable("sourceBillSid") String sourceBillSid); +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/package-info.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/package-info.java new file mode 100644 index 0000000000..ee7452e89b --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/package-info.java @@ -0,0 +1,4 @@ +/** + * 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明 + */ +package com.yxt.sms.feign; \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventory.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventory.java new file mode 100644 index 0000000000..06b2c8a5aa --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventory.java @@ -0,0 +1,53 @@ +package com.yxt.sms.feign.wms.wmsinventory; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsInventory extends BaseEntity { + // private String id; +// private String sid= UUID.randomUUID().toString(); +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") +// private Date createTime; +// private String remarks; +// private String isEnable; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodSpuSid;//商品基础信息sid + private String goodsSpuName;//商品名称 + private String goodsSkuSid;//商品Skusid + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private BigDecimal price1;//销售价格1 + private BigDecimal price2;//销售价格2 + private BigDecimal price3;//销售价格3 + private BigDecimal price4;//销售价格4 + private BigDecimal price5;//销售价格5 + private String unit;//计量单位 + private BigDecimal count;//库存数量 + private BigDecimal minimumPrice;//销售底价 + private BigDecimal freePrice;//三包价格 + private BigDecimal firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseAreaSid;//库区sid + private String warehouseArea;//库区名称 + private String warehouseRackSid;//货架sid + private String warehouseRackName;//货架名称 + private int isShowDiscount;//是否显示折扣标志 + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private int sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventoryFeign.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventoryFeign.java new file mode 100644 index 0000000000..7b8583c63e --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventoryFeign.java @@ -0,0 +1,37 @@ +package com.yxt.sms.feign.wms.wmsinventory; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +/** + * @description: 库存信息 + * @author: fzz + * @date: 2024/3/7 + **/ +@FeignClient( + contextId = "yxt-wms-WmsInventory", + name = "yxt-wms", + path = "apiadmin/inventory/wmsinventory", + fallback = WmsInventoryFeignFallback.class +) +public interface WmsInventoryFeign { + @ApiOperation("修改库存数量") + @PostMapping("/updateInventoryCount") + ResultBean updateInventoryCount(@RequestBody WmsUpdateCountQuery query); + + @ApiOperation("销售开单选择商品分页列表") + @PostMapping("/listPageSales") + public ResultBean> listPageSales(@RequestBody PagerQuery pq); + + @ApiOperation("根据Sid获取库存实体") + @PostMapping("/fetchEntityBySid") + ResultBean fetchEntityBySid(@RequestParam("sid") String sid); +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventoryFeignFallback.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventoryFeignFallback.java new file mode 100644 index 0000000000..1758d24923 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventoryFeignFallback.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.sms.feign.wms.wmsinventory; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * Project: anrui-fin(安瑞财务)
+ * File: FinManufacturerBankFeignFallback.java
+ * Class: com.yxt.anrui.fin.api.finmanufacturerbank.FinManufacturerBankFeignFallback
+ * Description: 公司开户账号表.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-03 15:00:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Component +public class WmsInventoryFeignFallback implements WmsInventoryFeign { + + @Override + public ResultBean updateInventoryCount(WmsUpdateCountQuery query) { + return null; + } + + @Override + public ResultBean> listPageSales(PagerQuery pq) { + return null; + } + + @Override + public ResultBean fetchEntityBySid(String sid) { + return null; + } +} \ No newline at end of file diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventorySalesQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventorySalesQuery.java new file mode 100644 index 0000000000..4ccc7b8eaa --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventorySalesQuery.java @@ -0,0 +1,16 @@ +package com.yxt.sms.feign.wms.wmsinventory; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/20 15:14 + */ +@Data +public class WmsInventorySalesQuery implements Query { + + private String queryName; //名称 + private String useOrgSid; +} diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventorySalesVo.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventorySalesVo.java new file mode 100644 index 0000000000..bd5d182ace --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsInventorySalesVo.java @@ -0,0 +1,29 @@ +package com.yxt.sms.feign.wms.wmsinventory; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/3/20 15:14 + */ +@Data +public class WmsInventorySalesVo implements Vo { + + private String inventorySid; + private String goodsID; + private String goodSpuSid;//商品基础信息sid + private String goodsSpuName;//商品名称 + private String goodsSkuSid;//商品Skusid + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String unit;//计量单位 + private String currentCount;//库存数量 + private String warehouseSid;//仓库sid + private String warehouse;//仓库名称 + private String price;//销售价 + +} + + diff --git a/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsUpdateCountQuery.java b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsUpdateCountQuery.java new file mode 100644 index 0000000000..f66e5744f1 --- /dev/null +++ b/yxt-sms-biz/src/main/java/com/yxt/sms/feign/wms/wmsinventory/WmsUpdateCountQuery.java @@ -0,0 +1,17 @@ +package com.yxt.sms.feign.wms.wmsinventory; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author Fan + * @description + * @date 2024/3/20 9:14 + */ +@Data +public class WmsUpdateCountQuery { + private String sid; + private BigDecimal count; + private Integer addOrReduce; // 0增加 1减少 +} diff --git a/yxt-sms-biz/src/main/resources/application-devv.yml b/yxt-sms-biz/src/main/resources/application-devv.yml new file mode 100644 index 0000000000..ca00473127 --- /dev/null +++ b/yxt-sms-biz/src/main/resources/application-devv.yml @@ -0,0 +1,30 @@ +spring: + datasource: + hikari: + max-lifetime: 500000 + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://39.104.100.138:3306/yxt_sms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true + username: root + password: yxt_mysql_138 + cloud: + nacos: + discovery: + server-addr: 39.104.100.138:8848 + register-enabled: false + redis: + database: 3 # Redis数据库索引(默认为0) + host: 39.104.100.138 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\\anrui\\upload\\ + url: + prefix: http://192.168.1.106:8111/upload/ diff --git a/yxt-sms-biz/src/main/resources/application-pro.yml b/yxt-sms-biz/src/main/resources/application-pro.yml new file mode 100644 index 0000000000..f0192cd6c6 --- /dev/null +++ b/yxt-sms-biz/src/main/resources/application-pro.yml @@ -0,0 +1,27 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://120.46.172.184:3306/yxt_sms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: '@anrui18033887500' + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 127.0.0.1 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: D:\anrui\upload\ + url: + prefix: http://120.46.172.184/api/upload/ diff --git a/yxt-sms-biz/src/main/resources/application-test.yml b/yxt-sms-biz/src/main/resources/application-test.yml new file mode 100644 index 0000000000..c2ba8f6937 --- /dev/null +++ b/yxt-sms-biz/src/main/resources/application-test.yml @@ -0,0 +1,31 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://172.18.0.4:3306/yxt_sms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: yxt_mysql_138 + hikari: + minimum-idle: 3 + max-lifetime: 30000 + maximum-pool-size: 10 + cloud: + nacos: + discovery: + server-addr: 172.18.0.5:8848 + redis: + database: 3 # Redis数据库索引(默认为0) + host: 172.18.0.7 + jedis: + pool: + max-active: -1 #连接池最大连接数(使用负值表示没有限制) + max-idle: 8 #连接池中的最大空闲连接 + max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + password: 123456 + port: 6379 + timeout: 0 # 连接超时时间(毫秒) +image: + upload: + path: /home/lzh/docker_data/nginx/html/anrui-system-ui/upload/ + url: + prefix: http://anrui.yyundong.com/upload/ diff --git a/yxt-sms-biz/src/main/resources/application.yml b/yxt-sms-biz/src/main/resources/application.yml new file mode 100644 index 0000000000..bc8f091fc8 --- /dev/null +++ b/yxt-sms-biz/src/main/resources/application.yml @@ -0,0 +1,50 @@ +spring: + application: + name: yxt-sms + profiles: + active: devv +# active: test +# active: pro + messages: + # 国际化资源文件路径 + basename: i18n/messages + servlet: + #上传文件 + multipart: + max-file-size: 50MB + max-request-size: 100MB + devtools: + restart: + # 热部署开关 + enabled: true + +server: + port: 7302 + max-http-header-size: 102400 + undertow: + max-http-post-size: -1 + +#mybatis +mybatis-plus: + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapper-locations: classpath*:**Mapper.xml + global-config: + refresh: true + db-config: + #定义生成ID的类型 + id-type: Auto + db-type: mysql + configuration: + map-underscore-to-camel-case: false + cache-enabled: true + call-setters-on-nulls: true + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +#rocketmq: +# producer: +# group: yxt-supervise-gf +# name-server: 127.0.0.1:9876 + + + + diff --git a/yxt-sms-biz/src/main/resources/logback-spring.xml b/yxt-sms-biz/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..1a756cd90a --- /dev/null +++ b/yxt-sms-biz/src/main/resources/logback-spring.xml @@ -0,0 +1,50 @@ + + + + + + + + + + %yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n) + + + + + + + + + + + + + + + ${log.base}.log + + ${log.base}.%d{yyyyMMdd}.%i.log.zip + + + + 1MB + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} + -%msg%n + + + + + + + + + + \ No newline at end of file diff --git a/yxt-sms-biz/src/test/java/com/yxt/sms/YxtSmsBizApplicationTests.java b/yxt-sms-biz/src/test/java/com/yxt/sms/YxtSmsBizApplicationTests.java new file mode 100644 index 0000000000..933f2da449 --- /dev/null +++ b/yxt-sms-biz/src/test/java/com/yxt/sms/YxtSmsBizApplicationTests.java @@ -0,0 +1,13 @@ +package com.yxt.sms; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class YxtSmsBizApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsReceiptBillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsReceiptBillRest.java index 12db67ca3f..c4f44a002e 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsReceiptBillRest.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsReceiptBillRest.java @@ -33,12 +33,6 @@ public class WmsReceiptBillRest { return rb.success().setData(pv); } - /* @ApiOperation("新增修改保存") - @PostMapping("/saveOrUpdate2") - ResultBean saveOrUpdate2(@RequestBody WmsReceiptBillDto dto) { - return wmsReceiptBillService.saveOrUpdateBill(dto); - } - */ @ApiOperation("新增修改保存") @PostMapping("/saveOrUpdate") ResultBean saveOrUpdate(@RequestBody WmsReceiptBillDto2 dto) {