zhizhi wu 5 years ago
parent
commit
cf040f9c78
  1. 4
      health/src/main/java/com/ccsens/health/api/AbnormalController.java
  2. 1
      health/src/main/java/com/ccsens/health/service/AbnormalService.java
  3. 2
      health/src/main/java/com/ccsens/health/service/ClockService.java
  4. 9
      health/src/main/java/com/ccsens/health/service/HealthService.java
  5. 2
      health/src/main/java/com/ccsens/health/service/JourneyService.java
  6. 3
      health/src/main/resources/application-dev.yml
  7. 3
      health/src/main/resources/application-prod.yml
  8. 3
      health/src/main/resources/application-test.yml
  9. 4
      health/src/main/resources/application.yml
  10. 1
      health/src/main/resources/mapper_dao/HealthRecordDao.xml
  11. 7
      util/src/main/java/com/ccsens/util/PropUtil.java

4
health/src/main/java/com/ccsens/health/api/AbnormalController.java

@ -61,7 +61,7 @@ public class AbnormalController {
@ApiOperation(value = "修改异常人员信息", notes = "") @ApiOperation(value = "修改异常人员信息", notes = "")
@RequestMapping(value = "update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse updateAbnormal(@ApiParam @Validated @RequestBody QueryDto<AbnormalDto.UpdateAbnormal> params) throws Exception { public JsonResponse updateAbnormal(@ApiParam @Validated @RequestBody QueryDto<AbnormalDto.UpdateAbnormal> params) throws Exception {
log.info("异常人员添加:{}",params); log.info("修改异常人员信息:{}",params);
abnormalService.updateAbnormal(params); abnormalService.updateAbnormal(params);
return JsonResponse.newInstance().ok(); return JsonResponse.newInstance().ok();
} }
@ -70,7 +70,7 @@ public class AbnormalController {
@ApiOperation(value = "删除异常人员信息", notes = "") @ApiOperation(value = "删除异常人员信息", notes = "")
@RequestMapping(value = "delAbnormal", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "delAbnormal", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse deleteAbnormal(@ApiParam @Validated @RequestBody QueryDto<AbnormalDto.DelAbnormal> params) throws Exception { public JsonResponse deleteAbnormal(@ApiParam @Validated @RequestBody QueryDto<AbnormalDto.DelAbnormal> params) throws Exception {
log.info("异常人员添加:{}",params); log.info("删除异常人员信息:{}",params);
abnormalService.delAbnormal(params); abnormalService.delAbnormal(params);
return JsonResponse.newInstance().ok(); return JsonResponse.newInstance().ok();
} }

1
health/src/main/java/com/ccsens/health/service/AbnormalService.java

@ -73,6 +73,7 @@ public class AbnormalService implements IAbnormalService{
AbnormalVo.AbnormalStatisticsVo abnormalStatisticsVo = new AbnormalVo.AbnormalStatisticsVo(); AbnormalVo.AbnormalStatisticsVo abnormalStatisticsVo = new AbnormalVo.AbnormalStatisticsVo();
BeanUtil.copyProperties(healthAbnormal,abnormalStatisticsVo); BeanUtil.copyProperties(healthAbnormal,abnormalStatisticsVo);
abnormalStatisticsVo.setHealthType(healthAbnormal.getHealthStatus());
return abnormalStatisticsVo; return abnormalStatisticsVo;
} }

2
health/src/main/java/com/ccsens/health/service/ClockService.java

@ -263,7 +263,7 @@ public class ClockService implements IClockService {
String path = WebConstant.UPLOAD_PATH_BASE + fileName; String path = WebConstant.UPLOAD_PATH_BASE + fileName;
WxXcxUtil.getWxCode(WebConstant.QRCODE_SITE WxXcxUtil.getWxCode(WebConstant.QRCODE_SITE
, "d=" + siteQrcode.getId() + "&t=" + createQRCode.getType(), null, path); , "d=" + siteQrcode.getId() + "&t=" + createQRCode.getType(), null, path);
qrcodePath = WebConstant.TEST_URL_BASE_HEALTH + fileName; qrcodePath = PropUtil.qrCode + fileName;
siteQrcode.setQrcodePath(qrcodePath); siteQrcode.setQrcodePath(qrcodePath);
//添加数据库 //添加数据库
siteQrcodeDao.insertSelective(siteQrcode); siteQrcodeDao.insertSelective(siteQrcode);

9
health/src/main/java/com/ccsens/health/service/HealthService.java

@ -13,13 +13,11 @@ import com.ccsens.health.bean.vo.HealthVo;
import com.ccsens.health.persist.dao.HealthQRCodeDao; import com.ccsens.health.persist.dao.HealthQRCodeDao;
import com.ccsens.health.persist.dao.HealthRecordsDao; import com.ccsens.health.persist.dao.HealthRecordsDao;
import com.ccsens.health.persist.dao.HealthTypeDao; import com.ccsens.health.persist.dao.HealthTypeDao;
import com.ccsens.util.CodeEnum; import com.ccsens.util.*;
import com.ccsens.util.DateUtil;
import com.ccsens.util.QrCodeUtil;
import com.ccsens.util.WebConstant;
import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException; import com.ccsens.util.exception.BaseException;
import com.ccsens.util.wx.WxXcxUtil; import com.ccsens.util.wx.WxXcxUtil;
import com.fasterxml.jackson.databind.annotation.JsonAppend;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.micrometer.shaded.org.pcollections.PCollection; import io.micrometer.shaded.org.pcollections.PCollection;
@ -104,7 +102,7 @@ public class HealthService implements IHealthService{
String path = WebConstant.UPLOAD_PATH_BASE+fileName; String path = WebConstant.UPLOAD_PATH_BASE+fileName;
WxXcxUtil.getWxCode(WebConstant.QRCODE_HEALTH WxXcxUtil.getWxCode(WebConstant.QRCODE_HEALTH
,"d="+userId,color,path); ,"d="+userId,color,path);
String qrcodePath = WebConstant.TEST_URL_BASE_HEALTH + fileName; String qrcodePath = PropUtil.qrCode + fileName;
//5、将健康码信息存入数据库 //5、将健康码信息存入数据库
HealthQRCode healthQRCode = new HealthQRCode(); HealthQRCode healthQRCode = new HealthQRCode();
@ -118,6 +116,7 @@ public class HealthService implements IHealthService{
BeanUtil.copyProperties(healthRecords,healthInfoVo); BeanUtil.copyProperties(healthRecords,healthInfoVo);
healthInfoVo.setUserId(userId); healthInfoVo.setUserId(userId);
healthInfoVo.setHealthCode(qrcodePath); healthInfoVo.setHealthCode(qrcodePath);
return healthInfoVo; return healthInfoVo;
} }

2
health/src/main/java/com/ccsens/health/service/JourneyService.java

@ -191,7 +191,7 @@ public class JourneyService implements IJourneyService{
public void updateAbnormalJourney(QueryDto<JourneyDto.UpdateAbnormalJourney> params) { public void updateAbnormalJourney(QueryDto<JourneyDto.UpdateAbnormalJourney> params) {
JourneyDto.UpdateAbnormalJourney journey = params.getParam(); JourneyDto.UpdateAbnormalJourney journey = params.getParam();
JourneyAbnormal journeyAbnormal = journeyAbnormalDao.selectByPrimaryKey(journey.getId()); JourneyAbnormal journeyAbnormal = journeyAbnormalDao.selectByPrimaryKey(journey.getId());
if(ObjectUtil.isNotNull(journeyAbnormal)){ if(ObjectUtil.isNull(journeyAbnormal)){
throw new BaseException(CodeEnum.PARAM_ERROR); throw new BaseException(CodeEnum.PARAM_ERROR);
} }
if(ObjectUtil.isNotNull(journey.getTripMode())){ if(ObjectUtil.isNotNull(journey.getTripMode())){

3
health/src/main/resources/application-dev.yml

@ -33,4 +33,5 @@ swagger:
file: file:
path: /home/cloud/health/uploads/ path: /home/cloud/health/uploads/
domain: http://localhost:7080/ domain: http://localhost:7080/
imgDomain: http://localhost:7080/uploads imgDomain: http://localhost:7080/uploads
qrCode: https://localhost:7080/gateway/health/uploads/

3
health/src/main/resources/application-prod.yml

@ -35,4 +35,5 @@ eureka:
file: file:
path: /home/cloud/health/uploads/ path: /home/cloud/health/uploads/
domain: https://sd.tall.com/gateway/health/ domain: https://sd.tall.com/gateway/health/
imgDomain: https://sd.tall.com/gateway/health/uploads imgDomain: https://sd.tall.com/gateway/health/uploads
qrCode: https://www.tall.wiki/gateway/health/uploads/

3
health/src/main/resources/application-test.yml

@ -35,4 +35,5 @@ eureka:
file: file:
path: /home/cloud/health/uploads/ path: /home/cloud/health/uploads/
domain: https://test.tall.wiki/gateway/health/ domain: https://test.tall.wiki/gateway/health/
imgDomain: https://test.tall.wiki/gateway/health/uploads imgDomain: https://test.tall.wiki/gateway/health/uploads
qrCode: https://test.tall.wiki/gateway/health/uploads/

4
health/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring: spring:
profiles: profiles:
active: prod active: test
include: common, util-prod include: common, util-test

1
health/src/main/resources/mapper_dao/HealthRecordDao.xml

@ -84,6 +84,7 @@
and and
h.time &gt;= #{startTime} h.time &gt;= #{startTime}
ORDER By h.time DESC ORDER By h.time DESC
limit 1
</select> </select>
<select id="getNotUpload" parameterType="java.util.Map" resultMap="resultMap_notUpload"> <select id="getNotUpload" parameterType="java.util.Map" resultMap="resultMap_notUpload">

7
util/src/main/java/com/ccsens/util/PropUtil.java

@ -17,6 +17,7 @@ public class PropUtil {
public static String projectName; public static String projectName;
public static String contextPath; public static String contextPath;
public static String gatewayUrl; public static String gatewayUrl;
public static String qrCode;
@Value("${gatewayUrl:}") @Value("${gatewayUrl:}")
public void setGatewayUrl(String gatewayUrl) { public void setGatewayUrl(String gatewayUrl) {
@ -34,7 +35,10 @@ public class PropUtil {
public void setImgDomain(String imgDomain) { public void setImgDomain(String imgDomain) {
PropUtil.imgDomain = imgDomain; PropUtil.imgDomain = imgDomain;
} }
@Value("${file.qrCode:}")
public void setQrCode(String qrCode) {
PropUtil.qrCode = qrCode;
}
@Value("${ht.project.name:}") @Value("${ht.project.name:}")
public void setProjectName(String projectName) { public void setProjectName(String projectName) {
PropUtil.projectName = projectName; PropUtil.projectName = projectName;
@ -44,4 +48,5 @@ public class PropUtil {
public void setContextPath(String contextPath) { public void setContextPath(String contextPath) {
PropUtil.contextPath = contextPath; PropUtil.contextPath = contextPath;
} }
} }

Loading…
Cancel
Save