Commit fc6fa6df5a64dd809a82fb4a0b1dec4594a755b9
1 parent
27e36dfaaf
Exists in
master
and in
6 other branches
德州产检管理添加处理意见查询历史数据处理
Showing 1 changed file with 51 additions and 42 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
fc6fa6d
| ... | ... | @@ -1657,51 +1657,50 @@ |
| 1657 | 1657 | |
| 1658 | 1658 | |
| 1659 | 1659 | |
| 1660 | - @RequestMapping(value = "/updateRecordOpinion", method = RequestMethod.GET) | |
| 1660 | + @RequestMapping(value = "/updateRecordOpinionFu", method = RequestMethod.GET) | |
| 1661 | 1661 | @ResponseBody |
| 1662 | - public String updateRecordOpinion(@RequestParam(required = false) String hospitalId, @RequestParam(required = false) String cid | |
| 1663 | - , @RequestParam(required = false) String fid) { | |
| 1662 | + public String updateRecordOpinionFu(@RequestParam(required = false) String hospitalId | |
| 1663 | + , @RequestParam(required = false) String id) { | |
| 1664 | 1664 | |
| 1665 | - | |
| 1666 | - AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 1667 | - antExChuQuery.setIsOpinion(true); | |
| 1665 | + // 查询复诊 | |
| 1666 | + AntExQuery antExQuery = new AntExQuery(); | |
| 1667 | + antExQuery.setIsOpinion(true); | |
| 1668 | 1668 | if (StringUtils.isNotEmpty(hospitalId)) { |
| 1669 | 1669 | |
| 1670 | - antExChuQuery.setHospitalId(hospitalId); | |
| 1670 | + antExQuery.setHospitalId(hospitalId); | |
| 1671 | 1671 | } |
| 1672 | - if (StringUtils.isNotEmpty(cid)) | |
| 1672 | + if (StringUtils.isNotEmpty(id)) | |
| 1673 | 1673 | { |
| 1674 | - antExChuQuery.setId(cid); | |
| 1674 | + antExQuery.setId(id); | |
| 1675 | 1675 | } |
| 1676 | 1676 | |
| 1677 | - List<AntExChuModel> antExChuModelList = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 1678 | - | |
| 1679 | - if (CollectionUtils.isNotEmpty(antExChuModelList)) { | |
| 1677 | + List<AntenatalExaminationModel> antenatalExaminationModelList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
| 1678 | + if (CollectionUtils.isNotEmpty(antenatalExaminationModelList)) { | |
| 1680 | 1679 | int batchSize = 100; |
| 1681 | 1680 | int end = 0; |
| 1682 | - for (int i = 0; i < antExChuModelList.size(); i += batchSize) { | |
| 1681 | + for (int i = 0; i < antenatalExaminationModelList.size(); i += batchSize) { | |
| 1683 | 1682 | end = (end + batchSize); |
| 1684 | - if (end > antExChuModelList.size()) { | |
| 1685 | - end = antExChuModelList.size(); | |
| 1683 | + if (end > antenatalExaminationModelList.size()) { | |
| 1684 | + end = antenatalExaminationModelList.size(); | |
| 1686 | 1685 | } |
| 1687 | - System.out.println("start:" + i + ",end:" + end); | |
| 1688 | - final List<AntExChuModel> tempList = antExChuModelList.subList(i, end); | |
| 1686 | + System.out.println("fstart:" + i + ",fend:" + end); | |
| 1687 | + final List<AntenatalExaminationModel> tempList = antenatalExaminationModelList.subList(i, end); | |
| 1689 | 1688 | commonThreadPool.execute(new Runnable() { |
| 1690 | 1689 | @Override |
| 1691 | 1690 | public void run() { |
| 1692 | 1691 | if (CollectionUtils.isNotEmpty(tempList)) { |
| 1693 | - for (AntExChuModel chuModel : tempList) { | |
| 1692 | + for (AntenatalExaminationModel fuModel : tempList) { | |
| 1694 | 1693 | |
| 1695 | 1694 | AntExRecordQuery pageAntExRecordsQuery = new AntExRecordQuery(); |
| 1696 | - pageAntExRecordsQuery.setfId(chuModel.getId()); | |
| 1695 | + pageAntExRecordsQuery.setfId(fuModel.getId()); | |
| 1697 | 1696 | List<AntExRecordModel> recordModels = recordService.queryAntExRecords(pageAntExRecordsQuery); |
| 1698 | 1697 | if (CollectionUtils.isNotEmpty(recordModels)) |
| 1699 | 1698 | { |
| 1700 | - if (StringUtils.isNotEmpty(chuModel.getTreatOpinion())) | |
| 1699 | + if (StringUtils.isNotEmpty(fuModel.getTreatmentOpinion())) | |
| 1701 | 1700 | { |
| 1702 | - System.out.println("chuId=" + chuModel.getId()+";chuModel.getTreatOpinion()"); | |
| 1701 | + System.out.println("fId=" + fuModel.getId()+";"+fuModel.getTreatmentOpinion()); | |
| 1703 | 1702 | AntExRecordModel recordModel = recordModels.get(0); |
| 1704 | - recordModel.setTreatOpinion(chuModel.getTreatOpinion()); | |
| 1703 | + recordModel.setTreatOpinion(fuModel.getTreatmentOpinion()); | |
| 1705 | 1704 | recordService.updateOne(recordModel,recordModel.getId()); |
| 1706 | 1705 | } |
| 1707 | 1706 | } |
| 1708 | 1707 | |
| 1709 | 1708 | |
| 1710 | 1709 | |
| 1711 | 1710 | |
| 1712 | 1711 | |
| 1713 | 1712 | |
| 1714 | 1713 | |
| 1715 | 1714 | |
| 1716 | 1715 | |
| 1717 | 1716 | |
| 1718 | 1717 | |
| 1719 | 1718 | |
| ... | ... | @@ -1712,45 +1711,54 @@ |
| 1712 | 1711 | } |
| 1713 | 1712 | } |
| 1714 | 1713 | |
| 1715 | - // 查询复诊 | |
| 1716 | - AntExQuery antExQuery = new AntExQuery(); | |
| 1717 | - antExQuery.setIsOpinion(true); | |
| 1714 | + return "updateRecordOpinionFu finish"; | |
| 1715 | + } | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + @RequestMapping(value = "/updateRecordOpinionChu", method = RequestMethod.GET) | |
| 1719 | + @ResponseBody | |
| 1720 | + public String updateRecordOpinionChu(@RequestParam(required = false) String hospitalId, @RequestParam(required = false) String id) { | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 1724 | + antExChuQuery.setIsOpinion(true); | |
| 1718 | 1725 | if (StringUtils.isNotEmpty(hospitalId)) { |
| 1719 | 1726 | |
| 1720 | - antExQuery.setHospitalId(hospitalId); | |
| 1727 | + antExChuQuery.setHospitalId(hospitalId); | |
| 1721 | 1728 | } |
| 1722 | - if (StringUtils.isNotEmpty(fid)) | |
| 1729 | + if (StringUtils.isNotEmpty(id)) | |
| 1723 | 1730 | { |
| 1724 | - antExQuery.setId(fid); | |
| 1731 | + antExChuQuery.setId(id); | |
| 1725 | 1732 | } |
| 1726 | 1733 | |
| 1727 | - List<AntenatalExaminationModel> antenatalExaminationModelList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
| 1728 | - if (CollectionUtils.isNotEmpty(antenatalExaminationModelList)) { | |
| 1734 | + List<AntExChuModel> antExChuModelList = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 1735 | + | |
| 1736 | + if (CollectionUtils.isNotEmpty(antExChuModelList)) { | |
| 1729 | 1737 | int batchSize = 100; |
| 1730 | 1738 | int end = 0; |
| 1731 | - for (int i = 0; i < antenatalExaminationModelList.size(); i += batchSize) { | |
| 1739 | + for (int i = 0; i < antExChuModelList.size(); i += batchSize) { | |
| 1732 | 1740 | end = (end + batchSize); |
| 1733 | - if (end > antenatalExaminationModelList.size()) { | |
| 1734 | - end = antenatalExaminationModelList.size(); | |
| 1741 | + if (end > antExChuModelList.size()) { | |
| 1742 | + end = antExChuModelList.size(); | |
| 1735 | 1743 | } |
| 1736 | - System.out.println("fstart:" + i + ",fend:" + end); | |
| 1737 | - final List<AntenatalExaminationModel> tempList = antenatalExaminationModelList.subList(i, end); | |
| 1744 | + System.out.println("start:" + i + ",end:" + end); | |
| 1745 | + final List<AntExChuModel> tempList = antExChuModelList.subList(i, end); | |
| 1738 | 1746 | commonThreadPool.execute(new Runnable() { |
| 1739 | 1747 | @Override |
| 1740 | 1748 | public void run() { |
| 1741 | 1749 | if (CollectionUtils.isNotEmpty(tempList)) { |
| 1742 | - for (AntenatalExaminationModel fuModel : tempList) { | |
| 1750 | + for (AntExChuModel chuModel : tempList) { | |
| 1743 | 1751 | |
| 1744 | 1752 | AntExRecordQuery pageAntExRecordsQuery = new AntExRecordQuery(); |
| 1745 | - pageAntExRecordsQuery.setfId(fuModel.getId()); | |
| 1753 | + pageAntExRecordsQuery.setfId(chuModel.getId()); | |
| 1746 | 1754 | List<AntExRecordModel> recordModels = recordService.queryAntExRecords(pageAntExRecordsQuery); |
| 1747 | 1755 | if (CollectionUtils.isNotEmpty(recordModels)) |
| 1748 | 1756 | { |
| 1749 | - if (StringUtils.isNotEmpty(fuModel.getTreatmentOpinion())) | |
| 1757 | + if (StringUtils.isNotEmpty(chuModel.getTreatOpinion())) | |
| 1750 | 1758 | { |
| 1751 | - System.out.println("fId=" + fuModel.getId()+";chuModel.getTreatOpinion()"); | |
| 1759 | + System.out.println("chuId=" + chuModel.getId()+";"+chuModel.getTreatOpinion()); | |
| 1752 | 1760 | AntExRecordModel recordModel = recordModels.get(0); |
| 1753 | - recordModel.setTreatOpinion(fuModel.getTreatmentOpinion()); | |
| 1761 | + recordModel.setTreatOpinion(chuModel.getTreatOpinion()); | |
| 1754 | 1762 | recordService.updateOne(recordModel,recordModel.getId()); |
| 1755 | 1763 | } |
| 1756 | 1764 | } |
| 1757 | 1765 | |
| ... | ... | @@ -1760,9 +1768,10 @@ |
| 1760 | 1768 | }); |
| 1761 | 1769 | } |
| 1762 | 1770 | } |
| 1763 | - | |
| 1764 | - return "updateRecordOpinion finish"; | |
| 1771 | + return "updateRecordOpinionChu finish"; | |
| 1765 | 1772 | } |
| 1773 | + | |
| 1774 | + | |
| 1766 | 1775 | |
| 1767 | 1776 | |
| 1768 | 1777 | @Autowired |