调整basic collectService

segment2.0
linrf 2 years ago
parent ec0eb5313c
commit cff770689d

@ -7,9 +7,9 @@ import com.docus.log.context.TrackHelper;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IHttpResult;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.record.pojo.dto.TBasicDTO;
import com.docus.server.record.service.ITBasicService;
import com.docus.server.collect.web.processor.VisitorProcessor;
import com.docus.server.collect.web.service.CollectService;
import com.docus.server.record.pojo.dto.TBasicDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@ -36,7 +36,7 @@ import javax.annotation.Resource;
@RequestMapping("/api/rest/basic")
public class BasicRestController {
@Resource
private ITBasicService tBasicService;
private CollectService collectService;
/**
* http
@ -52,7 +52,7 @@ public class BasicRestController {
processor = VisitorProcessor.class)
public CommonResult insertHttpPassiveBasic(@RequestBody String message) {
log.info("新增基础数据:{}", message);
tBasicService.insertTBasic(getValue());
collectService.insertOrUpdateBasic(getValue());
return null;
}
@ -70,7 +70,7 @@ public class BasicRestController {
processor = VisitorProcessor.class)
public CommonResult updateHttpPassiveBasic(@RequestBody String message) {
log.info("编辑基础数据:{}", message);
tBasicService.updateTBasic(getValue());
collectService.insertOrUpdateBasic(getValue());
return null;
}

@ -5,11 +5,11 @@ import com.docus.log.annotation.TrackGroup;
import com.docus.log.context.TrackHelper;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IWsResult;
import com.docus.server.collect.basic.ws.IBasicServer;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.record.pojo.dto.TBasicDTO;
import com.docus.server.record.service.ITBasicService;
import com.docus.server.collect.web.processor.VisitorProcessor;
import com.docus.server.collect.basic.ws.IBasicServer;
import com.docus.server.collect.web.service.CollectService;
import com.docus.server.record.pojo.dto.TBasicDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@ -27,7 +27,7 @@ import javax.annotation.Resource;
@Slf4j
public class BasicServerImpl implements IBasicServer {
@Resource
private ITBasicService tBasicService;
private CollectService collectService;
@Override
@TrackGroup(
@ -36,7 +36,7 @@ public class BasicServerImpl implements IBasicServer {
processor = VisitorProcessor.class)
public String setTBasic(String message) {
log.info("新增基础数据:{}", message);
tBasicService.insertTBasic(getValue());
collectService.insertOrUpdateBasic(getValue());
return null;
}
@ -47,7 +47,7 @@ public class BasicServerImpl implements IBasicServer {
processor = VisitorProcessor.class)
public String updateTBasic(String message) {
log.info("修改基础数据:{}", message);
tBasicService.updateTBasic(getValue());
collectService.insertOrUpdateBasic(getValue());
return null;
}

@ -30,11 +30,11 @@ public class TBasicServiceImpl extends ServiceImpl<TBasicMapper, TBasic> impleme
@Transactional(rollbackFor = Exception.class)
public void insertTBasic(TBasicDTO tBasicDTO) {
//判断jzh是否重复
Integer num = tBasicMapper.selectOne(tBasicDTO.getJzh());
if (num > 0) {
updateTBasic(tBasicDTO);
return;
}
// Integer num = tBasicMapper.selectOne(tBasicDTO.getJzh());
// if (num > 0) {
// updateTBasic(tBasicDTO);
// return;
// }
Long patientId = idService.getDateSeq();
//数据类型转化,格式处理

Loading…
Cancel
Save