修改his视图的sql入参,医嘱开单的相关接口。
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -64,6 +64,11 @@ public class HisViewSearchController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取今天的遗嘱开单信息
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping("/getMedicalPrescription")
|
@GetMapping("/getMedicalPrescription")
|
||||||
@EleganceLog(description = "获取今天的遗嘱开单信息!")
|
@EleganceLog(description = "获取今天的遗嘱开单信息!")
|
||||||
public Result getMedicalPrescription() {
|
public Result getMedicalPrescription() {
|
||||||
|
|||||||
@@ -9,8 +9,10 @@ import com.joju.datamanager.common.result.Result;
|
|||||||
import com.joju.datamanager.common.result.ResultUtil;
|
import com.joju.datamanager.common.result.ResultUtil;
|
||||||
import com.joju.datamanager.model.medicalprescription.MedicalPrescription;
|
import com.joju.datamanager.model.medicalprescription.MedicalPrescription;
|
||||||
import com.joju.datamanager.service.MedicalPrescriptionService;
|
import com.joju.datamanager.service.MedicalPrescriptionService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@@ -21,6 +23,7 @@ import java.util.List;
|
|||||||
* @author: Mr.zs
|
* @author: Mr.zs
|
||||||
* @create: 2024-04-02 19:11
|
* @create: 2024-04-02 19:11
|
||||||
**/
|
**/
|
||||||
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/MedicalPrescription")
|
@RequestMapping("/MedicalPrescription")
|
||||||
public class MedicalPrescriptionController {
|
public class MedicalPrescriptionController {
|
||||||
@@ -34,17 +37,31 @@ public class MedicalPrescriptionController {
|
|||||||
@EleganceLog(description = "获取本地的医嘱开单信息")
|
@EleganceLog(description = "获取本地的医嘱开单信息")
|
||||||
public Result getLocalMedicalPrescription() {
|
public Result getLocalMedicalPrescription() {
|
||||||
String today = DateUtil.today();
|
String today = DateUtil.today();
|
||||||
String todayString = today + "00:00:00";
|
String todayString = today + " 00:00:00";
|
||||||
DateTime tomorrow = DateUtil.tomorrow();
|
DateTime tomorrow = DateUtil.tomorrow();
|
||||||
String s = DateUtil.formatDate(tomorrow);
|
String s = DateUtil.formatDate(tomorrow);
|
||||||
String tomorrowString = s + "00:00:00";
|
String tomorrowString = s + " 00:00:00";
|
||||||
|
|
||||||
List<MedicalPrescription> medicalPrescriptions = medicalPrescriptionService.list(new QueryWrapper<MedicalPrescription>().between("lrrq", todayString, tomorrowString));
|
List<MedicalPrescription> medicalPrescriptions = medicalPrescriptionService.list(new QueryWrapper<MedicalPrescription>().between("lrrq", todayString, tomorrowString));
|
||||||
|
|
||||||
if (!CollUtil.isEmpty(medicalPrescriptions)) {
|
if (!CollUtil.isEmpty(medicalPrescriptions)) {
|
||||||
|
log.info("medicalPrescriptions is :" + medicalPrescriptions);
|
||||||
return ResultUtil.successData(medicalPrescriptions);
|
return ResultUtil.successData(medicalPrescriptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResultUtil.failureMsg("获取失败!!");
|
return ResultUtil.failureMsg("获取失败!!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("insertLocalMedicalPrescriptions")
|
||||||
|
@EleganceLog(description = "批量插入本地医嘱开单信息")
|
||||||
|
public Result insertLocalMedicalPrescriptions(List<MedicalPrescription> medicalPrescriptions) {
|
||||||
|
boolean b = medicalPrescriptionService.saveBatch(medicalPrescriptions);
|
||||||
|
if (b) {
|
||||||
|
return ResultUtil.success();
|
||||||
|
} else {
|
||||||
|
return ResultUtil.failureMsg("插入失败!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -131,10 +131,10 @@ public class HisViewSearchServiceImpl implements HisViewSearchService {
|
|||||||
log.info("打印链接状态:" + conn);
|
log.info("打印链接状态:" + conn);
|
||||||
// 3.通过数据库的连接操作数据库,实现增删改查(使用Statement类)
|
// 3.通过数据库的连接操作数据库,实现增删改查(使用Statement类)
|
||||||
String today = DateUtil.today();
|
String today = DateUtil.today();
|
||||||
String todayString = today + "00:00:00";
|
String todayString = today + " 00:00:00";
|
||||||
DateTime tomorrow = DateUtil.tomorrow();
|
DateTime tomorrow = DateUtil.tomorrow();
|
||||||
String s = DateUtil.formatDate(tomorrow);
|
String s = DateUtil.formatDate(tomorrow);
|
||||||
String tomorrowString = s + "00:00:00";
|
String tomorrowString = s + " 00:00:00";
|
||||||
// SELECT * FROM HIS_WJFHZCFXX WHERE lrrq BETWEEN '2024-04-02 00:00:00' AND '2024-04-03 00:00:00 '
|
// SELECT * FROM HIS_WJFHZCFXX WHERE lrrq BETWEEN '2024-04-02 00:00:00' AND '2024-04-03 00:00:00 '
|
||||||
String sql = " SELECT * FROM HIS_WJFHZCFXX WHERE lrrq BETWEEN '" + todayString + "' AND '" + tomorrowString + "'";
|
String sql = " SELECT * FROM HIS_WJFHZCFXX WHERE lrrq BETWEEN '" + todayString + "' AND '" + tomorrowString + "'";
|
||||||
log.info("打印sql" + sql);
|
log.info("打印sql" + sql);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ spring:
|
|||||||
url: jdbc:mysql://localhost:3306/hrs?zeroDateTimeBehavior=convertToNull&serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://localhost:3306/hrs?zeroDateTimeBehavior=convertToNull&serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password: fybjy_1234
|
password: fybjy_1234
|
||||||
# password: 123456
|
# password: 123456
|
||||||
druid:
|
druid:
|
||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
|
|||||||
Reference in New Issue
Block a user