Jelajahi Sumber

Merge branch '2.0' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into 2.0

LAPTOP-KB9HII50\70708 2 tahun lalu
induk
melakukan
9b357d8cb2

+ 81 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/MlwyyPrescriptionService.java

@ -0,0 +1,81 @@
package com.yihu.jw.hospital.prescription.service;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.service.entrance.MlwyyEntranceService;
import com.yihu.jw.mysql.query.BaseJpaService;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import net.sf.json.JSON;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class MlwyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO, PrescriptionDao> {
    private static final Logger logger = LoggerFactory.getLogger(MlwyyPrescriptionService.class);
    @Autowired
    private BasePatientMedicareCardDao patientMedicareCardDao;
    @Autowired
    private BasePatientDao basePatientDao;
    @Autowired
    private MlwyyEntranceService mlwyyEntranceService;
    public JSONArray findPatientCardList(String patientId) throws Exception {
        patientMedicareCardDao.deleteByPatientId(patientId);
        net.sf.json.JSONArray array =findPatientCard(patientId);
        for (int i=0;i<array.size();i++){
            net.sf.json.JSONObject object = array.getJSONObject(i);
            String cardType = object.getString("CARD_TYPE");
            String cardNo = object.getString("CARD_NO");
            String cardTypeName = object.getString("CARD_TYPE_NAME");
            PatientMedicareCardDO patientMedicareCardDO = new PatientMedicareCardDO();
            patientMedicareCardDO.setCode(cardNo);
            patientMedicareCardDO.setParentType("A");
            if (cardType.equalsIgnoreCase("2")){
                patientMedicareCardDO.setType("A_01");
            }else {
                patientMedicareCardDO.setType("A_03");
            }
            patientMedicareCardDO.setPatientCode(patientId);
            patientMedicareCardDO.setOrgCode("350211A1002");
            patientMedicareCardDO.setCityCode("350200");
            patientMedicareCardDO.setDel("1");
            patientMedicareCardDO.setRemark(cardTypeName);
            patientMedicareCardDao.save(patientMedicareCardDO);
        }
        return array;
    }
    /**
     * 获取卡记录
     *
     * @param patient
     * @return
     * @throws Exception
     */
    public JSONArray findPatientCard(String patient) throws Exception {
        JSONArray rs =new JSONArray();
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("PAT_NO","P5616242-0");
        jsonObject.put("CARD_NO","D40136791");
        jsonObject.put("CARD_STAT","激活");
        jsonObject.put("OP_DATE","2011-09-27 15:35:57");
        jsonObject.put("CARD_TYPE","2");
        jsonObject.put("CARD_TYPE_NAME","社保卡");
        jsonObject.put("social_no","350211198411053024");
        jsonObject.put("name","白海灵");
        rs.add(jsonObject);
        return rs;
    }
}

+ 9 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/MlwyyEntranceService.java

@ -0,0 +1,9 @@
package com.yihu.jw.hospital.prescription.service.entrance;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class MlwyyEntranceService {
}

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/suggest/service/BaseSuggestionDictService.java

@ -154,7 +154,7 @@ public class BaseSuggestionDictService extends BaseJpaService<BaseSuggestionDict
     */
    public MixEnvelop findByNameAndDes(String name, String des, Integer page, Integer pageSize){
        String sql = "select t.id as\"id\",t.suggest_name as\"suggestName\",t.suggest_describe as\"suggestDescribe\"," +
                "t.is_del as\"isDel\",t.is_sort as\"isSort\",t.create_time as\"createTime\",t.update_time as \"updateTime\"" +
                "t.is_del as\"isDel\",t.is_sort as\"isSort\",DATE_FORMAT(t.create_time,'%Y-%m-%d %H:%i:%S') as\"createTime\",DATE_FORMAT(t.update_time,'%Y-%m-%d %H:%i:%S') as \"updateTime\"" +
                " from base_suggestions_dict t where 1=1 and t.is_del = 1";
        if(StringUtils.isNotEmpty(name)){
            sql+=" and t.suggest_name like '%"+name+"%'";

+ 5 - 1
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -184,7 +184,11 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
        }
        sql+="ORDER BY\n" +
                "\tcreate_time DESC";
        String countSql = "select count(id) from base_patient where name like '%" + param + "%' or idcard like '%" + param + "%'";
        String condition ="";
        if (StringUtils.isNoneBlank(param)){
            condition = "where name like '%" + param + "%' or idcard like '%" + param + "%'";
        }
        String countSql = "select count(id) from base_patient "+condition;
        Long count  = jdbcTemplate.queryForObject(countSql,Long.class);
        if(count <= 0){
            return null;

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -257,7 +257,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.findDoctorByHospitalAndDiseaseAndDept)
    @ApiOperation(value = "根据疾病名称,热门部门查询医生", notes = "根据疾病名称,热门部门查询医生")
    public MixEnvelop findDoctorByHospitalAndDiseaseAndDept(@ApiParam(name = "iswork", value = "是否过滤排班,1是")
                                                             @RequestParam(value = "iswork", required = true)String iswork,
                                                             @RequestParam(value = "iswork", required = false)String iswork,
                                                            @ApiParam(name = "orgCode", value = "机构code")
                                                             @RequestParam(value = "orgCode", required = true,defaultValue = "350211A1002")String orgCode,
                                                            @ApiParam(name = "patientid", value = "patientid")

+ 6 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -142,6 +142,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
    @Autowired
    private HcyyPrescriptionService hcyyPrescriptionService;
    @Autowired
    private MlwyyEntranceService mlwyyEntranceService;
    @Value("${qywx.id}")
    private String qywxId;
@ -166,6 +168,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    private YkyyService ykyyService;
    @Autowired
    private QrcodeService qrcodeService;
    @Autowired
    private MlwyyPrescriptionService mlwyyPrescriptionService;
    @PostMapping(value = "updPrescriptionExpressage")
    @ApiOperation(value = "修改续方收货信息")
@ -436,6 +440,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                return success(jsonArray);
            } else if ("xm_tasy_wx".equalsIgnoreCase(wxId)) {
                return success(tasyNatService.findPatientCard(patient));
            }else if ("xm_mlwyy_wx".equalsIgnoreCase(wxId)){
                return success(mlwyyPrescriptionService.findPatientCardList(patient));
            } else {
                return ListEnvelop.getError("暂未开放");
            }