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-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() { + } + +}