Commit fc5cf70a by HlQ

[add]

1.添加合同进度数量统计接口
2.添加连接 mqtt server 配置信息
[chg] 升级 mybatis-plus-join-boot-starter 版本
1 parent 0004d1ae
......@@ -19,11 +19,12 @@
<redisson.verion>3.32.0</redisson.verion>
<mapstruct-plus.version>1.4.3</mapstruct-plus.version>
<mp.version>3.5.7</mp.version>
<mp-join.version>1.4.13</mp-join.version>
<mp-join.version>1.5.1</mp-join.version>
<wx-mp.version>4.6.2.B</wx-mp.version>
<sa-token.verion>1.38.0</sa-token.verion>
<myexcel.version>4.5.2</myexcel.version>
<maxmind.version>4.2.0</maxmind.version>
<mica.mqtt.version>2.3.7</mica.mqtt.version>
</properties>
<dependencies>
......@@ -99,6 +100,11 @@
<artifactId>geoip2</artifactId>
<version>${maxmind.version}</version>
</dependency>
<dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-mqtt-client-spring-boot-starter</artifactId>
<version>${mica.mqtt.version}</version>
</dependency>
</dependencies>
<build>
......
......@@ -120,6 +120,12 @@ public class ContractController {
return contractService.calAmount(dto);
}
@GetMapping("/contract/statStatus")
@SaCheckPermission(value = "contract:statStatus", orRole = "admin")
public Map<Integer, Long> statStatus(ContractDTO dto) {
return contractService.statStatus(dto);
}
@GetMapping("/contract/analyze")
@SaCheckPermission(value = "contract:analyze", orRole = "admin")
public Map<String, Object> analyze(ContractDTO dto) {
......
......@@ -142,7 +142,7 @@ public class StoreController {
}
@DeleteMapping("/store/log/{logId}")
@SaCheckPermission(value = "store:log:delete", orRole = "admin")
@SaCheckPermission(value = "store:log:remove", orRole = "admin")
public String delLog(@PathVariable Long logId) {
return storeLogService.removeById(logId) ? "删除成功" : "删除失败";
}
......
......@@ -3,8 +3,6 @@ package vion.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.databind.JsonNode;
import com.github.yulichang.base.MPJBaseService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import vion.dto.ContractDTO;
import vion.dto.RContractTeamDTO;
import vion.model.Contract;
......@@ -29,15 +27,17 @@ public interface IContractService extends MPJBaseService<Contract> {
ContractVO getVOById(Long id);
ContractVO getByNo(@PathVariable String no);
ContractVO getByNo(String no);
String updateById(Long id, String contractNo, ContractDTO dto);
JsonNode calAmount(ContractDTO dto);
Map<Integer, Long> statStatus(ContractDTO dto);
Map<String, Object> analyze(ContractDTO dto);
String dispatch(@RequestBody RContractTeamDTO dto);
String dispatch(RContractTeamDTO dto);
Page<RContractUser> getSaleList(RContractUser dto);
......
......@@ -426,6 +426,13 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
}
@Override
public Map<Integer, Long> statStatus(ContractDTO dto) {
Result result = getResult(dto);
List<Contract> contracts = this.selectJoinList(Contract.class, result.wrapper);
return contracts.stream().collect(Collectors.groupingBy(Contract::getStatus, Collectors.counting()));
}
@Override
public Map<String, Object> analyze(ContractDTO dto) {
List<Contract> contractList = this.lambdaQuery(converter.convert(dto, Contract.class))
.gt(Contract::getReceivableAmount, 0)
......
......@@ -9,6 +9,12 @@ spring.data.redis.password=RtOTnx2V
spring.data.redis.port=6379
spring.data.redis.database=8
mqtt.client.ip=127.0.0.1
mqtt.client.port=1883
mqtt.client.name=monitor-server
mqtt.client.client-id=MS8011
mqtt.client.version=MQTT_5
wx.mp.config-storage.type=Redisson
wx.mp.config-storage.key-prefix=wa
wx.mp.config-storage.redis.host=r-2zejlb88mng3q50aw7pd.redis.rds.aliyuncs.com
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!