Commit 849269ef72609d70bc241a86d80ba30b134d2ee9

Authored by liquanyu
1 parent 7d756c73ac

服务

Showing 5 changed files with 46 additions and 3 deletions

platform-biz-service/src/main/resources/mainOrm/master/PatientService.xml View file @ 849269e
... ... @@ -315,15 +315,21 @@
315 315 </if>
316 316  
317 317 <if test="serEndTime != null">
318   - and serEndTime = #{serEndTime,jdbcType=TIMESTAMP}
  318 + AND
  319 + <![CDATA[
  320 + DATEDIFF(#{serEndTime},serEndTime)>=0
  321 + ]]>
319 322 </if>
320 323  
  324 +
321 325 <if test="docStartTime != null">
322 326 and docStartTime = #{docStartTime,jdbcType=TIMESTAMP}
323 327 </if>
324   -
325 328 <if test="docEndTime != null">
326   - and docEndTime = #{docEndTime,jdbcType=TIMESTAMP}
  329 + AND
  330 + <![CDATA[
  331 + DATEDIFF(#{docEndTime},docEndTime)>=0
  332 + ]]>
327 333 </if>
328 334  
329 335 <if test="sql != null and sql != ''">
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java View file @ 849269e
... ... @@ -1184,6 +1184,29 @@
1184 1184  
1185 1185 public void doServiceEndExcute()
1186 1186 {
  1187 +
  1188 + PatientServiceQuery patientQuery = new PatientServiceQuery();
  1189 + patientQuery.setSerEndTime(new Date());
  1190 + patientQuery.setStatus(1);
  1191 + List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery);
  1192 + if (CollectionUtils.isNotEmpty(patientServices))
  1193 + {
  1194 + for (PatientService service : patientServices)
  1195 + {
  1196 + service.setSerType(1);
  1197 + service.setSerStatus(3);
  1198 + patientServiceService.updatePatientService(service);
  1199 +
  1200 + Patients patients = patientsService.findOnePatientById(service.getParentid());
  1201 + patients.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId());
  1202 + patients.setServiceStatus(ServiceStatusEnums.ADD_OVERDUE.getId());
  1203 + patientsService.updatePatient(patients);
  1204 +
  1205 + }
  1206 + }
  1207 +
  1208 +
  1209 +
1187 1210 // TServiceTimeRecordQuery stquery = new TServiceTimeRecordQuery();
1188 1211 // stquery.setEndTime(new Date());
1189 1212 // List<TServiceTimeRecord> tsList = serviceTimeRecordService.queryServiceTimeRecordsEnd(stquery);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java View file @ 849269e
... ... @@ -628,6 +628,11 @@
628 628 {
629 629 for (PatientService ps : list)
630 630 {
  631 + if (ps.getDocEndTime() == null || ps.getDocEndTime().getTime() < new Date().getTime())
  632 + {
  633 + continue;
  634 + }
  635 +
631 636 Patients pat = patientsService.findOnePatientById(ps.getParentid());
632 637 if (pat != null && pat.getType() == 1)
633 638 {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java View file @ 849269e
... ... @@ -1421,6 +1421,11 @@
1421 1421 {
1422 1422 for (PatientService ps : list)
1423 1423 {
  1424 + if (ps.getDocEndTime() == null || ps.getDocEndTime().getTime() < new Date().getTime())
  1425 + {
  1426 + continue;
  1427 + }
  1428 +
1424 1429 Patients pat = patientsService.findOnePatientById(ps.getParentid());
1425 1430 if (pat != null && pat.getType() == 1)
1426 1431 {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ 849269e
... ... @@ -1927,6 +1927,10 @@
1927 1927 {
1928 1928 for (PatientService ps : list)
1929 1929 {
  1930 + if (ps.getDocEndTime() == null || ps.getDocEndTime().getTime() < new Date().getTime())
  1931 + {
  1932 + continue;
  1933 + }
1930 1934 Patients pat = patientsService.findOnePatientById(ps.getParentid());
1931 1935 if (pat != null && pat.getType() == 1)
1932 1936 {