Sfoglia il codice sorgente

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

# Conflicts:
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/specialist/HopsitalServiceItemController.java
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/specialist/SpecialistHospitalItemService.java
wangzhinan 7 anni fa
parent
commit
bbf7ae018f

+ 20 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/specialist/HopsitalServiceItemController.java

@ -103,4 +103,24 @@ public class HopsitalServiceItemController extends BaseController {
            return error(-1, "查询失败");
        }
    }
    /**
     *  删除机构服务项目
     *
     * @param serviceItem 服务项目id
     * @param hospital 医院code
     * @return
     */
    @RequestMapping(value = "deleteHospitalItem", method = RequestMethod.POST)
    @ResponseBody
    public String delete(@RequestParam(name = "serviceItem",required = false) String serviceItem,
                                    @RequestParam(name = "hospital",required = false) String hospital){
        try {
            return write(200, "删除成功", "data",specialistHospitalItemService.delete(serviceItem,hospital));
        } catch (Exception ex) {
            error(ex);
            return error(-1, "删除失败");
        }
    }
}

+ 8 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/specialist/ServiceItemController.java

@ -2,7 +2,9 @@ package com.yihu.wlyy.controller.manager.specialist;/**
 * Created by nature of king on 2018/8/17.
 */
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.specialist.SpecialistServiceItemDO;
import com.yihu.wlyy.service.manager.specialist.ServiceItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -11,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
 * @author wangzhinan
 * @create 2018-08-17 16:51
@ -78,8 +82,10 @@ public class ServiceItemController  extends BaseController {
                                    @RequestParam(name = "page",defaultValue = "1")Integer page,
                                    @RequestParam(name = "pageSize",defaultValue = "10")Integer pageSize){
        try {
            return write(200, "操作成功", "data",serviceItemService.selectServiceItem(serviceItem,page,pageSize));
            JSONObject jsonObject = serviceItemService.selectServiceItem(serviceItem,page,pageSize);
            String totalCount = String.valueOf(jsonObject.get("totalCount"));
            Long total = Long.parseLong(totalCount);
            return write(200, "操作成功", page,pageSize,total,(List< SpecialistServiceItemDO>)jsonObject.get("detailModelList"));
        } catch (Exception ex) {
            error(ex);
            return error(-1, "操作失败");

+ 250 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/specialist/SpecialistServiceItemDO.java

@ -0,0 +1,250 @@
package com.yihu.wlyy.entity.specialist;/**
 * Created by nature of king on 2018/8/16.
 */
import com.yihu.wlyy.entity.IdEntityWithOperation;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
/**
 * @author wangzhinan
 * @create 2018-08-16 10:16
 * @desc 服务项目
 **/
@Entity
@Table(name = "wlyy_service_item")
public class SpecialistServiceItemDO extends IdEntityWithOperation implements Serializable {
    @Column(name = "saas_id")
    private String saasId; // saasId
    @Column(name = "title")
    private String title; //项目名称
    @Column(name = "content")
    private String content;//项目内涵
    @Column(name = "exclude_content")
    private String excludeContent; // 除去内容
    @Column(name = "description")
    private String description;//说明
    @Column(name = "disease_item")
    private String diseaseItem; //疾病项目
    @Column(name = "reserve")
    private Integer reserve; //是否预约
    @Column(name = "type")
    private Integer type;//完成方式
    @Column(name = "evaluation")
    private Integer evaluation;//项目评价
    @Column(name = "item_type")
    private Integer itemType; //项目类型
    @Column(name = "hospital_grade")
    private Integer hospitalGrade; //医院等级
    @Column(name = "three_hospitals")
    private Integer threeHospitals; //三级医院收费标准
    @Column(name = "two_hospitals")
    private Integer twoHospitals; //二级医院收费标准
    @Column(name = "one_hospitals")
    private Integer oneHospitals;//一级医院以及一级以下的社区医院
    @Column(name = "unit")
    private Integer unit; //计价单位
    @Column(name = "add_item")
    private String addItem;//加收项目
    @Column(name = "imediate")
    private Integer imediate;//立即生效
    @Column(name = "status")
    private Integer status; //删除状态
    @Transient
    public Integer flag;
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "title")
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    @Column(name = "content")
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    @Column(name = "exclude_content")
    public String getExcludeContent() {
        return excludeContent;
    }
    public void setExcludeContent(String excludeContent) {
        this.excludeContent = excludeContent;
    }
    @Column(name = "description")
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    @Column(name = "disease_item")
    public String getDiseaseItem() {
        return diseaseItem;
    }
    public void setDiseaseItem(String diseaseItem) {
        this.diseaseItem = diseaseItem;
    }
    @Column(name = "reserve")
    public Integer getReserve() {
        return reserve;
    }
    public void setReserve(Integer reserve) {
        this.reserve = reserve;
    }
    @Column(name = "type")
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    @Column(name = "evaluation")
    public Integer getEvaluation() {
        return evaluation;
    }
    public void setEvaluation(Integer evaluation) {
        this.evaluation = evaluation;
    }
    @Column(name = "item_type")
    public Integer getItemType() {
        return itemType;
    }
    public void setItemType(Integer itemType) {
        this.itemType = itemType;
    }
    @Column(name = "hospital_grade")
    public Integer getHospitalGrade() {
        return hospitalGrade;
    }
    public void setHospitalGrade(Integer hospitalGrade) {
        this.hospitalGrade = hospitalGrade;
    }
    @Column(name = "three_hospitals")
    public Integer getThreeHospitals() {
        return threeHospitals;
    }
    public void setThreeHospitals(Integer threeHospitals) {
        this.threeHospitals = threeHospitals;
    }
    @Column(name = "two_hospitals")
    public Integer getTwoHospitals() {
        return twoHospitals;
    }
    public void setTwoHospitals(Integer twoHospitals) {
        this.twoHospitals = twoHospitals;
    }
    @Column(name = "one_hospitals")
    public Integer getOneHospitals() {
        return oneHospitals;
    }
    public void setOneHospitals(Integer oneHospitals) {
        this.oneHospitals = oneHospitals;
    }
    @Column(name = "unit")
    public Integer getUnit() {
        return unit;
    }
    public void setUnit(Integer unit) {
        this.unit = unit;
    }
    @Column(name = "add_item")
    public String getAddItem() {
        return addItem;
    }
    public void setAddItem(String addItem) {
        this.addItem = addItem;
    }
    @Column(name = "imediate")
    public Integer getImediate() {
        return imediate;
    }
    public void setImediate(Integer imediate) {
        this.imediate = imediate;
    }
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    @Transient
    public Integer getFlag() {
        return flag;
    }
    public void setFlag(Integer flag) {
        this.flag = flag;
    }
}

+ 18 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/specialist/SpecialistHospitalItemService.java

@ -141,4 +141,22 @@ public class SpecialistHospitalItemService extends BaseService {
        return JSONObject.parseObject(response);
    }
    /**
     * 删除机构服务项目
     */
    public JSONObject delete(String serviceItem,String hospital){
        String response = null;
        String url =getBaseUrl() + "deleteHospitalItem";
        Map<String,String> params = new HashMap<>();
        params.put("hospital",hospital);
        params.put("serviceItem",serviceItem);
        try {
            response = httpClientUtil.httpPost(url,params);
        }catch (Exception e){
            e.printStackTrace();
            logger.error(e.getMessage());
        }
        return JSONObject.parseObject(response);
    }
}