| 
															
																@ -5,7 +5,6 @@ package com.yihu.wlyy.service.synergy;/** 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.alibaba.fastjson.JSONObject; 
															 | 
															
															 | 
															
																import com.alibaba.fastjson.JSONObject; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.entity.Patient; 
															 | 
															
															 | 
															
																import com.yihu.wlyy.entity.Patient; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.entity.User; 
															 | 
															
															 | 
															
																import com.yihu.wlyy.entity.User; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderDO; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerDO; 
															 | 
															
															 | 
															
																import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerDO; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerLogDO; 
															 | 
															
															 | 
															
																import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerLogDO; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.repository.PatientDao; 
															 | 
															
															 | 
															
																import com.yihu.wlyy.repository.PatientDao; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -55,24 +54,17 @@ public class SynergyWorkorderServicerLogService extends BaseJpaService { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     */ 
															 | 
															
															 | 
															
																     */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Transactional 
															 | 
															
															 | 
															
																    @Transactional 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    public void create(ManageSynergyWorkorderServicerLogDO synergyWorkorderServicerLogDO,String userCode){ 
															 | 
															
															 | 
															
																    public void create(ManageSynergyWorkorderServicerLogDO synergyWorkorderServicerLogDO,String userCode){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        ManageSynergyWorkorderServicerDO workorderServicerDO = workorderServicerDao.findByWorkOrderCodeAndPatientCode1(synergyWorkorderServicerLogDO.getWorkorderCode(),synergyWorkorderServicerLogDO.getWorkorderServiceCode()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        synergyWorkorderServicerLogDO.setCreateTime(new Date()); 
															 | 
															
															 | 
															
																        synergyWorkorderServicerLogDO.setCreateTime(new Date()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        synergyWorkorderServicerLogDO.setWorkorderServiceCode(workorderServicerDO.getCode()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        ManageSynergyWorkorderServicerLogDO workorderServicerLogDO = manageSynergyWorkorderServicerLogDao.save(synergyWorkorderServicerLogDO); 
															 | 
															
															 | 
															
																        ManageSynergyWorkorderServicerLogDO workorderServicerLogDO = manageSynergyWorkorderServicerLogDao.save(synergyWorkorderServicerLogDO); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        User user = userDao.findByCode(userCode); 
															 | 
															
															 | 
															
																        User user = userDao.findByCode(userCode); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        ManageSynergyWorkorderServicerDO workorderServicerDO = workorderServicerDao.findByWorkOrderCodeAndPatientCode1(workorderServicerLogDO.getWorkorderCode(),workorderServicerLogDO.getWorkorderServiceCode()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        workorderServicerDO.setStatus(3); 
															 | 
															
															 | 
															
																        workorderServicerDO.setStatus(3); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        workorderServicerDO.setExecutorCode(user.getCode()); 
															 | 
															
															 | 
															
																        workorderServicerDO.setExecutorCode(user.getCode()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        workorderServicerDO.setExecutorName(user.getName()); 
															 | 
															
															 | 
															
																        workorderServicerDO.setExecutorName(user.getName()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        workorderServicerDO.setExecutorType(2); 
															 | 
															
															 | 
															
																        workorderServicerDO.setExecutorType(2); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        workorderServicerDO.setCompleteTime(new Date()); 
															 | 
															
															 | 
															
																        workorderServicerDO.setCompleteTime(new Date()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        ManageSynergyWorkorderServicerDO workorderServicerDO1 = workorderServicerDao.save(workorderServicerDO); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String sql = "select * from manage_synergy_workorder_servicer where workorder_code = '"+workorderServicerLogDO.getWorkorderCode()+"' and status IN(1,2) AND service_patient_code != '"+workorderServicerDO1.getServicePatientCode()+"'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        List<ManageSynergyWorkorderServicerDO> workorderServicerDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper(ManageSynergyWorkorderServicerDO.class)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if ((workorderServicerDOS == null || workorderServicerDOS.size() == 0)&&workorderServicerDO1.getStatus() ==3){ 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            ManageSynergyWorkorderDO workorderDO = manageSynergyWorkOrderDao.findByCode(workorderServicerLogDO.getWorkorderCode()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            workorderDO.setStatus(3); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            workorderDO.setCompleteTime(new Date()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            manageSynergyWorkOrderDao.save(workorderDO); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        workorderServicerDao.save(workorderServicerDO); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    } 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 |