Commit 3ac6b8f1acb38bf699604cbd939708c7bfa33adb

Authored by liquanyu
1 parent 9619690544

update

Showing 2 changed files with 38 additions and 20 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ 3ac6b8f
... ... @@ -4257,7 +4257,7 @@
4257 4257 @ResponseBody
4258 4258 @RequestMapping(value = "/syncPatientsToMysql", method = RequestMethod.GET)
4259 4259 public String syncPatientsToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) {
4260   - patientSyncMysqlFacade.syncPatientsToMysql(startDate, endDate);
  4260 + patientSyncMysqlFacade.syncPatientsToMysql(startDate, endDate,hospitalId);
4261 4261 return "syncPatientsToMysql";
4262 4262 }
4263 4263  
... ... @@ -4266,7 +4266,7 @@
4266 4266 @ResponseBody
4267 4267 @RequestMapping(value = "/syncAntexchuToMysql", method = RequestMethod.GET)
4268 4268 public String syncAntexchuToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) {
4269   - patientSyncMysqlFacade.syncAntexchuToMysql(startDate, endDate);
  4269 + patientSyncMysqlFacade.syncAntexchuToMysql(startDate, endDate,hospitalId);
4270 4270 return "syncAntexchuToMysql";
4271 4271 }
4272 4272  
... ... @@ -4275,7 +4275,7 @@
4275 4275 @ResponseBody
4276 4276 @RequestMapping(value = "/syncAntexToMysql", method = RequestMethod.GET)
4277 4277 public String syncAntexToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) {
4278   - patientSyncMysqlFacade.syncAntexToMysql(startDate, endDate);
  4278 + patientSyncMysqlFacade.syncAntexToMysql(startDate, endDate,hospitalId);
4279 4279 return "syncAntexToMysql";
4280 4280 }
4281 4281  
... ... @@ -4285,7 +4285,7 @@
4285 4285 @ResponseBody
4286 4286 @RequestMapping(value = "/syncMatdeliverToMysql", method = RequestMethod.GET)
4287 4287 public String syncMatdeliverToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) {
4288   - patientSyncMysqlFacade.syncMatdeliverToMysql(startDate, endDate);
  4288 + patientSyncMysqlFacade.syncMatdeliverToMysql(startDate, endDate,hospitalId);
4289 4289 return "syncMatdeliverToMysql";
4290 4290 }
4291 4291  
... ... @@ -4294,10 +4294,10 @@
4294 4294 @ResponseBody
4295 4295 @RequestMapping(value = "/syncAllToMysql", method = RequestMethod.GET)
4296 4296 public String syncAllToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) {
4297   - patientSyncMysqlFacade.syncPatientsToMysql(startDate, endDate);
4298   - patientSyncMysqlFacade.syncMatdeliverToMysql(startDate, endDate);
4299   - patientSyncMysqlFacade.syncAntexchuToMysql(startDate, endDate);
4300   - patientSyncMysqlFacade.syncAntexToMysql(startDate, endDate);
  4297 + patientSyncMysqlFacade.syncPatientsToMysql(startDate, endDate,hospitalId);
  4298 + patientSyncMysqlFacade.syncMatdeliverToMysql(startDate, endDate,hospitalId);
  4299 + patientSyncMysqlFacade.syncAntexchuToMysql(startDate, endDate,hospitalId);
  4300 + patientSyncMysqlFacade.syncAntexToMysql(startDate, endDate,hospitalId);
4301 4301 return "syncAllToMysql";
4302 4302 }
4303 4303  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java View file @ 3ac6b8f
... ... @@ -1276,22 +1276,28 @@
1276 1276 syncBaby(startDate, endDate,hid);
1277 1277 syncBabyCheck(startDate, endDate,hid);
1278 1278 }
1279   - syncPatientsToMysql(startDate,endDate);
1280   - syncAntexchuToMysql(startDate, endDate);
1281   - syncAntexToMysql(startDate, endDate);
1282   - syncMatdeliverToMysql(startDate,endDate);
  1279 + syncPatientsToMysql(startDate, endDate, null);
  1280 + syncAntexchuToMysql(startDate, endDate,null);
  1281 + syncAntexToMysql(startDate, endDate,null);
  1282 + syncMatdeliverToMysql(startDate, endDate,null);
1283 1283 }
1284 1284  
1285 1285  
1286 1286  
1287   - public void syncPatientsToMysql(Date start,Date end)
  1287 + public void syncPatientsToMysql(Date start,Date end,String hospitalId)
1288 1288 {
1289 1289 PatientsQuery patientsQuery = new PatientsQuery();
1290 1290 patientsQuery.setYn(YnEnums.YES.getId());
1291 1291 patientsQuery.setModifiedStart(start);
1292 1292 patientsQuery.setModifiedEnd(end);
  1293 +
  1294 + if (StringUtils.isNotEmpty(hospitalId))
  1295 + {
  1296 + patientsQuery.setHospitalId(hospitalId);
  1297 + }
  1298 +
1293 1299 patientsQuery.setNeed("true");
1294   - patientsQuery.setLimit(100);
  1300 + patientsQuery.setLimit(10000);
1295 1301 int page = 1;
1296 1302 while (true)
1297 1303 {
1298 1304  
1299 1305  
... ... @@ -1324,15 +1330,19 @@
1324 1330 }
1325 1331  
1326 1332  
1327   - public void syncAntexchuToMysql(Date start,Date end)
  1333 + public void syncAntexchuToMysql(Date start,Date end,String hospitalId)
1328 1334 {
1329 1335 AntExChuQuery antExChuQuery = new AntExChuQuery();
1330 1336 antExChuQuery.setYn(YnEnums.YES.getId());
1331 1337 antExChuQuery.setModifiedStart(start);
1332 1338 antExChuQuery.setModifiedEnd(end);
  1339 + if (StringUtils.isNotEmpty(hospitalId))
  1340 + {
  1341 + antExChuQuery.setHospitalId(hospitalId);
  1342 + }
1333 1343 antExChuQuery.setNeed("true");
1334 1344  
1335   - antExChuQuery.setLimit(100);
  1345 + antExChuQuery.setLimit(10000);
1336 1346 int page = 1;
1337 1347 while (true)
1338 1348 {
1339 1349  
1340 1350  
... ... @@ -1459,15 +1469,19 @@
1459 1469 }
1460 1470  
1461 1471  
1462   - public void syncAntexToMysql(Date start,Date end)
  1472 + public void syncAntexToMysql(Date start,Date end,String hospitalId)
1463 1473 {
1464 1474 AntExQuery antExQuery = new AntExQuery();
1465 1475 antExQuery.setYn(YnEnums.YES.getId());
1466 1476 antExQuery.setModifiedStart(start);
1467 1477 antExQuery.setModifiedEnd(end);
  1478 + if (StringUtils.isNotEmpty(hospitalId))
  1479 + {
  1480 + antExQuery.setHospitalId(hospitalId);
  1481 + }
1468 1482 antExQuery.setNeed("true");
1469 1483  
1470   - antExQuery.setLimit(100);
  1484 + antExQuery.setLimit(10000);
1471 1485 int page = 1;
1472 1486 while (true)
1473 1487 {
1474 1488  
1475 1489  
... ... @@ -1545,14 +1559,18 @@
1545 1559 }
1546 1560  
1547 1561  
1548   - public void syncMatdeliverToMysql(Date start,Date end)
  1562 + public void syncMatdeliverToMysql(Date start,Date end,String hospitalId)
1549 1563 {
1550 1564 MatDeliverQuery matDeliverQuery = new MatDeliverQuery();
1551 1565 matDeliverQuery.setYn(YnEnums.YES.getId());
  1566 + if (StringUtils.isNotEmpty(hospitalId))
  1567 + {
  1568 + matDeliverQuery.setHospitalId(hospitalId);
  1569 + }
1552 1570 matDeliverQuery.setModifiedStart(start);
1553 1571 matDeliverQuery.setModifiedEnd(end);
1554 1572 matDeliverQuery.setNeed("true");
1555   - matDeliverQuery.setLimit(100);
  1573 + matDeliverQuery.setLimit(10000);
1556 1574 int page = 1;
1557 1575 while (true)
1558 1576 {