Commit 7439124f396ba2aff37f994cadd93c8fc14876dd
1 parent
5e39a8b4
Exists in
dev
lpg 功能模块划分
Showing
25 changed files
with
1075 additions
and
516 deletions
Show diff stats
backend/lpg-user/src/main/java/com/hotent/lpg/user/controller/DdConroller.java
0 → 100644
... | ... | @@ -0,0 +1,129 @@ |
1 | +package com.hotent.lpg.user.controller; | |
2 | + | |
3 | +import cn.hutool.core.bean.BeanUtil; | |
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
5 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
6 | +import com.hotent.base.model.CommonResult; | |
7 | +import com.hotent.lpg.common.enums.DdlyEnum; | |
8 | +import com.hotent.lpg.common.enums.UserlxEnum; | |
9 | +import com.hotent.lpg.common.model.WDd; | |
10 | +import com.hotent.lpg.common.model.WHydz; | |
11 | +import com.hotent.lpg.common.model.WHyxx; | |
12 | +import com.hotent.lpg.user.dao.WHydzDao; | |
13 | +import com.hotent.lpg.user.dto.CreateOrderRequest; | |
14 | +import com.hotent.lpg.user.manager.WDdManager; | |
15 | +import com.hotent.lpg.user.manager.WHyxxManager; | |
16 | +import com.hotent.uc.util.ContextUtil; | |
17 | +import io.swagger.annotations.ApiOperation; | |
18 | +import io.swagger.annotations.ApiParam; | |
19 | +import org.springframework.beans.factory.annotation.Autowired; | |
20 | +import org.springframework.validation.annotation.Validated; | |
21 | +import org.springframework.web.bind.annotation.*; | |
22 | + | |
23 | +import javax.annotation.Resource; | |
24 | +import java.util.List; | |
25 | + | |
26 | +@RestController | |
27 | +@RequestMapping("/customer/dd/") | |
28 | +@Validated | |
29 | +public class DdConroller { | |
30 | + | |
31 | + @Autowired | |
32 | + private WDdManager wDdManager; | |
33 | + | |
34 | + @Resource | |
35 | + private WHydzDao hydzDao; | |
36 | + @Resource | |
37 | + private WHyxxManager wHyxxManager; | |
38 | + | |
39 | + | |
40 | + /** | |
41 | + * 会员获取订单列表 | |
42 | + * | |
43 | + * @param page | |
44 | + * @param zt | |
45 | + * @return | |
46 | + * @throws Exception | |
47 | + */ | |
48 | + @GetMapping(value = "/list") | |
49 | + public CommonResult list(Page page, String zt) throws Exception { | |
50 | + IPage<List<WDd>> list = wDdManager.pageList(page, zt, ContextUtil.getCurrentUserId()); | |
51 | + return CommonResult.ok().value(list); | |
52 | + } | |
53 | + | |
54 | + | |
55 | + /** | |
56 | + * 根据id获取订单数据详情 | |
57 | + * | |
58 | + * @param id | |
59 | + * @return | |
60 | + * @throws Exception ModelAndView | |
61 | + */ | |
62 | + @GetMapping(value = "/getDetail") | |
63 | + @ApiOperation(value = "根据id获取订单数据详情", httpMethod = "GET", notes = "根据id获取订单数据详情") | |
64 | + public CommonResult<WDd> getDetail(@ApiParam(name = "id", value = "业务对象主键", required = true) | |
65 | + @RequestParam(required = true) String id) throws Exception { | |
66 | + return CommonResult.<WDd>ok().value(wDdManager.getDetail(id)); | |
67 | + } | |
68 | + | |
69 | + /** | |
70 | + * 取消订单 | |
71 | + * | |
72 | + * @param ddid 订单id | |
73 | + * @return | |
74 | + * @throws Exception | |
75 | + * @throws | |
76 | + */ | |
77 | + @PostMapping(value = "/cancel") | |
78 | + @ApiOperation(value = "取消订单", httpMethod = "POST", notes = "取消订单") | |
79 | + public CommonResult<String> cancel(@RequestParam(required = true) String ddid) throws Exception { | |
80 | + wDdManager.cancel(ddid); | |
81 | + return CommonResult.<String>ok(); | |
82 | + } | |
83 | + | |
84 | + /** | |
85 | + * 创建订单 | |
86 | + * | |
87 | + * @param request | |
88 | + * @return | |
89 | + * @throws Exception | |
90 | + * @throws | |
91 | + */ | |
92 | + @PostMapping(value = "/save") | |
93 | + @ApiOperation(value = "创建订单", httpMethod = "POST", notes = "创建订单") | |
94 | + public CommonResult createOrder(@ApiParam(name = "CreateOrderRequest", value = "创建订单请求对象", required = true) @RequestBody CreateOrderRequest request) throws Exception { | |
95 | + WHydz hydz = hydzDao.selectOneByHyIdAndDzId(ContextUtil.getCurrentUserId(), request.getHydzId()); | |
96 | + if (BeanUtil.isEmpty(hydz)){ | |
97 | + throw new RuntimeException("未查询到地址信息。"); | |
98 | + } | |
99 | + WHyxx hyxx = wHyxxManager.getUseridByInfo(ContextUtil.getCurrentUserId()); | |
100 | + if (BeanUtil.isEmpty(hyxx)){ | |
101 | + throw new RuntimeException("未查询会员信息。"); | |
102 | + } | |
103 | + request.setShlxr(hydz.getFLxr()); | |
104 | + request.setShlxrdh(hydz.getFLxrdh()); | |
105 | + request.setShsf(hydz.getFLxrsf()); | |
106 | + request.setShs(hydz.getFLxrs()); | |
107 | + request.setShq(hydz.getFLxrq()); | |
108 | + request.setShjd(hydz.getFLxrjd()); | |
109 | + request.setShxxdz(hydz.getFLxrxxdz()); | |
110 | + request.setJd(hydz.getFJd()); | |
111 | + request.setWd(hydz.getFWd()); | |
112 | + | |
113 | + request.setSfhy("是"); | |
114 | + request.setHydh(hyxx.getFSjh()); //账号就是电话 | |
115 | + request.setHyid(hyxx.getFUserid()); | |
116 | + request.setHymc(hyxx.getFXm()); | |
117 | + request.setHylx(hyxx.getFHylx()); | |
118 | + request.setSfzh(hyxx.getFSfzh()); | |
119 | + request.setShtysbm(hyxx.getFShtysbm()); | |
120 | + | |
121 | + request.setXdrlx(UserlxEnum.hy.getInfo()); | |
122 | + request.setXdrid(ContextUtil.getCurrentUserId()); | |
123 | + request.setXdrmc(ContextUtil.getCurrentUser().getFullname()); | |
124 | + request.setDdly(DdlyEnum.xsxd.getInfo()); | |
125 | + WDd order = wDdManager.createOrder(request); | |
126 | + return CommonResult.ok().value(order); | |
127 | + } | |
128 | + | |
129 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/controller/TqglController.java
0 → 100644
... | ... | @@ -0,0 +1,94 @@ |
1 | +package com.hotent.lpg.user.controller; | |
2 | + | |
3 | + | |
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
5 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
6 | +import com.hotent.base.controller.BaseController; | |
7 | +import com.hotent.base.model.CommonResult; | |
8 | +import com.hotent.base.util.StringUtil; | |
9 | +import com.hotent.lpg.common.model.WTqgl; | |
10 | +import com.hotent.lpg.user.manager.WTqglManager; | |
11 | +import com.hotent.runtime.script.ScriptImpl; | |
12 | +import com.hotent.uc.api.model.IUser; | |
13 | +import io.swagger.annotations.ApiOperation; | |
14 | +import io.swagger.annotations.ApiParam; | |
15 | +import lombok.extern.slf4j.Slf4j; | |
16 | +import org.springframework.web.bind.annotation.*; | |
17 | + | |
18 | +import javax.annotation.Resource; | |
19 | + | |
20 | +/** | |
21 | + * 退气管理 前端控制器 | |
22 | + * | |
23 | + * @author 超级管理员 | |
24 | + * @company 广州宏天软件股份有限公司 | |
25 | + * @since 2024-04-11 | |
26 | + */ | |
27 | +@Slf4j | |
28 | +@RestController | |
29 | +@RequestMapping("/customer/wTqgl/v1/") | |
30 | +public class TqglController extends BaseController<WTqglManager, WTqgl> { | |
31 | + | |
32 | + @Resource | |
33 | + private ScriptImpl script; | |
34 | + | |
35 | + /** | |
36 | + * 根据id获取退气管理数据详情 | |
37 | + * | |
38 | + * @param id | |
39 | + * @return | |
40 | + * @throws Exception ModelAndView | |
41 | + */ | |
42 | + @GetMapping(value = "/getDetail") | |
43 | + @ApiOperation(value = "根据id获取退气管理数据详情", httpMethod = "GET", notes = "根据id获取退气管理数据详情") | |
44 | + public CommonResult<WTqgl> getDetail(@ApiParam(name = "id", value = "业务对象主键", required = true) @RequestParam(required = true) String id) throws Exception { | |
45 | + return CommonResult.<WTqgl>ok().value(baseService.getDetail(id)); | |
46 | + } | |
47 | + | |
48 | + /** | |
49 | + * 会员退气 | |
50 | + * | |
51 | + * @param id 会员用气记录id | |
52 | + * @return | |
53 | + * @throws Exception | |
54 | + * @throws | |
55 | + */ | |
56 | + @PostMapping(value = "/save") | |
57 | + @ApiOperation(value = "新增退气管理数据", httpMethod = "POST", notes = "新增退气管理数据") | |
58 | + public CommonResult<String> save(String id) throws Exception { | |
59 | + if (StringUtil.isEmpty(id)) { | |
60 | + return CommonResult.error("参数不全"); | |
61 | + } | |
62 | + log.info("新增退气管理数据,会员用气记录id={}", id); | |
63 | + try { | |
64 | + baseService.saveTq(id); | |
65 | + } catch (Exception e) { | |
66 | + log.info("新增退气管理数据,异常={}", e.getMessage()); | |
67 | + return CommonResult.error(e.getMessage()); | |
68 | + } | |
69 | + return CommonResult.<String>ok().message(""); | |
70 | + } | |
71 | + | |
72 | + /** | |
73 | + * 退气列表 | |
74 | + * | |
75 | + * @return | |
76 | + * @throws Exception | |
77 | + * @throws | |
78 | + */ | |
79 | + @GetMapping(value = "/tqPage") | |
80 | + @ApiOperation(value = "退气列表", httpMethod = "GET", notes = "退气列表") | |
81 | + public CommonResult<Object> tqPage(Page page, WTqgl wTqgl) throws Exception { | |
82 | + log.info("退气列表,page={},wTqgl={}", page, wTqgl); | |
83 | + IPage<WTqgl> result = null; | |
84 | + try { | |
85 | + IUser currentUser = script.getCurrentUser(); | |
86 | + wTqgl.setFHyyhid(currentUser.getUserId()); | |
87 | + result = baseService.tqPage(page, wTqgl,null); | |
88 | + } catch (Exception e) { | |
89 | + log.info("退气列表,异常={}", e.getMessage()); | |
90 | + return CommonResult.error(e.getMessage()); | |
91 | + } | |
92 | + return new CommonResult<>(true, "", result); | |
93 | + } | |
94 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/dao/WDdfwrzDao.java
0 → 100644
... | ... | @@ -0,0 +1,14 @@ |
1 | +package com.hotent.lpg.user.dao; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
4 | +import com.hotent.lpg.common.model.WDdfwrz; | |
5 | + | |
6 | +/** | |
7 | + * 订单服务日志 Mapper 接口 | |
8 | + * | |
9 | + * @company 广州宏天软件股份有限公司 | |
10 | + * @author 超级管理员 | |
11 | + * @since 2024-03-21 | |
12 | + */ | |
13 | +public interface WDdfwrzDao extends BaseMapper<WDdfwrz> { | |
14 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/dao/WDdxqDao.java
0 → 100644
... | ... | @@ -0,0 +1,14 @@ |
1 | +package com.hotent.lpg.user.dao; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
4 | +import com.hotent.lpg.common.model.WDdxq; | |
5 | + | |
6 | +/** | |
7 | + * 订单详情 Mapper 接口 | |
8 | + * | |
9 | + * @author 超级管理员 | |
10 | + * @company 广州宏天软件股份有限公司 | |
11 | + * @since 2024-03-18 | |
12 | + */ | |
13 | +public interface WDdxqDao extends BaseMapper<WDdxq> { | |
14 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/dao/WQplxDao.java
0 → 100644
... | ... | @@ -0,0 +1,14 @@ |
1 | +package com.hotent.lpg.user.dao; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
4 | +import com.hotent.lpg.common.model.WQplx; | |
5 | + | |
6 | +/** | |
7 | + * 气瓶类型 Mapper 接口 | |
8 | + * | |
9 | + * @company 广州宏天软件股份有限公司 | |
10 | + * @author 超级管理员 | |
11 | + * @since 2024-03-13 | |
12 | + */ | |
13 | +public interface WQplxDao extends BaseMapper<WQplx> { | |
14 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/dao/WTqglDao.java
0 → 100644
... | ... | @@ -0,0 +1,21 @@ |
1 | +package com.hotent.lpg.user.dao; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
5 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
6 | +import com.hotent.lpg.common.model.WTqgl; | |
7 | +import org.apache.ibatis.annotations.Param; | |
8 | + | |
9 | +import java.util.List; | |
10 | + | |
11 | +/** | |
12 | + * 退气管理 Mapper 接口 | |
13 | + * | |
14 | + * @company 广州宏天软件股份有限公司 | |
15 | + * @author 超级管理员 | |
16 | + * @since 2024-04-11 | |
17 | + */ | |
18 | +public interface WTqglDao extends BaseMapper<WTqgl> { | |
19 | + IPage<WTqgl> tqPage(Page page, @Param("query") WTqgl wTqgl, @Param("list") List<String> orgIdList); | |
20 | + | |
21 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/dto/CreateOrderRequest.java
0 → 100644
... | ... | @@ -0,0 +1,150 @@ |
1 | +package com.hotent.lpg.user.dto; | |
2 | + | |
3 | +import lombok.Data; | |
4 | + | |
5 | +import javax.validation.constraints.NotBlank; | |
6 | +import javax.validation.constraints.NotNull; | |
7 | +import javax.validation.constraints.Size; | |
8 | +import java.util.List; | |
9 | + | |
10 | +@Data | |
11 | +public class CreateOrderRequest { | |
12 | + | |
13 | + /** | |
14 | + * 是否会员 | |
15 | + */ | |
16 | + private String sfhy; | |
17 | + | |
18 | + /** | |
19 | + * 会员id | |
20 | + */ | |
21 | + private String hyid; | |
22 | + | |
23 | + /** | |
24 | + * 会员名称 | |
25 | + */ | |
26 | + private String hymc; | |
27 | + | |
28 | + /** | |
29 | + * 会员电话 | |
30 | + */ | |
31 | + private String hydh; | |
32 | + | |
33 | + /** | |
34 | + * 订单来源 | |
35 | + */ | |
36 | + private String ddly; | |
37 | + | |
38 | + /** | |
39 | + * 配送方式 | |
40 | + */ | |
41 | + private String psfs; | |
42 | + | |
43 | + /** | |
44 | + * 买家留言 | |
45 | + */ | |
46 | + private String mjly; | |
47 | + | |
48 | + /** | |
49 | + * 备注 | |
50 | + */ | |
51 | + private String bz; | |
52 | + | |
53 | + /** | |
54 | + * 会员收货地址id | |
55 | + */ | |
56 | + private String hydzId; | |
57 | + /** | |
58 | + * 收货联系人 | |
59 | + */ | |
60 | + private String shlxr; | |
61 | + /** | |
62 | + * 收货联系人电话 | |
63 | + */ | |
64 | + private String shlxrdh; | |
65 | + /** | |
66 | + * 收货省份 | |
67 | + */ | |
68 | + private String shsf; | |
69 | + /** | |
70 | + * 收货市 | |
71 | + */ | |
72 | + private String shs; | |
73 | + /** | |
74 | + * 收货区 | |
75 | + */ | |
76 | + private String shq; | |
77 | + /** | |
78 | + * 收货街道 | |
79 | + */ | |
80 | + private String shjd; | |
81 | + | |
82 | + /** | |
83 | + * 收货详细地址 | |
84 | + */ | |
85 | + private String shxxdz; | |
86 | + | |
87 | + | |
88 | + /** | |
89 | + * 下单人类型 | |
90 | + */ | |
91 | + private String xdrlx; | |
92 | + /** | |
93 | + * 下单人id | |
94 | + */ | |
95 | + private String xdrid; | |
96 | + /** | |
97 | + * 下单人名称 | |
98 | + */ | |
99 | + private String xdrmc; | |
100 | + | |
101 | + | |
102 | + /** | |
103 | + * 下单人名称 | |
104 | + */ | |
105 | + private String shtysbm; | |
106 | + | |
107 | + /** | |
108 | + * 身份证号 | |
109 | + */ | |
110 | + private String sfzh; | |
111 | + | |
112 | + /** | |
113 | + * 会员类型 | |
114 | + */ | |
115 | + private String hylx; | |
116 | + | |
117 | + /** | |
118 | + * 经度 | |
119 | + */ | |
120 | + private String jd; | |
121 | + | |
122 | + /** | |
123 | + * 维度 | |
124 | + */ | |
125 | + private String wd; | |
126 | + | |
127 | + | |
128 | + | |
129 | + /** | |
130 | + * 购买详情 | |
131 | + */ | |
132 | + @Size(min = 1, message = "购买详情不能为空") | |
133 | + @NotNull(message = "购买详情不能为空") | |
134 | + private List<XqVO> xqList; | |
135 | + | |
136 | + @Data | |
137 | + public static class XqVO { | |
138 | + /** | |
139 | + * 气瓶类型ID | |
140 | + */ | |
141 | + @NotBlank(message = "气瓶类型ID不能为空") | |
142 | + private String qplxId; | |
143 | + /** | |
144 | + * 数量 | |
145 | + */ | |
146 | + @NotNull(message = "数量不能为空") | |
147 | + private Integer sl; | |
148 | + } | |
149 | +} | |
150 | + | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/WDdManager.java
1 | 1 | package com.hotent.lpg.user.manager; |
2 | 2 | |
3 | 3 | |
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
5 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
4 | 6 | import com.hotent.base.manager.BaseManager; |
5 | 7 | import com.hotent.lpg.common.model.WDd; |
8 | +import com.hotent.lpg.user.dto.CreateOrderRequest; | |
9 | +import com.hotent.lpg.user.vo.DdxxVo; | |
10 | + | |
11 | +import java.util.List; | |
6 | 12 | |
7 | 13 | /** |
8 | 14 | * 订单 服务类 |
... | ... | @@ -12,4 +18,40 @@ import com.hotent.lpg.common.model.WDd; |
12 | 18 | * @since 2024-03-18 |
13 | 19 | */ |
14 | 20 | public interface WDdManager extends BaseManager<WDd> { |
21 | + | |
22 | + | |
23 | + /** | |
24 | + * 根据主键获取详情 | |
25 | + * | |
26 | + * @param id | |
27 | + * @return | |
28 | + */ | |
29 | + WDd getDetail(String id); | |
30 | + | |
31 | + void cancel(String ddid); | |
32 | + | |
33 | + | |
34 | + WDd createOrder(CreateOrderRequest request); | |
35 | + | |
36 | + | |
37 | + | |
38 | + /** | |
39 | + * 订单列表 | |
40 | + * | |
41 | + * @param page | |
42 | + * @param zt 订单状态 | |
43 | + * @param hyid 会员id | |
44 | + * @return | |
45 | + */ | |
46 | + IPage pageList(Page page, String zt, String hyid); | |
47 | + | |
48 | + /** | |
49 | + * 根据订单id查询订单详情 | |
50 | + * | |
51 | + * @param oracleId | |
52 | + * @return | |
53 | + */ | |
54 | + DdxxVo getOrderByid(String oracleId); | |
55 | + | |
56 | + | |
15 | 57 | } | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/WDdfwrzManager.java
0 → 100644
... | ... | @@ -0,0 +1,17 @@ |
1 | +package com.hotent.lpg.user.manager; | |
2 | + | |
3 | +import com.hotent.base.manager.BaseManager; | |
4 | +import com.hotent.lpg.common.model.WDdfwrz; | |
5 | + | |
6 | +/** | |
7 | + * 订单服务日志 服务类 | |
8 | + * | |
9 | + * @author 超级管理员 | |
10 | + * @company 广州宏天软件股份有限公司 | |
11 | + * @since 2024-03-21 | |
12 | + */ | |
13 | +public interface WDdfwrzManager extends BaseManager<WDdfwrz> { | |
14 | + | |
15 | + void insertDdfwrz(String fwlxdm, String ddid); | |
16 | + | |
17 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/WDdxqManager.java
0 → 100644
... | ... | @@ -0,0 +1,14 @@ |
1 | +package com.hotent.lpg.user.manager; | |
2 | + | |
3 | +import com.hotent.base.manager.BaseManager; | |
4 | +import com.hotent.lpg.common.model.WDdxq; | |
5 | + | |
6 | +/** | |
7 | + * 订单详情 服务类 | |
8 | + * | |
9 | + * @company 广州宏天软件股份有限公司 | |
10 | + * @author 超级管理员 | |
11 | + * @since 2024-03-18 | |
12 | + */ | |
13 | +public interface WDdxqManager extends BaseManager<WDdxq> { | |
14 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/WQplxManager.java
0 → 100644
... | ... | @@ -0,0 +1,16 @@ |
1 | +package com.hotent.lpg.user.manager; | |
2 | + | |
3 | +import com.hotent.base.manager.BaseManager; | |
4 | +import com.hotent.lpg.common.model.WQplx; | |
5 | + | |
6 | +/** | |
7 | + * 气瓶类型 服务类 | |
8 | + * | |
9 | + * @author 超级管理员 | |
10 | + * @company 广州宏天软件股份有限公司 | |
11 | + * @since 2024-03-13 | |
12 | + */ | |
13 | +public interface WQplxManager extends BaseManager<WQplx> { | |
14 | + | |
15 | + | |
16 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/WTqglManager.java
0 → 100644
... | ... | @@ -0,0 +1,36 @@ |
1 | +package com.hotent.lpg.user.manager; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
4 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
5 | +import com.hotent.base.manager.BaseManager; | |
6 | +import com.hotent.lpg.common.model.WTqgl; | |
7 | + | |
8 | +import java.util.List; | |
9 | + | |
10 | +/** | |
11 | + * 退气管理 服务类 | |
12 | + * | |
13 | + * @company 广州宏天软件股份有限公司 | |
14 | + * @author 超级管理员 | |
15 | + * @since 2024-04-11 | |
16 | + */ | |
17 | +public interface WTqglManager extends BaseManager<WTqgl> { | |
18 | + IPage<WTqgl> tqPage(Page page, WTqgl wTqgl, List<String> orgIdList); | |
19 | + | |
20 | + | |
21 | + /** | |
22 | + * 申请退气 | |
23 | + * @param id | |
24 | + */ | |
25 | + void saveTq(String id); | |
26 | + | |
27 | + | |
28 | + /** | |
29 | + * 根据主键获取详情 | |
30 | + * @param id | |
31 | + * @return | |
32 | + */ | |
33 | + WTqgl getDetail(String id); | |
34 | + | |
35 | + | |
36 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/impl/WDdManagerImpl.java
1 | 1 | package com.hotent.lpg.user.manager.impl; |
2 | 2 | |
3 | +import cn.hutool.core.bean.BeanUtil; | |
4 | +import cn.hutool.core.collection.CollUtil; | |
5 | +import cn.hutool.core.util.NumberUtil; | |
6 | +import cn.hutool.core.util.ObjectUtil; | |
7 | +import cn.hutool.core.util.StrUtil; | |
8 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
9 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
10 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
11 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
12 | +import com.hotent.base.id.IdGenerator; | |
3 | 13 | import com.hotent.base.manager.impl.BaseManagerImpl; |
14 | +import com.hotent.base.util.BeanUtils; | |
15 | +import com.hotent.base.util.StringUtil; | |
16 | +import com.hotent.lpg.common.enums.DdfwlxEnum; | |
17 | +import com.hotent.lpg.common.enums.DdztEnum; | |
4 | 18 | import com.hotent.lpg.common.model.WDd; |
19 | +import com.hotent.lpg.common.model.WDdxq; | |
20 | +import com.hotent.lpg.common.model.WHyyqjl; | |
21 | +import com.hotent.lpg.common.model.WQplx; | |
5 | 22 | import com.hotent.lpg.user.dao.WDdDao; |
23 | +import com.hotent.lpg.user.dao.WDdxqDao; | |
24 | +import com.hotent.lpg.user.dao.WQplxDao; | |
25 | +import com.hotent.lpg.user.dto.CreateOrderRequest; | |
6 | 26 | import com.hotent.lpg.user.manager.WDdManager; |
27 | +import com.hotent.lpg.user.manager.WDdfwrzManager; | |
28 | +import com.hotent.lpg.user.manager.WHyxxManager; | |
29 | +import com.hotent.lpg.user.manager.WHyyqjlManager; | |
30 | +import com.hotent.lpg.user.vo.DdxxVo; | |
31 | +import com.hotent.uc.util.ContextUtil; | |
7 | 32 | import lombok.extern.slf4j.Slf4j; |
8 | 33 | import org.springframework.stereotype.Service; |
9 | 34 | import org.springframework.transaction.annotation.Transactional; |
10 | 35 | |
36 | +import javax.annotation.Resource; | |
37 | +import java.math.BigDecimal; | |
38 | +import java.time.LocalDateTime; | |
39 | +import java.util.ArrayList; | |
40 | +import java.util.List; | |
41 | + | |
11 | 42 | /** |
12 | 43 | * 订单 服务实现类 |
13 | 44 | * |
... | ... | @@ -19,4 +50,150 @@ import org.springframework.transaction.annotation.Transactional; |
19 | 50 | @Transactional(rollbackFor = Exception.class) |
20 | 51 | @Service |
21 | 52 | public class WDdManagerImpl extends BaseManagerImpl<WDdDao, WDd> implements WDdManager { |
53 | + @Resource | |
54 | + private IdGenerator idGenerator; | |
55 | + | |
56 | + @Resource | |
57 | + private WDdxqDao ddxqDao; | |
58 | + @Resource | |
59 | + private WQplxDao qplxDao; | |
60 | + @Resource | |
61 | + private WDdfwrzManager wDdfwrzManager; | |
62 | + @Resource | |
63 | + private WHyxxManager wHyxxManager; | |
64 | + @Resource | |
65 | + private WHyyqjlManager wHyyqjlManager; | |
66 | + @Override | |
67 | + public WDd getDetail(String id) { | |
68 | + WDd wDd = this.get(id); | |
69 | + if (ObjectUtil.isNull(wDd)) { | |
70 | + return wDd; | |
71 | + } | |
72 | + wDd.setDdxqList(ddxqDao.selectList(new LambdaQueryWrapper<WDdxq>().eq(WDdxq::getfDdid, wDd.getId()))); | |
73 | + return wDd; | |
74 | + } | |
75 | + @Override | |
76 | + public void cancel(String ddid) { | |
77 | + WDd dd = baseMapper.selectById(ddid); | |
78 | + if (ObjectUtil.isNull(dd)) { | |
79 | + throw new RuntimeException("参数错误:订单不存在"); | |
80 | + } | |
81 | + if (DdztEnum.dps.getInfo().equals(dd.getFDdzt()) || DdztEnum.psz.getInfo().equals(dd.getFDdzt())) { | |
82 | + dd.setFDdzt(DdztEnum.yqx.getInfo()); | |
83 | + baseMapper.updateById(dd); | |
84 | + } else { | |
85 | + throw new RuntimeException("订单状态不正确"); | |
86 | + } | |
87 | + //添加服务日志 | |
88 | + wDdfwrzManager.insertDdfwrz(DdfwlxEnum.qxdd.getCode(), dd.getId()); | |
89 | + } | |
90 | + | |
91 | + @Override | |
92 | + @Transactional(rollbackFor = Exception.class) | |
93 | + public WDd createOrder(CreateOrderRequest request) { | |
94 | + WQplx qplx = qplxDao.selectById(request.getXqList().get(0).getQplxId()); | |
95 | + WDd dd = new WDd(); | |
96 | + dd.setId(idGenerator.getSuid()); | |
97 | + | |
98 | + dd.setFSfhy(request.getSfhy()); | |
99 | + dd.setFHyyhid(request.getHyid()); | |
100 | + dd.setFHymc(request.getHymc()); | |
101 | + dd.setFHylx(request.getHylx()); | |
102 | + dd.setFHydh(request.getHydh()); | |
103 | + | |
104 | + dd.setFShtysbm(request.getShtysbm()); | |
105 | + dd.setFSfzh(request.getSfzh()); | |
106 | + | |
107 | + dd.setFDdlx(null); | |
108 | + dd.setFDddh(idGenerator.getSuid()); | |
109 | + dd.setFDdly(request.getDdly()); | |
110 | + dd.setFZffs(null); | |
111 | + dd.setFPsfs(request.getPsfs()); | |
112 | + dd.setFDdzt(DdztEnum.dps.getInfo()); | |
113 | + dd.setFMjly(request.getMjly()); | |
114 | + dd.setFBz(request.getBz()); | |
115 | + | |
116 | + dd.setFCzid(qplx.getfSsczid()); | |
117 | + dd.setFCzmc(qplx.getfSsczmc()); | |
118 | + dd.setFQyid(qplx.getfSsqyid()); | |
119 | + | |
120 | + dd.setFXdrlx(request.getXdrlx()); | |
121 | + dd.setFXdrid(request.getXdrid()); | |
122 | + dd.setFXdrmc(request.getXdrmc()); | |
123 | + dd.setFShlxr(request.getShlxr()); | |
124 | + dd.setFShlxrdh(request.getShlxrdh()); | |
125 | + dd.setFShsf(request.getShsf()); | |
126 | + dd.setFShs(request.getShs()); | |
127 | + dd.setFShq(request.getShq()); | |
128 | + dd.setFShjd(request.getShjd()); | |
129 | + dd.setFShxxdz(request.getShxxdz()); | |
130 | + dd.setFCjr(ContextUtil.getCurrentUser().getFullname()); | |
131 | + dd.setFCjsj(LocalDateTime.now()); | |
132 | + dd.setFGxr(ContextUtil.getCurrentUser().getFullname()); | |
133 | + dd.setFGxsj(LocalDateTime.now()); | |
134 | + dd.setFShdzjd(request.getJd()); | |
135 | + dd.setFShdzwd(request.getWd()); | |
136 | + BigDecimal ddje = new BigDecimal(0); | |
137 | + List<WDdxq> ddxqList = new ArrayList<WDdxq>(); | |
138 | + for (CreateOrderRequest.XqVO xqVO : request.getXqList()) { | |
139 | + WQplx wQplx = qplxDao.selectById(xqVO.getQplxId()); | |
140 | + if (ObjectUtil.isNull(wQplx)) { | |
141 | + throw new RuntimeException("商品信息不存在"); | |
142 | + } | |
143 | + ddje = NumberUtil.add(ddje, NumberUtil.mul(wQplx.getfJg(), xqVO.getSl())); | |
144 | + WDdxq ddxq = new WDdxq(); | |
145 | + ddxq.setfDdid(dd.getId()); | |
146 | + ddxq.setfQplxid(wQplx.getId()); | |
147 | + ddxq.setfSpmc(wQplx.getfMc()); | |
148 | + ddxq.setfTp(wQplx.getfTp()); | |
149 | + ddxq.setfSl(BigDecimal.valueOf(xqVO.getSl())); | |
150 | + ddxq.setfDj(wQplx.getfJg()); | |
151 | + ddxq.setfMs(wQplx.getfMs()); | |
152 | + ddxqDao.insert(ddxq); | |
153 | + ddxqList.add(ddxq); | |
154 | + } | |
155 | + dd.setFDdje(ddje); | |
156 | + dd.setDdxqList(ddxqList); | |
157 | + baseMapper.insert(dd); | |
158 | + //添加服务日志 | |
159 | + wDdfwrzManager.insertDdfwrz(DdfwlxEnum.cjdd.getCode(), dd.getId()); | |
160 | + return dd; | |
161 | + } | |
162 | + | |
163 | + @Override | |
164 | + public IPage pageList(Page page, String zt, String hyid) { | |
165 | + LambdaQueryWrapper<WDd> wrapper = new LambdaQueryWrapper<>(); | |
166 | + wrapper.eq(StrUtil.isNotBlank(zt), WDd::getFDdzt, zt); | |
167 | + wrapper.eq(WDd::getFHyyhid, hyid); | |
168 | + wrapper.orderByDesc(WDd::getFCjsj); | |
169 | + Page selectPage = baseMapper.selectPage(page, wrapper); | |
170 | + if (CollUtil.isNotEmpty(selectPage.getRecords())) { | |
171 | + List<WDd> list = selectPage.getRecords(); | |
172 | + for (WDd dd : list) { | |
173 | + dd.setDdxqList(ddxqDao.selectList(new LambdaQueryWrapper<WDdxq>().eq(WDdxq::getfDdid, dd.getId()))); | |
174 | + } | |
175 | + } | |
176 | + return selectPage; | |
177 | + } | |
178 | + | |
179 | + @Override | |
180 | + public DdxxVo getOrderByid(String oracleId) { | |
181 | + WDd dd = this.getById(oracleId); | |
182 | + if (BeanUtils.isEmpty(dd)) { | |
183 | + throw new RuntimeException("未查询到订单信息。"); | |
184 | + } | |
185 | + DdxxVo ddxxVo = new DdxxVo(); | |
186 | + BeanUtil.copyProperties(dd, ddxxVo); | |
187 | + if (StringUtil.isNotEmpty(dd.getFHyyhid())) { | |
188 | + ddxxVo.setHyxx(wHyxxManager.getUseridByInfo(dd.getFHyyhid())); | |
189 | + } | |
190 | + WHyyqjl wHyyqjl = wHyyqjlManager.getOne | |
191 | + (Wrappers.<WHyyqjl>lambdaQuery() | |
192 | + .eq(WHyyqjl::getFHyyhid, dd.getFHyyhid()) | |
193 | + | |
194 | + .orderByDesc(WHyyqjl::getFCjsj) | |
195 | + .last("LIMIT 1")); | |
196 | + ddxxVo.setMcazsj(BeanUtil.isEmpty(wHyyqjl) ? null : wHyyqjl.getFCjsj()); | |
197 | + return ddxxVo; | |
198 | + } | |
22 | 199 | } | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/impl/WDdfwrzManagerImpl.java
0 → 100644
... | ... | @@ -0,0 +1,69 @@ |
1 | +package com.hotent.lpg.user.manager.impl; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
5 | +import com.hotent.base.manager.impl.BaseManagerImpl; | |
6 | +import com.hotent.base.util.BeanUtils; | |
7 | +import com.hotent.base.util.JsonUtil; | |
8 | +import com.hotent.lpg.common.enums.DdfwlxEnum; | |
9 | +import com.hotent.lpg.common.enums.UserlxEnum; | |
10 | +import com.hotent.lpg.common.model.WDdfwrz; | |
11 | +import com.hotent.lpg.common.model.WHyxx; | |
12 | +import com.hotent.lpg.user.dao.WDdfwrzDao; | |
13 | +import com.hotent.lpg.user.manager.WDdManager; | |
14 | +import com.hotent.lpg.user.manager.WDdfwrzManager; | |
15 | +import com.hotent.lpg.user.manager.WHyxxManager; | |
16 | +import com.hotent.lpg.user.vo.DdxxVo; | |
17 | +import com.hotent.uc.util.ContextUtil; | |
18 | +import org.springframework.stereotype.Service; | |
19 | +import org.springframework.transaction.annotation.Transactional; | |
20 | + | |
21 | +import javax.annotation.Resource; | |
22 | +import java.time.LocalDateTime; | |
23 | + | |
24 | +/** | |
25 | + * 订单服务日志 服务实现类 | |
26 | + * | |
27 | + * @author 超级管理员 | |
28 | + * @company 广州宏天软件股份有限公司 | |
29 | + * @since 2024-03-21 | |
30 | + */ | |
31 | +@Transactional(rollbackFor = Exception.class) | |
32 | +@Service | |
33 | +public class WDdfwrzManagerImpl extends BaseManagerImpl<WDdfwrzDao, WDdfwrz> implements WDdfwrzManager { | |
34 | + | |
35 | + | |
36 | + @Resource | |
37 | + private WDdManager wDdManager; | |
38 | + @Resource | |
39 | + private WHyxxManager wHyxxManager; | |
40 | + /** | |
41 | + * 添加订单服务日志 | |
42 | + * | |
43 | + * @param ddid | |
44 | + */ | |
45 | + @Override | |
46 | + public void insertDdfwrz(String fwlxdm, String ddid) { | |
47 | + try { | |
48 | + LambdaQueryWrapper<WHyxx> hyxxQuery = Wrappers.lambdaQuery(WHyxx.class).eq(WHyxx::getFSjh, ContextUtil.getCurrentUser().getAccount()); | |
49 | + WHyxx wHyxx = wHyxxManager.list(hyxxQuery).stream().findAny().orElse(null); | |
50 | + WDdfwrz wDdfwrz = new WDdfwrz(); | |
51 | + DdxxVo detail = wDdManager.getOrderByid(ddid); | |
52 | + DdfwlxEnum ddfwlxEnum = DdfwlxEnum.valueOf(fwlxdm); | |
53 | + wDdfwrz.setfFwlx(ddfwlxEnum.getInfo()); | |
54 | +// formatWithString(ddfwlxEnum.getContent(), detail) | |
55 | + wDdfwrz.setfFwnr(ddfwlxEnum.getInfo()); | |
56 | + wDdfwrz.setfKzjson(JsonUtil.toJson(detail)); | |
57 | + wDdfwrz.setfCzrlx(BeanUtils.isNotEmpty(wHyxx) ? UserlxEnum.hy.getInfo() : UserlxEnum.yg.getInfo()); | |
58 | + wDdfwrz.setfCzrid(ContextUtil.getCurrentUserId()); | |
59 | + wDdfwrz.setfCzsj(LocalDateTime.now()); | |
60 | + wDdfwrz.setfCzr(ContextUtil.getCurrentUser().getFullname()); | |
61 | + wDdfwrz.setfQyid(detail.getFQyid()); | |
62 | + wDdfwrz.setfCzid(detail.getFCzid()); | |
63 | + wDdfwrz.setfDdid(detail.getId()); | |
64 | + this.save(wDdfwrz); | |
65 | + } catch (Exception e) { | |
66 | + e.printStackTrace(); | |
67 | + } | |
68 | + } | |
69 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/impl/WDdxqManagerImpl.java
0 → 100644
... | ... | @@ -0,0 +1,21 @@ |
1 | +package com.hotent.lpg.user.manager.impl; | |
2 | + | |
3 | +import com.hotent.base.manager.impl.BaseManagerImpl; | |
4 | +import com.hotent.lpg.common.model.WDdxq; | |
5 | +import com.hotent.lpg.user.dao.WDdxqDao; | |
6 | +import com.hotent.lpg.user.manager.WDdxqManager; | |
7 | +import org.springframework.stereotype.Service; | |
8 | + | |
9 | +/** | |
10 | + * 订单详情 服务实现类 | |
11 | + * | |
12 | + * @company 广州宏天软件股份有限公司 | |
13 | + * @author 超级管理员 | |
14 | + * @since 2024-03-18 | |
15 | + */ | |
16 | +@Service | |
17 | +public class WDdxqManagerImpl extends BaseManagerImpl<WDdxqDao, WDdxq> implements WDdxqManager { | |
18 | + | |
19 | + | |
20 | + | |
21 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/impl/WQplxManagerImpl.java
0 → 100644
... | ... | @@ -0,0 +1,20 @@ |
1 | +package com.hotent.lpg.user.manager.impl; | |
2 | + | |
3 | +import com.hotent.base.manager.impl.BaseManagerImpl; | |
4 | +import com.hotent.lpg.common.model.WQplx; | |
5 | +import com.hotent.lpg.user.dao.WQplxDao; | |
6 | +import com.hotent.lpg.user.manager.WQplxManager; | |
7 | +import org.springframework.stereotype.Service; | |
8 | +import org.springframework.transaction.annotation.Transactional; | |
9 | + | |
10 | +/** | |
11 | + * 气瓶类型 服务实现类 | |
12 | + * | |
13 | + * @company 广州宏天软件股份有限公司 | |
14 | + * @author 超级管理员 | |
15 | + * @since 2024-03-13 | |
16 | + */ | |
17 | +@Transactional(rollbackFor = Exception.class) | |
18 | +@Service | |
19 | +public class WQplxManagerImpl extends BaseManagerImpl<WQplxDao, WQplx> implements WQplxManager { | |
20 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/manager/impl/WTqglManagerImpl.java
0 → 100644
... | ... | @@ -0,0 +1,104 @@ |
1 | +package com.hotent.lpg.user.manager.impl; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | |
5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
6 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
7 | +import com.hotent.base.id.IdGenerator; | |
8 | +import com.hotent.base.manager.impl.BaseManagerImpl; | |
9 | +import com.hotent.lpg.common.enums.QpztEnum; | |
10 | +import com.hotent.lpg.common.model.WDd; | |
11 | +import com.hotent.lpg.common.model.WHyyqjl; | |
12 | +import com.hotent.lpg.common.model.WTqgl; | |
13 | +import com.hotent.lpg.user.dao.WTqglDao; | |
14 | +import com.hotent.lpg.user.manager.WDdManager; | |
15 | +import com.hotent.lpg.user.manager.WHyyqjlManager; | |
16 | +import com.hotent.lpg.user.manager.WTqglManager; | |
17 | +import lombok.extern.slf4j.Slf4j; | |
18 | +import org.springframework.stereotype.Service; | |
19 | +import org.springframework.transaction.annotation.Transactional; | |
20 | + | |
21 | +import javax.annotation.Resource; | |
22 | +import java.time.LocalDateTime; | |
23 | +import java.util.List; | |
24 | + | |
25 | +/** | |
26 | + * 退气管理 服务实现类 | |
27 | + * | |
28 | + * @author 超级管理员 | |
29 | + * @company 广州宏天软件股份有限公司 | |
30 | + * @since 2024-04-11 | |
31 | + */ | |
32 | +@Transactional(rollbackFor = Exception.class) | |
33 | +@Service | |
34 | +@Slf4j | |
35 | +public class WTqglManagerImpl extends BaseManagerImpl<WTqglDao, WTqgl> implements WTqglManager { | |
36 | + | |
37 | + @Resource | |
38 | + private IdGenerator idGenerator; | |
39 | + @Resource | |
40 | + private WHyyqjlManager wHyyqjlManager; | |
41 | + @Resource | |
42 | + private WDdManager wDdManager; | |
43 | + | |
44 | + @Override | |
45 | + public IPage<WTqgl> tqPage(Page page, WTqgl wTqgl, List<String> orgIdList) { | |
46 | + IPage<WTqgl> result = baseMapper.tqPage(page, wTqgl, orgIdList); | |
47 | + return result; | |
48 | + } | |
49 | + | |
50 | + @Override | |
51 | + public void saveTq(String id) { | |
52 | + WHyyqjl wHyyqjl = wHyyqjlManager.getById(id); | |
53 | + if (wHyyqjl == null) { | |
54 | + throw new RuntimeException("会员用气记录不存在"); | |
55 | + } | |
56 | + if (QpztEnum.ygh.equals(wHyyqjl.getFZt())) { | |
57 | + throw new RuntimeException("此状态下不允许提交退气"); | |
58 | + } | |
59 | + List<WTqgl> wTqgls = baseMapper.selectList(Wrappers.<WTqgl>lambdaQuery().eq(WTqgl::getFHyyqjlid, id)); | |
60 | + if (CollectionUtils.isNotEmpty(wTqgls)) { | |
61 | + throw new RuntimeException("已提交申请,无需再次提交"); | |
62 | + } | |
63 | + WDd wdd = wDdManager.getById(wHyyqjl.getFDdid()); | |
64 | + WTqgl wTqgl = new WTqgl(); | |
65 | + wTqgl.setFHyyqjlid(id); | |
66 | + wTqgl.setFQpid(wHyyqjl.getFQpid()); | |
67 | + wTqgl.setFQptm(wHyyqjl.getFQptm()); | |
68 | + wTqgl.setFQpgg((wHyyqjl.getFQpgg() == null ? "" : wHyyqjl.getFQpgg()) + " " + (wHyyqjl.getFCzjz() == null ? "" : wHyyqjl.getFCzjz())); | |
69 | + wTqgl.setFQprl(wHyyqjl.getFQprl()); | |
70 | + wTqgl.setFAzsj(wHyyqjl.getFKssysj()); | |
71 | + wTqgl.setFSqsj(LocalDateTime.now()); | |
72 | + wTqgl.setFTqdh(idGenerator.getSuid()); | |
73 | + wTqgl.setFHyxm(wHyyqjl.getFXm()); | |
74 | + wTqgl.setFHyyhid(wHyyqjl.getFHyyhid()); | |
75 | + wTqgl.setFHysjh(wHyyqjl.getFSjh()); | |
76 | + wTqgl.setFQplzid(null); | |
77 | + if (wdd != null) { | |
78 | + wTqgl.setFSsqyid(wdd.getFQyid()); | |
79 | + wTqgl.setFSsczid(wdd.getFCzid()); | |
80 | + wTqgl.setFSsqymc(null); | |
81 | + wTqgl.setFSsczmc(wdd.getFCzmc()); | |
82 | + wTqgl.setFLxr(wdd.getFShlxr()); | |
83 | + wTqgl.setFLxrdh(wdd.getFShlxrdh()); | |
84 | + wTqgl.setFLxrsf(wdd.getFShsf()); | |
85 | + wTqgl.setFLxrs(wdd.getFShs()); | |
86 | + wTqgl.setFLxrq(wdd.getFShq()); | |
87 | + wTqgl.setFLxrjd(wdd.getFShjd()); | |
88 | + wTqgl.setFLxrxxdz(wdd.getFShxxdz()); | |
89 | + wTqgl.setFJd(wdd.getFShdzjd()); | |
90 | + wTqgl.setFWd(wdd.getFShdzwd()); | |
91 | + } | |
92 | + wTqgl.setFDdid(wHyyqjl.getFDdid()); | |
93 | + wTqgl.setFZt(QpztEnum.dhs.getInfo()); | |
94 | + baseMapper.insert(wTqgl); | |
95 | + wHyyqjl.setFZt(QpztEnum.tqz.getInfo()); | |
96 | + wHyyqjlManager.updateById(wHyyqjl); | |
97 | + } | |
98 | + | |
99 | + @Override | |
100 | + public WTqgl getDetail(String id) { | |
101 | + WTqgl wTqgl = this.get(id); | |
102 | + return wTqgl; | |
103 | + } | |
104 | +} | ... | ... |
backend/lpg-user/src/main/java/com/hotent/lpg/user/vo/DdxxVo.java
0 → 100644
... | ... | @@ -0,0 +1,20 @@ |
1 | +package com.hotent.lpg.user.vo; | |
2 | + | |
3 | +import com.hotent.lpg.common.model.WAj; | |
4 | +import com.hotent.lpg.common.model.WDd; | |
5 | +import com.hotent.lpg.common.model.WDdpsxq; | |
6 | +import com.hotent.lpg.common.model.WHyxx; | |
7 | +import lombok.Data; | |
8 | + | |
9 | +import java.time.LocalDateTime; | |
10 | + | |
11 | +/** | |
12 | + * 订单详情 | |
13 | + */ | |
14 | +@Data | |
15 | +public class DdxxVo extends WDd { | |
16 | + private WAj ajxx=new WAj(); | |
17 | + private WHyxx hyxx=new WHyxx(); | |
18 | + private WDdpsxq ddpsxq=new WDdpsxq(); | |
19 | + private LocalDateTime mcazsj; | |
20 | +} | ... | ... |
backend/lpg-user/src/main/resources/mapper/WTqglMapper.xml
0 → 100644
... | ... | @@ -0,0 +1,103 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.hotent.lpg.user.dao.WTqglDao"> | |
4 | + | |
5 | + <!-- 通用查询映射结果 --> | |
6 | + <resultMap id="BaseResultMap" type="com.hotent.lpg.common.model.WTqgl"> | |
7 | + <id column="ID_" property="id" /> | |
8 | + <result column="REF_ID_" property="refId" /> | |
9 | + <result column="F_hyyqjlID" property="fHyyqjlid" /> | |
10 | + <result column="F_qpID" property="fQpid" /> | |
11 | + <result column="F_qptm" property="fQptm" /> | |
12 | + <result column="F_qpgg" property="fQpgg" /> | |
13 | + <result column="F_qprl" property="fQprl" /> | |
14 | + <result column="F_azsj" property="fAzsj" /> | |
15 | + <result column="F_sqsj" property="fSqsj" /> | |
16 | + <result column="F_tqdh" property="fTqdh" /> | |
17 | + <result column="F_hyxm" property="fHyxm" /> | |
18 | + <result column="F_hysjh" property="fHysjh" /> | |
19 | + <result column="F_qplzID" property="fQplzid" /> | |
20 | + <result column="F_ssqyID" property="fSsqyid" /> | |
21 | + <result column="F_ssczID" property="fSsczid" /> | |
22 | + <result column="F_ssqymc" property="fSsqymc" /> | |
23 | + <result column="F_ssczmc" property="fSsczmc" /> | |
24 | + <result column="F_sjhsqyID" property="fSjhsqyid" /> | |
25 | + <result column="F_sjhsczID" property="fSjhsczid" /> | |
26 | + <result column="F_sjhsqymc" property="fSjhsqymc" /> | |
27 | + <result column="F_sjhsczmc" property="fSjhsczmc" /> | |
28 | + <result column="F_ddID" property="fDdid" /> | |
29 | + <result column="F_zt" property="fZt" /> | |
30 | + <result column="F_hsrxm" property="fHsrxm" /> | |
31 | + <result column="F_hsrID" property="fHsrid" /> | |
32 | + <result column="F_hsrlxdh" property="fHsrlxdh" /> | |
33 | + <result column="F_form_data_rev_" property="fFormDataRev" /> | |
34 | + <result column="F_lxr" property="fLxr" /> | |
35 | + <result column="F_lxrdh" property="fLxrdh" /> | |
36 | + <result column="F_lxrsf" property="fLxrsf" /> | |
37 | + <result column="F_lxrs" property="fLxrs" /> | |
38 | + <result column="F_lxrq" property="fLxrq" /> | |
39 | + <result column="F_lxrjd" property="fLxrjd" /> | |
40 | + <result column="F_lxrxxdz" property="fLxrxxdz" /> | |
41 | + <result column="F_jd" property="fJd" /> | |
42 | + <result column="F_wd" property="fWd" /> | |
43 | + <result column="F_hyyhID" property="fHyyhid" /> | |
44 | + | |
45 | + </resultMap> | |
46 | + | |
47 | + <!-- 通用查询结果列 --> | |
48 | + <sql id="Base_Column_List"> | |
49 | + ID_, REF_ID_, F_hyyqjlID, F_qpID, F_qptm, F_qpgg, F_qprl, F_azsj, F_sqsj, F_tqdh, F_hyxm, F_hysjh, F_qplzID, F_ssqyID, F_ssczID, F_ssqymc, F_ssczmc, F_sjhsqyID, F_sjhsczID, F_sjhsqymc, F_sjhsczmc, F_ddID, F_zt, F_hsrxm, F_hsrID, F_hsrlxdh, F_form_data_rev_, F_lxr, F_lxrdh, F_lxrsf, F_lxrs, F_lxrq, F_lxrjd, F_lxrxxdz, F_jd, F_wd,F_hyyhID | |
50 | + </sql> | |
51 | + | |
52 | + <select id="selectPage" resultMap="BaseResultMap"> | |
53 | + select | |
54 | + <include refid="Base_Column_List"/> | |
55 | + from | |
56 | + w_tqgl | |
57 | + ${ew.customSqlSegment} | |
58 | + </select> | |
59 | + | |
60 | + <select id="selectList" resultMap="BaseResultMap"> | |
61 | + select | |
62 | + <include refid="Base_Column_List"/> | |
63 | + from | |
64 | + w_tqgl | |
65 | + ${ew.customSqlSegment} | |
66 | + </select> | |
67 | + | |
68 | + <select id="selectById" resultMap="BaseResultMap"> | |
69 | + select | |
70 | + <include refid="Base_Column_List"/> | |
71 | + from | |
72 | + w_tqgl | |
73 | + where | |
74 | + ID_ = #{id} | |
75 | + </select> | |
76 | + | |
77 | + <select id="tqPage" resultMap="BaseResultMap"> | |
78 | + select * from w_tqgl | |
79 | + <where> | |
80 | + <if test="query.fHyyhid != null and query.fHyyhid != ''"> | |
81 | + and w_tqgl.F_hyyhID = #{query.fHyyhid} | |
82 | + </if> | |
83 | + <if test="list != null and list.size() > 0"> | |
84 | + and w_tqgl.F_ssczID in | |
85 | + <foreach collection="list" item="czId" open="(" close=")" separator=","> | |
86 | + #{czId} | |
87 | + </foreach> | |
88 | + </if> | |
89 | + <if test="list == null or list.size() == 0"> | |
90 | + <if test="query.fSsczid != null and query.fSsczid != ''"> | |
91 | + and w_tqgl.F_ssczID = #{query.fSsczid} | |
92 | + </if> | |
93 | + </if> | |
94 | + <if test="query.fZt != null and query.fZt != ''"> | |
95 | + and w_tqgl.F_zt = #{query.fZt} | |
96 | + </if> | |
97 | + <if test="query.fQptm != null and query.fQptm != ''"> | |
98 | + and w_tqgl.F_qptm like concat('%',#{query.fQptm},'%') | |
99 | + </if> | |
100 | + </where> | |
101 | + order by w_tqgl.F_sqsj desc | |
102 | + </select> | |
103 | +</mapper> | ... | ... |
backend/lpg/src/main/java/com/hotent/lpg/controller/hy/DdConroller.java
... | ... | @@ -1,130 +0,0 @@ |
1 | -package com.hotent.lpg.controller.hy; | |
2 | - | |
3 | -import cn.hutool.core.bean.BeanUtil; | |
4 | -import com.baomidou.mybatisplus.core.metadata.IPage; | |
5 | -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
6 | -import com.hotent.base.model.CommonResult; | |
7 | -import com.hotent.lpg.dao.WHydzDao; | |
8 | -import com.hotent.lpg.manager.WDdManager; | |
9 | -import com.hotent.lpg.manager.WHyxxManager; | |
10 | -import com.hotent.lpg.model.WDd; | |
11 | -import com.hotent.lpg.model.WHydz; | |
12 | -import com.hotent.lpg.model.WHyxx; | |
13 | -import com.hotent.lpg.model.enums.DdlyEnum; | |
14 | -import com.hotent.lpg.model.enums.UserlxEnum; | |
15 | -import com.hotent.lpg.model.request.CreateOrderRequest; | |
16 | -import com.hotent.uc.util.ContextUtil; | |
17 | -import io.swagger.annotations.ApiOperation; | |
18 | -import io.swagger.annotations.ApiParam; | |
19 | -import org.springframework.beans.factory.annotation.Autowired; | |
20 | -import org.springframework.validation.annotation.Validated; | |
21 | -import org.springframework.web.bind.annotation.*; | |
22 | - | |
23 | -import javax.annotation.Resource; | |
24 | -import java.util.List; | |
25 | - | |
26 | -@RestController | |
27 | -@RequestMapping("/customer/dd/") | |
28 | -@Validated | |
29 | -public class DdConroller { | |
30 | - | |
31 | - @Autowired | |
32 | - private WDdManager wDdManager; | |
33 | - | |
34 | - @Resource | |
35 | - private WHydzDao hydzDao; | |
36 | - @Resource | |
37 | - private WHyxxManager wHyxxManager; | |
38 | - | |
39 | - | |
40 | - /** | |
41 | - * 会员获取订单列表 | |
42 | - * | |
43 | - * @param page | |
44 | - * @param zt | |
45 | - * @param search | |
46 | - * @return | |
47 | - * @throws Exception | |
48 | - */ | |
49 | - @GetMapping(value = "/list") | |
50 | - public CommonResult list(Page page, String zt) throws Exception { | |
51 | - IPage<List<WDd>> list = wDdManager.pageList(page, zt, ContextUtil.getCurrentUserId()); | |
52 | - return CommonResult.ok().value(list); | |
53 | - } | |
54 | - | |
55 | - | |
56 | - /** | |
57 | - * 根据id获取订单数据详情 | |
58 | - * | |
59 | - * @param id | |
60 | - * @return | |
61 | - * @throws Exception ModelAndView | |
62 | - */ | |
63 | - @GetMapping(value = "/getDetail") | |
64 | - @ApiOperation(value = "根据id获取订单数据详情", httpMethod = "GET", notes = "根据id获取订单数据详情") | |
65 | - public CommonResult<WDd> getDetail(@ApiParam(name = "id", value = "业务对象主键", required = true) | |
66 | - @RequestParam(required = true) String id) throws Exception { | |
67 | - return CommonResult.<WDd>ok().value(wDdManager.getDetail(id)); | |
68 | - } | |
69 | - | |
70 | - /** | |
71 | - * 取消订单 | |
72 | - * | |
73 | - * @param ddid 订单id | |
74 | - * @return | |
75 | - * @throws Exception | |
76 | - * @throws | |
77 | - */ | |
78 | - @PostMapping(value = "/cancel") | |
79 | - @ApiOperation(value = "取消订单", httpMethod = "POST", notes = "取消订单") | |
80 | - public CommonResult<String> cancel(@RequestParam(required = true) String ddid) throws Exception { | |
81 | - wDdManager.cancel(ddid); | |
82 | - return CommonResult.<String>ok(); | |
83 | - } | |
84 | - | |
85 | - /** | |
86 | - * 创建订单 | |
87 | - * | |
88 | - * @param request | |
89 | - * @return | |
90 | - * @throws Exception | |
91 | - * @throws | |
92 | - */ | |
93 | - @PostMapping(value = "/save") | |
94 | - @ApiOperation(value = "创建订单", httpMethod = "POST", notes = "创建订单") | |
95 | - public CommonResult createOrder(@ApiParam(name = "CreateOrderRequest", value = "创建订单请求对象", required = true) @RequestBody CreateOrderRequest request) throws Exception { | |
96 | - WHydz hydz = hydzDao.selectOneByHyIdAndDzId(ContextUtil.getCurrentUserId(), request.getHydzId()); | |
97 | - if (BeanUtil.isEmpty(hydz)){ | |
98 | - throw new RuntimeException("未查询到地址信息。"); | |
99 | - } | |
100 | - WHyxx hyxx = wHyxxManager.getUseridByInfo(ContextUtil.getCurrentUserId()); | |
101 | - if (BeanUtil.isEmpty(hyxx)){ | |
102 | - throw new RuntimeException("未查询会员信息。"); | |
103 | - } | |
104 | - request.setShlxr(hydz.getFLxr()); | |
105 | - request.setShlxrdh(hydz.getFLxrdh()); | |
106 | - request.setShsf(hydz.getFLxrsf()); | |
107 | - request.setShs(hydz.getFLxrs()); | |
108 | - request.setShq(hydz.getFLxrq()); | |
109 | - request.setShjd(hydz.getFLxrjd()); | |
110 | - request.setShxxdz(hydz.getFLxrxxdz()); | |
111 | - request.setJd(hydz.getFJd()); | |
112 | - request.setWd(hydz.getFWd()); | |
113 | - | |
114 | - request.setSfhy("是"); | |
115 | - request.setHydh(hyxx.getFSjh()); //账号就是电话 | |
116 | - request.setHyid(hyxx.getFUserid()); | |
117 | - request.setHymc(hyxx.getFXm()); | |
118 | - request.setHylx(hyxx.getFHylx()); | |
119 | - request.setSfzh(hyxx.getFSfzh()); | |
120 | - request.setShtysbm(hyxx.getFShtysbm()); | |
121 | - | |
122 | - request.setXdrlx(UserlxEnum.hy.getInfo()); | |
123 | - request.setXdrid(ContextUtil.getCurrentUserId()); | |
124 | - request.setXdrmc(ContextUtil.getCurrentUser().getFullname()); | |
125 | - request.setDdly(DdlyEnum.xsxd.getInfo()); | |
126 | - WDd order = wDdManager.createOrder(request); | |
127 | - return CommonResult.ok().value(order); | |
128 | - } | |
129 | - | |
130 | -} |
backend/lpg/src/main/java/com/hotent/lpg/controller/hy/TqglController.java
... | ... | @@ -1,95 +0,0 @@ |
1 | -package com.hotent.lpg.controller.hy; | |
2 | - | |
3 | - | |
4 | -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
5 | -import com.baomidou.mybatisplus.core.metadata.IPage; | |
6 | -import com.hotent.base.controller.BaseController; | |
7 | -import com.hotent.base.model.CommonResult; | |
8 | -import com.hotent.base.util.StringUtil; | |
9 | -import com.hotent.lpg.manager.WTqglManager; | |
10 | -import com.hotent.lpg.model.WTqgl; | |
11 | -import com.hotent.runtime.script.ScriptImpl; | |
12 | -import com.hotent.uc.api.model.IUser; | |
13 | -import io.swagger.annotations.ApiOperation; | |
14 | -import io.swagger.annotations.ApiParam; | |
15 | -import lombok.extern.slf4j.Slf4j; | |
16 | -import org.springframework.web.bind.annotation.*; | |
17 | - | |
18 | -import javax.annotation.Resource; | |
19 | -import java.util.ArrayList; | |
20 | - | |
21 | -/** | |
22 | - * 退气管理 前端控制器 | |
23 | - * | |
24 | - * @author 超级管理员 | |
25 | - * @company 广州宏天软件股份有限公司 | |
26 | - * @since 2024-04-11 | |
27 | - */ | |
28 | -@Slf4j | |
29 | -@RestController | |
30 | -@RequestMapping("/customer/wTqgl/v1/") | |
31 | -public class TqglController extends BaseController<WTqglManager, WTqgl> { | |
32 | - | |
33 | - @Resource | |
34 | - private ScriptImpl script; | |
35 | - | |
36 | - /** | |
37 | - * 根据id获取退气管理数据详情 | |
38 | - * | |
39 | - * @param id | |
40 | - * @return | |
41 | - * @throws Exception ModelAndView | |
42 | - */ | |
43 | - @GetMapping(value = "/getDetail") | |
44 | - @ApiOperation(value = "根据id获取退气管理数据详情", httpMethod = "GET", notes = "根据id获取退气管理数据详情") | |
45 | - public CommonResult<WTqgl> getDetail(@ApiParam(name = "id", value = "业务对象主键", required = true) @RequestParam(required = true) String id) throws Exception { | |
46 | - return CommonResult.<WTqgl>ok().value(baseService.getDetail(id)); | |
47 | - } | |
48 | - | |
49 | - /** | |
50 | - * 会员退气 | |
51 | - * | |
52 | - * @param id 会员用气记录id | |
53 | - * @return | |
54 | - * @throws Exception | |
55 | - * @throws | |
56 | - */ | |
57 | - @PostMapping(value = "/save") | |
58 | - @ApiOperation(value = "新增退气管理数据", httpMethod = "POST", notes = "新增退气管理数据") | |
59 | - public CommonResult<String> save(String id) throws Exception { | |
60 | - if (StringUtil.isEmpty(id)) { | |
61 | - return CommonResult.error("参数不全"); | |
62 | - } | |
63 | - log.info("新增退气管理数据,会员用气记录id={}", id); | |
64 | - try { | |
65 | - baseService.saveTq(id); | |
66 | - } catch (Exception e) { | |
67 | - log.info("新增退气管理数据,异常={}", e.getMessage()); | |
68 | - return CommonResult.error(e.getMessage()); | |
69 | - } | |
70 | - return CommonResult.<String>ok().message(""); | |
71 | - } | |
72 | - | |
73 | - /** | |
74 | - * 退气列表 | |
75 | - * | |
76 | - * @return | |
77 | - * @throws Exception | |
78 | - * @throws | |
79 | - */ | |
80 | - @GetMapping(value = "/tqPage") | |
81 | - @ApiOperation(value = "退气列表", httpMethod = "GET", notes = "退气列表") | |
82 | - public CommonResult<Object> tqPage(Page page, WTqgl wTqgl) throws Exception { | |
83 | - log.info("退气列表,page={},wTqgl={}", page, wTqgl); | |
84 | - IPage<WTqgl> result = null; | |
85 | - try { | |
86 | - IUser currentUser = script.getCurrentUser(); | |
87 | - wTqgl.setFHyyhid(currentUser.getUserId()); | |
88 | - result = baseService.tqPage(page, wTqgl,null); | |
89 | - } catch (Exception e) { | |
90 | - log.info("退气列表,异常={}", e.getMessage()); | |
91 | - return CommonResult.error(e.getMessage()); | |
92 | - } | |
93 | - return new CommonResult<>(true, "", result); | |
94 | - } | |
95 | -} |
backend/lpg/src/main/java/com/hotent/lpg/dao/WDdfwrzDao.java
... | ... | @@ -1,15 +0,0 @@ |
1 | -package com.hotent.lpg.dao; | |
2 | - | |
3 | -import com.hotent.lpg.model.WDdfwrz; | |
4 | -import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
5 | - | |
6 | -/** | |
7 | - * 订单服务日志 Mapper 接口 | |
8 | - * | |
9 | - * @company 广州宏天软件股份有限公司 | |
10 | - * @author 超级管理员 | |
11 | - * @since 2024-03-21 | |
12 | - */ | |
13 | -public interface WDdfwrzDao extends BaseMapper<WDdfwrz> { | |
14 | - | |
15 | -} |
backend/lpg/src/main/java/com/hotent/lpg/model/request/CreateOrderRequest.java
... | ... | @@ -1,153 +0,0 @@ |
1 | -package com.hotent.lpg.model.request; | |
2 | - | |
3 | -import com.baomidou.mybatisplus.annotation.TableField; | |
4 | -import com.fasterxml.jackson.annotation.JsonProperty; | |
5 | -import io.swagger.annotations.ApiModelProperty; | |
6 | -import lombok.Data; | |
7 | - | |
8 | -import javax.validation.constraints.NotBlank; | |
9 | -import javax.validation.constraints.NotNull; | |
10 | -import javax.validation.constraints.Size; | |
11 | -import java.util.List; | |
12 | - | |
13 | -@Data | |
14 | -public class CreateOrderRequest { | |
15 | - | |
16 | - /** | |
17 | - * 是否会员 | |
18 | - */ | |
19 | - private String sfhy; | |
20 | - | |
21 | - /** | |
22 | - * 会员id | |
23 | - */ | |
24 | - private String hyid; | |
25 | - | |
26 | - /** | |
27 | - * 会员名称 | |
28 | - */ | |
29 | - private String hymc; | |
30 | - | |
31 | - /** | |
32 | - * 会员电话 | |
33 | - */ | |
34 | - private String hydh; | |
35 | - | |
36 | - /** | |
37 | - * 订单来源 | |
38 | - */ | |
39 | - private String ddly; | |
40 | - | |
41 | - /** | |
42 | - * 配送方式 | |
43 | - */ | |
44 | - private String psfs; | |
45 | - | |
46 | - /** | |
47 | - * 买家留言 | |
48 | - */ | |
49 | - private String mjly; | |
50 | - | |
51 | - /** | |
52 | - * 备注 | |
53 | - */ | |
54 | - private String bz; | |
55 | - | |
56 | - /** | |
57 | - * 会员收货地址id | |
58 | - */ | |
59 | - private String hydzId; | |
60 | - /** | |
61 | - * 收货联系人 | |
62 | - */ | |
63 | - private String shlxr; | |
64 | - /** | |
65 | - * 收货联系人电话 | |
66 | - */ | |
67 | - private String shlxrdh; | |
68 | - /** | |
69 | - * 收货省份 | |
70 | - */ | |
71 | - private String shsf; | |
72 | - /** | |
73 | - * 收货市 | |
74 | - */ | |
75 | - private String shs; | |
76 | - /** | |
77 | - * 收货区 | |
78 | - */ | |
79 | - private String shq; | |
80 | - /** | |
81 | - * 收货街道 | |
82 | - */ | |
83 | - private String shjd; | |
84 | - | |
85 | - /** | |
86 | - * 收货详细地址 | |
87 | - */ | |
88 | - private String shxxdz; | |
89 | - | |
90 | - | |
91 | - /** | |
92 | - * 下单人类型 | |
93 | - */ | |
94 | - private String xdrlx; | |
95 | - /** | |
96 | - * 下单人id | |
97 | - */ | |
98 | - private String xdrid; | |
99 | - /** | |
100 | - * 下单人名称 | |
101 | - */ | |
102 | - private String xdrmc; | |
103 | - | |
104 | - | |
105 | - /** | |
106 | - * 下单人名称 | |
107 | - */ | |
108 | - private String shtysbm; | |
109 | - | |
110 | - /** | |
111 | - * 身份证号 | |
112 | - */ | |
113 | - private String sfzh; | |
114 | - | |
115 | - /** | |
116 | - * 会员类型 | |
117 | - */ | |
118 | - private String hylx; | |
119 | - | |
120 | - /** | |
121 | - * 经度 | |
122 | - */ | |
123 | - private String jd; | |
124 | - | |
125 | - /** | |
126 | - * 维度 | |
127 | - */ | |
128 | - private String wd; | |
129 | - | |
130 | - | |
131 | - | |
132 | - /** | |
133 | - * 购买详情 | |
134 | - */ | |
135 | - @Size(min = 1, message = "购买详情不能为空") | |
136 | - @NotNull(message = "购买详情不能为空") | |
137 | - private List<XqVO> xqList; | |
138 | - | |
139 | - @Data | |
140 | - public static class XqVO { | |
141 | - /** | |
142 | - * 气瓶类型ID | |
143 | - */ | |
144 | - @NotBlank(message = "气瓶类型ID不能为空") | |
145 | - private String qplxId; | |
146 | - /** | |
147 | - * 数量 | |
148 | - */ | |
149 | - @NotNull(message = "数量不能为空") | |
150 | - private Integer sl; | |
151 | - } | |
152 | -} | |
153 | - |
backend/lpg/src/main/java/com/hotent/lpg/model/vo/DdxxVo.java
... | ... | @@ -1,20 +0,0 @@ |
1 | -package com.hotent.lpg.model.vo; | |
2 | - | |
3 | -import com.hotent.lpg.model.WAj; | |
4 | -import com.hotent.lpg.model.WDd; | |
5 | -import com.hotent.lpg.model.WDdpsxq; | |
6 | -import com.hotent.lpg.model.WHyxx; | |
7 | -import lombok.Data; | |
8 | - | |
9 | -import java.time.LocalDateTime; | |
10 | - | |
11 | -/** | |
12 | - * 订单详情 | |
13 | - */ | |
14 | -@Data | |
15 | -public class DdxxVo extends WDd { | |
16 | - private WAj ajxx=new WAj(); | |
17 | - private WHyxx hyxx=new WHyxx(); | |
18 | - private WDdpsxq ddpsxq=new WDdpsxq(); | |
19 | - private LocalDateTime mcazsj; | |
20 | -} |
backend/lpg/src/main/resources/mapper/WTqglMapper.xml
... | ... | @@ -1,103 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | -<mapper namespace="com.hotent.lpg.dao.WTqglDao"> | |
4 | - | |
5 | - <!-- 通用查询映射结果 --> | |
6 | - <resultMap id="BaseResultMap" type="com.hotent.lpg.model.WTqgl"> | |
7 | - <id column="ID_" property="id" /> | |
8 | - <result column="REF_ID_" property="refId" /> | |
9 | - <result column="F_hyyqjlID" property="fHyyqjlid" /> | |
10 | - <result column="F_qpID" property="fQpid" /> | |
11 | - <result column="F_qptm" property="fQptm" /> | |
12 | - <result column="F_qpgg" property="fQpgg" /> | |
13 | - <result column="F_qprl" property="fQprl" /> | |
14 | - <result column="F_azsj" property="fAzsj" /> | |
15 | - <result column="F_sqsj" property="fSqsj" /> | |
16 | - <result column="F_tqdh" property="fTqdh" /> | |
17 | - <result column="F_hyxm" property="fHyxm" /> | |
18 | - <result column="F_hysjh" property="fHysjh" /> | |
19 | - <result column="F_qplzID" property="fQplzid" /> | |
20 | - <result column="F_ssqyID" property="fSsqyid" /> | |
21 | - <result column="F_ssczID" property="fSsczid" /> | |
22 | - <result column="F_ssqymc" property="fSsqymc" /> | |
23 | - <result column="F_ssczmc" property="fSsczmc" /> | |
24 | - <result column="F_sjhsqyID" property="fSjhsqyid" /> | |
25 | - <result column="F_sjhsczID" property="fSjhsczid" /> | |
26 | - <result column="F_sjhsqymc" property="fSjhsqymc" /> | |
27 | - <result column="F_sjhsczmc" property="fSjhsczmc" /> | |
28 | - <result column="F_ddID" property="fDdid" /> | |
29 | - <result column="F_zt" property="fZt" /> | |
30 | - <result column="F_hsrxm" property="fHsrxm" /> | |
31 | - <result column="F_hsrID" property="fHsrid" /> | |
32 | - <result column="F_hsrlxdh" property="fHsrlxdh" /> | |
33 | - <result column="F_form_data_rev_" property="fFormDataRev" /> | |
34 | - <result column="F_lxr" property="fLxr" /> | |
35 | - <result column="F_lxrdh" property="fLxrdh" /> | |
36 | - <result column="F_lxrsf" property="fLxrsf" /> | |
37 | - <result column="F_lxrs" property="fLxrs" /> | |
38 | - <result column="F_lxrq" property="fLxrq" /> | |
39 | - <result column="F_lxrjd" property="fLxrjd" /> | |
40 | - <result column="F_lxrxxdz" property="fLxrxxdz" /> | |
41 | - <result column="F_jd" property="fJd" /> | |
42 | - <result column="F_wd" property="fWd" /> | |
43 | - <result column="F_hyyhID" property="fHyyhid" /> | |
44 | - | |
45 | - </resultMap> | |
46 | - | |
47 | - <!-- 通用查询结果列 --> | |
48 | - <sql id="Base_Column_List"> | |
49 | - ID_, REF_ID_, F_hyyqjlID, F_qpID, F_qptm, F_qpgg, F_qprl, F_azsj, F_sqsj, F_tqdh, F_hyxm, F_hysjh, F_qplzID, F_ssqyID, F_ssczID, F_ssqymc, F_ssczmc, F_sjhsqyID, F_sjhsczID, F_sjhsqymc, F_sjhsczmc, F_ddID, F_zt, F_hsrxm, F_hsrID, F_hsrlxdh, F_form_data_rev_, F_lxr, F_lxrdh, F_lxrsf, F_lxrs, F_lxrq, F_lxrjd, F_lxrxxdz, F_jd, F_wd,F_hyyhID | |
50 | - </sql> | |
51 | - | |
52 | - <select id="selectPage" resultMap="BaseResultMap"> | |
53 | - select | |
54 | - <include refid="Base_Column_List"/> | |
55 | - from | |
56 | - w_tqgl | |
57 | - ${ew.customSqlSegment} | |
58 | - </select> | |
59 | - | |
60 | - <select id="selectList" resultMap="BaseResultMap"> | |
61 | - select | |
62 | - <include refid="Base_Column_List"/> | |
63 | - from | |
64 | - w_tqgl | |
65 | - ${ew.customSqlSegment} | |
66 | - </select> | |
67 | - | |
68 | - <select id="selectById" resultMap="BaseResultMap"> | |
69 | - select | |
70 | - <include refid="Base_Column_List"/> | |
71 | - from | |
72 | - w_tqgl | |
73 | - where | |
74 | - ID_ = #{id} | |
75 | - </select> | |
76 | - | |
77 | - <select id="tqPage" resultMap="BaseResultMap"> | |
78 | - select * from w_tqgl | |
79 | - <where> | |
80 | - <if test="query.fHyyhid != null and query.fHyyhid != ''"> | |
81 | - and w_tqgl.F_hyyhID = #{query.fHyyhid} | |
82 | - </if> | |
83 | - <if test="list != null and list.size() > 0"> | |
84 | - and w_tqgl.F_ssczID in | |
85 | - <foreach collection="list" item="czId" open="(" close=")" separator=","> | |
86 | - #{czId} | |
87 | - </foreach> | |
88 | - </if> | |
89 | - <if test="list == null or list.size() == 0"> | |
90 | - <if test="query.fSsczid != null and query.fSsczid != ''"> | |
91 | - and w_tqgl.F_ssczID = #{query.fSsczid} | |
92 | - </if> | |
93 | - </if> | |
94 | - <if test="query.fZt != null and query.fZt != ''"> | |
95 | - and w_tqgl.F_zt = #{query.fZt} | |
96 | - </if> | |
97 | - <if test="query.fQptm != null and query.fQptm != ''"> | |
98 | - and w_tqgl.F_qptm like concat('%',#{query.fQptm},'%') | |
99 | - </if> | |
100 | - </where> | |
101 | - order by w_tqgl.F_sqsj desc | |
102 | - </select> | |
103 | -</mapper> |