Commit 14495775 authored by 竹天卫's avatar 竹天卫

功能已修复

parent 04283a27
......@@ -40,9 +40,9 @@ public class WeiXinController {
log.debug("=============================================");
try {
//测试服务器
// return weiXinService.getTestToken(code);
return weiXinService.getTestToken(code);
//正式服务器
return weiXinService.getToken(code, "APP");
// return weiXinService.getToken(code, "APP");
} catch (Exception e) {
log.debug("获取登录token{}", e);
}
......@@ -153,22 +153,16 @@ public class WeiXinController {
@ApiOperation(value = "发送消息")
@GetMapping("/sendTextMessage")
public BaseResponse sendTextMessage(String touser) {
public BaseResponse sendTextMessage(String touser, Integer entrustId) {
try {
//发送企业微信消息内容
Integer notice = (int)(1+Math.random()*(10-1+1));
String URL = "https://lab.wisenergy.cn/lab-bangye?id="+269+"&path=/blanche/entrustdetail&notice="+notice;
String systemUrL = systemUrl.replace("U_R_L",URLUtil.encode(URL));
String content="你好!"+"竹天卫"+"向您申请了一条委托,请前往\n" +
String systemUrL = weiXinService.createMessage(entrustId, "/blanche/entrustdetail");
String content="你好!"+"竹天卫"+"向您申请了一条新委托,请前往\n" +
systemUrL+"进行评审。";
System.out.println("**************************content**********************");
System.out.println(content);
weiXinService.sendTextMessage(touser, content);
// weiXinService.sendTextMessage("1","hello");
return BaseResponse.okData("成功");
} catch (Exception e) {
log.debug("发送消息{}", e);
......
......@@ -91,6 +91,9 @@ public class Team extends BaseEntity implements Serializable {
@ApiModelProperty("小数位数(0保留整数,1保留1位小数...)")
private Integer retain;
@ApiModelProperty("单位")
private String units;
}
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-03-04
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Titration implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 检测用户id
*/
private Integer userId;
/**
* 检测组id
*/
private Integer teamGroupId;
/**
* 校核元素
*/
private String checkElement;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 备注
*/
private String remark;
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.Titration;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-03-04
*/
public interface TitrationMapper extends BaseMapper<Titration> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.wise.sc.cement.business.mapper.TitrationMapper">
</mapper>
......@@ -16,6 +16,9 @@ import java.util.Map;
@ApiModel("数据校核-快速计算接口")
public class CheckCountFastQuery {
@ApiModelProperty("检测人id")
private Integer userId;
@ApiModelProperty("检测组表id")
private Integer teamGroupId;
......
......@@ -28,7 +28,7 @@ public class CheckCountNewQuery {
@ApiModelProperty("检测人员id")
private Integer userId;
@ApiModelProperty("是否通过 1通过,2退回")
@ApiModelProperty("是否通过 0保存,1通过,2退回")
private Integer isAgree;
@ApiModelProperty("退回原因")
......
......@@ -48,4 +48,7 @@ public class TeamQuery {
@ApiModelProperty("是否需要派发(0否 样品处理完直接校核,1是样品处理完需要检测再校核)")
private Integer isPf;
@ApiModelProperty("单位")
private String units;
}
......@@ -31,6 +31,9 @@ public class CheckTeamResultVo {
@ApiModelProperty("本组序号 12345")
private Integer sortNo;
@ApiModelProperty("单位")
private String units;
@ApiModelProperty("状态(0未接受,1接受,2待校核,3退回,4校核通过,5校核退回)")
private Integer status;
......
......@@ -74,6 +74,9 @@ public class TeamVo {
@ApiModelProperty("是否需要派发(0否 样品处理完直接校核,1是样品处理完需要检测再校核)")
private Integer isPf;
@ApiModelProperty("单位")
private String units;
}
package cn.wise.sc.cement.business.service;
import cn.wise.sc.cement.business.entity.Titration;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2021-03-04
*/
public interface ITitrationService extends IService<Titration> {
}
......@@ -4,9 +4,11 @@ package cn.wise.sc.cement.business.service.impl;
import cn.wise.sc.cement.business.entity.EntityEnclosure;
import cn.wise.sc.cement.business.entity.TeamGroup;
import cn.wise.sc.cement.business.entity.Titration;
import cn.wise.sc.cement.business.mapper.EntityEnclosureMapper;
import cn.wise.sc.cement.business.mapper.TeamGroupMapper;
import cn.wise.sc.cement.business.mapper.TeamMapper;
import cn.wise.sc.cement.business.mapper.TitrationMapper;
import cn.wise.sc.cement.business.model.BaseResponse;
import cn.wise.sc.cement.business.model.query.EnclosureQuery;
import cn.wise.sc.cement.business.model.vo.InputResultVo;
......@@ -37,9 +39,9 @@ public class CommonServiceImpl {
@Autowired
private IEntityEnclosureService entityEnclosureService;
@Resource
private TeamMapper teamMapper;
@Resource
private TeamGroupMapper teamGroupMapper;
@Resource
private TitrationMapper titrationMapper;
......@@ -176,7 +178,7 @@ public class CommonServiceImpl {
}
//Map转json数组
public JSONArray mapToJSONArray2(Integer groupId, Map<String, String> map){
public JSONArray mapToJSONArray2(Integer userId, Integer groupId, Map<String, String> map){
JSONArray jsonArray = new JSONArray();
for(Map.Entry entry : map.entrySet() ){
JSONObject jsonObject = new JSONObject();
......@@ -237,57 +239,32 @@ public class CommonServiceImpl {
}
String checkElement = JSON.toJSON(jsonArr).toString();
teamGroup.setCheckElement(checkElement);
teamGroupMapper.updateById(teamGroup);
//人员-检测组校核元素表
QueryWrapper<Titration> titrationQueryWrapper = new QueryWrapper<>();
titrationQueryWrapper.eq("user_id",userId);
titrationQueryWrapper.eq("team_group_id",teamGroup.getId());
List<Titration> titrationList = titrationMapper.selectList(titrationQueryWrapper);
if(titrationList != null && titrationList.size()>0){
Titration titration= titrationList.get(0);
titration.setCheckElement(checkElement)
.setUpdateTime(LocalDateTime.now());
titrationMapper.updateById(titration);
}else{
Titration titration = new Titration();
titration.setUserId(userId)
.setTeamGroupId(teamGroup.getId())
.setCheckElement(checkElement)
.setCreateTime(LocalDateTime.now())
.setUpdateTime(titration.getCreateTime());
titrationMapper.insert(titration);
/*if(teamgroupMap.containsKey("TSiO<sub>2</sub>")){
if(map.containsKey("TSiO<sub>2</sub>")){
teamgroupMap.put("TSiO<sub>2</sub>",map.get("TSiO<sub>2</sub>"));
}
}
if(teamgroupMap.containsKey("TAl<sub>2</sub>O<sub>3</sub>")){
if(map.containsKey("TAl<sub>2</sub>O<sub>3</sub>")){
teamgroupMap.put("TAl<sub>2</sub>O<sub>3</sub>",map.get("TAl<sub>2</sub>O<sub>3</sub>"));
}
}
if(teamgroupMap.containsKey("TFe<sub>2</sub>O<sub>3</sub>")){
if(map.containsKey("TFe<sub>2</sub>O<sub>3</sub>")){
teamgroupMap.put("TFe<sub>2</sub>O<sub>3</sub>",map.get("TFe<sub>2</sub>O<sub>3</sub>"));
}
}
if(teamgroupMap.containsKey("TMgO")){
if(map.containsKey("TMgO")){
teamgroupMap.put("TMgO",map.get("TMgO"));
}
}
if(teamgroupMap.containsKey("TTiO<sub>2</sub>")){
if(map.containsKey("TTiO<sub>2</sub>")){
teamgroupMap.put("TTiO<sub>2</sub>",map.get("TTiO<sub>2</sub>"));
}
}
if(teamgroupMap.containsKey("TAl<sub>2</sub>O<sub>3</sub>")){
if(map.containsKey("TAl<sub>2</sub>O<sub>3</sub>")){
teamgroupMap.put("TAl<sub>2</sub>O<sub>3</sub>",map.get("TAl<sub>2</sub>O<sub>3</sub>"));
}
}
if(teamgroupMap.containsKey("TTiO<sub>2</sub>")){
if(map.containsKey("TTiO<sub>2</sub>")){
teamgroupMap.put("TTiO<sub>2</sub>",map.get("TTiO<sub>2</sub>"));
}
}
if(teamgroupMap.containsKey("TCaO")){
if(map.containsKey("TCaO")){
teamgroupMap.put("TCaO",map.get("TCaO"));
}
}*/
// JSONArray checkElementArray = mapToJSONArray(teamgroupMap);
String checkElement = JSON.toJSON(jsonArr).toString();
teamGroup.setCheckElement(checkElement);
teamGroupMapper.updateById(teamGroup);
}
return jsonArray;
}
......@@ -356,6 +333,8 @@ public class CommonServiceImpl {
countMap.put(name, CheckCountUtil.countYMXGrade(resultMap));
}else if(name.equals("易磨性校验码")){
countMap.put(name, CheckCountUtil.countYMXCode(resultMap));
}else if(name.equals("激光粒度分析")){
countMap.put(name,CheckCountUtil.countJGLD(resultMap));
}
......@@ -488,6 +467,14 @@ public class CommonServiceImpl {
}
}
//输出检测项第九次循环
for(String name : checkResutlList){
if(name.equals("工业分析")){
String countGYFX = CheckCountUtil.countGYFX(countMap);
countMap.put(name, countGYFX);
}
}
return countMap;
}
......
......@@ -127,7 +127,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
private SampleDistributionCheckMapper sampleDistributionCheckMapper;
@Resource
private SampleDistributionCheckinputMapper sampleDistributionCheckinputMapper;
@Resource
private TitrationMapper titrationMapper;
/**
......@@ -3256,7 +3257,19 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
checkSampleResultVo.setSampleId(sample.getId());
//根据委托id,样品id 检测组id,检测人id判断校核输入表是否有数据,如果有显示校核输入表数据,如果没有显示检测项表数据。
String inputResult = teamGroup.getCheckElement();
String inputResult = null;
//通过检测组和检测人查询上次输入的检测组校核元素 用于展示
QueryWrapper<Titration> titrationQueryWrapper = new QueryWrapper<>();
titrationQueryWrapper.eq("user_id",userId);
titrationQueryWrapper.eq("team_group_id",teamGroup.getId());
List<Titration> titrationList = titrationMapper.selectList(titrationQueryWrapper);
if(titrationList != null && titrationList.size()>0){
inputResult = titrationList.get(0).getCheckElement();
}else{
inputResult = teamGroup.getCheckElement();
}
Integer status = 2;
QueryWrapper<SampleDistributionCheckinput> checkinputQueryWrapper = new QueryWrapper<>();
checkinputQueryWrapper.eq("entrust_id", entrust.getId());
......@@ -3298,6 +3311,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
checkTeamResultVo.setMethodId(team.getMethodId());
checkTeamResultVo.setMethodName(team.getMethodName());
checkTeamResultVo.setNumber(team.getNumber());
checkTeamResultVo.setSortNo(team.getSortNo());
checkTeamResultVo.setUnits(team.getUnits());
//当前检测人检测结果
checkTeamResultVo.setDistributionResult(sampleDistribution.getDistributionResult());
......@@ -3436,6 +3451,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if (loginUser == null) {
return BaseResponse.errorMsg("请登录用户");
}
if(query.getUserId() == null){
return BaseResponse.errorMsg("检测人信息错误");
}
//通过检测组获取检测项信息
List<String> checkResutlList = teamMapper.getByGroup(query.getTeamGroupId());
......@@ -3443,7 +3461,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if(query.getIntputResult() == null){
return BaseResponse.errorMsg("请输入检测数据");
}
JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(query.getTeamGroupId(), query.getIntputResult());
JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(query.getUserId(), query.getTeamGroupId(), query.getIntputResult());
String inputResult_String = JSON.toJSON(inputResult_jsonArray).toString();
System.out.println(inputResult_String);
......@@ -3474,7 +3492,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if (query.getTeamGroupId() == null ) {
return BaseResponse.errorMsg("请选择检测组");
}
if (query.getIsAgree() == null || ( query.getIsAgree() != 1 && query.getIsAgree() != 2)) {
if (query.getIsAgree() == null ||
( query.getIsAgree() != 0 && query.getIsAgree() != 1 && query.getIsAgree() != 2)) {
return BaseResponse.errorMsg("请选择正确按钮");
}
if(query.getIsAgree() ==2 && StringUtils.isEmpty(query.getAuditReason())){
......@@ -3494,14 +3513,14 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
List<SampleDistributionCheckinput> checkinputList =
sampleDistributionCheckinputMapper.selectList(checkinputQueryWrapper);
SampleDistributionCheckinput checkinput = null;
JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(query.getTeamGroupId(), query.getIntputResult());
JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(query.getUserId(), query.getTeamGroupId(), query.getIntputResult());
String inputResult_String = JSON.toJSON(inputResult_jsonArray).toString();
System.out.println(inputResult_String);
if(checkinputList!= null && checkinputList.size() > 0 ){
checkinput = checkinputList.get(0);
checkinput.setCheckUserId(loginUser.getId())
.setInputResult(inputResult_String)
.setStatus(query.getIsAgree() == 1?4:5)
.setStatus(query.getIsAgree() == 1?4:query.getIsAgree() == 0?2:5)
.setUpdateTime(LocalDateTime.now())
.setRemark(query.getAuditReason());
sampleDistributionCheckinputMapper.updateById(checkinput);
......@@ -3513,7 +3532,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.setUserId(query.getUserId())
.setCheckUserId(loginUser.getId())
.setInputResult(inputResult_String)
.setStatus(query.getIsAgree() == 1?4:5)
.setStatus(query.getIsAgree() == 1?4:query.getIsAgree() == 0?2:5)
.setCreateTime(LocalDateTime.now())
.setUpdateTime(LocalDateTime.now())
.setRemark(query.getAuditReason());
......@@ -3521,7 +3540,36 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
//根据按钮判断
if(query.getIsAgree() == 1){ //通过
if(query.getIsAgree() == 0){ //保存
//保存校核结果信息
List<CheckCountDistributionNewQuery> queryList = query.getCheckCountDistributionNewQueryList();
if(queryList!= null && queryList.size()>0 ){
for(CheckCountDistributionNewQuery disQuery : queryList){
SampleDistribution dis = distributionMapper.selectById(disQuery.getDistributionId());
dis.setStatus(2); //待校核
dis.setCheckInputId(checkinput.getId());
dis.setDistributionResult(disQuery.getDistributionResult());
if(dis.getCheckId() != null){
SampleDistributionCheck disCheck = sampleDistributionCheckMapper.selectById(dis.getCheckId());
disCheck.setDistributionError(disQuery.getDistributionError())
.setLastResult(disQuery.getLastResult())
.setUpdateTime(LocalDateTime.now());
sampleDistributionCheckMapper.updateById(disCheck);
dis.setCheckId(disCheck.getId());
}else{
SampleDistributionCheck disCheck = new SampleDistributionCheck();
disCheck.setDistributionError(disQuery.getDistributionError())
.setLastResult(disQuery.getLastResult())
.setCreateTime(LocalDateTime.now())
.setUpdateTime(LocalDateTime.now());
sampleDistributionCheckMapper.insert(disCheck);
dis.setCheckId(disCheck.getId());
}
distributionMapper.updateById(dis);
}
}
}else if(query.getIsAgree() == 1){ //通过
//保存校核结果信息
List<CheckCountDistributionNewQuery> queryList = query.getCheckCountDistributionNewQueryList();
if(queryList!= null && queryList.size()>0 ){
......@@ -3651,11 +3699,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
}
entrustMapper.updateById(entrust);
if(query.getIsAgree()!=0){
logsService.saveLog(SysLogs.ObjType.ENTRUST_LOG, entrust.getId(), "数据校核", null);
iPrecipriceService.updateStatusByEntrustId(entrust.getId());
}
return BaseResponse.okData("校核完成");
}
......@@ -4193,7 +4241,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if(sampleQuery.getIntputResult() == null){
return BaseResponse.errorMsg("请输入检测数据");
}
JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(check.getTeamGroupId(), sampleQuery.getIntputResult());
JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(sampleQuery.getUserId(), check.getTeamGroupId(), sampleQuery.getIntputResult());
String inputResult_String = JSON.toJSON(inputResult_jsonArray).toString();
System.out.println(inputResult_String);
......
......@@ -269,7 +269,8 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT
.setQualifications(query.getQualifications())
.setHandleId(query.getHandleId())
.setIsParallel(query.getIsParallel())
.setIsPf(query.getIsPf());
.setIsPf(query.getIsPf())
.setUnits(query.getUnits());
teamMapper.updateById(update);
return BaseResponse.okData(update);
}
......
package cn.wise.sc.cement.business.service.impl;
import cn.wise.sc.cement.business.entity.Titration;
import cn.wise.sc.cement.business.mapper.TitrationMapper;
import cn.wise.sc.cement.business.service.ITitrationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2021-03-04
*/
@Service
public class TitrationServiceImpl extends ServiceImpl<TitrationMapper, Titration> implements ITitrationService {
}
......@@ -234,6 +234,8 @@ public class CheckCountUtil {
//计算的核心公式结果
BigDecimal countResult = m2.subtract(m1).subtract(m3).divide(m,4).multiply(new BigDecimal(0.343));
endResult = countResult.multiply(param100).setScale(2,BigDecimal.ROUND_HALF_UP);
}else{
endResult = new BigDecimal(0);
}
}else if(name.equals("K<sub>2</sub>O")){
if( StringUtils.isNotBlank(resultMap.get("CK<sub>2</sub>O")) &&
......@@ -387,6 +389,32 @@ public class CheckCountUtil {
return endResult==null?"":endResult.toString();
}
/**
* 求激光粒度分析
* @param resultMap
* @return
*/
public static String countJGLD(Map<String, String> resultMap) {
String count = "";
String D10="";
String D50="";
String D90="";
if( StringUtils.isNotBlank(resultMap.get("D10"))){
D10 = resultMap.get("D10").trim();
}
if( StringUtils.isNotBlank(resultMap.get("D50"))){
D50 = resultMap.get("D50").trim();
}
if( StringUtils.isNotBlank(resultMap.get("D90"))){
D90 = resultMap.get("D90").trim();
}
count = "D10="+D10+" \n D50="+D50+" \n D90="+D90;
return count;
}
/**
* 求SO3
* @param resultMap
......@@ -416,6 +444,9 @@ public class CheckCountUtil {
weightSO3:elseResult.multiply(mSO3).divide(mSO3,4);
count = osResult.subtract(new BigDecimal(0.00000000001)).setScale(2,BigDecimal.ROUND_HALF_UP);
}
}else if(StringUtils.isNotBlank(resultMap.get("显示值"))){
BigDecimal displaySO3= getBigDecimal(resultMap.get("显示值").trim());
count = displaySO3.multiply(new BigDecimal(2.5));
}
return count==null?"":count.toString();
}
......@@ -855,7 +886,7 @@ public class CheckCountUtil {
}
/**
* 求40Mad 0或1
* 求Ad
* @param countMap
* @return
*/
......@@ -866,8 +897,10 @@ public class CheckCountUtil {
){
BigDecimal BC_Aad= getBigDecimal(countMap.get("报出_Aad"));
BigDecimal BC_Mad= getBigDecimal(countMap.get("报出_Mad"));
if(BC_Mad.compareTo(param100)!=0){
count = BC_Aad.multiply(param100).divide(param100.subtract(BC_Mad),4);
}
}
return count==null?"":count.toString();
}
......@@ -991,6 +1024,40 @@ public class CheckCountUtil {
return count==null?"":count.setScale(2,BigDecimal.ROUND_HALF_UP).toString();
}
/**
* 求工业分析
* @param countMap
* @return
*/
public static String countGYFX(Map<String, String> countMap) {
String count = "";
String Mad= "";
String Aad= "";
String Vad= "";
String Qnet_ad_MJ_kg= "";
String JZ= "";
if( StringUtils.isNotBlank(countMap.get("Mad"))){
Mad= getBigDecimal(countMap.get("Mad")).toString();
}
if( StringUtils.isNotBlank(countMap.get("Aad"))){
Aad= getBigDecimal(countMap.get("Aad")).toString();
}
if( StringUtils.isNotBlank(countMap.get("Vad"))){
Vad= getBigDecimal(countMap.get("Vad")).toString();
}
if( StringUtils.isNotBlank(countMap.get("Qnet,ad MJ/kg"))){
Qnet_ad_MJ_kg= getBigDecimal(countMap.get("Qnet,ad MJ/kg")).toString();
}
if( StringUtils.isNotBlank(countMap.get("焦渣"))){
JZ= getBigDecimal(countMap.get("焦渣")).toString();
}
count = "Mad="+Mad+" \n Aad="+Aad+" \n Vad="+Vad+" \n Qnet,ad MJ/kg="+Qnet_ad_MJ_kg+" \n 焦渣="+JZ;
return count;
}
/**
* 求易磨性等级
* @param resultMap
......@@ -1012,6 +1079,13 @@ public class CheckCountUtil {
}else{
count = "A";
}
String YMX_kWh_t_str = "";
if(YMX_kWh_t != null){
YMX_kWh_t_str = YMX_kWh_t.toString();
}
count = "易磨性值="+YMX_kWh_t_str+" \n 易磨性等级="+count;
}
return count;
......
......@@ -8,9 +8,9 @@ spring:
active: dev
datasource:
# 192.168.110.85 admin!@#123 sinoma_zhengshiData sinoma_tmp
# url: jdbc:mysql://192.168.110.85:3306/sinoma_zhengshiData?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://192.168.110.85:3306/sinoma_zhengshiData?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://192.168.110.85:3306/sinoma_bangye?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: admin!@#123
driverClassName: com.mysql.cj.jdbc.Driver
......@@ -41,30 +41,30 @@ mybatis-plus:
mapper-locations: classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
#正式服务器
weixin:
corpId: wwc7ae84e6af6ba921
agentIdPC: 1000151
agentSecretPC: h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg
agentId: 1000150
agentSecret: zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc
backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
backOrcUrl: https://fccdcmtl.sinoma-tianjin.com/lab-system
systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=U_R_L&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
#weixin:
# corpId: wwc7ae84e6af6ba921
# agentIdPC: 1000151
# agentSecretPC: h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg
# agentId: 1000150
# agentSecret: zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc
# backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
# backOrcUrl: https://ccdcmtl.sinoma-tianjin.com/lab-system
# systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=U_R_L&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
# 原始链接备份
# systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
#测试服务器
#weixin:
# corpId: ww348f91b2573c1867
# agentId: 1000002
# agentIdPC: 1000003
# agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
# agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
# backUrl: https%3a%2f%2flab.wisenergy.cn%2flab-bangye
# backOrcUrl: https://lab.wisenergy.cn/lab-bangye
# systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=U_R_L&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
weixin:
corpId: ww348f91b2573c1867
agentId: 1000002
agentIdPC: 1000003
agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
backUrl: https%3a%2f%2flab.wisenergy.cn%2flab-bangye
backOrcUrl: https://lab.wisenergy.cn/lab-bangye
systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=U_R_L&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
#邦业服务器
......
......@@ -234,7 +234,13 @@
<select id="countHandlePage" resultType="cn.wise.sc.cement.business.model.vo.DataStatisticsVo">
SELECT su.id as id, su.name as name, count(*) as value FROM sample_handle sh
left join sys_user su on su.id = sh.user_id
where sh.status = 1 or sh.status = 5
where (sh.status = 1 or sh.status = 5)
<if test="params.startDate != null and params.startDate != ''">
and DATE(sh.create_time) &gt;= #{params.startDate}
</if>
<if test="params.endDate != null and params.endDate != ''">
and DATE(sh.create_time) &lt;= #{params.endDate}
</if>
group by sh.user_id
</select>
......@@ -259,7 +265,13 @@
<select id="countDistributionPage" resultType="cn.wise.sc.cement.business.model.vo.DataStatisticsVo">
SELECT su.id as id, su.name as name, count(*) as value FROM sample_distribution sd
left join sys_user su on su.id = sd.user_id
where sd.status = 1 or sd.status = 5
where (sd.status = 1 or sd.status = 5)
<if test="params.startDate != null and params.startDate != ''">
and DATE(sh.create_time) &gt;= #{params.startDate}
</if>
<if test="params.endDate != null and params.endDate != ''">
and DATE(sh.create_time) &lt;= #{params.endDate}
</if>
group by sd.user_id
</select>
......@@ -286,7 +298,13 @@
<select id="countTeamIng" resultType="cn.wise.sc.cement.business.model.vo.DataStatisticsVo">
SELECT t.name as name, count(*) as value FROM sample_distribution sd
left join team t on t.id = sd.team_id
where sd.status = 1 or sd.status = 5
where (sd.status = 1 or sd.status = 5)
<if test="params.startDate != null and params.startDate != ''">
and DATE(sd.create_time) &gt;= #{params.startDate}
</if>
<if test="params.endDate != null and params.endDate != ''">
and DATE(sd.create_time) &lt;= #{params.endDate}
</if>
group by sd.team_id
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment