Explorar el Código

新增动态菜单

chenweida hace 7 años
padre
commit
f324a686bf

+ 130 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/dict/DmExpressagePriceEntity.java

@ -0,0 +1,130 @@
package com.yihu.wlyy.entity.dict;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 快递价目表
 */
@Entity
@Table(name = "dm_expressage_price", schema = "wlyy", catalog = "")
public class DmExpressagePriceEntity extends IdEntity {
    private String code;
    private String startAddressName;
    private String endAddressName;
    private Integer firstWeight;
    private Integer firstWeightPrice;
    private Integer continueWeight;
    private Integer continueWeightPrice;
    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    @Basic
    @Column(name = "start_address_name")
    public String getStartAddressName() {
        return startAddressName;
    }
    public void setStartAddressName(String startAddressName) {
        this.startAddressName = startAddressName;
    }
    @Basic
    @Column(name = "end_address_name")
    public String getEndAddressName() {
        return endAddressName;
    }
    public void setEndAddressName(String endAddressName) {
        this.endAddressName = endAddressName;
    }
    @Basic
    @Column(name = "first_weight")
    public Integer getFirstWeight() {
        return firstWeight;
    }
    public void setFirstWeight(Integer firstWeight) {
        this.firstWeight = firstWeight;
    }
    @Basic
    @Column(name = "first_weight_price")
    public Integer getFirstWeightPrice() {
        return firstWeightPrice;
    }
    public void setFirstWeightPrice(Integer firstWeightPrice) {
        this.firstWeightPrice = firstWeightPrice;
    }
    @Basic
    @Column(name = "continue_weight")
    public Integer getContinueWeight() {
        return continueWeight;
    }
    public void setContinueWeight(Integer continueWeight) {
        this.continueWeight = continueWeight;
    }
    @Basic
    @Column(name = "continue_weight_price")
    public Integer getContinueWeightPrice() {
        return continueWeightPrice;
    }
    public void setContinueWeightPrice(Integer continueWeightPrice) {
        this.continueWeightPrice = continueWeightPrice;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DmExpressagePriceEntity that = (DmExpressagePriceEntity) o;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (code != null ? !code.equals(that.code) : that.code != null) return false;
        if (startAddressName != null ? !startAddressName.equals(that.startAddressName) : that.startAddressName != null)
            return false;
        if (endAddressName != null ? !endAddressName.equals(that.endAddressName) : that.endAddressName != null)
            return false;
        if (firstWeight != null ? !firstWeight.equals(that.firstWeight) : that.firstWeight != null) return false;
        if (firstWeightPrice != null ? !firstWeightPrice.equals(that.firstWeightPrice) : that.firstWeightPrice != null)
            return false;
        if (continueWeight != null ? !continueWeight.equals(that.continueWeight) : that.continueWeight != null)
            return false;
        if (continueWeightPrice != null ? !continueWeightPrice.equals(that.continueWeightPrice) : that.continueWeightPrice != null)
            return false;
        return true;
    }
    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (startAddressName != null ? startAddressName.hashCode() : 0);
        result = 31 * result + (endAddressName != null ? endAddressName.hashCode() : 0);
        result = 31 * result + (firstWeight != null ? firstWeight.hashCode() : 0);
        result = 31 * result + (firstWeightPrice != null ? firstWeightPrice.hashCode() : 0);
        result = 31 * result + (continueWeight != null ? continueWeight.hashCode() : 0);
        result = 31 * result + (continueWeightPrice != null ? continueWeightPrice.hashCode() : 0);
        return result;
    }
}

+ 19 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/dict/DmExpressagePriceDao.java

@ -0,0 +1,19 @@
package com.yihu.wlyy.repository.dict;
import com.yihu.wlyy.entity.dict.DmExpressagePriceEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * 快递费用
 * @author huangwenjie 2017.08.03
 */
public interface DmExpressagePriceDao extends
        PagingAndSortingRepository<DmExpressagePriceEntity, Long>,
        JpaSpecificationExecutor<DmExpressagePriceEntity> {
    @Query("from DmExpressagePriceEntity where code = ?1 and endAddressName LIKE ?2 ")
    DmExpressagePriceEntity getExprePriceEntityByCodeAndEndAdressName(String code,String end_address_name);
}

+ 15 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionReviewedDao.java

@ -0,0 +1,15 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionReviewed;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Trick on 2017/8/4.
 */
public interface PrescriptionReviewedDao extends PagingAndSortingRepository<PrescriptionReviewed, Long>, JpaSpecificationExecutor<PrescriptionReviewed> {
    @Query("select p from PrescriptionReviewed p where p.prescriptionCode=?1")
    PrescriptionReviewed findByPrescriptionCode(String prescriptionCode);
}

+ 93 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java

@ -0,0 +1,93 @@
package com.yihu.wlyy.service.third.jw;
import com.yihu.wlyy.util.HttpClientUtil;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
 * 基位长处方接口
 * Created by yeshijie on 2017/8/3.
 */
@Service
public class JwPrescriptionService {
    //基卫服务地址
    @Value("${sign.check_upload}")
    private String jwUrl;
    @Autowired
    private HttpClientUtil httpClientUtil;
    /**
     * 获取字典列表
     * @param dictName
     * @return
     * @throws Exception
     */
    public String getDictForI(String dictName) throws Exception{
        String url = jwUrl + "/third/prescription/getDictForI";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("dictName", dictName));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    public String getRecipeTemplate(String dictName) throws Exception{
        String url = jwUrl + "/third/prescription/getRecipeTemplate";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("dictName", dictName));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    public String getLastRecipe(String dictName) throws Exception{
        String url = jwUrl + "/third/prescription/getLastRecipe";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("dictName", dictName));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    public String saveRecipe(String dictName) throws Exception{
        String url = jwUrl + "/third/prescription/saveRecipe";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("dictName", dictName));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    public String getDispUnSettleFeeList(String dictName) throws Exception{
        String url = jwUrl + "/third/prescription/getDispUnSettleFeeList";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("dictName", dictName));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    public String executeSickSettle(String dictName) throws Exception{
        String url = jwUrl + "/third/prescription/executeSickSettle";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("dictName", dictName));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
}