Browse Source

代码修改

huangwenjie 7 năm trước cách đây
mục cha
commit
74185097b2

+ 39 - 0
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/common/util/NumberUtil.java

@ -646,4 +646,43 @@ public class NumberUtil {
        }
        return true;
    }
    
    /**
     * 将分为单位的数额转换为元
     * @param amount
     * @return
     */
    public static String feeToYuan(Integer amount){
        try {
            if(!amount.toString().matches("\\-?[0-9]+"));
        }catch (Exception e) {
            e.printStackTrace();
        }
        int flag = 0;
        String amString = amount.toString();
        if(amString.charAt(0)=='-'){
            flag = 1;
            amString = amString.substring(1);
        }
        StringBuffer result = new StringBuffer();
        if(amString.length()==1){
            result.append("0.0").append(amString);
        }else if(amString.length() == 2){
            result.append("0.").append(amString);
        }else{
            String intString = amString.substring(0,amString.length()-2);
            for(int i=1; i<=intString.length();i++){
                if( (i-1)%3 == 0 && i !=1){
//                    result.append(",");
                }
                result.append(intString.substring(intString.length()-i,intString.length()-i+1));
            }
            result.reverse().append(".").append(amString.substring(amString.length()-2));
        }
        if(flag == 1){
            return "-"+result.toString();
        }else{
            return result.toString();
        }
    }
}

+ 41 - 7
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/service/ChargeZYService.java

@ -3,6 +3,7 @@ package com.yihu.wlyy.sign.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.sign.common.SystemConfig;
import com.yihu.wlyy.sign.common.util.DateUtil;
import com.yihu.wlyy.sign.common.util.NumberUtil;
import com.yihu.wlyy.sign.common.util.StringUtil;
import com.yihu.wlyy.sign.dao.*;
import com.yihu.wlyy.sign.entity.*;
@ -213,13 +214,46 @@ public class ChargeZYService {
                infoobj.put("kfrxm0",sign.getDoctorName());//扣费人
                infoobj.put("kfsj00",charge.getChargeTime());//扣费时间
                infoobj.put("kfzt00",charge.getMiCollectStatus());//扣费状态
                infoobj.put("kfdjh0",charge.getMiSettleNo());//扣费单据号
                infoobj.put("zje000",String.valueOf(charge.getMiTotalFee()));//扣费总额
                infoobj.put("zfbtzf",charge.getCadresPay());//政府补贴支付
                infoobj.put("tcjjzf",charge.getHealthCarePay());//医保统筹支付
                infoobj.put("jkzhzf",charge.getHeathPay());//健康账户支付
                infoobj.put("zhzfe0",charge.getAccountPay());//医保账户支付
                infoobj.put("xjzfe0",charge.getSelfPay());//个人现金自付
                String misettleno = "";
                if(StringUtils.isNotBlank(charge.getMiSettleNo())){
                    misettleno = charge.getMiSettleNo().trim();
                }
                infoobj.put("kfdjh0",misettleno);//扣费单据号
                
                
                infoobj.put("zje000",NumberUtil.feeToYuan(charge.getTotalAmount()));//扣费总额
                
                if(StringUtils.isNotBlank(charge.getCadresPay())){
                    infoobj.put("zfbtzf", NumberUtil.feeToYuan(Integer.parseInt(charge.getCadresPay().trim())));//政府补贴支付
                }else{
                    infoobj.put("zfbtzf","0.00");//政府补贴支付
                }
    
                if(StringUtils.isNotBlank(charge.getHealthCarePay())){
                    infoobj.put("tcjjzf",NumberUtil.feeToYuan(Integer.parseInt(charge.getHealthCarePay().trim())));//医保统筹支付
                }else{
                    infoobj.put("tcjjzf","0.00");//医保统筹支付
                }
    
                if(StringUtils.isNotBlank(charge.getHeathPay())){
                    infoobj.put("jkzhzf",NumberUtil.feeToYuan(Integer.parseInt(charge.getHeathPay().trim())));//健康账户支付
                }else{
                    infoobj.put("jkzhzf","0.00");//健康账户支付
                }
    
                if(StringUtils.isNotBlank(charge.getAccountPay())){
                    infoobj.put("zhzfe0",NumberUtil.feeToYuan(Integer.parseInt(charge.getHeathPay().trim())));//医保账户支付
                }else{
                    infoobj.put("zhzfe0","0.00");//医保账户支付
                }
    
                if(StringUtils.isNotBlank(charge.getSelfPay())){
                    infoobj.put("xjzfe0",NumberUtil.feeToYuan(Integer.parseInt(charge.getSelfPay().trim())));//个人现金自付
                }else{
                    infoobj.put("xjzfe0","0.00");//个人现金自付
                }
                
                jsonObject.put("INSUR_FEE_INFO",infoobj);
    
                System.out.println("开始上传缴费数据:"+jsonObject.toString());

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -926,6 +926,7 @@ public class JMJkEduArticleService extends BaseService {
            heapm.setArticleCover(article.getString("articleCover"));//封面
            heapm.setComputeTime(computeTime(article.getString("insertTime")));
            heapm.setOperatorName(article.getString("operatorName"));
            heapm.setSendType(Integer.valueOf(article.getString("sendType")));//发送类型
            doctor = doctorDao.findByCode(one.getDoctorCode());
            heapm.setPhoto(doctor.getPhoto());
            result.add(heapm);

+ 11 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/vo/HealthEduArticlePatientModel.java

@ -44,7 +44,9 @@ public class HealthEduArticlePatientModel {
    private Integer pointNumber=0;//文章点赞数
    @ApiModelProperty(value = "封面图", required = false, access = "response")
    private String articleCover="";//封面图
    @ApiModelProperty(value = "发送类型", required = false, access = "response")
    private Integer sendType = 0;//发送类型 1医生发送 2卫纪委发送
    
    private String computeTime;//时间
    private String photo;//医生头像
    private String operatorName;//文章作者
@ -192,4 +194,12 @@ public class HealthEduArticlePatientModel {
    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }
    
    public Integer getSendType() {
        return sendType;
    }
    
    public void setSendType(Integer sendType) {
        this.sendType = sendType;
    }
}