Browse Source

我的家庭模块代码提交

liuwenbin 6 years ago
parent
commit
08582ac92f

+ 1 - 4
svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/servicepackage/PackageServiceEndpoint.java

@ -6,8 +6,6 @@ import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageItemDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import com.yihu.jw.patient.service.service_package.PackageService;
import com.yihu.jw.restmodel.base.dict.DictHospitalDeptVO;
import com.yihu.jw.restmodel.base.doctor.BaseDoctorSimpleVO;
import com.yihu.jw.restmodel.base.org.BaseOrgVO;
@ -22,7 +20,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
@ -37,7 +34,7 @@ import java.util.List;
public class PackageServiceEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private PackageService packageService;
    private com.yihu.jw.patient.service.service_package.PackageService packageService;
    @GetMapping(value= PatientRequestMapping.SignPackage.findPackageService)
    @ApiOperation(value = "获取服务包", notes = "获取服务包")

+ 19 - 1
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/myFamily/MyFamilyService.java

@ -40,6 +40,8 @@ public class MyFamilyService {
    private PatientApplyLogService patientApplyLogService;
    @Autowired
    private BasePatientMedicardCardService  patientMedicareCardService;
    @Autowired
//    private com.yihu.jw.patient.service.service_package.PackageService packageService;
    LinkedList<String> role = new LinkedList<>(Arrays.asList("配偶","父亲","母亲","公公","婆婆","岳父","岳母","女婿","儿媳","子女"));
    public List<Map<String,Object>> getMyFamilyBindingRole(String patient) throws Exception{
@ -242,7 +244,7 @@ public class MyFamilyService {
     * @return
     * @throws Exception
     */
    public List<Map<String,Object>> getBindingList(String patient) throws Exception{
    public List<Map<String,Object>> getBindingList(String patient,String packageId) throws Exception{
        List<Map<String,Object>> resultList = new LinkedList<>();
        List<BasePatientFamilyMemberDO> list = patientFamilyMemberService.getByPatientAndFamilyMember(patient);
        String patientTemp = null;
@ -262,6 +264,14 @@ public class MyFamilyService {
            map.put("principalNum","");//社保卡号
        }
        map.put("mobile",basePatientDO.getMobile());//手机号码
        if(StringUtils.isEmpty(packageId)){
            if(packageService.findPatientSignExist(patient,packageId)){
                map.put("isPackage",1);
            }else{
                map.put("isPackage",0);
            }
        }
        resultList.add(map);
        //家人
        for(BasePatientFamilyMemberDO one:list){
@ -285,6 +295,14 @@ public class MyFamilyService {
                map2.put("principalNum","");//社保卡号
            }
            map2.put("mobile",basePatientDO.getMobile());//手机号码
            if(StringUtils.isEmpty(packageId)){
                if(packageService.findPatientSignExist(patient,packageId)){
                    map2.put("isPackage",1);
                }else{
                    map2.put("isPackage",0);
                }
            }
            resultList.add(map2);
        }
        return resultList;

+ 6 - 0
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/myFamily/PatientApplyLogService.java

@ -51,4 +51,10 @@ public class PatientApplyLogService extends BaseJpaService<PatientApplyLog, Pati
        String sql = "select l.* from patient_apply_for_log l where l.create_user='"+patient+"' and l.del=1 and l.status in (1,2) and l.failure_time>="+ DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss");
        return jdbcTemplate.queryForList(sql);
    }
    //invalid 无效 valid 有效
    public List<Map<String, Object>> findInvalidByPatient(String patient){
        String sql = "select l.* from patient_apply_for_log l where l.create_user='"+patient+"' and l.del=1 and (l.status in (4,5) or (l.failure_time>='"+ DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss")+"' and l.status in (1,2)))";
        return jdbcTemplate.queryForList(sql);
    }
}