wangzhinan пре 1 недеља
родитељ
комит
55c14e8807

+ 21 - 11
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -3677,7 +3677,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            totalSql += " AND e.name like '%" + nameKey + "%' ";
        }
        if (type!=null)  {
            totalSql += " AND e.type ='"+type+"' ";
            totalSql += " AND e.sf_type ='"+type+"' ";
        }
        if (StringUtils.isNotBlank(patientName)) {
            totalSql += " AND o.patient_name like '%" + patientName + "%' ";
@ -3745,7 +3745,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        sql = sql + " e.name as \"name\", " +
                " e.oneself_pickup_flg AS \"oneselfPickupFlg\", " +
                " e.type AS \"type\", " +
                " e.sf_type AS \"type\", " +
                " o.id AS \"outpatientId\", " +
                " o.icd10_name AS \"icd10Name\", " +
                " o.medical_state AS \"medicalState\", " +
@ -11836,7 +11836,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (patientDO==null){
            return PageEnvelop.getError("找不到该患者",-1);
        }
        StringBuffer sql = new StringBuffer(" SELECT DISTINCT b.*, c.oneself_pickup_flg,c.type,f.job_title_code,f.job_title_name  FROM (SELECT a.* FROM wlyy_prescription a left join wlyy_outpatient o ON o.id=a.outpatient_id  WHERE o.consumer = '");
        StringBuffer sql = new StringBuffer(" SELECT DISTINCT b.*, c.oneself_pickup_flg,c.sf_type as \"type\",f.job_title_code,f.job_title_name  FROM (SELECT a.* FROM wlyy_prescription a left join wlyy_outpatient o ON o.id=a.outpatient_id  WHERE o.consumer = '");
        StringBuffer countSql = new StringBuffer("select COUNT(DISTINCT b.id) count FROM (SELECT a.* FROM wlyy_prescription a left join wlyy_outpatient o ON o.id=a.outpatient_id  WHERE o.consumer = '");
        /*if (consumerflag){
            sql.append(" WHERE o.consumer = '");
@ -17222,6 +17222,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (StringUtils.isNoneBlank(sysDictDO.getDictValue())){
            com.alibaba.fastjson.JSONObject obj = com.alibaba.fastjson.JSONObject.parseObject(sysDictDO.getDictValue());
            String amStartStr = DateUtil.getStringDateShort()+" "+obj.getString("amStartDate");
            String sftcFlag = obj.getString("sftcFlag");
            String amEndStr = DateUtil.getStringDateShort()+" "+obj.getString("amEndDate");
            String pmStartStr = DateUtil.getStringDateShort()+" "+obj.getString("pmStartDate");
            String pmEndStr = DateUtil.getStringDateShort()+" "+obj.getString("pmEndDate");
@ -17230,17 +17231,26 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            Date amEndDate = DateUtil.strToDateLong(amEndStr);
            Date pmStartDate = DateUtil.strToDateLong(pmStartStr);
            Date pmEndDate = DateUtil.strToDateLong(pmEndStr);
            if (amStartDate.compareTo(nowDate)<0&&amEndDate.compareTo(nowDate)>0){
                flag = true;
            } else if (pmStartDate.compareTo(nowDate)<0&&pmEndDate.compareTo(nowDate)>0) {
                flag = true;
            if (sftcFlag.equalsIgnoreCase("1")){
                if (amStartDate.compareTo(nowDate)<0&&amEndDate.compareTo(nowDate)>0){
                    flag = true;
                } else if (pmStartDate.compareTo(nowDate)<0&&pmEndDate.compareTo(nowDate)>0) {
                    flag = true;
                }else {
                    flag = false;
                }
                LocalDate today = LocalDate.now();
                int dayOfWeek = today.getDayOfWeek().getValue();
                System.out.println(dayOfWeek+"=====================");
                if (dayOfWeek==6){
                    if (amStartDate.compareTo(nowDate)<0&&amEndDate.compareTo(nowDate)>0){
                        flag = true;
                    }
                }
            }else {
                flag = false;
                flag=false;
            }
        }
        LocalDate today = LocalDate.now();
        int dayOfWeek = today.getDayOfWeek().getValue();
        System.out.println(dayOfWeek+"=====================");
        return flag;
    }

+ 3 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java

@ -1636,8 +1636,9 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            invoice.put("unit", mxDO.getChargeUnit());//单位
            invoice.put("specType", mxDO.getSpecificationType());//规格型号
            invoice.put("tax", 0);//
            invoice.put("favouredPolicyFlag","03");//优惠政策标识:0,不使用;1,使用;数电票时简易征收 02:稀土03:免税04:不征税 05:先征后退 06:100%先征后退 07:50%先征后退 08: 按 3%简易征收09:按5%简易征收 10: 按5% 简易征收减按1.5%计征11: 即征即退 30% 12: 即征即退 50% 13:即征即退 70%14 :即征即退 100%15:超税负 3%即征即退超税负 8%即征即退 17:超6:税负 12%即征即退 18:超税负 6%即征即退
            invoice.put("zeroRateFlag", 3);//
            invoice.put("favouredPolicyFlag","1");//优惠政策标识:0,不使用;1,使用;数电票时简易征收 02:稀土03:免税04:不征税 05:先征后退 06:100%先征后退 07:50%先征后退 08: 按 3%简易征收09:按5%简易征收 10: 按5% 简易征收减按1.5%计征11: 即征即退 30% 12: 即征即退 50% 13:即征即退 70%14 :即征即退 100%15:超税负 3%即征即退超税负 8%即征即退 17:超6:税负 12%即征即退 18:超税负 6%即征即退
            invoice.put("favouredPolicyName","免税");
            invoice.put("zeroRateFlag", 1);//
            invoice.put("deduction", 0);
            array.add(invoice);
        }

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/util/SFUtils.java

@ -3,6 +3,7 @@ package com.yihu.jw.hospital.prescription.service.entrance.util;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.cronutils.utils.DateUtils;
import com.sfjswl.util.SftcwlSignature;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionExpressageDO.java

@ -350,7 +350,7 @@ public class WlyyPrescriptionExpressageDO extends UuidIdentityEntity {
        this.bspOrderNo = bspOrderNo;
    }
    @Column(name = "type")
    @Column(name = "sf_type")
    public Integer getType() {
        return type;
    }