|
@ -3,13 +3,13 @@ package com.yihu.jw.care.service.patient;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.jw.care.dao.label.PatientLabelDao;
|
|
|
import com.yihu.jw.care.dao.label.WlyyPatientLabelDao;
|
|
|
import com.yihu.jw.care.service.common.DictService;
|
|
|
import com.yihu.jw.care.service.sign.ServicePackageService;
|
|
|
import com.yihu.jw.care.util.ConstantUtil;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
|
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
|
|
|
import com.yihu.jw.entity.care.label.PatientLabelDO;
|
|
|
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
|
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
|
import com.yihu.jw.patient.service.BasePatientMedicardCardService;
|
|
|
import com.yihu.jw.restmodel.web.PageEnvelop;
|
|
@ -49,7 +49,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
|
@Autowired
|
|
|
private ServicePackageService servicePackageService;
|
|
|
@Autowired
|
|
|
private PatientLabelDao patientLabelDao;
|
|
|
private WlyyPatientLabelDao patientLabelDao;
|
|
|
@Autowired
|
|
|
private DictService dictService;
|
|
|
|
|
@ -176,9 +176,9 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
|
public void updPatientLabel(String jsonData,String patientId) throws Exception{
|
|
|
patientLabelDao.deleteByPatient(patientId);
|
|
|
JSONArray jsonArray = JSON.parseArray(jsonData);
|
|
|
List<PatientLabelDO> labelDOList = new ArrayList<>();
|
|
|
List<WlyyPatientLabelDO> labelDOList = new ArrayList<>();
|
|
|
for (int i=0;i<jsonArray.size();i++){
|
|
|
PatientLabelDO labelDO = JSONObject.parseObject(jsonArray.getJSONObject(i).toJSONString(), PatientLabelDO.class);
|
|
|
WlyyPatientLabelDO labelDO = JSONObject.parseObject(jsonArray.getJSONObject(i).toJSONString(), WlyyPatientLabelDO.class);
|
|
|
labelDO.setPatient(patientId);
|
|
|
labelDO.setCzrq(new Date());
|
|
|
labelDOList.add(labelDO);
|