Commit 16a98397606ff5617bf80487d10237e7bb99eb08

Authored by zhangchao
Exists in luanping and in 1 other branch dev

Merge branch 'dev' of https://git.healthbaby.com.cn/jiangjiazhi/regional-platform into dev

# Conflicts:
#	platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
#	platform-operate-api/src/main/resources/spring/applicationContext-quartz.xml

Showing 6 changed files

platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/PatientServiceMapper.java View file @ 16a9839
... ... @@ -11,6 +11,7 @@
11 11  
12 12 public interface PatientServiceMapper {
13 13 public void addPatientService(PatientService obj);
  14 + void addPatientServiceAll(@Param("serviceList") List<PatientService> serviceList);
14 15  
15 16 public void updatePatientService(PatientService obj);
16 17  
... ... @@ -31,6 +32,8 @@
31 32 List<Map> selectOnlyBzService(PatientServiceQuery query);
32 33  
33 34 List<Map<String,Object>> selectServiceByHospital(String hospitalId);
  35 +
  36 + List<Map<String,String>> selectServiceByHospital(@Param("hospitalId") String hospitalId);
34 37  
35 38 int selectOnlyBzServiceCount(PatientServiceQuery query);
36 39  
platform-biz-service/src/main/java/com/lyms/platform/permission/service/PatientServiceService.java View file @ 16a9839
... ... @@ -3,13 +3,14 @@
3 3 import com.lyms.platform.permission.model.PatientService;
4 4 import com.lyms.platform.permission.model.PatientServiceQuery;
5 5 import com.lyms.platform.permission.model.ServiceListQuery;
  6 +import org.apache.ibatis.annotations.Param;
6 7  
7 8 import java.util.List;
8 9 import java.util.Map;
9 10  
10 11 public interface PatientServiceService {
11 12 public void addPatientService(PatientService obj);
12   -
  13 + void addPatientServiceAll(List<PatientService> serviceList);
13 14 public void updatePatientService(PatientService obj);
14 15  
15 16 public void deletePatientService(String id);
... ... @@ -32,7 +33,7 @@
32 33 List<Map<String, Object>> getServeDetailList(ServiceListQuery param);
33 34  
34 35 List<String> getHospitalIds(ServiceListQuery param, List<String> ids);
35   -
  36 + List<Map<String,String>> selectServiceByHospital(@Param("hospitalId") String hospitalId);
36 37 /**
37 38 * 查询病人服务list
38 39 *
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/PatientServiceServiceImpl.java View file @ 16a9839
... ... @@ -7,11 +7,13 @@
7 7 import com.lyms.platform.permission.service.PatientServiceService;
8 8 import org.springframework.beans.factory.annotation.Autowired;
9 9 import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
10 11  
11 12 import java.util.List;
12 13 import java.util.Map;
13 14  
14 15 @Service
  16 +@Transactional
15 17 public class PatientServiceServiceImpl implements PatientServiceService {
16 18  
17 19 @Autowired
... ... @@ -23,6 +25,11 @@
23 25 }
24 26  
25 27 @Override
  28 + public void addPatientServiceAll(List<PatientService> serviceList) {
  29 + patientServiceMapper.addPatientServiceAll(serviceList);
  30 + }
  31 +
  32 + @Override
26 33 public void updatePatientService(PatientService obj) {
27 34 patientServiceMapper.updatePatientService(obj);
28 35 }
... ... @@ -89,6 +96,11 @@
89 96 @Override
90 97 public List<String> getHospitalIds(ServiceListQuery param, List<String> hospitalIds) {
91 98 return patientServiceMapper.getHospitalIds(param, hospitalIds);
  99 + }
  100 +
  101 + @Override
  102 + public List<Map<String, String>> selectServiceByHospital(String hospitalId) {
  103 + return patientServiceMapper.selectServiceByHospital(hospitalId);
92 104 }
93 105  
94 106 /**
platform-biz-service/src/main/resources/mainOrm/master/PatientService.xml View file @ 16a9839
... ... @@ -54,6 +54,20 @@
54 54 )
55 55 </insert>
56 56  
  57 + <insert id="addPatientServiceAll" parameterType="java.util.List">
  58 + INSERT INTO patient_service
  59 + (id,parentid,pid,ser_type,ser_doct,create_date,create_user_name,create_user,ser_status,
  60 + update_date,update_user_name,update_user,hospital_id,ser_code,status,receive_date,receive_user,back_date,back_user,order_id,syn_status,is_old,per_type
  61 + ,device,deviceCon,doctorWeek,serviceWeek,serStartWeek,serEndWeek,serStartTime,serEndTime,docStartWeek,docEndWeek,docStartTime,docEndTime
  62 + )
  63 + VALUES
  64 + <foreach collection ="serviceList" item="patientService" separator =",">
  65 + (#{patientService.id},#{patientService.parentid},#{patientService.pid},#{patientService.serType},#{patientService.serDoct},#{patientService.createDate},#{patientService.createUserName},#{patientService.createUser},#{patientService.serStatus},#{patientService.updateDate},
  66 + #{patientService.updateUserName},#{patientService.updateUser},#{patientService.hospitalId},#{patientService.serCode},#{patientService.status},#{patientService.receiveDate},#{patientService.receiveUser},#{patientService.backDate},#{patientService.backUser},#{patientService.orderId},#{patientService.synStatus},#{patientService.isOld},#{patientService.perType}
  67 + ,#{patientService.device},#{patientService.deviceCon},#{patientService.doctorWeek},#{patientService.serviceWeek},#{patientService.serStartWeek},#{patientService.serEndWeek},#{patientService.serStartTime},#{patientService.serEndTime},#{patientService.docStartWeek},#{patientService.docEndWeek},#{patientService.docStartTime},#{patientService.docEndTime}
  68 + )
  69 + </foreach >
  70 + </insert>
57 71  
58 72 <update id="updatePatientService" parameterType="com.lyms.platform.permission.model.PatientService">
59 73 update patient_service
... ... @@ -357,6 +371,16 @@
357 371 from patient_service
358 372 <include refid="PatientServiceCondition"/>
359 373 <include refid="orderAndLimit"/>
  374 + </select>
  375 +
  376 + <select id="selectServiceByHospital" resultType="java.util.HashMap">
  377 + SELECT
  378 + hso.ser_type as serType,hds.doct_id as doctId
  379 +FROM
  380 + `hospital_service_content` hso
  381 +INNER JOIN hospital_doct_service hds
  382 +on hso.id=hds.hosp_service_id
  383 +where hso.hospital_id=#{hospitalId} and hso.ser_type in (3,4,6)
360 384 </select>
361 385  
362 386 <!--查询只开通了标准服务的数据 -->
platform-msg-generate/src/main/java/com/lyms/platform/msg/utils/DateUtils.java View file @ 16a9839
... ... @@ -232,8 +232,12 @@
232 232 return Math.abs(result);
233 233 }
234 234 public static void main(String[] args) {
235   - System.out.println(DateUtil.getyyyy_MM_dd(DateUtil.addDay(new Date(),33)));
236   - System.out.println(DateUtil.daysBetween(DateUtil.addDay(DateUtil.addDay(new Date(),33),-33),new Date()));
  235 + /*Date startDate = DateUtils.getNewDate(new Date(), -18, "周", 1 + 1);
  236 + Date endDate = DateUtils.getNewDate(new Date(), -13, "周", 1);
  237 + System.out.println(DateUtils.getDateStr(DateUtils.formatDate(startDate, DateUtils.Y_M_D),DateUtils.Y_M_D));
  238 + System.out.println(DateUtils.getDateStr(DateUtils.formatDate(endDate, DateUtils.Y_M_D),DateUtils.Y_M_D));*/
  239 +
  240 + System.out.println(DateUtils.getNewDate(DateUtils.preaseDate("2023-09-26 8:00:00",DateUtils.Y_M_D_H_M_S),13, "周", -1));
237 241 }
238 242 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java View file @ 16a9839
... ... @@ -13,7 +13,6 @@
13 13 import com.lyms.platform.pojo.*;
14 14 import com.lyms.platform.query.*;
15 15  
16   -import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException;
17 16 import org.apache.commons.codec.binary.*;
18 17 import org.apache.commons.codec.binary.Base64;
19 18 import org.apache.commons.collections.CollectionUtils;