<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/controller/AppHistoryController.java<|end_filename|>
package com.neu.his.cloud.api.app.controller;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.app.AppCheckTestResult;
import com.neu.his.cloud.api.app.dto.app.AppDeptDescriptionResult;
import com.neu.his.cloud.api.app.dto.app.AppDrugItemResult;
import com.neu.his.cloud.api.app.dto.app.AppHistoryRegResult;
import com.neu.his.cloud.api.app.dto.dms.DmsRegHistoryResult;
import com.neu.his.cloud.api.app.service.bms.BmsFeeQueryService;
import com.neu.his.cloud.api.app.service.dms.DmsNonDrugItemRecordService;
import com.neu.his.cloud.api.app.service.dms.DmsRegistrationService;
import com.neu.his.cloud.api.app.service.sms.SmsDescriptionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@Controller
@Api(tags = "AppHistoryController", description = "APP 挂号历史信息管理")
@RequestMapping("/appRegHistory")
//@CrossOrigin(allowCredentials = "true")
public class AppHistoryController {

    @Autowired
    private DmsRegistrationService dmsRegistrationService;

    @Autowired
    private BmsFeeQueryService bmsFeeQueryService;

    @Autowired
    private DmsNonDrugItemRecordService dmsNonDrugItemRecordService;

    @Autowired
    private SmsDescriptionService smsDescriptionService;


    @HystrixCommand(fallbackMethod = "listAllRegistrationFallbackInfo")
    @ApiOperation("查询历史挂号信息")
    @RequestMapping(value = "/listAllRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsRegHistoryResult>> listAllRegistration(@RequestParam("identificationNo") String identificationNo){
        return  dmsRegistrationService.listAllRegistration(identificationNo);
    }
    private CommonResult<List<DmsRegHistoryResult>> listAllRegistrationFallbackInfo( String identificationNo){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listFeeFallbackInfo")
    @ApiOperation("查询某次挂号费用（大项）")
    @RequestMapping(value = "/listFee", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppHistoryRegResult>> listFee(@RequestParam("registrationId") Long registrationId){
        return bmsFeeQueryService.listFee(registrationId);
    }
    private CommonResult<List<AppHistoryRegResult>> listFeeFallbackInfo(Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listFeeDetailFallbackInfo")
    @ApiOperation("查询某次挂号费用（小项）")
    @RequestMapping(value = "/listDetail", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppDrugItemResult>> listFeeDetail(@RequestParam("prescriptionId") Long prescriptionId ,
                                                               @RequestParam("type") int type){
       return bmsFeeQueryService.listFeeDetail(prescriptionId,type);
    }
    private CommonResult<List<AppDrugItemResult>> listFeeDetailFallbackInfo(Long prescriptionId ,int type){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "getResultFallbackInfo")
    @ApiOperation("查询检查检验结果")
    @RequestMapping(value = "/getResult", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<AppCheckTestResult> getResult(@RequestParam("id") Long id){
       return dmsNonDrugItemRecordService.getResult(id);
    }
    private CommonResult<AppCheckTestResult> getResultFallbackInfo(Long id){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "getDeptDescriptionFallbackInfo")
    @ApiOperation("查询所有科室描述")
    @RequestMapping(value = "/getDeptDescription", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppDeptDescriptionResult>> getDeptDescription(){
        return smsDescriptionService.getDeptDescription();
    }
    private CommonResult<List<AppDeptDescriptionResult>> getDeptDescriptionFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsDiseService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsDiseParam;
import com.neu.his.common.dto.dms.DmsDiseResult;

import java.util.List;

/**
 * 诊断
 */
public interface DmsDiseService {
    /**
     * 描述：新增一个诊断
     */
    int create(DmsDiseParam dmsDiseParam);
    /**
     * 描述：根据ids删除诊断
     */
    int delete(List<Long> ids);
    /**
     * 描述：根据id更新诊断
     */
    int update(Long id, DmsDiseParam dmsDiseParam);
    /**
     * 描述：查询诊断
     */
    List<DmsDiseResult> select(DmsDiseParam dmsDiseParam, Integer pageSize, Integer pageNum);
    /**
     * 描述：查询所有诊断
     */
    List<DmsDiseResult> selectAll();
    /**
     * 描述：根据id串获取诊断简单对象list
     */
    List<DmsDiseResult> parseList( String idsStr);
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/sms/SmsDeptAmountStatisticsResult.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.sms;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Setter
@Getter
@ToString
public class SmsDeptAmountStatisticsResult  implements Serializable {
    List<String> dateOfSevenDays;

    List<String> amountCat;

    List<BigDecimal> medicineAmount;

    List<BigDecimal> herbalAmount;

    List<BigDecimal> checkAmount;

    List<BigDecimal> testAmount;

    List<BigDecimal> dispositionAmount;

    List<BigDecimal> executedAmount;
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsDrugStoreService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsRefundDrugListParam;
import com.neu.his.cloud.service.dms.dto.pms.PmsDrugStorePatientListResult;


import java.util.Date;

/**
 * 药房
 */
public interface DmsDrugStoreService {

    /**
     * 描述：列出患者
     */
    PmsDrugStorePatientListResult listPatient(Date date, String medicalRecordNo, Integer type);

    /**
     * 描述：发药
     */
    int releaseDrug(Long prescriptionId, Integer type);

    /**
     * 描述：退药
     */
    int refundDrug(DmsRefundDrugListParam dmsRefundDrugListParam);

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/model/SmsDescription.java<|end_filename|>
package com.neu.his.cloud.service.sms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;

public class SmsDescription implements Serializable {
    private Long id;

    private String description;

    private Integer type;

    private Integer status;

    private String url;

    private Long theId;

    private BigDecimal star;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Long getTheId() {
        return theId;
    }

    public void setTheId(Long theId) {
        this.theId = theId;
    }

    public BigDecimal getStar() {
        return star;
    }

    public void setStar(BigDecimal star) {
        this.star = star;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", description=").append(description);
        sb.append(", type=").append(type);
        sb.append(", status=").append(status);
        sb.append(", url=").append(url);
        sb.append(", theId=").append(theId);
        sb.append(", star=").append(star);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/domain/QueueEnum.java<|end_filename|>
package com.neu.his.cloud.service.dms.domain;

import lombok.Getter;

@Getter
public enum QueueEnum {
    /**
     * 消息通知队列
     */
    QUEUE_ORDER_CANCEL("his.order.direct", "his.order.cancel", "his.order.cancel"),
    /**
     * 消息通知ttl队列
     */
    QUEUE_TTL_ORDER_CANCEL("his.order.direct.ttl", "his.order.cancel.ttl", "his.order.cancel.ttl");

    /**
     * 交换名称
     */
    private String exchange;
    /**
     * 队列名称
     */
    private String name;
    /**
     * 路由键
     */
    private String routeKey;

    QueueEnum(String exchange, String name, String routeKey) {
        this.exchange = exchange;
        this.name = name;
        this.routeKey = routeKey;
    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/service/sms/SmsRoleService.java<|end_filename|>
package com.neu.his.cloud.zuul.service.sms;

import com.neu.his.cloud.zuul.model.SmsPermission;
import com.neu.his.cloud.zuul.model.SmsStaff;

import java.util.List;

/**
 * @author Zain
 * @title: SmsRoleService
 * @projectName his-cloud
 * @description: TODO
 * @date 2019/6/17 14:20
 */
public interface SmsRoleService {

    /**
     * 描述:根据角色Id查询角色的权限
     * <p>author: 赵煜
     */
    List<SmsPermission> getPermissionList(Long roleId);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/service/sms/SmsStaffService.java<|end_filename|>
package com.neu.his.cloud.zuul.service.sms;

import com.neu.his.cloud.zuul.dto.sms.SmsStaffParam;
import com.neu.his.cloud.zuul.model.SmsStaff;

public interface SmsStaffService {

    /**
     * 描述: 根据username查询员工(名字精确查询)
     * <p>author: 赵煜
     */
    SmsStaff selectByUserName(String username);

    String test();

    /**
     * 描述：登录功能
     * <p>author: 赵煜
     * <p>return 生成的JWT的token
     */
    String login(String username, String password);


    /**
     * 描述：注册功能 ---替换create
     */
    SmsStaff register(SmsStaffParam smsStaffParam);


}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/model/DmsHerbalModelItem.java<|end_filename|>
package com.neu.his.cloud.service.sms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;

public class DmsHerbalModelItem implements Serializable {
    private Long id;

    private Integer status;

    private String footnote;

    private Long drugId;

    private Long usageNum;

    private Integer usageNumUnit;

    private Long modelId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getFootnote() {
        return footnote;
    }

    public void setFootnote(String footnote) {
        this.footnote = footnote;
    }

    public Long getDrugId() {
        return drugId;
    }

    public void setDrugId(Long drugId) {
        this.drugId = drugId;
    }

    public Long getUsageNum() {
        return usageNum;
    }

    public void setUsageNum(Long usageNum) {
        this.usageNum = usageNum;
    }

    public Integer getUsageNumUnit() {
        return usageNumUnit;
    }

    public void setUsageNumUnit(Integer usageNumUnit) {
        this.usageNumUnit = usageNumUnit;
    }

    public Long getModelId() {
        return modelId;
    }

    public void setModelId(Long modelId) {
        this.modelId = modelId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", status=").append(status);
        sb.append(", footnote=").append(footnote);
        sb.append(", drugId=").append(drugId);
        sb.append(", usageNum=").append(usageNum);
        sb.append(", usageNumUnit=").append(usageNumUnit);
        sb.append(", modelId=").append(modelId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/EsDiseService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.dms.model.EsDise;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * 诊断搜索（ES）
 */
public interface EsDiseService {
    /**
     * 描述：从数据库中导入所有疾病到ES
     */
    int importAll();

    /**
     * 描述：根据id删除疾病
     */
    void delete(Long id);

    /**
     * 描述：根据id创建疾病
     */
    EsDise create(Long id);

    /**
     * 描述：批量删除疾病
     */
    void delete(List<Long> ids);

    /**
     * 描述：根据关键字搜索
     */
    Page<EsDise> search(String keyword, Integer pageNum, Integer pageSize);

    /**
     * 描述：根据关键字模糊搜索
     */
    Page<EsDise> searchFuzzy(String keyword, Integer pageNum, Integer pageSize);
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/controller/SmsEchartsController.java<|end_filename|>
package com.neu.his.cloud.service.sms.controller;


import com.neu.his.cloud.service.sms.common.CommonResult;
import com.neu.his.cloud.service.sms.dto.sms.SmsDeptAmountStatisticsResult;
import com.neu.his.cloud.service.sms.dto.sms.SmsPatientsStatisticsResult;
import com.neu.his.cloud.service.sms.dto.sms.SmsStaffAmountStatisticsResult;
import com.neu.his.cloud.service.sms.service.SmsEchartsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "SmsEchartsController", description = "图表统计")
@RequestMapping("/charts")
@CrossOrigin(allowCredentials = "true")
public class SmsEchartsController {
    @Autowired
    private SmsEchartsService smsEchartsService;

    @ApiOperation(value = "统计个人每日接待患者人数（近7日）")
    @RequestMapping(value = "/staffPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> staffPatients(@RequestParam Long staffId) {
        SmsPatientsStatisticsResult smsPatientsStatisticsResult = smsEchartsService.staffPatients(staffId);
        return CommonResult.success(smsPatientsStatisticsResult);
    }

    @ApiOperation(value = "统计个人每日分类收费信息（近7日）")
    @RequestMapping(value = "/staffClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsStaffAmountStatisticsResult> staffClassifyStatistics(@RequestParam Long staffId) {
        SmsStaffAmountStatisticsResult smsStaffAmountStatisticsResult = smsEchartsService.staffClassifyStatistics(staffId);
        return CommonResult.success(smsStaffAmountStatisticsResult);
    }

    @ApiOperation(value = "统计各科室每日接待患者人数（近7日）")
    @RequestMapping(value = "/deptPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> deptPatients(@RequestParam Long deptId) {
        SmsPatientsStatisticsResult smsPatientsStatisticsResult = smsEchartsService.deptPatients(deptId);
        return CommonResult.success(smsPatientsStatisticsResult);
    }

    @ApiOperation(value = "统计各科室每日分类收费信息（近7日）")
    @RequestMapping(value = "/deptClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsDeptAmountStatisticsResult> deptClassifyStatistics(@RequestParam Long deptId) {
        SmsDeptAmountStatisticsResult smsDeptAmountStatisticsResult = smsEchartsService.deptClassifyStatistics(deptId);
        return CommonResult.success(smsDeptAmountStatisticsResult);
    }

    @ApiOperation(value = "统计全院每日接待患者人数（近7日）")
    @RequestMapping(value = "/totalClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsDeptAmountStatisticsResult> totalClassifyStatistics() {
        SmsDeptAmountStatisticsResult smsDeptAmountStatisticsResult = smsEchartsService.totalClassifyStatistics();
        return CommonResult.success(smsDeptAmountStatisticsResult);
    }

    @ApiOperation(value = "统计全院每日分类收费信息（近7日）")
    @RequestMapping(value = "/totalPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> totalPatients() {
        SmsPatientsStatisticsResult smsPatientsStatisticsResult = smsEchartsService.totalPatients();
        return CommonResult.success(smsPatientsStatisticsResult);
    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsRegistrationParam.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
@ToString

public class DmsRegistrationParam  implements Serializable {

    @ApiModelProperty(value = "排班id")
    private Long skdId;

    @ApiModelProperty(value = "是否需要病历本")
    private Integer needBook;

    @ApiModelProperty(value = "科室id")
    private Long deptId;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "就诊日期")
    private Date attendanceDate;

    @ApiModelProperty(value = "姓名")
    private String name;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "出生日期")
    private Date dateOfBirth;

    @ApiModelProperty(value = "身份证号")
    private String identificationNo;

    @ApiModelProperty(value = "家庭住址")
    private String homeAddress;

    @ApiModelProperty(value = "电话号码")
    private String phoneNo;

    @ApiModelProperty(value = "性别")
    private Integer gender;

    @ApiModelProperty(value = "病历号")
    private String medicalRecordNo;

    @ApiModelProperty(value = "结算类别id")
    private Long settlementCatId;

    @ApiModelProperty(value = "应收金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "发票号")
    private Long invoiceNo;

    @ApiModelProperty(value = "操作员id")
    private Long opratorId;


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/sms/SmsPermissionResult.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.sms;


import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
@ToString
public class SmsPermissionResult  implements Serializable {
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "父权限Id")
    private Long pid;
    @ApiModelProperty(value = "权限名")
    private String name;
    @ApiModelProperty(value = "值")
    private String value;
    @ApiModelProperty(value = "权限url")
    private String url;
    @ApiModelProperty(value = "权限状态")
    private Integer status;
    @ApiModelProperty(value = "权限创建时间")
    private Date createTime;
    @ApiModelProperty(value = "排序号")
    private Integer sort;
    @ApiModelProperty(value = "权限类别")
    private Integer type;
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/dto/sms/SmsFrequentUsedResult.java<|end_filename|>
package com.neu.his.cloud.service.sms.dto.sms;

import com.neu.his.cloud.service.sms.dto.dms.DmsDrugResult;
import com.neu.his.cloud.service.sms.dto.dms.DmsNonDrugResult;
import com.neu.his.cloud.service.sms.model.DmsDise;
import com.neu.his.cloud.service.sms.model.DmsDrug;
import com.neu.his.cloud.service.sms.model.DmsNonDrug;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class SmsFrequentUsedResult  implements Serializable {

    @ApiModelProperty(value = "常用项id")
    private Long id;
    @ApiModelProperty(value = "所属用户id")
    private Long staffId;

    @ApiModelProperty(value = "检查项列表")
    private List<DmsNonDrugResult> checkList;
    @ApiModelProperty(value = "处置项列表")
    private List<DmsNonDrugResult> dispositionList;
    @ApiModelProperty(value = "检验项列表")
    private List<DmsNonDrugResult> testList;
    @ApiModelProperty(value = "西医诊断列表")
    private List<DmsDise> medicineDiseList;
    @ApiModelProperty(value = "中医诊断列表")
    private List<DmsDise> herbalDiseList;
    @ApiModelProperty(value = "药品列表")
    private List<DmsDrugResult> drugList;


    @ApiModelProperty(value = "检查模板id列表")
    private List<Long> checkModelIdList;
    @ApiModelProperty(value = "处置模板id列表")
    private List<Long> dispositionModelIdList;
    @ApiModelProperty(value = "检验模板id列表")
    private List<Long> testModelIdList;
    @ApiModelProperty(value = "药品模板id列表")
    private List<Long> drugModelIdList;






}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/model/DmsCaseModel.java<|end_filename|>
package com.neu.his.cloud.service.sms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;

public class DmsCaseModel implements Serializable {
    private Long id;

    private String chiefComplaint;

    private String historyOfPresentIllness;

    private String historyOfTreatment;

    private String pastHistory;

    private String allergies;

    private String healthCheckup;

    private String priliminaryDiseIdList;

    private String priliminaryDiseStrList;

    private String name;

    private Integer status;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getChiefComplaint() {
        return chiefComplaint;
    }

    public void setChiefComplaint(String chiefComplaint) {
        this.chiefComplaint = chiefComplaint;
    }

    public String getHistoryOfPresentIllness() {
        return historyOfPresentIllness;
    }

    public void setHistoryOfPresentIllness(String historyOfPresentIllness) {
        this.historyOfPresentIllness = historyOfPresentIllness;
    }

    public String getHistoryOfTreatment() {
        return historyOfTreatment;
    }

    public void setHistoryOfTreatment(String historyOfTreatment) {
        this.historyOfTreatment = historyOfTreatment;
    }

    public String getPastHistory() {
        return pastHistory;
    }

    public void setPastHistory(String pastHistory) {
        this.pastHistory = pastHistory;
    }

    public String getAllergies() {
        return allergies;
    }

    public void setAllergies(String allergies) {
        this.allergies = allergies;
    }

    public String getHealthCheckup() {
        return healthCheckup;
    }

    public void setHealthCheckup(String healthCheckup) {
        this.healthCheckup = healthCheckup;
    }

    public String getPriliminaryDiseIdList() {
        return priliminaryDiseIdList;
    }

    public void setPriliminaryDiseIdList(String priliminaryDiseIdList) {
        this.priliminaryDiseIdList = priliminaryDiseIdList;
    }

    public String getPriliminaryDiseStrList() {
        return priliminaryDiseStrList;
    }

    public void setPriliminaryDiseStrList(String priliminaryDiseStrList) {
        this.priliminaryDiseStrList = priliminaryDiseStrList;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", chiefComplaint=").append(chiefComplaint);
        sb.append(", historyOfPresentIllness=").append(historyOfPresentIllness);
        sb.append(", historyOfTreatment=").append(historyOfTreatment);
        sb.append(", pastHistory=").append(pastHistory);
        sb.append(", allergies=").append(allergies);
        sb.append(", healthCheckup=").append(healthCheckup);
        sb.append(", priliminaryDiseIdList=").append(priliminaryDiseIdList);
        sb.append(", priliminaryDiseStrList=").append(priliminaryDiseStrList);
        sb.append(", name=").append(name);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsDrugStoreDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsDrugStoreDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsRefundDrugListParam;
import com.neu.his.cloud.zuul.dto.pms.PmsDrugStorePatientListResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController
@Api(tags = "DmsDrugStoreDistributionController", description = "药房工作台")
@RequestMapping("/drugStore")
@CrossOrigin(allowCredentials = "true")
public class DmsDrugStoreDistributionController {

    @Autowired
    private ApiPcDmsDrugStoreDistributionService apiPcDmsDrugStoreDistributionService;

    @HystrixCommand(fallbackMethod = "listPatientFallbackInfo")
    @ApiOperation("刷新发药患者")
    @RequestMapping(value = "/listPatient", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsDrugStorePatientListResult> listPatient(@RequestParam(value = "medicalRecordNo",required = false) String medicalRecordNo,
                                                                   @RequestParam("queryDate") String queryDate,
                                                                   @RequestParam("type") Integer type){
        return  apiPcDmsDrugStoreDistributionService.listPatient(medicalRecordNo,queryDate,type);
    }
    private CommonResult<PmsDrugStorePatientListResult> listPatientFallbackInfo(String medicalRecordNo, String queryDate,Integer type){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "releaseDrugFallbackInfo")
    @ApiOperation("发药")
    @RequestMapping(value = "/releaseDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult releaseDrug(@RequestParam("prescriptionId") Long prescriptionId,
                                    @RequestParam("type") Integer type){
       return apiPcDmsDrugStoreDistributionService.releaseDrug(prescriptionId,type);
    }
    private CommonResult releaseDrugFallbackInfo(Long prescriptionId,Integer type){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "refundDrugFallbackInfo")
    @ApiOperation("退药")
    @RequestMapping(value = "/refundDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult refundDrug(@RequestBody DmsRefundDrugListParam dmsRefundDrugListParam){
        return apiPcDmsDrugStoreDistributionService.refundDrug(dmsRefundDrugListParam);
    }
    private CommonResult refundDrugFallbackInfo(DmsRefundDrugListParam dmsRefundDrugListParam){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}


<|start_filename|>HIS-web/src/api/outpatient/feequery.js<|end_filename|>
import request from '@/utils/request'
export function listByRegistration(data) {
  return request({
    url: '/feeQuery/listByRegistration',
    method: 'post',
    params:{
      registrationId: data
    }
  })
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/impl/SmsSkdServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.sms.service.impl;



import cn.hutool.core.collection.CollectionUtil;
import com.neu.his.cloud.service.sms.dto.sms.*;
import com.neu.his.cloud.service.sms.mapper.*;
import com.neu.his.cloud.service.sms.model.*;
import com.neu.his.cloud.service.sms.service.SmsSkdService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

import java.util.*;

/**
 * 排班
 */
@Service
public class SmsSkdServiceImpl implements SmsSkdService {

    @Autowired
    private SmsSkdRuleMapper smsSkdRuleMapper;

    @Autowired
    private SmsSkdRuleItemMapper smsSkdRuleItemMapper;

    @Autowired
    private SmsDeptMapper smsDeptMapper;

    @Autowired
    private SmsStaffMapper smsStaffMapper;

    @Autowired
    private SmsSkdMapper smsSkdMapper;

    @Autowired
    private SmsRegistrationRankMapper smsRegistrationRankMapper;


    @Override
    public int createRule(SmsSkdRuleParam smsSkdRuleParam){
        SmsSkdRule smsSkdRule = new SmsSkdRule();
        BeanUtils.copyProperties(smsSkdRuleParam, smsSkdRule);
        smsSkdRule.setStatus(1);
        smsSkdRule.setOperateTime(new Date());
        int skdRuleCount = smsSkdRuleMapper.insert(smsSkdRule);

        //根据操作员id和操作时间查询排版规则的id
        SmsSkdRuleExample ruleExample = new SmsSkdRuleExample();
        ruleExample.createCriteria().andOperatorIdEqualTo(smsSkdRuleParam.getOperatorId());
        ruleExample.setOrderByClause("operate_time desc");
        List<SmsSkdRule> smsSkdRuleList = smsSkdRuleMapper.selectByExample(ruleExample);
        if(smsSkdRuleList.size() <= 0){
            return 0;
        }
        Long skdRuleId = smsSkdRuleList.get(0).getId();

        //遍历排班项并全部插入
        int sumOfRuleItem = 0;
        for(SmsSkdRuleItemParam smsSkdRuleItemParam : smsSkdRuleParam.getSmsSkdRuleItemParamList()){
            SmsSkdRuleItem smsSkdRuleItem = new SmsSkdRuleItem();
            BeanUtils.copyProperties(smsSkdRuleItemParam,smsSkdRuleItem);
            smsSkdRuleItem.setStatus(1);
            smsSkdRuleItem.setSkRuleId(skdRuleId);
            sumOfRuleItem += smsSkdRuleItemMapper.insert(smsSkdRuleItem);
        }
        return skdRuleCount + sumOfRuleItem;
    }

    @Override
    public int deleteRule(List<Long> ids){
        //删除Rule
        SmsSkdRuleExample smsSkdRuleExample = new SmsSkdRuleExample();
        smsSkdRuleExample.createCriteria().andIdIn(ids);
        int skdRuleCount = smsSkdRuleMapper.deleteByExample(smsSkdRuleExample);

        //删除RuleItem
        SmsSkdRuleItemExample smsSkdRuleItemExample = new SmsSkdRuleItemExample();
        smsSkdRuleItemExample.createCriteria().andSkRuleIdIn(ids);
        int skdRuleItemCount = smsSkdRuleItemMapper.deleteByExample(smsSkdRuleItemExample);
        return skdRuleCount + skdRuleItemCount;
    }

    @Override
    public int updateRule(Long id,SmsSkdRuleParam smsSkdRuleParam){
        List<Long> deleteList = new ArrayList<>();
        deleteList.add(id);

        //根据id删除
        int deleteCount = deleteRule(deleteList);

        //插入新排版规则
        int insertCount = createRule(smsSkdRuleParam);
        return deleteCount + insertCount;
    }

    /**
     * 描述:1.调用SmsSkdRuleDao根据deptId查找数据（不包括规则项）
     * <p>author: ma
     * <p>author: 赵煜 修改查询不到科室排班规则500错误，封装操作员姓名
     */
    @Override
    public List<SmsSkdRuleResult> selectRuleByDept(Long deptId){
        //获取科室名
        SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(deptId);
        if(StringUtils.isEmpty(smsDept)){
            return null;
        }
        //查询一个科室的所有排版规则(status为1)
        SmsSkdRuleExample smsSkdRuleExample = new SmsSkdRuleExample();
        smsSkdRuleExample.createCriteria().andDeptIdEqualTo(deptId).andStatusEqualTo(1);
        List<SmsSkdRule> smsSkdRuleList = smsSkdRuleMapper.selectByExample(smsSkdRuleExample);
        if(CollectionUtils.isEmpty(smsSkdRuleList)){  //如果为空，则不需要接下来的数据封装
            return null;
        }
        List<SmsSkdRuleResult> smsSkdRuleResultList = new ArrayList<>();
        for(SmsSkdRule smsSkdRule : smsSkdRuleList){
            SmsSkdRuleResult smsSkdRuleResult = new SmsSkdRuleResult();
            BeanUtils.copyProperties(smsSkdRule,smsSkdRuleResult);
            //设置科室名
            smsSkdRuleResult.setDeptName(smsDept.getName());
            //设置操作姓名
            SmsStaff operator=smsStaffMapper.selectByPrimaryKey(smsSkdRule.getOperatorId());
            if(null!=operator){
                smsSkdRuleResult.setOperatorName(operator.getUsername());
            }
            //设置排班项（暂不用）
            smsSkdRuleResultList.add(smsSkdRuleResult);
        }
        return smsSkdRuleResultList;
    }

    @Override
    public SmsSkdRuleResult getRuleDetail(Long ruleId){
        SmsSkdRule smsSkdRule = smsSkdRuleMapper.selectByPrimaryKey(ruleId);
        if(smsSkdRule == null){
            return null;
        }
        SmsSkdRuleResult smsSkdRuleResult = new SmsSkdRuleResult();
        BeanUtils.copyProperties(smsSkdRule,smsSkdRuleResult);

        //设置科室名
        String deptName = smsDeptMapper.selectByPrimaryKey(smsSkdRuleResult.getDeptId()).getName();
        if(deptName == null){
            return null;
        }
        smsSkdRuleResult.setDeptName(deptName);

        //设置排班项
        List<SmsSkdRuleItemResult> smsSkdRuleItemResultList = new ArrayList<>();
        SmsSkdRuleItemExample smsSkdRuleItemExample = new SmsSkdRuleItemExample();
        smsSkdRuleItemExample.createCriteria().andSkRuleIdEqualTo(smsSkdRuleResult.getId());
        List<SmsSkdRuleItem> smsSkdRuleItemList = smsSkdRuleItemMapper.selectByExample(smsSkdRuleItemExample);
        for(SmsSkdRuleItem smsSkdRuleItem : smsSkdRuleItemList){
            SmsSkdRuleItemResult smsSkdRuleItemResult = new SmsSkdRuleItemResult();
            BeanUtils.copyProperties(smsSkdRuleItem,smsSkdRuleItemResult);
            //获取并设置医生name
            SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(smsSkdRuleItemResult.getStaffId());
            smsSkdRuleItemResult.setStaffName(smsStaff.getName());

            smsSkdRuleItemResultList.add(smsSkdRuleItemResult);
        }

        smsSkdRuleResult.setSmsSkdRuleItemResultList(smsSkdRuleItemResultList);
        return smsSkdRuleResult;
    }

    @Override
    public int generateSkd(List<Long> ruleIds,Date startDate,Date endDate){
        if(endDate.compareTo(startDate) < 0){
            return 0;
        }

        //设置排版规则id与科室id对应
        SmsSkdRuleExample smsSkdRuleExample = new SmsSkdRuleExample();
        smsSkdRuleExample.createCriteria().andIdIn(ruleIds);
        List<SmsSkdRule> smsSkdRuleList = smsSkdRuleMapper.selectByExample(smsSkdRuleExample);
        Map<Long, Long> ruleIdToDeptIdMap = new Hashtable<>();
        for(SmsSkdRule smsSkdRule : smsSkdRuleList){
            ruleIdToDeptIdMap.put(smsSkdRule.getId(),smsSkdRule.getDeptId());
        }

        //调用SmsSkdRuleItemDao查询所有ruleIds的排班项，并合并为一个Map
        SmsSkdRuleItemExample smsSkdRuleItemExample = new SmsSkdRuleItemExample();
        smsSkdRuleItemExample.createCriteria().andSkRuleIdIn(ruleIds).andStatusEqualTo(1);
        List<SmsSkdRuleItem> smsSkdRuleItemList = smsSkdRuleItemMapper.selectByExample(smsSkdRuleItemExample);
        Map<Long, List<SmsSkdRuleItem>> deptIdToItemListMap = new Hashtable<>();
        //生成一个StaffIdList
        List<Long> staffIdList = new ArrayList<>();
        for(SmsSkdRuleItem smsSkdRuleItem :smsSkdRuleItemList){
            Long currentDeptId = ruleIdToDeptIdMap.get(smsSkdRuleItem.getSkRuleId());
            List<SmsSkdRuleItem> currentItemList;
            if(deptIdToItemListMap.containsKey(currentDeptId)){
                currentItemList = deptIdToItemListMap.get(currentDeptId);
                //判断该staff是否已经存在
                for(SmsSkdRuleItem currentItem : currentItemList){
                    if(smsSkdRuleItem.getStaffId() == currentItem.getStaffId()){
                        return 0;
                    }
                }
            }else {
                currentItemList = new ArrayList<>();
            }
            currentItemList.add(smsSkdRuleItem);
            staffIdList.add(smsSkdRuleItem.getStaffId());
            deptIdToItemListMap.put(currentDeptId,currentItemList);
        }

        //没有重复，则遍历排班记录表，根据Date\staffId删除排班记录
        SmsSkdExample smsSkdExample = new SmsSkdExample();
        smsSkdExample.createCriteria().andDateBetween(startDate,endDate).andStaffIdIn(staffIdList);
        int deleteSkdCount = smsSkdMapper.deleteByExample(smsSkdExample);

        //遍历起止时间,判断每一天为周几，取出所有itemList中的daysOfWeek，如果为周i，则取出第2(i-1)位和第2(i-1)+1位。如果为0，则continue，如果为1，则插入skd
        int insertSkdCount = 0;
        List<Date> listDate = getDatesBetweenTwoDate(startDate, endDate);
        for(Date today : listDate){
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(today);
            int week = calendar.get(Calendar.DAY_OF_WEEK) - 2;  //此时week，周日为-1
            if(week == -1){
                week = 6;       //将周日设置为6
            }
            //遍历map
            for(Long currentDeptId : deptIdToItemListMap.keySet()){
                List<SmsSkdRuleItem> currentItemList = deptIdToItemListMap.get(currentDeptId);
                //遍历同一科室id下Item
                for(SmsSkdRuleItem ruleItem : currentItemList){
                    String noon = ruleItem.getDaysOfWeek();
                    char morning = noon.charAt(2*week);
                    char afternoon = noon.charAt(2*week + 1);

                    if(morning == '1'){
                        //添加上午值班信息
                        SmsSkd skd = new SmsSkd();
                        skd.setDate(today);
                        skd.setStatus(1);
                        skd.setRemain(ruleItem.getSkLimit());
                        skd.setNoon(0);
                        skd.setStaffId(ruleItem.getStaffId());
                        skd.setDeptId(currentDeptId);
                        skd.setSkLimit(ruleItem.getSkLimit());
                        insertSkdCount += smsSkdMapper.insert(skd);
                    }
                    if(afternoon == '1'){
                        //添加下午值班信息
                        SmsSkd skd = new SmsSkd();
                        skd.setDate(today);
                        skd.setStatus(1);
                        skd.setRemain(ruleItem.getSkLimit());
                        skd.setNoon(1);
                        skd.setStaffId(ruleItem.getStaffId());
                        skd.setDeptId(currentDeptId);
                        skd.setSkLimit(ruleItem.getSkLimit());
                        insertSkdCount += smsSkdMapper.insert(skd);
                    }
                }
            }
        }
        return insertSkdCount;
    }

    @Override
    public List<SmsSkdResult> listSkd(SmsSkdParam smsSkdParam){
        SmsSkdExample smsSkdExample = new SmsSkdExample();
        SmsSkdExample.Criteria criteria = smsSkdExample.createCriteria();
        criteria.andStatusEqualTo(1);

        //根据医生id、起止时间、午别、科室id查询
        if(smsSkdParam.getStaffId() != null){
            criteria.andStaffIdEqualTo(smsSkdParam.getStaffId());
        }
        //20190625 ma
        if(smsSkdParam.getStartDate() != null){
            criteria.andDateGreaterThanOrEqualTo(smsSkdParam.getStartDate());
        }
        if(smsSkdParam.getEndDate() != null){
            criteria.andDateLessThanOrEqualTo(smsSkdParam.getEndDate());
        }
        if(smsSkdParam.getNoon() != null){
            criteria.andNoonEqualTo(smsSkdParam.getNoon());
        }
        if(smsSkdParam.getDeptId() != null){
            criteria.andDeptIdEqualTo(smsSkdParam.getDeptId());
        }
        //根据挂号级别查询
        if(smsSkdParam.getRegistrationRankId() != null){
            SmsStaffExample smsStaffExample = new SmsStaffExample();
            SmsStaffExample.Criteria staffCriteria = smsStaffExample.createCriteria();
            staffCriteria.andStatusEqualTo(1);
            if(smsSkdParam.getDeptId() != null){
                staffCriteria.andDeptIdEqualTo(smsSkdParam.getDeptId());
            }
            staffCriteria.andRegistrationRankIdEqualTo(smsSkdParam.getRegistrationRankId());

            List<SmsStaff> smsStaffList = smsStaffMapper.selectByExample(smsStaffExample);
            List<Long> smsStaffIdList = new ArrayList<>();
            for(SmsStaff smsStaff : smsStaffList){
                smsStaffIdList.add(smsStaff.getId());
            }
            criteria.andStaffIdIn(smsStaffIdList);
        }


        //返回数据包装成Result  201906225 ma
        smsSkdExample.setOrderByClause("date desc");

        List<SmsSkd> smsSkdList = smsSkdMapper.selectByExample(smsSkdExample);
        List<SmsSkdResult> smsSkdResultList = new ArrayList<>();
        for (SmsSkd smsSkd : smsSkdList) {
            SmsSkdResult smsSkdResult = new SmsSkdResult();
            BeanUtils.copyProperties(smsSkd, smsSkdResult);

            //封装部门名称
            SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(smsSkd.getDeptId());
            smsSkdResult.setDeptName(smsDept.getName());

            //封装医生姓名、挂号级别
            SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(smsSkd.getStaffId());
            smsSkdResult.setStaffName(smsStaff.getName());
            SmsRegistrationRank smsRegistrationRank = smsRegistrationRankMapper.selectByPrimaryKey(smsStaff.getRegistrationRankId());
            smsSkdResult.setRegistrationRank(smsRegistrationRank.getName());

            smsSkdResultList.add(smsSkdResult);
        }
        return smsSkdResultList;
    }

    @Override
    public List<SmsSkdDocResult> listDocBySkd(SmsSkdDocParam smsSkdDocParam){
        SmsSkdExample smsSkdExample = new SmsSkdExample();
        SmsSkdExample.Criteria criteria = smsSkdExample.createCriteria();
        criteria.andStatusEqualTo(1).andRemainGreaterThan(new Long(0));
        if(smsSkdDocParam.getDate() != null){
            System.err.println("getDate:"+smsSkdDocParam.getDate());
            criteria.andDateEqualTo(smsSkdDocParam.getDate());
        }
        if(smsSkdDocParam.getNoon() != null){
            System.err.println("getNoon:"+smsSkdDocParam.getNoon());
            criteria.andNoonEqualTo(smsSkdDocParam.getNoon());
        }
        if(smsSkdDocParam.getDeptId() != null){
            System.err.println("getDeptId:"+smsSkdDocParam.getDeptId());
            criteria.andDeptIdEqualTo(smsSkdDocParam.getDeptId());
        }
        if(smsSkdDocParam.getRegistrationRankId() != null){
            SmsStaffExample smsStaffExample = new SmsStaffExample();
            SmsStaffExample.Criteria staffCriteria = smsStaffExample.createCriteria();
            staffCriteria.andStatusEqualTo(1);
            System.err.println(smsSkdDocParam);
            if(smsSkdDocParam.getDeptId() != null){
                staffCriteria.andDeptIdEqualTo(smsSkdDocParam.getDeptId());
            }
            staffCriteria.andRegistrationRankIdEqualTo(smsSkdDocParam.getRegistrationRankId());

            List<SmsStaff> smsStaffList = smsStaffMapper.selectByExample(smsStaffExample);
            List<Long> smsStaffIdList = new ArrayList<>();
         //   System.err.println("smsStaffIdList.size():"+smsStaffIdList.size());
            for(SmsStaff smsStaff : smsStaffList){
                smsStaffIdList.add(smsStaff.getId());
            }
            if(!CollectionUtil.isEmpty(smsStaffList))
                 criteria.andStaffIdIn(smsStaffIdList);
        }



        //返回数据包装成Result
        List<SmsSkd> smsSkdList = smsSkdMapper.selectByExample(smsSkdExample);
        List<SmsSkdDocResult> smsSkdDocResultList = new ArrayList<>();
        for (SmsSkd smsSkd : smsSkdList) {
            SmsSkdDocResult smsSkdDocResult = new SmsSkdDocResult();
            smsSkdDocResult.setSkdId(smsSkd.getId());

            //封装医生名字和挂号费
            SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(smsSkd.getStaffId());
            smsSkdDocResult.setName(smsStaff.getName());
            SmsRegistrationRank smsRegistrationRank = smsRegistrationRankMapper.selectByPrimaryKey(smsStaff.getRegistrationRankId());
            smsSkdDocResult.setAmount(smsRegistrationRank.getPrice());

            smsSkdDocResultList.add(smsSkdDocResult);
        }
        return smsSkdDocResultList;
    }

    @Override
    public List<SmsSkdRuleItemResult> listCanSkdStaffByDept(Long deptId) {
        SmsStaffExample example = new SmsStaffExample();
        example.createCriteria().andDeptIdEqualTo(deptId).andStatusNotEqualTo(0).andSkdFlagEqualTo(1);//找出可以排班的员工
        List<SmsStaff> smsStaffList = smsStaffMapper.selectByExample(example);
        List<SmsSkdRuleItemResult> smsSkdRuleItemResultList=new ArrayList<>();
        for (SmsStaff smsStaff:smsStaffList){
            SmsSkdRuleItemResult smsSkdRuleItemResult=new SmsSkdRuleItemResult();
           smsSkdRuleItemResult.setStaffName(smsStaff.getName());
           smsSkdRuleItemResult.setStaffId(smsStaff.getId());
            smsSkdRuleItemResultList.add(smsSkdRuleItemResult);
        }
        return smsSkdRuleItemResultList;
    }

    //根据起止日期生成日期List
    public List<Date> getDatesBetweenTwoDate(Date start, Date end){
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(start);
        List<Date> dateList = new ArrayList<>();
        while(calendar.getTime().compareTo(end) <= 0){
            dateList.add(calendar.getTime());
            calendar.add(Calendar.DATE, 1);
        }
        return dateList;
    }
}


<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/model/SmsFrequentUsedExample.java<|end_filename|>
package com.neu.his.mbg.model;

import java.util.ArrayList;
import java.util.List;

public class SmsFrequentUsedExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SmsFrequentUsedExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListIsNull() {
            addCriterion("medicine_dise_id_list is null");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListIsNotNull() {
            addCriterion("medicine_dise_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListEqualTo(String value) {
            addCriterion("medicine_dise_id_list =", value, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListNotEqualTo(String value) {
            addCriterion("medicine_dise_id_list <>", value, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListGreaterThan(String value) {
            addCriterion("medicine_dise_id_list >", value, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListGreaterThanOrEqualTo(String value) {
            addCriterion("medicine_dise_id_list >=", value, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListLessThan(String value) {
            addCriterion("medicine_dise_id_list <", value, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListLessThanOrEqualTo(String value) {
            addCriterion("medicine_dise_id_list <=", value, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListLike(String value) {
            addCriterion("medicine_dise_id_list like", value, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListNotLike(String value) {
            addCriterion("medicine_dise_id_list not like", value, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListIn(List<String> values) {
            addCriterion("medicine_dise_id_list in", values, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListNotIn(List<String> values) {
            addCriterion("medicine_dise_id_list not in", values, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListBetween(String value1, String value2) {
            addCriterion("medicine_dise_id_list between", value1, value2, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andMedicineDiseIdListNotBetween(String value1, String value2) {
            addCriterion("medicine_dise_id_list not between", value1, value2, "medicineDiseIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListIsNull() {
            addCriterion("disposition_id_list is null");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListIsNotNull() {
            addCriterion("disposition_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListEqualTo(String value) {
            addCriterion("disposition_id_list =", value, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListNotEqualTo(String value) {
            addCriterion("disposition_id_list <>", value, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListGreaterThan(String value) {
            addCriterion("disposition_id_list >", value, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListGreaterThanOrEqualTo(String value) {
            addCriterion("disposition_id_list >=", value, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListLessThan(String value) {
            addCriterion("disposition_id_list <", value, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListLessThanOrEqualTo(String value) {
            addCriterion("disposition_id_list <=", value, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListLike(String value) {
            addCriterion("disposition_id_list like", value, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListNotLike(String value) {
            addCriterion("disposition_id_list not like", value, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListIn(List<String> values) {
            addCriterion("disposition_id_list in", values, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListNotIn(List<String> values) {
            addCriterion("disposition_id_list not in", values, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListBetween(String value1, String value2) {
            addCriterion("disposition_id_list between", value1, value2, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionIdListNotBetween(String value1, String value2) {
            addCriterion("disposition_id_list not between", value1, value2, "dispositionIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListIsNull() {
            addCriterion("test_id_list is null");
            return (Criteria) this;
        }

        public Criteria andTestIdListIsNotNull() {
            addCriterion("test_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andTestIdListEqualTo(String value) {
            addCriterion("test_id_list =", value, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListNotEqualTo(String value) {
            addCriterion("test_id_list <>", value, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListGreaterThan(String value) {
            addCriterion("test_id_list >", value, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListGreaterThanOrEqualTo(String value) {
            addCriterion("test_id_list >=", value, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListLessThan(String value) {
            addCriterion("test_id_list <", value, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListLessThanOrEqualTo(String value) {
            addCriterion("test_id_list <=", value, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListLike(String value) {
            addCriterion("test_id_list like", value, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListNotLike(String value) {
            addCriterion("test_id_list not like", value, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListIn(List<String> values) {
            addCriterion("test_id_list in", values, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListNotIn(List<String> values) {
            addCriterion("test_id_list not in", values, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListBetween(String value1, String value2) {
            addCriterion("test_id_list between", value1, value2, "testIdList");
            return (Criteria) this;
        }

        public Criteria andTestIdListNotBetween(String value1, String value2) {
            addCriterion("test_id_list not between", value1, value2, "testIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListIsNull() {
            addCriterion("herbal_dise_id_list is null");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListIsNotNull() {
            addCriterion("herbal_dise_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListEqualTo(String value) {
            addCriterion("herbal_dise_id_list =", value, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListNotEqualTo(String value) {
            addCriterion("herbal_dise_id_list <>", value, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListGreaterThan(String value) {
            addCriterion("herbal_dise_id_list >", value, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListGreaterThanOrEqualTo(String value) {
            addCriterion("herbal_dise_id_list >=", value, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListLessThan(String value) {
            addCriterion("herbal_dise_id_list <", value, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListLessThanOrEqualTo(String value) {
            addCriterion("herbal_dise_id_list <=", value, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListLike(String value) {
            addCriterion("herbal_dise_id_list like", value, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListNotLike(String value) {
            addCriterion("herbal_dise_id_list not like", value, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListIn(List<String> values) {
            addCriterion("herbal_dise_id_list in", values, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListNotIn(List<String> values) {
            addCriterion("herbal_dise_id_list not in", values, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListBetween(String value1, String value2) {
            addCriterion("herbal_dise_id_list between", value1, value2, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andHerbalDiseIdListNotBetween(String value1, String value2) {
            addCriterion("herbal_dise_id_list not between", value1, value2, "herbalDiseIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListIsNull() {
            addCriterion("check_model_id_list is null");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListIsNotNull() {
            addCriterion("check_model_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListEqualTo(String value) {
            addCriterion("check_model_id_list =", value, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListNotEqualTo(String value) {
            addCriterion("check_model_id_list <>", value, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListGreaterThan(String value) {
            addCriterion("check_model_id_list >", value, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListGreaterThanOrEqualTo(String value) {
            addCriterion("check_model_id_list >=", value, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListLessThan(String value) {
            addCriterion("check_model_id_list <", value, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListLessThanOrEqualTo(String value) {
            addCriterion("check_model_id_list <=", value, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListLike(String value) {
            addCriterion("check_model_id_list like", value, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListNotLike(String value) {
            addCriterion("check_model_id_list not like", value, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListIn(List<String> values) {
            addCriterion("check_model_id_list in", values, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListNotIn(List<String> values) {
            addCriterion("check_model_id_list not in", values, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListBetween(String value1, String value2) {
            addCriterion("check_model_id_list between", value1, value2, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andCheckModelIdListNotBetween(String value1, String value2) {
            addCriterion("check_model_id_list not between", value1, value2, "checkModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListIsNull() {
            addCriterion("disposition_model_id_list is null");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListIsNotNull() {
            addCriterion("disposition_model_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListEqualTo(String value) {
            addCriterion("disposition_model_id_list =", value, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListNotEqualTo(String value) {
            addCriterion("disposition_model_id_list <>", value, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListGreaterThan(String value) {
            addCriterion("disposition_model_id_list >", value, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListGreaterThanOrEqualTo(String value) {
            addCriterion("disposition_model_id_list >=", value, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListLessThan(String value) {
            addCriterion("disposition_model_id_list <", value, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListLessThanOrEqualTo(String value) {
            addCriterion("disposition_model_id_list <=", value, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListLike(String value) {
            addCriterion("disposition_model_id_list like", value, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListNotLike(String value) {
            addCriterion("disposition_model_id_list not like", value, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListIn(List<String> values) {
            addCriterion("disposition_model_id_list in", values, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListNotIn(List<String> values) {
            addCriterion("disposition_model_id_list not in", values, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListBetween(String value1, String value2) {
            addCriterion("disposition_model_id_list between", value1, value2, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andDispositionModelIdListNotBetween(String value1, String value2) {
            addCriterion("disposition_model_id_list not between", value1, value2, "dispositionModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListIsNull() {
            addCriterion("test_model_id_list is null");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListIsNotNull() {
            addCriterion("test_model_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListEqualTo(String value) {
            addCriterion("test_model_id_list =", value, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListNotEqualTo(String value) {
            addCriterion("test_model_id_list <>", value, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListGreaterThan(String value) {
            addCriterion("test_model_id_list >", value, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListGreaterThanOrEqualTo(String value) {
            addCriterion("test_model_id_list >=", value, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListLessThan(String value) {
            addCriterion("test_model_id_list <", value, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListLessThanOrEqualTo(String value) {
            addCriterion("test_model_id_list <=", value, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListLike(String value) {
            addCriterion("test_model_id_list like", value, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListNotLike(String value) {
            addCriterion("test_model_id_list not like", value, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListIn(List<String> values) {
            addCriterion("test_model_id_list in", values, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListNotIn(List<String> values) {
            addCriterion("test_model_id_list not in", values, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListBetween(String value1, String value2) {
            addCriterion("test_model_id_list between", value1, value2, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andTestModelIdListNotBetween(String value1, String value2) {
            addCriterion("test_model_id_list not between", value1, value2, "testModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListIsNull() {
            addCriterion("drug_model_id_list is null");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListIsNotNull() {
            addCriterion("drug_model_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListEqualTo(String value) {
            addCriterion("drug_model_id_list =", value, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListNotEqualTo(String value) {
            addCriterion("drug_model_id_list <>", value, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListGreaterThan(String value) {
            addCriterion("drug_model_id_list >", value, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListGreaterThanOrEqualTo(String value) {
            addCriterion("drug_model_id_list >=", value, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListLessThan(String value) {
            addCriterion("drug_model_id_list <", value, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListLessThanOrEqualTo(String value) {
            addCriterion("drug_model_id_list <=", value, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListLike(String value) {
            addCriterion("drug_model_id_list like", value, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListNotLike(String value) {
            addCriterion("drug_model_id_list not like", value, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListIn(List<String> values) {
            addCriterion("drug_model_id_list in", values, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListNotIn(List<String> values) {
            addCriterion("drug_model_id_list not in", values, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListBetween(String value1, String value2) {
            addCriterion("drug_model_id_list between", value1, value2, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andDrugModelIdListNotBetween(String value1, String value2) {
            addCriterion("drug_model_id_list not between", value1, value2, "drugModelIdList");
            return (Criteria) this;
        }

        public Criteria andStaffIdIsNull() {
            addCriterion("staff_id is null");
            return (Criteria) this;
        }

        public Criteria andStaffIdIsNotNull() {
            addCriterion("staff_id is not null");
            return (Criteria) this;
        }

        public Criteria andStaffIdEqualTo(Long value) {
            addCriterion("staff_id =", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotEqualTo(Long value) {
            addCriterion("staff_id <>", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdGreaterThan(Long value) {
            addCriterion("staff_id >", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdGreaterThanOrEqualTo(Long value) {
            addCriterion("staff_id >=", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdLessThan(Long value) {
            addCriterion("staff_id <", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdLessThanOrEqualTo(Long value) {
            addCriterion("staff_id <=", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdIn(List<Long> values) {
            addCriterion("staff_id in", values, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotIn(List<Long> values) {
            addCriterion("staff_id not in", values, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdBetween(Long value1, Long value2) {
            addCriterion("staff_id between", value1, value2, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotBetween(Long value1, Long value2) {
            addCriterion("staff_id not between", value1, value2, "staffId");
            return (Criteria) this;
        }

        public Criteria andCheckIdListIsNull() {
            addCriterion("check_id_list is null");
            return (Criteria) this;
        }

        public Criteria andCheckIdListIsNotNull() {
            addCriterion("check_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andCheckIdListEqualTo(String value) {
            addCriterion("check_id_list =", value, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListNotEqualTo(String value) {
            addCriterion("check_id_list <>", value, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListGreaterThan(String value) {
            addCriterion("check_id_list >", value, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListGreaterThanOrEqualTo(String value) {
            addCriterion("check_id_list >=", value, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListLessThan(String value) {
            addCriterion("check_id_list <", value, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListLessThanOrEqualTo(String value) {
            addCriterion("check_id_list <=", value, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListLike(String value) {
            addCriterion("check_id_list like", value, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListNotLike(String value) {
            addCriterion("check_id_list not like", value, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListIn(List<String> values) {
            addCriterion("check_id_list in", values, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListNotIn(List<String> values) {
            addCriterion("check_id_list not in", values, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListBetween(String value1, String value2) {
            addCriterion("check_id_list between", value1, value2, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andCheckIdListNotBetween(String value1, String value2) {
            addCriterion("check_id_list not between", value1, value2, "checkIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListIsNull() {
            addCriterion("drug_id_list is null");
            return (Criteria) this;
        }

        public Criteria andDrugIdListIsNotNull() {
            addCriterion("drug_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andDrugIdListEqualTo(String value) {
            addCriterion("drug_id_list =", value, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListNotEqualTo(String value) {
            addCriterion("drug_id_list <>", value, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListGreaterThan(String value) {
            addCriterion("drug_id_list >", value, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListGreaterThanOrEqualTo(String value) {
            addCriterion("drug_id_list >=", value, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListLessThan(String value) {
            addCriterion("drug_id_list <", value, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListLessThanOrEqualTo(String value) {
            addCriterion("drug_id_list <=", value, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListLike(String value) {
            addCriterion("drug_id_list like", value, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListNotLike(String value) {
            addCriterion("drug_id_list not like", value, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListIn(List<String> values) {
            addCriterion("drug_id_list in", values, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListNotIn(List<String> values) {
            addCriterion("drug_id_list not in", values, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListBetween(String value1, String value2) {
            addCriterion("drug_id_list between", value1, value2, "drugIdList");
            return (Criteria) this;
        }

        public Criteria andDrugIdListNotBetween(String value1, String value2) {
            addCriterion("drug_id_list not between", value1, value2, "drugIdList");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/controller/SmsStaffController.java<|end_filename|>
package com.neu.his.cloud.service.sms.controller;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.service.sms.common.CommonPage;
import com.neu.his.cloud.service.sms.common.CommonResult;
import com.neu.his.cloud.service.sms.dto.sms.*;
import com.neu.his.cloud.service.sms.model.SmsStaff;
import com.neu.his.cloud.service.sms.service.SmsSkdService;
import com.neu.his.cloud.service.sms.service.SmsStaffService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.security.Principal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "SmsStaffController", description = "用户管理")
@RequestMapping("/staff")
@CrossOrigin(allowCredentials = "true")
public class SmsStaffController {

    @Autowired
    private SmsStaffService smsStaffService;
//    @Value("${jwt.tokenHeader}")  //自动装载jwt
//    private String tokenHeader;
//    @Value("${jwt.tokenHead}")
//    private String tokenHead;
    @Autowired
    private SmsSkdService smsSkdService;

    //查询上班医生
    //1.调用SmsSkdService的listDocBySkd
    @ApiOperation(value = "查询上班医生")
    @RequestMapping(value = "/listDocBySkd", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<SmsSkdDocResult>> listDocBySkd(@RequestBody SmsSkdDocParam smsSkdDocParam, BindingResult result){
        List<SmsSkdDocResult> smsSkdDocResultList;
        smsSkdDocResultList = smsSkdService.listDocBySkd(smsSkdDocParam);
        return CommonResult.success(smsSkdDocResultList);
    }


//    /**
//     * 描述:新增一个用户
//     * <p>author:赵煜
//     */
//    @ApiOperation("新增一个用户（调用注册接口）")
//    @RequestMapping(value = "/create", method = RequestMethod.POST)
//    @ResponseBody
//    public CommonResult create(@RequestBody SmsStaffParam smsStaffParam, BindingResult result){
//        SmsStaff smsStaff= smsStaffService.register(smsStaffParam);
//
//        return CommonResult.success(smsStaff);
//    }

    /**
     * 描述:根据ids删除用户
     * <p>author: ma
     */
    @ApiOperation("根据ids删除用户")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids) {
        int count = smsStaffService.delete(ids);
        if(count > 0){
            return CommonResult.success(count,"删除成功");
        }
        return CommonResult.failed("删除失败");
    }

    /**
     * 描述:更新一个用户的全部信息
     * <p>author: ma
     */
    @ApiOperation("更新一个用户的全部信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody SmsStaffParam smsStaffParam, BindingResult result){
        int count = smsStaffService.update(id,smsStaffParam);
        if(id > 0){
            return CommonResult.success(count,"更新成功");
        }
        return CommonResult.failed("更新失败");
    }

    /**
     * 描述:模糊查询用户、且分页
     * <p>author: ma
     */
    @ApiOperation("模糊查询用户、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsStaffResult>> list(@RequestBody SmsStaffParam queryParam,
                                                         @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        Page page =PageHelper.startPage(pageNum, pageSize);
        List<SmsStaffResult> list = smsStaffService.select(queryParam,pageSize,pageNum);
        Long pageTotal=page.getTotal();
        return CommonResult.success(CommonPage.restPage(list,pageTotal));
    }

    /**
     * 描述:查询所有用户
     * <p>author: ma
     */
    @ApiOperation("查询所有用户")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsStaffResult>> listAll(){
        List<SmsStaffResult> list = smsStaffService.selectAll();
        return CommonResult.success(list);
    }


//    /**
//     * 描述:登录
//     * <p>author: 赵煜
//     */
//    @ApiOperation(value = "登录以后返回token")
//    @RequestMapping(value = "/login", method = RequestMethod.POST)
//    @ResponseBody
//    public CommonResult login(@RequestBody SmsStaffLoginParam smsStaffLoginParam, BindingResult result) {
//        String token = smsStaffService.login(smsStaffLoginParam.getUsername(), smsStaffLoginParam.getPassword());
//        if (token == null) {
//            return CommonResult.validateFailed("用户名或密码错误");
//        }
//        //如果 token不等于 null
//        Map<String, String> tokenMap = new HashMap<>();
//        tokenMap.put("token", token);
//        tokenMap.put("tokenHead", tokenHead);
//        return CommonResult.success(tokenMap); //为什么要用HashMap进行返回，难道是为了减少实体类？
//    }

//    /**
//     * 描述:登录
//     * <p>author: 赵煜
//     *
//     */
//    @ApiOperation(value = "登录以后返回token")
//    @RequestMapping(value = "/getStaffByPwd", method = RequestMethod.POST)
//    @ResponseBody
//    public CommonResult getStaffByPwd(@RequestBody SmsStaffLoginParam smsStaffLoginParam, BindingResult result) {
//        SmsStaff smsStaff = smsStaffService.getStaffByPwd(smsStaffLoginParam.getUsername(), smsStaffLoginParam.getPassword());
//        if (smsStaff == null) {
//            return CommonResult.validateFailed("用户名或密码错误");
//        }
//        return CommonResult.success(smsStaff);
//    }


//    @ApiOperation(value = "获取当前登录用户信息")
//    @RequestMapping(value = "/info", method = RequestMethod.GET)
//    @ResponseBody
//    public CommonResult getAdminInfo(Principal principal) {
//        String username = principal.getName();
//        SmsStaff smsStaff = smsStaffService.selectByUserName(username);
//        Map<String, Object> data = new HashMap<>();
//        data.put("username", smsStaff.getUsername());
//        data.put("id", smsStaff.getId());
//        data.put("name", smsStaff.getName());
//        data.put("deptId", smsStaff.getDeptId());
//        return CommonResult.success(data);
//    }

}


<|start_filename|>HIS-web/src/router/admin/admin.js<|end_filename|>
/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const adminRouter = {
  path: '/admin',
  component: Layout,
  redirect: '/admin/department',
  name: 'admin',
  meta: {
    title: '信息维护',
    icon: 'edit',
    roles:[1,4,7]
  },
  children: [
    {
      path: 'department',
      component: () => import('@/views/admin/department'),
      name: 'department',
      meta: { title: '科室管理', noCache: true ,roles:[1,7]}
    },
    {
      path: 'registLevel',
      component: () => import('@/views/admin/registLevel'),
      name: 'registLevel',
      meta: { title: '挂号级别管理', noCache: true ,roles:[1,7]}
    },
    {
      path: 'settleCat',
      component: () => import('@/views/admin/settleCat'),
      name: 'settleCat',
      meta: { title: '结算类别管理', noCache: true ,roles:[1,7]}
    },
    {
      path: 'diagnosis',
      component: () => import('@/views/admin/diagnosis'),
      name: 'diagnosis',
      meta: { title: '诊断目录管理', noCache: true ,roles:[1,7]}
    },
    {
      path: 'non_drug',
      component: () => import('@/views/admin/non_drug'),
      name: 'non_drug',
      meta: { title: '非药品收费项目管理', noCache: true,roles:[1,7] }
    },
    {
      path: 'drug',
      component: () => import('@/views/admin/drug'),
      name: 'drug',
      meta: { title: '药品管理', noCache: true ,roles:[1,4,7]}
    }
  ]
}

export default adminRouter


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/controller/AppRegistrationController.java<|end_filename|>
package com.neu.his.cloud.api.app.controller;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.app.AppDocSkdResult;
import com.neu.his.cloud.api.app.dto.app.AppRegistrationParam;
import com.neu.his.cloud.api.app.dto.app.AppStaffDescriptionResult;
import com.neu.his.cloud.api.app.dto.pms.PmsPatientResult;
import com.neu.his.cloud.api.app.dto.sms.SmsDeptResult;
import com.neu.his.cloud.api.app.dto.sms.SmsSkdParam;
import com.neu.his.cloud.api.app.dto.sms.SmsSkdResult;
import com.neu.his.cloud.api.app.service.dms.DmsRegistrationService;
import com.neu.his.cloud.api.app.service.pms.PmsPatientService;
import com.neu.his.cloud.api.app.service.sms.SmsDeptService;
import com.neu.his.cloud.api.app.service.sms.SmsDescriptionService;
import com.neu.his.cloud.api.app.service.sms.SmsSkdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "AppRegistrationController", description = "APP 挂号管理")
@RequestMapping("/appRegistration")
//@CrossOrigin(allowCredentials = "true")
public class AppRegistrationController {

    @Autowired
    private SmsDeptService smsDeptService;

    @Autowired
    private SmsSkdService smsSkdService;

    @Autowired
    private DmsRegistrationService dmsRegistrationService;

    @Autowired
    private PmsPatientService pmsPatientService;

    @Autowired
    private SmsDescriptionService smsDescriptionService;

    @Value("${server.port}")
    private String port;

     @HystrixCommand(fallbackMethod = "loginFallbackInfo")
     @ApiOperation("患者 手机端登录")
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsPatientResult> login(@RequestParam("identificationNo") String identificationNo,
                                                @RequestParam("medicalRecordNo") String medicalRecordNo){
       return pmsPatientService.login(identificationNo ,medicalRecordNo);
    }
    private CommonResult<PmsPatientResult> loginFallbackInfo( String identificationNo,String medicalRecordNo){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listAllDeptFallbackInfo")
    @ApiOperation("查询所有科室")
    @RequestMapping(value = "/listAllDept", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsDeptResult>> listAllDept(){
      return smsDeptService.listAll();
    }
    private CommonResult<List<SmsDeptResult>> listAllDeptFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络+prot:"+port) ;
    }

    @HystrixCommand(fallbackMethod = "listDeptDoctorFallbackInfo")
    @ApiOperation("查询某个科室所有专家")
    @RequestMapping(value = "/listDeptDoctor", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppStaffDescriptionResult>> listDeptDoctor(@RequestParam("deptId") Long deptId){
        return smsDescriptionService.listDeptDoctor(deptId);
    }
    private CommonResult<List<AppStaffDescriptionResult>> listDeptDoctorFallbackInfo(Long deptId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listDoctorSkdFallbackInfo")
    @ApiOperation("查询某个专家所有排班及描述信息")
    @RequestMapping(value = "/listDoctorSkd", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<AppDocSkdResult> listDoctorSkd(@RequestParam("staffId") Long staffId,
                                                       @RequestParam(value = "endDate",required = false) Date endDate){
        SmsSkdParam smsSkdParam = new SmsSkdParam();
        smsSkdParam.setStaffId(staffId);
        Calendar calendar = Calendar.getInstance();
        //设置起始时间为当天00:00:00.0
        calendar.setTime(new Date());
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        smsSkdParam.setStartDate(calendar.getTime());

        //设置截止时间为最后一天23:59:59.0
        if(endDate != null){
            calendar.setTime(endDate);
            calendar.set(Calendar.HOUR_OF_DAY, 23);
            calendar.set(Calendar.MINUTE, 59);
            calendar.set(Calendar.SECOND, 59);
            calendar.set(Calendar.MILLISECOND, 0);
            smsSkdParam.setEndDate(calendar.getTime());
        }

        List<SmsSkdResult> skdResultList = smsSkdService.listSkd(smsSkdParam).getData();  //与单体不一样 20190626

        AppDocSkdResult result = smsDescriptionService.getStaffDetailById(staffId).getData();

        if(result != null){
            result.setSkdResultList(skdResultList);
        }
        return CommonResult.success(result);
    }
    private CommonResult<AppDocSkdResult> listDoctorSkdFallbackInfo(Long staffId, Date endDate){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "registrationFallbackInfo")
    @ApiOperation("挂号")
    @RequestMapping(value = "/appReg", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult registration(@RequestBody AppRegistrationParam appRegistrationParam, BindingResult result){
        return dmsRegistrationService.appRegistration(appRegistrationParam);
    }
    private CommonResult registrationFallbackInfo(AppRegistrationParam appRegistrationParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/sms/ApiPcSmsSkdDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.sms;


import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.sms.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcSmsSkdDistributionService {

    @RequestMapping(value = "/skd/createRule", method = RequestMethod.POST)
    CommonResult createRule(@RequestBody SmsSkdRuleParam smsSkdRuleParam);


    @RequestMapping(value = "/skd/deleteRule", method = RequestMethod.POST)
    CommonResult deleteRule(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/skd/updateRule/{id}", method = RequestMethod.POST)
    CommonResult updateRule(@PathVariable Long id, @RequestBody SmsSkdRuleParam smsSkdRuleParam);


    @RequestMapping(value = "/skd/listRule", method = RequestMethod.POST)
    CommonResult<CommonPage<SmsSkdRuleResult>> listRule(@RequestParam("deptId")  Long deptId,
                                                               @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                               @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);


    @RequestMapping(value = "/skd/getRuleDetail", method = RequestMethod.POST)
    CommonResult<SmsSkdRuleResult> getRuleDetail(@RequestParam("ruleId") Long ruleId);


    @RequestMapping(value = "/skd/generateSkd", method = RequestMethod.POST)
    CommonResult generateSkd(@RequestParam("ruleIds") List<Long> ruleIds, @RequestParam("startDate")String startDate, @RequestParam("endDate")String endDate);


    @RequestMapping(value = "/skd/listSkd", method = RequestMethod.POST)
    CommonResult<CommonPage<SmsSkdResult>> listSkd(@RequestBody SmsSkdParam queryParam,
                                                           @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);


    @RequestMapping(value = "/skd/listCanSkdStaff/{deptId}", method = RequestMethod.POST)
    CommonResult<List<SmsSkdRuleItemResult>> listCanSkdStaff(@PathVariable Long deptId);

}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/dto/app/AppDrugItemResult.java<|end_filename|>
package com.neu.his.cloud.service.bms.dto.app;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

@Setter
@Getter
@ToString
public class AppDrugItemResult {

    @ApiModelProperty(value = "药品名称")
    String drugName;
    @ApiModelProperty(value = "规格")
    String format;
    @ApiModelProperty(value = "当前数量")
    Long currentNum;
    @ApiModelProperty(value = "单价")
    BigDecimal price;
    @ApiModelProperty(value = "状态 0作废（删除）1未发药 2已发药 3退药")
    Integer status;

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/mapper/DmsCaseModelMapper.java<|end_filename|>
package com.neu.his.cloud.service.dms.mapper;

import com.neu.his.cloud.service.dms.model.DmsCaseModel;
import com.neu.his.cloud.service.dms.model.DmsCaseModelExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsCaseModelMapper {
    int countByExample(DmsCaseModelExample example);

    int deleteByExample(DmsCaseModelExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsCaseModel record);

    int insertSelective(DmsCaseModel record);

    List<DmsCaseModel> selectByExample(DmsCaseModelExample example);

    DmsCaseModel selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsCaseModel record, @Param("example") DmsCaseModelExample example);

    int updateByExample(@Param("record") DmsCaseModel record, @Param("example") DmsCaseModelExample example);

    int updateByPrimaryKeySelective(DmsCaseModel record);

    int updateByPrimaryKey(DmsCaseModel record);
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsDrugService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsDosageResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsDrugParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsDrugResult;

import java.util.List;

/**
 * 药品
 */
public interface DmsDrugService {

    /**
     * 描述：创建药品
     */
    int createDrug(DmsDrugParam dmsDrugParam);

    /**
     * 描述：删除药品
     */
    int deleteDrug(List<Long> ids);

    /**
     * 描述：更新药品
     */
    int updateDrug(Long id, DmsDrugParam dmsDrugParam);

    /**
     * 描述：查询药品
     */
    List<DmsDrugResult> selectDrug(DmsDrugParam dmsDrugParam, Integer pageSize, Integer pageNum);

    /**
     * 描述：查询所有药品
     */
    List<DmsDrugResult> selectAllDrug();

    /**
     * 描述：查询所有剂型
     */
    List<DmsDosageResult> selectAllDosage();

    /**
     * 描述：根据id查询药品
     */
    DmsDrugResult selectById(Long id);
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/dto/dms/DmsDrugResult.java<|end_filename|>
package com.neu.his.cloud.service.sms.dto.dms;


import com.neu.his.cloud.service.sms.model.DmsDosage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
public class DmsDrugResult  implements Serializable {
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "药品编码")
    private String code;
    @ApiModelProperty(value = "药品名称")
    private String name;
    @ApiModelProperty(value = "药品规格")
    private String format;
    @ApiModelProperty(value = "药品单价")
    private BigDecimal price;
    @ApiModelProperty(value = "包装单位")
    private String unit;
    @ApiModelProperty(value = "生产厂家")
    private String manufacturer;
    @ApiModelProperty(value = "药品剂型")
    private DmsDosage dosage;
    @ApiModelProperty(value = "药品类型")
    private Long typeId;
    @ApiModelProperty(value = "拼音助记码")
    private String mnemonicCode;
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    @ApiModelProperty(value = "库存")
    private Long stock;
    @ApiModelProperty(value = "通用名")
    private String genericName;
    @ApiModelProperty(value = "状态")
    private Integer status;

    @Override
    public String toString() {
        return "DmsDrugResult{" +
                "id='" + id + '\'' +
                ", code='" + code + '\'' +
                ", name='" + name + '\'' +
                ", format='" + format + '\'' +
                ", price=" + price +
                ", unit='" + unit + '\'' +
                ", manufacturer='" + manufacturer + '\'' +
                ", dosage=" + dosage +
                ", typeID=" + typeId +
                ", mnemonicCode='" + mnemonicCode + '\'' +
                ", createDate=" + createDate +
                ", stock=" + stock +
                ", genericName='" + genericName + '\'' +
                ", status=" + status +
                '}';
    }
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/impl/BmsFeeServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.bms.service.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.neu.his.cloud.service.bms.dto.bms.*;
import com.neu.his.cloud.service.bms.mapper.*;
import com.neu.his.cloud.service.bms.model.*;
import com.neu.his.cloud.service.bms.service.BmsFeeService;
import com.neu.his.cloud.service.bms.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.List;

@Service
public class BmsFeeServiceImpl implements BmsFeeService {
    @Autowired
    DmsRegistrationMapper dmsRegistrationMapper;
    @Autowired
    DmsNonDrugItemRecordMapper dmsNonDrugItemRecordMapper;
    @Autowired
    DmsMedicineItemRecordMapper dmsMedicineItemRecordMapper;
    @Autowired
    DmsHerbalItemRecordMapper dmsHerbalItemRecordMapper;
    @Autowired
    BmsBillsRecordMapper bmsBillsRecordMapper;
    @Autowired
    BmsInvoiceRecordMapper bmsInvoiceRecordMapper;
    @Autowired
    PmsPatientMapper pmsPatientMapper;
    @Autowired
    SmsSkdMapper smsSkdMapper;
    @Autowired
    SmsStaffMapper smsStaffMapper;
    @Autowired
    SmsRegistrationRankMapper smsRegistrationRankMapper;
    @Autowired
    SmsDeptMapper smsDeptMapper;
    @Autowired
    DmsNonDrugMapper dmsNonDrugMapper;
    @Autowired
    DmsDrugMapper dmsDrugMapper;
    @Autowired
    DmsMedicinePrescriptionRecordMapper dmsMedicinePrescriptionRecordMapper;
    @Autowired
    DmsHerbalPrescriptionRecordMapper dmsHerbalPrescriptionRecordMapper;
    //查询当日挂号人
    //1.传入病历号和挂号日期
    //2.1.如果病历号为空和挂号日期为空，则显示今天的挂号记录按时间倒序
    //2.2 如果病历号为空挂号日期不为空，则根据日期查询所有挂号，并倒序
    //2.3 如果病历号不为空，挂号日期为空，则显示该患者所有就诊信息
    //2.4 如果病历号为和挂号日期都不为空，则直接查询

    /**
     *   20190624 赵煜 排除大量空指针异常
     * @param medicalRecordNo
     * @param queryDate
     * @return
     */
    @Override
    public List<BmsRegistrationPatientResult> listRegisteredPatient(String medicalRecordNo, Date queryDate) {
        List<BmsRegistrationPatientResult> bmsRegistrationPatientResultList = new ArrayList<>();
        if (medicalRecordNo == null && queryDate == null){//如果病历号为空和挂号日期为空，则显示今天的挂号记录按创建时间倒序
            Date date = DateUtil.getDate(new Date());
            Date startOfDate = DateUtil.setMilliSecond(date,0);//毫秒设为0
            DmsRegistrationExample dmsRegistrationExample = new DmsRegistrationExample();
            dmsRegistrationExample.createCriteria().andAttendanceDateEqualTo(startOfDate);
            dmsRegistrationExample.setOrderByClause("create_time desc");
            List<DmsRegistration> dmsRegistrationList = dmsRegistrationMapper.selectByExample(dmsRegistrationExample);
            if (!dmsRegistrationList.isEmpty()){
                for (DmsRegistration dmsRegistration: dmsRegistrationList) {
                    BmsRegistrationPatientResult bmsRegistrationPatientResult = new BmsRegistrationPatientResult();
                    bmsRegistrationPatientResult.setRegistrationStatus(dmsRegistration.getStatus());
                    bmsRegistrationPatientResult.setAttendanceDate(dmsRegistration.getAttendanceDate());
                    bmsRegistrationPatientResult.setRegistrationCreateDate(dmsRegistration.getCreateTime());
                    bmsRegistrationPatientResult.setNeedBook(dmsRegistration.getNeedBook());
                    bmsRegistrationPatientResult.setRegistrationId(dmsRegistration.getId());
                    //病人name，病人出生日期，病人性别,病历号
                    PmsPatient pmsPatient = pmsPatientMapper.selectByPrimaryKey(dmsRegistration.getPatientId());
                    bmsRegistrationPatientResult.setPatientName(pmsPatient.getName());
                    bmsRegistrationPatientResult.setPatientDateOfBirth(pmsPatient.getDateOfBirth());
                    bmsRegistrationPatientResult.setPatientGender(pmsPatient.getGender());
                    bmsRegistrationPatientResult.setMedicalRecordNo(pmsPatient.getMedicalRecordNo());
                    //挂号级别name,看诊医生名
                    SmsSkd smsSkd = smsSkdMapper.selectByPrimaryKey(dmsRegistration.getSkdId());

                    SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(smsSkd==null?null:smsSkd.getStaffId());
                    SmsRegistrationRank smsRegistrationRank = smsRegistrationRankMapper.selectByPrimaryKey(smsStaff==null?null:smsStaff.getRegistrationRankId());

                    bmsRegistrationPatientResult.setRegistrationRankName(smsRegistrationRank==null?null:smsRegistrationRank.getName());
                    bmsRegistrationPatientResult.setBindDoctorName(smsStaff==null?null:smsStaff.getName());
                    //挂号科室名
                    SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(dmsRegistration.getDeptId());
                    bmsRegistrationPatientResult.setDeptName(smsDept==null?null:smsDept.getName());

                    bmsRegistrationPatientResultList.add(bmsRegistrationPatientResult);
                }
            }
            return bmsRegistrationPatientResultList;
        }
        else if (medicalRecordNo == null && queryDate != null){//如果病历号为空挂号日期不为空，则根据日期查询所有挂号，并倒序
            Date date = DateUtil.getDate(queryDate);
            Date startOfDate = DateUtil.setMilliSecond(date,0);
            DmsRegistrationExample dmsRegistrationExample = new DmsRegistrationExample();
            dmsRegistrationExample.createCriteria().andAttendanceDateEqualTo(startOfDate);
            dmsRegistrationExample.setOrderByClause("create_time desc");
            List<DmsRegistration> dmsRegistrationList = dmsRegistrationMapper.selectByExample(dmsRegistrationExample);
            if (!dmsRegistrationList.isEmpty()){
                for (DmsRegistration dmsRegistration: dmsRegistrationList) {
                    BmsRegistrationPatientResult bmsRegistrationPatientResult = new BmsRegistrationPatientResult();
                    bmsRegistrationPatientResult.setRegistrationStatus(dmsRegistration.getStatus());
                    bmsRegistrationPatientResult.setAttendanceDate(dmsRegistration.getAttendanceDate());
                    bmsRegistrationPatientResult.setRegistrationCreateDate(dmsRegistration.getCreateTime());
                    bmsRegistrationPatientResult.setNeedBook(dmsRegistration.getNeedBook());
                    bmsRegistrationPatientResult.setRegistrationId(dmsRegistration.getId());
                    //病人name，病人出生日期，病人性别,病历号
                    PmsPatient pmsPatient = pmsPatientMapper.selectByPrimaryKey(dmsRegistration.getPatientId());
                    bmsRegistrationPatientResult.setPatientName(pmsPatient.getName());
                    bmsRegistrationPatientResult.setPatientDateOfBirth(pmsPatient.getDateOfBirth());
                    bmsRegistrationPatientResult.setPatientGender(pmsPatient.getGender());
                    bmsRegistrationPatientResult.setMedicalRecordNo(pmsPatient.getMedicalRecordNo());
                    //挂号级别name,看诊医生名

                    SmsSkd smsSkd = smsSkdMapper.selectByPrimaryKey(dmsRegistration.getSkdId());
                    SmsStaff smsStaff=null;
                    SmsRegistrationRank smsRegistrationRank=null;
                    if(null != smsSkd)
                      smsStaff = smsStaffMapper.selectByPrimaryKey(smsSkd.getStaffId());
                    if(smsStaff!=null)
                        smsRegistrationRank = smsRegistrationRankMapper.selectByPrimaryKey(smsStaff.getRegistrationRankId());
                    if(smsRegistrationRank!=null)
                        bmsRegistrationPatientResult.setRegistrationRankName(smsRegistrationRank.getName());
                    if(smsStaff!=null)
                        bmsRegistrationPatientResult.setBindDoctorName(smsStaff.getName());
                    //挂号科室名
                    SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(dmsRegistration.getDeptId());
                    if(null != smsDept)
                        bmsRegistrationPatientResult.setDeptName(smsDept.getName());

                    bmsRegistrationPatientResultList.add(bmsRegistrationPatientResult);
                }
            }
            return bmsRegistrationPatientResultList;
        }
        else if (medicalRecordNo != null && queryDate == null){//如果病历号不为空，挂号日期为空，则显示该患者所有就诊信息
            PmsPatientExample pmsPatientExample = new PmsPatientExample();
            pmsPatientExample.createCriteria().andMedicalRecordNoEqualTo(medicalRecordNo);
            List<PmsPatient> pmsPatientList = pmsPatientMapper.selectByExample(pmsPatientExample);
            //如果数据正常，则一个病历号只会存在一个病人

            if (!CollectionUtil.isEmpty(pmsPatientList)){//如果有对应的患者记录
                PmsPatient pmsPatient = pmsPatientList.get(0);

                //查询该患者的所有就诊记录并按时间倒序
                DmsRegistrationExample dmsRegistrationExample = new DmsRegistrationExample();
                dmsRegistrationExample.createCriteria().andPatientIdEqualTo(pmsPatient.getId());
                dmsRegistrationExample.setOrderByClause("create_time desc");
                List<DmsRegistration> dmsRegistrationList = dmsRegistrationMapper.selectByExample(dmsRegistrationExample);
                for (DmsRegistration dmsRegistration:dmsRegistrationList) {
                    BmsRegistrationPatientResult bmsRegistrationPatientResult = new BmsRegistrationPatientResult();
                    bmsRegistrationPatientResult.setRegistrationStatus(dmsRegistration.getStatus());
                    bmsRegistrationPatientResult.setAttendanceDate(dmsRegistration.getAttendanceDate());
                    bmsRegistrationPatientResult.setRegistrationCreateDate(dmsRegistration.getCreateTime());
                    bmsRegistrationPatientResult.setNeedBook(dmsRegistration.getNeedBook());
                    bmsRegistrationPatientResult.setRegistrationId(dmsRegistration.getId());
                    //病人name，病人出生日期，病人性别,病历号
                    bmsRegistrationPatientResult.setPatientName(pmsPatient.getName());
                    bmsRegistrationPatientResult.setPatientDateOfBirth(pmsPatient.getDateOfBirth());
                    bmsRegistrationPatientResult.setPatientGender(pmsPatient.getGender());
                    bmsRegistrationPatientResult.setMedicalRecordNo(pmsPatient.getMedicalRecordNo());
                    //挂号级别name
                    SmsSkd smsSkd = smsSkdMapper.selectByPrimaryKey(dmsRegistration.getSkdId());
                    SmsStaff smsStaff =null;
                    SmsRegistrationRank smsRegistrationRank=null;

                    if(null != smsSkd)
                        smsStaff = smsStaffMapper.selectByPrimaryKey(smsSkd.getStaffId());
                    //挂号级别name
                    if(null !=smsStaff)
                        smsRegistrationRank = smsRegistrationRankMapper.selectByPrimaryKey(smsStaff.getRegistrationRankId());
                    //挂号级别名
                    if(null != smsRegistrationRank)
                        bmsRegistrationPatientResult.setRegistrationRankName(smsRegistrationRank.getName());
                    // 医生名
                    if(null != smsStaff)
                        bmsRegistrationPatientResult.setBindDoctorName(smsStaff.getName());
                    //挂号科室名
                    SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(dmsRegistration.getDeptId());
                    if(null != smsDept)
                        bmsRegistrationPatientResult.setDeptName(smsDept.getName());


                    bmsRegistrationPatientResultList.add(bmsRegistrationPatientResult);
                }
                return bmsRegistrationPatientResultList;
            }
            else{////如果没有对应的患者记录
                return null;
            }
        }
        else {//如果病历号为和挂号日期都不为空，则直接查询
            Date date = DateUtil.getDate(queryDate);
            Date startOfDate = DateUtil.setMilliSecond(date,0);
            PmsPatientExample pmsPatientExample = new PmsPatientExample();
            pmsPatientExample.createCriteria().andMedicalRecordNoEqualTo(medicalRecordNo);
            List<PmsPatient> pmsPatientList = pmsPatientMapper.selectByExample(pmsPatientExample);
            if (!pmsPatientList.isEmpty()){//如果有对应的患者记录
                PmsPatient pmsPatient = pmsPatientList.get(0);
                DmsRegistrationExample dmsRegistrationExample = new DmsRegistrationExample();
                dmsRegistrationExample.createCriteria().andPatientIdEqualTo(pmsPatient.getId()).andAttendanceDateEqualTo(startOfDate);
                dmsRegistrationExample.setOrderByClause("create_time desc");
                List<DmsRegistration> dmsRegistrationList = dmsRegistrationMapper.selectByExample(dmsRegistrationExample);
                for (DmsRegistration dmsRegistration:dmsRegistrationList) {
                    BmsRegistrationPatientResult bmsRegistrationPatientResult = new BmsRegistrationPatientResult();
                    bmsRegistrationPatientResult.setRegistrationStatus(dmsRegistration.getStatus());
                    bmsRegistrationPatientResult.setAttendanceDate(dmsRegistration.getAttendanceDate());
                    bmsRegistrationPatientResult.setRegistrationCreateDate(dmsRegistration.getCreateTime());
                    bmsRegistrationPatientResult.setNeedBook(dmsRegistration.getNeedBook());
                    bmsRegistrationPatientResult.setRegistrationId(dmsRegistration.getId());
                    //病人name，病人出生日期，病人性别,病历号
                    bmsRegistrationPatientResult.setPatientName(pmsPatient.getName());
                    bmsRegistrationPatientResult.setPatientDateOfBirth(pmsPatient.getDateOfBirth());
                    bmsRegistrationPatientResult.setPatientGender(pmsPatient.getGender());
                    bmsRegistrationPatientResult.setMedicalRecordNo(pmsPatient.getMedicalRecordNo());
                    //挂号级别name,看诊医生名
                    SmsSkd smsSkd = smsSkdMapper.selectByPrimaryKey(dmsRegistration.getSkdId());
                    SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(smsSkd.getStaffId());
                    SmsRegistrationRank smsRegistrationRank = smsRegistrationRankMapper.selectByPrimaryKey(smsStaff.getRegistrationRankId());
                    if(null!=smsRegistrationRank)
                        bmsRegistrationPatientResult.setRegistrationRankName(smsRegistrationRank.getName());
                    if(null != smsStaff)
                        bmsRegistrationPatientResult.setBindDoctorName(smsStaff.getName());
                    //挂号科室名
                    SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(dmsRegistration.getDeptId());
                    if(null != smsDept)
                    bmsRegistrationPatientResult.setDeptName(smsDept.getName());

                    bmsRegistrationPatientResultList.add(bmsRegistrationPatientResult);
                }
                return bmsRegistrationPatientResultList;
            }
            else{//如果没有对应的患者记录
                return null;
            }
        }
    }
    //根据挂号id查找出未缴费项目
    //1.传入挂号id
    //2.查询非药品记录表、两个处方表的信息（状态为未缴费）status为1，
    //3.封装并返回
    @Override
    public List<BmsChargeResult> listChargeByRegistrationId(Long registrationId){
        List<BmsChargeResult> bmsChargeResultList = new ArrayList<>();
        //非药品
        DmsNonDrugItemRecordExample dmsNonDrugItemRecordExample = new DmsNonDrugItemRecordExample();
        dmsNonDrugItemRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId).andStatusEqualTo(1);
        dmsNonDrugItemRecordExample.setOrderByClause("create_time asc");
        List<DmsNonDrugItemRecord> dmsNonDrugItemRecordList = dmsNonDrugItemRecordMapper.selectByExample(dmsNonDrugItemRecordExample);
        if (!dmsNonDrugItemRecordList.isEmpty()){
            for (DmsNonDrugItemRecord dmsNonDrugItemRecord: dmsNonDrugItemRecordList) {
                BmsChargeResult bmsChargeResult = new BmsChargeResult();
                bmsChargeResult.setId(dmsNonDrugItemRecord.getId());//是药品id或非药品id还是成药记录项id、草药记录项id、非药品记录项id（后者）
                bmsChargeResult.setAmount(dmsNonDrugItemRecord.getAmount());
                bmsChargeResult.setCreateTime(dmsNonDrugItemRecord.getCreateTime());
                bmsChargeResult.setStatus(1);
                //缴费项名称
                DmsNonDrug dmsNonDrug = dmsNonDrugMapper.selectByPrimaryKey(dmsNonDrugItemRecord.getNoDrugId());
                bmsChargeResult.setName(dmsNonDrug.getName());
                //type
                //bmsChargeResult的type：1检查 2检验 3处置
                //dmsNonDrugItemRecord的type：0检查 1检验  2处置
                if (dmsNonDrugItemRecord.getType() == 0){
                    bmsChargeResult.setType(1);
                }
                else if (dmsNonDrugItemRecord.getType() == 1){
                    bmsChargeResult.setType(2);
                }
                else if (dmsNonDrugItemRecord.getType() == 2){
                    bmsChargeResult.setType(3);
                }
                bmsChargeResultList.add(bmsChargeResult);
            }
        }
        //成药处方
        DmsMedicinePrescriptionRecordExample dmsMedicinePrescriptionRecordExample = new DmsMedicinePrescriptionRecordExample();
        dmsMedicinePrescriptionRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId).andStatusEqualTo(1);
        dmsMedicinePrescriptionRecordExample.setOrderByClause("create_time asc");
        List<DmsMedicinePrescriptionRecord> dmsMedicinePrescriptionRecordList = dmsMedicinePrescriptionRecordMapper.selectByExample(dmsMedicinePrescriptionRecordExample);
        if (!dmsMedicinePrescriptionRecordList.isEmpty()){
            for(DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord : dmsMedicinePrescriptionRecordList){
                BmsChargeResult bmsChargeResult = new BmsChargeResult();
                bmsChargeResult.setId(dmsMedicinePrescriptionRecord.getId());
                bmsChargeResult.setCreateTime(dmsMedicinePrescriptionRecord.getCreateTime());
                bmsChargeResult.setName(dmsMedicinePrescriptionRecord.getName());
                bmsChargeResult.setAmount(dmsMedicinePrescriptionRecord.getAmount());
                bmsChargeResult.setType(5);
                bmsChargeResultList.add(bmsChargeResult);
            }

        }
        //草药处方
        DmsHerbalPrescriptionRecordExample dmsHerbalPrescriptionRecordExample = new DmsHerbalPrescriptionRecordExample();
        dmsHerbalPrescriptionRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId).andStatusEqualTo(1);
        dmsHerbalPrescriptionRecordExample.setOrderByClause("create_time asc");
        List<DmsHerbalPrescriptionRecord> dmsHerbalPrescriptionRecordList = dmsHerbalPrescriptionRecordMapper.selectByExample(dmsHerbalPrescriptionRecordExample);
        if (!dmsHerbalPrescriptionRecordList.isEmpty()){
            for (DmsHerbalPrescriptionRecord dmsHerbalPrescriptionRecord : dmsHerbalPrescriptionRecordList){//遍历处方
                BmsChargeResult bmsChargeResult = new BmsChargeResult();
                bmsChargeResult.setId(dmsHerbalPrescriptionRecord.getId());
                bmsChargeResult.setCreateTime(dmsHerbalPrescriptionRecord.getCreateTime());
                bmsChargeResult.setName(dmsHerbalPrescriptionRecord.getName());
                bmsChargeResult.setAmount(dmsHerbalPrescriptionRecord.getAmount());
                bmsChargeResult.setType(4);
                bmsChargeResultList.add(bmsChargeResult);
            }
        }
        return bmsChargeResultList;
    }
    //收费
    //1.传入收费项目ids和对应type（0 挂号 1检查 2检验 3处置 4草药 5成药）、发票号、操作人id，遍历并判断项目状态是否为1，并修改状态为2，顺便查出挂号id等字段
    //2.根据挂号id查出账单记录，并关联项目（更新串）
    //4.插入发票
    @Override
    public int charge(List<BmsChargeParam> bmsChargeParamList) {
        if (bmsChargeParamList.isEmpty()){
            return 0;
        }
        else{
            //这些属性插入发票的时候要用
            Long billId = 0l;//账单id
            BigDecimal totalAmount = new BigDecimal(0.0);//总金额  每一项叠加
            String itemList = "";//项目列表串 叠加

            for (BmsChargeParam bmsChargeParam : bmsChargeParamList){
                Integer type = bmsChargeParam.getType();
                if (type == 1 || type == 2 || type == 3){//1检查 2检验 3处置
                    DmsNonDrugItemRecord dmsNonDrugItemRecord = dmsNonDrugItemRecordMapper.selectByPrimaryKey(bmsChargeParam.getChargeItemId());
                    if (dmsNonDrugItemRecord.getStatus() == 1){
                        dmsNonDrugItemRecord.setStatus(2);
                        dmsNonDrugItemRecordMapper.updateByPrimaryKeySelective(dmsNonDrugItemRecord);
                    }
                    //根据挂号id查出账单记录，并关联项目（更新串）
                    Long registrationId = dmsNonDrugItemRecord.getRegistrationId();
                    BmsBillsRecordExample bmsBillsRecordExample = new BmsBillsRecordExample();
                    bmsBillsRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId);
                    List<BmsBillsRecord> bmsBillsRecordList = bmsBillsRecordMapper.selectByExample(bmsBillsRecordExample);
                    if (!bmsBillsRecordList.isEmpty()){
                        BmsBillsRecord bmsBillsRecord = bmsBillsRecordList.get(0);
                        String recordList = bmsBillsRecord.getRecordList();
                        if (recordList == null){
                            recordList = "";
                        }
                        String insertRecord = dmsNonDrugItemRecord.getId() + "," + type + "><";
                        recordList = recordList + insertRecord;
                        bmsBillsRecord.setRecordList(recordList);
                        bmsBillsRecordMapper.updateByExampleSelective(bmsBillsRecord,bmsBillsRecordExample);

                        billId = bmsBillsRecord.getId();//账单id:插入发票的时候要用
                        itemList = itemList + dmsNonDrugItemRecord.getId() + "," + type + "," + bmsChargeParam.getAmount() + "><";//项目列表串:插入发票的时候要用
                        totalAmount = totalAmount.add(bmsChargeParam.getAmount());//金额累加
                    }
                }
                else if (type == 4){//4草药
                    DmsHerbalPrescriptionRecord dmsHerbalPrescriptionRecord = dmsHerbalPrescriptionRecordMapper.selectByPrimaryKey(bmsChargeParam.getChargeItemId());
                    if (dmsHerbalPrescriptionRecord.getStatus() == 1){
                        dmsHerbalPrescriptionRecord.setStatus(2);
                        dmsHerbalPrescriptionRecordMapper.updateByPrimaryKeySelective(dmsHerbalPrescriptionRecord);
                    }
                    //根据挂号id查出账单记录，并关联项目（更新串）
                    Long registrationId = dmsHerbalPrescriptionRecord.getRegistrationId();
                    BmsBillsRecordExample bmsBillsRecordExample = new BmsBillsRecordExample();
                    bmsBillsRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId);
                    List<BmsBillsRecord> bmsBillsRecordList = bmsBillsRecordMapper.selectByExample(bmsBillsRecordExample);
                    if (!bmsBillsRecordList.isEmpty()){
                        BmsBillsRecord bmsBillsRecord = bmsBillsRecordList.get(0);
                        String recordList = bmsBillsRecord.getRecordList();
                        if (recordList == null){
                            recordList = "";
                        }
                        String insertRecord = dmsHerbalPrescriptionRecord.getId() + "," + type + "><";
                        recordList = recordList + insertRecord;
                        bmsBillsRecord.setRecordList(recordList);
                        bmsBillsRecordMapper.updateByExampleSelective(bmsBillsRecord,bmsBillsRecordExample);

                        billId = bmsBillsRecord.getId();//账单id:插入发票的时候要用
                        itemList = itemList + dmsHerbalPrescriptionRecord.getId() + "," + type + "," + bmsChargeParam.getAmount() + "><";//项目列表串:插入发票的时候要用
                        totalAmount = totalAmount.add(bmsChargeParam.getAmount());//金额累加
                    }
                }
                else if (type == 5){//5成药
                    DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord = dmsMedicinePrescriptionRecordMapper.selectByPrimaryKey(bmsChargeParam.getChargeItemId());
                    if (dmsMedicinePrescriptionRecord.getStatus() == 1){
                        dmsMedicinePrescriptionRecord.setStatus(2);
                        dmsMedicinePrescriptionRecordMapper.updateByPrimaryKeySelective(dmsMedicinePrescriptionRecord);
                    }
                    //根据挂号id查出账单记录，并关联项目（更新串）
                    Long registrationId = dmsMedicinePrescriptionRecord.getRegistrationId();
                    BmsBillsRecordExample bmsBillsRecordExample = new BmsBillsRecordExample();
                    bmsBillsRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId);
                    List<BmsBillsRecord> bmsBillsRecordList = bmsBillsRecordMapper.selectByExample(bmsBillsRecordExample);
                    if (!bmsBillsRecordList.isEmpty()){
                        BmsBillsRecord bmsBillsRecord = bmsBillsRecordList.get(0);
                        String recordList = bmsBillsRecord.getRecordList();
                        if (recordList == null){
                            recordList = "";
                        }
                        String insertRecord = dmsMedicinePrescriptionRecord.getId() + "," + type + "><";
                        recordList = recordList + insertRecord;
                        bmsBillsRecord.setRecordList(recordList);
                        bmsBillsRecordMapper.updateByExampleSelective(bmsBillsRecord,bmsBillsRecordExample);

                        billId = bmsBillsRecord.getId();//账单id:插入发票的时候要用
                        itemList = itemList + dmsMedicinePrescriptionRecord.getId() + "," + type + "," + bmsChargeParam.getAmount() + "><";//项目列表串:插入发票的时候要用
                        totalAmount = totalAmount.add(bmsChargeParam.getAmount());//金额累加
                    }
                }
            }
            //插入发票
            BmsInvoiceRecord bmsInvoiceRecord = new BmsInvoiceRecord();
            bmsInvoiceRecord.setCreateTime(new Date());
            bmsInvoiceRecord.setInvoiceNo(bmsChargeParamList.get(0).getInvoiceNo());
            bmsInvoiceRecord.setBillId(billId);
            bmsInvoiceRecord.setAmount(totalAmount);
            bmsInvoiceRecord.setOperatorId(bmsChargeParamList.get(0).getOperatorId());
            bmsInvoiceRecord.setSettlementCatId(bmsChargeParamList.get(0).getSettlementCatId());
            bmsInvoiceRecord.setItemList(itemList);
            bmsInvoiceRecord.setType(1);
            bmsInvoiceRecordMapper.insertSelective(bmsInvoiceRecord);

            return 1;
        }
    }
    //退费查询：根据挂号id查找出所有发票
    //1.传入挂号id,根据挂号id查找账单id
    //2.根据账单id查询所有发票，type为（1  正常）
    //3.解析串，并封装成对象（筛选非药品（status=2未登记（已缴费））,药品（遍历药品项，封装可退处方项和处方）、计算退款金额），
    @Override
    public List<BmsRefundChargeResult> listRefundByRegistrationId(Long registrationId) {
        List<BmsRefundChargeResult> bmsRefundChargeResultList = new ArrayList<>();
        //根据挂号id查找账单id
        BmsBillsRecordExample bmsBillsRecordExample = new BmsBillsRecordExample();
        bmsBillsRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<BmsBillsRecord> bmsBillsRecordList = bmsBillsRecordMapper.selectByExample(bmsBillsRecordExample);
        if (!bmsBillsRecordList.isEmpty()){
            //根据账单id查询所有发票，type为（1  正常）
            BmsBillsRecord bmsBillsRecord = bmsBillsRecordList.get(0);
            Long billId = bmsBillsRecord.getId();
            BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();
            bmsInvoiceRecordExample.createCriteria().andBillIdEqualTo(billId).andTypeEqualTo(1);
            List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
            for (BmsInvoiceRecord bmsInvoiceRecord : bmsInvoiceRecordList){
                String itemList = bmsInvoiceRecord.getItemList();
                String[][] resolvedItemList = resolveItemList(itemList);
                if (resolvedItemList.length != 0){
                        for(int x = 0; x < resolvedItemList.length ; x++) {
                         if(StringUtils.isEmpty(resolvedItemList[x][0])){
                             continue;
                         }
                        Long id = Long.valueOf(resolvedItemList[x][0]);
                        Integer type = Integer.valueOf(resolvedItemList[x][1]);
                        BigDecimal amount = new BigDecimal(resolvedItemList[x][2]);

                            System.err.println(id + " "+type+" "+amount);

                            //非药品
                        if (type == 1 || type == 2 || type == 3){
                            DmsNonDrugItemRecord dmsNonDrugItemRecord = dmsNonDrugItemRecordMapper.selectByPrimaryKey(id);
                            if (dmsNonDrugItemRecord.getStatus() == 2){//status=2未登记（已缴费）
                                BmsRefundChargeResult bmsRefundChargeResult = new BmsRefundChargeResult();
                                bmsRefundChargeResult.setInvoiceIdfNo(bmsInvoiceRecord.getInvoiceNo());
                                bmsRefundChargeResult.setId(dmsNonDrugItemRecord.getId());
                                //退款项名称
                                DmsNonDrug dmsNonDrug = dmsNonDrugMapper.selectByPrimaryKey(dmsNonDrugItemRecord.getNoDrugId());
                                bmsRefundChargeResult.setName(dmsNonDrug.getName());

                                bmsRefundChargeResult.setAmount(dmsNonDrugItemRecord.getAmount());
                                bmsRefundChargeResult.setType(type);
                                bmsRefundChargeResult.setStatus(dmsNonDrugItemRecord.getStatus());
                                bmsRefundChargeResult.setCreateTime(dmsNonDrugItemRecord.getCreateTime());
                                bmsRefundChargeResult.setNum(1l);

                                bmsRefundChargeResultList.add(bmsRefundChargeResult);
                            }
                        }
                        //草药
                        if (type == 4){
                            DmsHerbalItemRecordExample dmsHerbalItemRecordExample = new DmsHerbalItemRecordExample();
                            dmsHerbalItemRecordExample.createCriteria().andPrescriptionIdEqualTo(id);
                            List<DmsHerbalItemRecord> dmsHerbalItemRecordList = dmsHerbalItemRecordMapper.selectByExample(dmsHerbalItemRecordExample);
                            if (!dmsHerbalItemRecordList.isEmpty()){
                                for (DmsHerbalItemRecord dmsHerbalItemRecord : dmsHerbalItemRecordList){
                                        if ((dmsHerbalItemRecord.getStatus() == 3 || dmsHerbalItemRecord.getStatus() == 1) && dmsHerbalItemRecord.getCurrentNum() != 0l){//3退药、未发药
                                        BmsRefundChargeResult bmsRefundChargeResult = new BmsRefundChargeResult();
                                        bmsRefundChargeResult.setInvoiceIdfNo(bmsInvoiceRecord.getInvoiceNo());
                                        bmsRefundChargeResult.setId(dmsHerbalItemRecord.getId());
                                        //退款项名称
                                        DmsDrug dmsDrug = dmsDrugMapper.selectByPrimaryKey(dmsHerbalItemRecord.getDrugId());
                                        bmsRefundChargeResult.setName(dmsDrug.getName());

                                        if (dmsHerbalItemRecord.getStatus() == 3){
                                            bmsRefundChargeResult.setAmount(dmsDrug.getPrice().multiply(new BigDecimal(dmsHerbalItemRecord.getCurrentNum())));
                                        }
                                        else{
                                            bmsRefundChargeResult.setAmount(dmsDrug.getPrice().multiply(new BigDecimal(dmsHerbalItemRecord.getTotalNum())));
                                        }
                                        bmsRefundChargeResult.setType(type);
                                        bmsRefundChargeResult.setStatus(dmsHerbalItemRecord.getStatus());
                                        //开立时间
                                        DmsHerbalPrescriptionRecord dmsHerbalPrescriptionRecord = dmsHerbalPrescriptionRecordMapper.selectByPrimaryKey(dmsHerbalItemRecord.getPrescriptionId());
                                        bmsRefundChargeResult.setCreateTime(dmsHerbalPrescriptionRecord.getCreateTime());

                                        bmsRefundChargeResult.setNum(dmsHerbalItemRecord.getCurrentNum());

                                        bmsRefundChargeResultList.add(bmsRefundChargeResult);
                                    }

                                }
                            }
                        }
                        //成药
                        if (type == 5){
                            DmsMedicineItemRecordExample dmsMedicineItemRecordExample = new DmsMedicineItemRecordExample();
                            dmsMedicineItemRecordExample.createCriteria().andPrescriptionIdEqualTo(id);
                            List<DmsMedicineItemRecord> dmsMedicineItemRecordList = dmsMedicineItemRecordMapper.selectByExample(dmsMedicineItemRecordExample);
                            if (!dmsMedicineItemRecordList.isEmpty()){
                                for (DmsMedicineItemRecord dmsMedicineItemRecord : dmsMedicineItemRecordList){
                                    System.err.println("getCurrentNum:"+dmsMedicineItemRecord.getCurrentNum());
                                    System.err.println("getRefundNum:"+dmsMedicineItemRecord.getRefundNum());
                                    System.err.println("getStatus:"+dmsMedicineItemRecord.getStatus());

                                    if((dmsMedicineItemRecord.getStatus() == 1 && dmsMedicineItemRecord.getCurrentNum()!= 0)|| (dmsMedicineItemRecord.getStatus() == 3  && dmsMedicineItemRecord.getRefundNum() != 0))
                                    {//退药、未发药(现有数量不为0)
                                        BmsRefundChargeResult bmsRefundChargeResult = new BmsRefundChargeResult();
                                        bmsRefundChargeResult.setInvoiceIdfNo(bmsInvoiceRecord.getInvoiceNo());
                                        bmsRefundChargeResult.setId(dmsMedicineItemRecord.getId());
                                        //退款项名称
                                        DmsDrug dmsDrug = dmsDrugMapper.selectByPrimaryKey(dmsMedicineItemRecord.getDrugId());
                                        bmsRefundChargeResult.setName(dmsDrug.getName());
                                        if (dmsMedicineItemRecord.getStatus() == 3){
                                            bmsRefundChargeResult.setAmount(dmsDrug.getPrice().multiply(new BigDecimal(dmsMedicineItemRecord.getRefundNum())));
                                        }
                                        else{
                                            bmsRefundChargeResult.setAmount(dmsDrug.getPrice().multiply(new BigDecimal(dmsMedicineItemRecord.getNum())));
                                        }
                                        bmsRefundChargeResult.setType(type);
                                        bmsRefundChargeResult.setStatus(dmsMedicineItemRecord.getStatus());
                                        //开立时间
                                        DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord = dmsMedicinePrescriptionRecordMapper.selectByPrimaryKey(id);
                                        bmsRefundChargeResult.setCreateTime(dmsMedicinePrescriptionRecord.getCreateTime());

                                        bmsRefundChargeResult.setNum(dmsMedicineItemRecord.getCurrentNum());

                                        bmsRefundChargeResultList.add(bmsRefundChargeResult);
                                    }
                                }
                            }
                        }
                    }

                }
            }
            //Collections.sort(bmsRefundChargeResultList,Comparator.comparing(BmsRefundChargeResult::getInvoiceIdfNo));
            bmsRefundChargeResultList.sort(new Comparator<BmsRefundChargeResult>() {
                @Override
                public int compare(BmsRefundChargeResult o1, BmsRefundChargeResult o2) {
                    return o1.getInvoiceIdfNo().compareTo(o2.getInvoiceIdfNo());//升序
                    //return o2.getInvoiceIdfNo().compareTo(o1.getInvoiceIdfNo());//降序
                }
            });

            return bmsRefundChargeResultList;
        }
        return null;
    }
    //非药品、药品退费过程
    //1.传入待退项目记录（成药、草药、非药品）ids、原发票、操作员Id、type、退款金额
    //2.  根据原发票号分类(有几个发票就是几类)
    //3.1.如果为非药品，则修改状态为5（已退费）
    //3.2.如果为药品，则根据项目记录（成药、草药）id和type修改处方项（refund变为0，status变为2已发药），更新处方记录中的amount
    //4.新增一条冲红发票记录（金额为原发票总钱负值，与原发票关联），原发票状态改为3
    //5.插入新发票（重新拼串，并更新amount为原amount总退款金额）
    @Override
    public int refundCharge(List<BmsRefundChargeParam> bmsRefundChargeParamList) {
        if (!bmsRefundChargeParamList.isEmpty()){
            BigDecimal totalRefundAmount = new BigDecimal(0);//存要退的总金额
            List<BmsInvoiceItemList> refundList = new ArrayList<>();//存退了哪些项目
            for (BmsRefundChargeParam bmsRefundChargeParam : bmsRefundChargeParamList){

                System.err.println("bmsRefundChargeParam: "+bmsRefundChargeParam);

                Integer type = bmsRefundChargeParam.getType();
                //非药品
                if (type == 1 || type == 2 || type ==3){
                    DmsNonDrugItemRecord dmsNonDrugItemRecord = dmsNonDrugItemRecordMapper.selectByPrimaryKey(bmsRefundChargeParam.getChargeItemId());
                    dmsNonDrugItemRecord.setStatus(5);//5（已退费）
                    dmsNonDrugItemRecordMapper.updateByPrimaryKeySelective(dmsNonDrugItemRecord);
                    //加入refundList，非药品直接加入
                    BmsInvoiceItemList bmsInvoiceItemList = new BmsInvoiceItemList(bmsRefundChargeParam.getChargeItemId(),type,new BigDecimal(0));
                    totalRefundAmount = totalRefundAmount.add(bmsRefundChargeParam.getRefundAmount());
                    refundList.add(bmsInvoiceItemList);
                }
                //草药
                if (type == 4){
                    DmsHerbalItemRecord dmsHerbalItemRecord = dmsHerbalItemRecordMapper.selectByPrimaryKey(bmsRefundChargeParam.getChargeItemId());
                    if (dmsHerbalItemRecord.getStatus() == 1){//未发药
                        dmsHerbalItemRecord.setCurrentNum(0l);
                    }
                    dmsHerbalItemRecord.setStatus(2);//2已发药
                    dmsHerbalItemRecordMapper.updateByPrimaryKeySelective(dmsHerbalItemRecord);
                    //更新处方记录中的amount
                    Long prescriptionId = dmsHerbalItemRecord.getPrescriptionId();
                    DmsHerbalPrescriptionRecord dmsHerbalPrescriptionRecord = dmsHerbalPrescriptionRecordMapper.selectByPrimaryKey(prescriptionId);
                    dmsHerbalPrescriptionRecord.setAmount(dmsHerbalPrescriptionRecord.getAmount().subtract(bmsRefundChargeParam.getRefundAmount()));
                    dmsHerbalPrescriptionRecordMapper.updateByPrimaryKeySelective(dmsHerbalPrescriptionRecord);
                    totalRefundAmount = totalRefundAmount.add(bmsRefundChargeParam.getRefundAmount());
                    //加入refundList，药品按照处方加入
                    if (!refundList.isEmpty()){
                        int flag = 0;//标志该处方是否已加入
                        int index = 0;//若该处方以加入，则标志该处方在list的index
                        for (int i = 0;i < refundList.size();i++){
                            if (refundList.get(i).getId() == dmsHerbalPrescriptionRecord.getId() && refundList.get(i).getType() == type){
                                flag = 1;
                                index = i;
                                break;
                            }
                        }
                        if (flag ==1){//若存在，则跟新金额
                            BigDecimal oldAmount = refundList.get(index).getAmount();
                            BigDecimal newAmount = oldAmount.add(bmsRefundChargeParam.getRefundAmount());
                            refundList.get(index).setAmount(newAmount);
                        }
                        else{//如果不存在，则加入refundList
                            BmsInvoiceItemList bmsInvoiceItemList = new BmsInvoiceItemList(dmsHerbalPrescriptionRecord.getId(),type,bmsRefundChargeParam.getRefundAmount());
                            refundList.add(bmsInvoiceItemList);
                        }
                    }
                }
                //成药
                if (type == 5){
                    DmsMedicineItemRecord dmsMedicineItemRecord = dmsMedicineItemRecordMapper.selectByPrimaryKey(bmsRefundChargeParam.getChargeItemId());
                    dmsMedicineItemRecord.setRefundNum(0l);
                    if (dmsMedicineItemRecord.getStatus() == 1){//未发药
                        dmsMedicineItemRecord.setCurrentNum(0l);
                    }
                    dmsMedicineItemRecord.setStatus(2);//2已发药
                    dmsMedicineItemRecordMapper.updateByPrimaryKeySelective(dmsMedicineItemRecord);
                    //更新处方记录中的amount
                    Long prescriptionId = dmsMedicineItemRecord.getPrescriptionId();
                    DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord = dmsMedicinePrescriptionRecordMapper.selectByPrimaryKey(prescriptionId);
                    dmsMedicinePrescriptionRecord.setAmount(dmsMedicinePrescriptionRecord.getAmount().subtract(bmsRefundChargeParam.getRefundAmount()));
                    dmsMedicinePrescriptionRecordMapper.updateByPrimaryKeySelective(dmsMedicinePrescriptionRecord);
                    totalRefundAmount = totalRefundAmount.add(bmsRefundChargeParam.getRefundAmount());
                    //加入refundList，药品按照处方加入
                    if (!refundList.isEmpty()){
                        int flag = 0;//标志该处方是否已加入
                        int index = 0;//若该处方以加入，则标志该处方在list的index
                        for (int i = 0;i < refundList.size();i++){
                            if (refundList.get(i).getId() == dmsMedicinePrescriptionRecord.getId() && refundList.get(i).getType() == type){
                                flag = 1;
                                index = i;
                                break;
                            }
                        }
                        if (flag ==1){//若存在，则跟新金额
                            BigDecimal oldAmount = refundList.get(index).getAmount();
                            BigDecimal newAmount = oldAmount.add(bmsRefundChargeParam.getRefundAmount());
                            refundList.get(index).setAmount(newAmount);
                        }
                        else{//如果不存在，则加入refundList
                            BmsInvoiceItemList bmsInvoiceItemList = new BmsInvoiceItemList(dmsMedicinePrescriptionRecord.getId(),type,bmsRefundChargeParam.getRefundAmount());
                            refundList.add(bmsInvoiceItemList);
                        }
                    }
                }
            }
            Long invoiceNo = bmsRefundChargeParamList.get(0).getInvoiceNo();//原发票号
            Long redInvoiceNo = bmsRefundChargeParamList.get(0).getRedInvoiceNo();//冲红发票号
            Long newInvoiceNo = bmsRefundChargeParamList.get(0).getNewInvoiceNo();//新发票号
            Long operatorId = bmsRefundChargeParamList.get(0).getOperatorId();//操作员id
            Long settlementCatId = bmsRefundChargeParamList.get(0).getSettlementCatId();//结算类型
            //for (Long invoiceNO : sortByInvoiceOfAmount.keySet()){
            BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();
            bmsInvoiceRecordExample.createCriteria().andInvoiceNoEqualTo(invoiceNo);
            List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
            if (!bmsInvoiceRecordList.isEmpty()){
                Date date = new Date();

                BmsInvoiceRecord bmsInvoiceRecord = bmsInvoiceRecordList.get(0);

                //新增一条冲红发票记录（金额为原发票总钱负值，与原发票关联）
                BigDecimal oldAmount = bmsInvoiceRecord.getAmount();//原发票的金额
                BmsInvoiceRecord redBmsInvoiceRecord = new BmsInvoiceRecord();
                redBmsInvoiceRecord.setAmount(oldAmount.multiply(new BigDecimal(-1)));
                redBmsInvoiceRecord.setAssociateId(bmsInvoiceRecord.getId());
                redBmsInvoiceRecord.setInvoiceNo(redInvoiceNo);
                redBmsInvoiceRecord.setCreateTime(date);
                redBmsInvoiceRecord.setOperatorId(operatorId);
                redBmsInvoiceRecord.setBillId(bmsInvoiceRecord.getBillId());
                redBmsInvoiceRecord.setType(2);//2冲红
                bmsInvoiceRecordMapper.insertSelective(redBmsInvoiceRecord);

                //插入新发票（重新拼串，并更新amount为原amount总退款金额）
                BigDecimal newAmount = oldAmount.subtract(totalRefundAmount);//新发票的金额

                BmsInvoiceRecord newBmsInvoiceRecord = new BmsInvoiceRecord();
                newBmsInvoiceRecord.setAmount(newAmount);
                newBmsInvoiceRecord.setInvoiceNo(newInvoiceNo);
                newBmsInvoiceRecord.setCreateTime(date);
                newBmsInvoiceRecord.setBillId(bmsInvoiceRecord.getBillId());
                newBmsInvoiceRecord.setOperatorId(operatorId);
                newBmsInvoiceRecord.setSettlementCatId(settlementCatId);
                newBmsInvoiceRecord.setType(1);
                //新发票的itemList
                String oldItemList = bmsInvoiceRecord.getItemList();
                String[][] resolvedItemList = resolveItemList(oldItemList);
                String newList = "";
                if (resolvedItemList.length != 0){
                    for(int x = 0; x < resolvedItemList.length ; x++) {
                        Long id = Long.valueOf(resolvedItemList[x][0]);
                        Integer type = Integer.valueOf(resolvedItemList[x][1]);
                        BigDecimal amount = new BigDecimal(resolvedItemList[x][2]);
                        //List<BmsInvoiceItemList> refundList = new ArrayList<>();//存退了哪些项目
                        for (int i = 0;i < refundList.size();i++){
                            if (refundList.get(i).getId() == id && refundList.get(i).getType() == type){
                                resolvedItemList[x][2] = refundList.get(i).getAmount().toString();//可能有问题
                            }
                        }
                    }
                    for (int j = 0;j< resolvedItemList.length;j++){
                        if (Double.parseDouble(resolvedItemList[j][2]) == 0){
                            continue;
                        }else {
                            newList = newList + resolvedItemList[j][0] + "," + resolvedItemList[j][1] + "," +resolvedItemList[j][2] + "><";
                        }
                    }
                }


                //原发票type改为3,原发票与新发票关联
                bmsInvoiceRecordExample.clear();
                bmsInvoiceRecordExample.createCriteria().andInvoiceNoEqualTo(invoiceNo);
                List<BmsInvoiceRecord> bmsInvoiceRecordList1 = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
                if (!bmsInvoiceRecordList1.isEmpty()){
                    Long newInvoiceId = bmsInvoiceRecordList1.get(0).getId();
                    bmsInvoiceRecord.setType(3);//3被冲红
                    bmsInvoiceRecord.setAssociateId(newInvoiceId);
                    bmsInvoiceRecordMapper.updateByPrimaryKeySelective(bmsInvoiceRecord);

                    newBmsInvoiceRecord.setSettleRecordId(bmsInvoiceRecordList1.get(0).getSettleRecordId());
                }

                newBmsInvoiceRecord.setItemList(newList);
                bmsInvoiceRecordMapper.insertSelective(newBmsInvoiceRecord);
            }
            return 1;
        }
        return 0;
    }
    //挂号退费过程
    //1.传入挂号id
    //2.判断状态为1（待诊），则直接退费，修改项目状态为4（已退号），
    //3.根据挂号id查找账单，根据账单id和status为1找到发票
    //3.新增一条冲红发票记录（原发票amount负值，与原发票关联）,把状态改为3（被冲红）
    //5.根据挂号id，判断是否为专家号，如果为专家号，则修改skd,相关医生的限额+1
    @Override
    public int refundRegistrationCharge(BmsRefundRegChargeParam bmsRefundRegChargeParam) {
        DmsRegistration dmsRegistration = dmsRegistrationMapper.selectByPrimaryKey(bmsRefundRegChargeParam.getRegistrationId());
        if (dmsRegistration.getStatus() == 1){//1（待诊）
            dmsRegistration.setStatus(4);//4（已退号）
            dmsRegistrationMapper.updateByPrimaryKeySelective(dmsRegistration);
        }
        BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();
        bmsInvoiceRecordExample.createCriteria().andInvoiceNoEqualTo(bmsRefundRegChargeParam.getOldInvoiceNo());
        List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
        if (!bmsInvoiceRecordList.isEmpty()){
            BmsInvoiceRecord bmsInvoiceRecord = bmsInvoiceRecordList.get(0);
            //更新原发票
            bmsInvoiceRecord.setType(3);
            bmsInvoiceRecordMapper.updateByPrimaryKeySelective(bmsInvoiceRecord);

            //插入冲红发票
            BigDecimal oldAmount = bmsInvoiceRecord.getAmount();
            BigDecimal newAmount = oldAmount.multiply(new BigDecimal(-1));
            BmsInvoiceRecord redBmsInvoiceRecord = new BmsInvoiceRecord();
            redBmsInvoiceRecord.setInvoiceNo(bmsRefundRegChargeParam.getRedInvoiceNo());
            redBmsInvoiceRecord.setAssociateId(bmsInvoiceRecord.getId());
            redBmsInvoiceRecord.setAmount(newAmount);
            redBmsInvoiceRecord.setCreateTime(new Date());
            redBmsInvoiceRecord.setType(2);
            redBmsInvoiceRecord.setOperatorId(bmsRefundRegChargeParam.getOperatorId());
            redBmsInvoiceRecord.setBillId(bmsInvoiceRecord.getBillId());
            bmsInvoiceRecordMapper.insertSelective(redBmsInvoiceRecord);
            //根据挂号id，判断是否为专家号，如果为专家号，则修改skd,相关医生的限额+1
            SmsSkd smsSkd = smsSkdMapper.selectByPrimaryKey(dmsRegistration.getSkdId());
            SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(smsSkd.getStaffId());
            SmsRegistrationRank registrationRank = smsRegistrationRankMapper.selectByPrimaryKey(smsStaff.getRegistrationRankId());
            if (registrationRank.getCode() == "specialist"){
                smsSkd.setRemain(smsSkd.getRemain()+1);
                smsSkdMapper.updateByPrimaryKey(smsSkd);
            }
        }
        return 1;
    }

    //解析发票的itemList
    public String[][] resolveItemList(String itemList){
        String[] prescription = itemList.split("><");
        String[][] result = new String[prescription.length][3];
        for (int i = 0 ; i < prescription.length ; i++){
            String[] item = prescription[i].split(",");
            for (int j = 0 ; j < item.length ; j++){
                result[i][j] = item[j];
            }
        }
        return result;
    }
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/controller/DmsDiseCatalogController.java<|end_filename|>
package com.neu.his.cloud.service.dms.controller;

import com.neu.his.cloud.service.dms.common.CommonPage;
import com.neu.his.cloud.service.dms.common.CommonResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsDiseCatalogParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsDiseCatalogResult;
import com.neu.his.cloud.service.dms.service.DmsDiseCatalogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsDiseCatalogController", description = "诊断目录管理")
@RequestMapping("/DmsDiseCatalog")
@CrossOrigin(allowCredentials = "true")
public class DmsDiseCatalogController {
    @Autowired
    DmsDiseCatalogService dmsDiseCatalogService;

    @ApiOperation(value = "新增一个诊断目录")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsDiseCatalogParam dmsDiseCatalogParam , BindingResult result){
        CommonResult commonResult;
        int count = dmsDiseCatalogService.create(dmsDiseCatalogParam);
        if (count == 1) {
            commonResult = CommonResult.success(count);
        } else {
            commonResult = CommonResult.failed();
        }
        return commonResult;
    }

    @ApiOperation(value = "根据ids删除诊断目录")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        int count = dmsDiseCatalogService.delete(ids);
        if (count >= 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }
    @ApiOperation(value = "更新")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody DmsDiseCatalogParam dmsDiseCatalogParam , BindingResult result){
        int count = dmsDiseCatalogService.update(id,dmsDiseCatalogParam);
        if (count > 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }
    @ApiOperation(value = "模糊查询诊断目录、且分页？？？")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<DmsDiseCatalogResult>> list(DmsDiseCatalogParam queryParam){
        return null;
    }

    @ApiOperation(value = "查询所有诊断目录")
    @RequestMapping(value = "/listAll", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDiseCatalogResult>> listAll(){
        return CommonResult.success(dmsDiseCatalogService.selectAll());
    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/bms/BmsInvoiceResult.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.bms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
@ToString
public class BmsInvoiceResult implements Serializable {
    @ApiModelProperty(value = "创建时间")
    Date createTime;
    @ApiModelProperty(value = "发票号")
    Long invoiceNo;
    @ApiModelProperty(value = "账单id")
    Long billId;
    @ApiModelProperty(value = "总金额")
    BigDecimal amount;
    @ApiModelProperty(value = "冻结状态")
    Integer freezeStatus;
    @ApiModelProperty(value = "关联发票id")
    Long associateId;
    @ApiModelProperty(value = "结算类型name")
    String settlementCatName;
    @ApiModelProperty(value = "对账人id")
    Long operatorSettleId;
    @ApiModelProperty(value = "日结人id")
    Long operatorId;
    @ApiModelProperty(value = "所属日结记录id")
    Long settleRecordId;


    @ApiModelProperty(value = "类型")
    Integer type;


}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsNonDrugModelDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;


import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugModelParam;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugModelResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsNonDrugModelDistributionService {

    @RequestMapping(value = "/NonDrugModel/createModel", method = RequestMethod.POST)
    CommonResult create(@RequestBody DmsNonDrugModelParam dmsNonDrugModelParam) ;


    @RequestMapping(value = "/NonDrugModel/deleteModel", method = RequestMethod.POST)
    CommonResult deleteModel(@RequestParam("ids") List<Long> ids);

    @RequestMapping(value = "/NonDrugModel/deleteModelItem", method = RequestMethod.POST)
    CommonResult deleteModelItem(@RequestParam("modelId")Long modelId, @RequestParam("ids") List<Long> itemIds);



    @RequestMapping(value = "/NonDrugModel/updateModel", method = RequestMethod.POST)
    CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsNonDrugModelParam dmsNonDrugModelParam);


    @RequestMapping(value = "/NonDrugModel/listModel", method = RequestMethod.POST)
    CommonResult<CommonPage<DmsNonDrugModelResult>> list(@RequestBody DmsNonDrugModelParam queryParam,
                                                                @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin);


}

<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/BmsDailySettlementService.java<|end_filename|>
package com.neu.his.cloud.service.bms.service;

import com.neu.his.cloud.service.bms.dto.bms.BmsDailySettleRecordResult;
import com.neu.his.cloud.service.bms.dto.bms.BmsSettleListItemResult;

import java.util.Date;
import java.util.List;

/**
 * 日结
 */
public interface BmsDailySettlementService {
    /**
     * 描述：根据收费员id在日结记录表中查询最近的end_datetime
     */
    Date queryRecentEndDatetime(Long staffId);
    /**
     * 描述：根据起始、结束时间和收费员id统计日结信息
     */
    BmsDailySettleRecordResult statisticDailySettlement(Long cashierId, Date startDatetime, Date endDatetime);
    /**
     * 描述：根据起始、结束时间和收费员id列出日结历史
     */
    List<BmsSettleListItemResult> listDailySettleListRecord(Long cashierId, Date startDatetime, Date endDatetime);
    /**
     * 描述：根据日结记录id查询日结详细信息
     */
    BmsDailySettleRecordResult querySettleDetailById(Long id);
    /**
     * 描述：根据起始、结束时间和收费员id统计日结信息并日结
     */
    Long dailySettle(Long cashierId, Date startDatetime, Date endDatetime);

    /**
     * 描述：对账
     */
    int verifySettle(Long verifyOperatorId, Long settleRecordId);
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsRedisSaveService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;


import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseHistoryParam;

import com.neu.his.cloud.api.pc.dto.dms.DmsDrugRedisParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugRedisParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsRedisSaveService {

    @RequestMapping(value = "/redisSave/saveCasePage", method = RequestMethod.POST)
    public CommonResult saveCasePage(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam,
                                     @RequestParam("registrationId") Long registrationId);

    @RequestMapping(value = "/redisSave/getCasePage", method = RequestMethod.POST)
    public CommonResult<DmsCaseHistoryParam> getCasePage(@RequestParam("registrationId") Long registrationId);


    @RequestMapping(value = "/redisSave/saveDrugPrescription", method = RequestMethod.POST)
    public CommonResult saveDrugPrescription(@RequestBody List<DmsDrugRedisParam> dmsDrugRedisParam,
                                             @RequestParam("registrationId") Long registrationId,
                                             @RequestParam("type") int type);

    @RequestMapping(value = "/redisSave/getDrugPrescription", method = RequestMethod.POST)
    public CommonResult<List<DmsDrugRedisParam>> getDrugPrescription(@RequestParam("registrationId") Long registrationId,
                                                                     @RequestParam("type") int type);


    @RequestMapping(value = "/redisSave/saveNonDrug", method = RequestMethod.POST)
    public CommonResult saveNonDrug(@RequestBody DmsNonDrugRedisParam dmsNonDrugRedisParam,
                                    @RequestParam("registrationId") Long registrationId,
                                    @RequestParam("type") int type);

    @RequestMapping(value = "/redisSave/getNonDrug", method = RequestMethod.POST)
    CommonResult<DmsNonDrugRedisParam> getNonDrug(@RequestParam("registrationId") Long registrationId,
                                                  @RequestParam("type") int type);
}

<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/bms/BmsRefundDrugResult.java<|end_filename|>
package com.neu.his.common.dto.bms;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;

public class BmsRefundDrugResult  implements Serializable {
    @ApiModelProperty(value = "药品名")
    String name;
    @ApiModelProperty(value = "当前药品数量")
    Long currentNum;
    @ApiModelProperty(value = "已退药数量")
    Long refundNum;
    @ApiModelProperty(value = "单位")
    Integer numUnit;
    @ApiModelProperty(value = "单价")
    BigDecimal price;
    @ApiModelProperty(value = "类型 0 成药 1草药")
    Integer type;


}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/model/BmsInvoiceRecord.java<|end_filename|>
package com.neu.his.cloud.service.dms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class BmsInvoiceRecord implements Serializable {
    private Long id;

    private Date createTime;

    private Long invoiceNo;

    private Long billId;

    private BigDecimal amount;

    private Integer freezeStatus;

    private Long associateId;

    private Long operatorId;

    private Long settlementCatId;

    private Long settleRecordId;

    private String itemList;

    private Integer type;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getInvoiceNo() {
        return invoiceNo;
    }

    public void setInvoiceNo(Long invoiceNo) {
        this.invoiceNo = invoiceNo;
    }

    public Long getBillId() {
        return billId;
    }

    public void setBillId(Long billId) {
        this.billId = billId;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Integer getFreezeStatus() {
        return freezeStatus;
    }

    public void setFreezeStatus(Integer freezeStatus) {
        this.freezeStatus = freezeStatus;
    }

    public Long getAssociateId() {
        return associateId;
    }

    public void setAssociateId(Long associateId) {
        this.associateId = associateId;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public Long getSettlementCatId() {
        return settlementCatId;
    }

    public void setSettlementCatId(Long settlementCatId) {
        this.settlementCatId = settlementCatId;
    }

    public Long getSettleRecordId() {
        return settleRecordId;
    }

    public void setSettleRecordId(Long settleRecordId) {
        this.settleRecordId = settleRecordId;
    }

    public String getItemList() {
        return itemList;
    }

    public void setItemList(String itemList) {
        this.itemList = itemList;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", createTime=").append(createTime);
        sb.append(", invoiceNo=").append(invoiceNo);
        sb.append(", billId=").append(billId);
        sb.append(", amount=").append(amount);
        sb.append(", freezeStatus=").append(freezeStatus);
        sb.append(", associateId=").append(associateId);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", settlementCatId=").append(settlementCatId);
        sb.append(", settleRecordId=").append(settleRecordId);
        sb.append(", itemList=").append(itemList);
        sb.append(", type=").append(type);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsDrugModelController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsDrugModelParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsDrugModelResult;
import com.neu.his.cloud.api.pc.service.dms.DmsDrugModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 *药品模版
 */
@RestController
@Api(tags = "DmsDrugModelController", description = "药品模板管理")
@RequestMapping("/drugModel")
@CrossOrigin(allowCredentials = "true")
public class DmsDrugModelController {

    @Autowired
    DmsDrugModelService dmsDrugModelService;

    @ApiOperation(value = "新增药品模版")
    @RequestMapping(value = "/createModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsDrugModelParam dmsDrugModelParam, BindingResult result) {
        return dmsDrugModelService.createModel(dmsDrugModelParam);

    }


    @ApiOperation(value = "删除药品模版")
    @RequestMapping(value = "/deleteModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModel(@RequestParam("ids") List<Long> ids){
       return dmsDrugModelService.deleteModel(ids);

    }

    @ApiOperation(value = "更新药品模版")
    @RequestMapping(value = "/updateModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsDrugModelParam dmsDrugModelParam, BindingResult result){
        return dmsDrugModelService.updateModel(modelId,dmsDrugModelParam);
    }

    @ApiOperation(value = "模糊查询药品模版、且分页")
    @RequestMapping(value = "/listModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<DmsDrugModelResult>> listModel(@RequestBody DmsDrugModelParam queryParam,
                                                             @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                             @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin){

       return dmsDrugModelService.listModel(queryParam, pageSize, pageNum,isAdmin);

    }

}


<|start_filename|>HIS-app/store/index.js<|end_filename|>
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		// url: 'localhost:9999',
		url: '10.25.52.152:10021/app',
		hasLogin: false,
		name: '',
		patientId: '',
		idCard: '',
		homeAddress: '',
		phoneNo: '',
		gender: '',
		medicalRecordNo: '',
		dateOfBirth: ''
	},
	mutations: {
		login(state, provider) {
			state.hasLogin = true;
			state.name = provider.name;
			state.patientId = provider.id;
			state.idCard = provider.identificationNo;
			state.homeAddress = provider.homeAddress;
			state.phoneNo = provider.phoneNo;
			state.medicalRecordNo = provider.medicalRecordNo;
			state.dateOfBirth = provider.dateOfBirth;
			if(provider.gender == 0){
				state.gender = '男';
			}else if(provider.gender == 1){
				state.gender = '女';
			}
		},
		logout(state) {
			state.hasLogin = false;
			name = '';
			patientId: '';
			idCard: '';
			homeAddress: '';
			phoneNo: '';
			gender: '';
			medicalRecordNo: ''
		}
	},
	actions: {
		// lazy loading openid
		getUserOpenId: async function ({
			commit,
			state
		}) {
			return await new Promise((resolve, reject) => {
				if (state.openid) {
					resolve(state.openid)
				} else {
					uni.login({
						success: (data) => {
							commit('login')
							setTimeout(function () { //模拟异步请求服务器获取 openid
								const openid = '123456789'
								console.log('uni.request mock openid[' + openid + ']');
								commit('setOpenid', openid)
								resolve(openid)
							}, 1000)
						},
						fail: (err) => {
							console.log('uni.login 接口调用失败，将无法正常使用开放接口等服务', err)
							reject(err)
						}
					})
				}
			})
		}
	}
})

export default store


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsMechanicItemRecordDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;

import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsMechanicItemRecordResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsMechanicItemRecordDistributionService {

    @RequestMapping(value = "/DmsMechanicItemRecord/listByDept", method = RequestMethod.POST)
    CommonResult<List<DmsMechanicItemRecordResult>> listByDept(@RequestParam("deptId") Long deptId);

    @RequestMapping(value = "/DmsMechanicItemRecord/log", method = RequestMethod.POST)
    CommonResult log(@RequestParam("itemRecordId") Long itemRecordId, @RequestParam("logStaffId") Long logStaffId);

    @RequestMapping(value = "/DmsMechanicItemRecord/uploadResult", method = RequestMethod.POST)
    CommonResult uploadResult(@RequestParam("id") Long id,
                                     @RequestParam("executeStaffId") Long excuteStaffId,
                                     @RequestParam("checkResult") String checkResult,
                                     @RequestParam("resultImgUrlList") String resultImgUrlList);

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/component/RabbitMQOrderSender.java<|end_filename|>
package com.neu.his.cloud.service.dms.component;

import com.neu.his.cloud.service.dms.domain.QueueEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.AmqpException;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessagePostProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class RabbitMQOrderSender {
    private static Logger LOGGER = LoggerFactory.getLogger(RabbitMQOrderSender.class);

    @Autowired
    private AmqpTemplate amqpTemplate;

    public void sendMessage(Long orderId,int type,final long delayTimes){
        //发送信息格式：id&类型（1检查\检验\处置 4草药 5成药）
        String msg = orderId + "&" + type;
        //给延迟队列发送消息
        amqpTemplate.convertAndSend(QueueEnum.QUEUE_TTL_ORDER_CANCEL.getExchange(),
                                    QueueEnum.QUEUE_TTL_ORDER_CANCEL.getRouteKey(),
                                    msg,
                new MessagePostProcessor() {
                    @Override
                    public Message postProcessMessage(Message message) throws AmqpException {
                        //给消息设置延迟毫秒值
                         message.getMessageProperties().setExpiration(String.valueOf(delayTimes));
                         return message;
                 }
        });
        LOGGER.info("send order message msg:{}",msg);
    }
}

<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/controller/TestFeignController.java<|end_filename|>
package com.neu.his.cloud.api.app.controller;

import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.sms.SmsDeptResult;
import com.neu.his.cloud.api.app.service.TestFeignService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName: TestFeignController
 * @description: TODO
 * @author Zain
 * @date 2019/6/15 14:43
 */
@RefreshScope
@RestController
@Api(tags = "TestFeignController", description = "APP 挂号管理")
@RequestMapping("/test")
@CrossOrigin(allowCredentials = "true")
public class TestFeignController {
    @Autowired
    TestFeignService testFeignService;
//
//    @Value("${test.test}")
//    private String testMQandRefresh;

    @ApiOperation("hi")
    @RequestMapping(value = "hi", method = RequestMethod.GET)
    public String sayHi(@RequestParam String message) {
        return testFeignService.sayHi(message);
    }

//    @RequestMapping(value = "testMQ", method = RequestMethod.GET)
//    public String testMQ(@RequestParam String message) {
//        return testMQandRefresh;
//    }
    @ApiOperation("selectAllDept")
    @RequestMapping(value = "selectAllDept", method = RequestMethod.GET)
    public CommonResult<List<SmsDeptResult>> selectAllDept() {
        return testFeignService.listAll();
    }



}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/model/DmsNonDrugItemRecord.java<|end_filename|>
package com.neu.his.cloud.service.pms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class DmsNonDrugItemRecord implements Serializable {
    private Long id;

    private Long registrationId;

    private Integer status;

    private String aim;

    private String demand;

    private Integer logStatus;

    private String checkResult;

    private String resultImgUrlList;

    private String clinicalImpression;

    private String clinicalDiagnosis;

    private Date createTime;

    private Long excuteStaffId;

    private Date logDatetime;

    private Long noDrugId;

    private String checkParts;

    private Integer type;

    private Long excuteDeptId;

    private Long createStaffId;

    private Long logStaffId;

    private Date excuteTime;

    private BigDecimal amount;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getRegistrationId() {
        return registrationId;
    }

    public void setRegistrationId(Long registrationId) {
        this.registrationId = registrationId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getAim() {
        return aim;
    }

    public void setAim(String aim) {
        this.aim = aim;
    }

    public String getDemand() {
        return demand;
    }

    public void setDemand(String demand) {
        this.demand = demand;
    }

    public Integer getLogStatus() {
        return logStatus;
    }

    public void setLogStatus(Integer logStatus) {
        this.logStatus = logStatus;
    }

    public String getCheckResult() {
        return checkResult;
    }

    public void setCheckResult(String checkResult) {
        this.checkResult = checkResult;
    }

    public String getResultImgUrlList() {
        return resultImgUrlList;
    }

    public void setResultImgUrlList(String resultImgUrlList) {
        this.resultImgUrlList = resultImgUrlList;
    }

    public String getClinicalImpression() {
        return clinicalImpression;
    }

    public void setClinicalImpression(String clinicalImpression) {
        this.clinicalImpression = clinicalImpression;
    }

    public String getClinicalDiagnosis() {
        return clinicalDiagnosis;
    }

    public void setClinicalDiagnosis(String clinicalDiagnosis) {
        this.clinicalDiagnosis = clinicalDiagnosis;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getExcuteStaffId() {
        return excuteStaffId;
    }

    public void setExcuteStaffId(Long excuteStaffId) {
        this.excuteStaffId = excuteStaffId;
    }

    public Date getLogDatetime() {
        return logDatetime;
    }

    public void setLogDatetime(Date logDatetime) {
        this.logDatetime = logDatetime;
    }

    public Long getNoDrugId() {
        return noDrugId;
    }

    public void setNoDrugId(Long noDrugId) {
        this.noDrugId = noDrugId;
    }

    public String getCheckParts() {
        return checkParts;
    }

    public void setCheckParts(String checkParts) {
        this.checkParts = checkParts;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getExcuteDeptId() {
        return excuteDeptId;
    }

    public void setExcuteDeptId(Long excuteDeptId) {
        this.excuteDeptId = excuteDeptId;
    }

    public Long getCreateStaffId() {
        return createStaffId;
    }

    public void setCreateStaffId(Long createStaffId) {
        this.createStaffId = createStaffId;
    }

    public Long getLogStaffId() {
        return logStaffId;
    }

    public void setLogStaffId(Long logStaffId) {
        this.logStaffId = logStaffId;
    }

    public Date getExcuteTime() {
        return excuteTime;
    }

    public void setExcuteTime(Date excuteTime) {
        this.excuteTime = excuteTime;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", registrationId=").append(registrationId);
        sb.append(", status=").append(status);
        sb.append(", aim=").append(aim);
        sb.append(", demand=").append(demand);
        sb.append(", logStatus=").append(logStatus);
        sb.append(", checkResult=").append(checkResult);
        sb.append(", resultImgUrlList=").append(resultImgUrlList);
        sb.append(", clinicalImpression=").append(clinicalImpression);
        sb.append(", clinicalDiagnosis=").append(clinicalDiagnosis);
        sb.append(", createTime=").append(createTime);
        sb.append(", excuteStaffId=").append(excuteStaffId);
        sb.append(", logDatetime=").append(logDatetime);
        sb.append(", noDrugId=").append(noDrugId);
        sb.append(", checkParts=").append(checkParts);
        sb.append(", type=").append(type);
        sb.append(", excuteDeptId=").append(excuteDeptId);
        sb.append(", createStaffId=").append(createStaffId);
        sb.append(", logStaffId=").append(logStaffId);
        sb.append(", excuteTime=").append(excuteTime);
        sb.append(", amount=").append(amount);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsCaseModelDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsCaseModelDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseModelCatalogNode;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseModelListResult;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseModelOrCatalogParam;
import com.neu.his.cloud.zuul.model.DmsCaseModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsCaseModelDistributionController", description = "病历模板管理")
@RequestMapping("/DmsCaseModel")
@CrossOrigin(allowCredentials = "true")
public class DmsCaseModelDistributionController {
    @Autowired
    ApiPcDmsCaseModelDistributionService apiPcDmsCaseModelDistributionService;

    @HystrixCommand(fallbackMethod = "createFallbackInfo")
    @ApiOperation(value = "新增病历模板目录或模板")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsCaseModelOrCatalogParam dmsCaseModelOrCatalogParam, BindingResult result) {
        return apiPcDmsCaseModelDistributionService.create(dmsCaseModelOrCatalogParam);
    }
    private CommonResult createFallbackInfo(DmsCaseModelOrCatalogParam dmsCaseModelOrCatalogParam, BindingResult result) {
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listModelCatTreeFallbackInfo")
    @ApiOperation(value = "显示病历模板目录树")
    @RequestMapping(value = "/listModelCatTree", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsCaseModelCatalogNode>> listModelCatTree(@RequestParam Long ownId, @RequestParam Integer scope) {
        return apiPcDmsCaseModelDistributionService.listModelCatTree(ownId,scope);
    }
    private CommonResult<List<DmsCaseModelCatalogNode>> listModelCatTreeFallbackInfo(Long ownId, Integer scope) {
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteModelOrCatFallbackInfo")
    @ApiOperation(value = "删除病历模版或目录")
    @RequestMapping(value = "/deleteModelOrCat", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModelOrCat(@RequestParam("id") Long id){
       return apiPcDmsCaseModelDistributionService.deleteModelOrCat(id);
    }
    private CommonResult deleteModelOrCatFallbackInfo(Long id){
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "updateModelFallbackInfo")
    @ApiOperation(value = "更新病历模版信息")
    @RequestMapping(value = "/updateModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsCaseModel dmsCaseModel, BindingResult result){
       return apiPcDmsCaseModelDistributionService.updateModel(modelId,dmsCaseModel);
    }
    private CommonResult updateModelFallbackInfo(Long modelId, DmsCaseModel dmsCaseModel, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateNameFallbackInfo")
    @ApiOperation(value = "更新目录或模板的名字")
    @RequestMapping(value = "/updateModel/{id}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult updateName(@PathVariable("id") Long id, @RequestParam("name")String name){
       return apiPcDmsCaseModelDistributionService.updateName(id,name);
    }
    private CommonResult updateNameFallbackInfo(Long id, String name){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "getModelDetailFallbackInfo")
    @ApiOperation(value = "根据模板id查询模板详细信息")
    @RequestMapping(value = "/getModelDetail/{id}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseModel> getModelDetail(@PathVariable("id") Long id){
        return apiPcDmsCaseModelDistributionService.getModelDetail(id);
    }
    private CommonResult<DmsCaseModel> getModelDetailFallbackInfo(Long id){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "getAllStaffModelFallbackInfo")
    @ApiOperation(value = "根据staffId获取所有病历模板")
    @RequestMapping(value = "/getAllStaffModel", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseModelListResult> getAllStaffModel(@RequestParam("staffId") Long staffId){
        return apiPcDmsCaseModelDistributionService.getAllStaffModel(staffId);
    }
    private CommonResult<DmsCaseModelListResult> getAllStaffModelFallbackInfo(Long staffId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsRedisSaveDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;


import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseHistoryParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugRedisParam;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugRedisParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsRedisSaveDistributionService {
    @RequestMapping(value = "/redisSave/saveCasePage", method = RequestMethod.POST)
    public CommonResult saveCasePage(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam,
                                     @RequestParam("registrationId") Long registrationId);

    @RequestMapping(value = "/redisSave/getCasePage", method = RequestMethod.POST)
    public CommonResult<DmsCaseHistoryParam> getCasePage(@RequestParam("registrationId") Long registrationId);


    @RequestMapping(value = "/redisSave/saveDrugPrescription", method = RequestMethod.POST)
    public CommonResult saveDrugPrescription(@RequestBody List<DmsDrugRedisParam> dmsDrugRedisParam,
                                             @RequestParam("registrationId") Long registrationId,
                                             @RequestParam("type") int type);

    @RequestMapping(value = "/redisSave/getDrugPrescription", method = RequestMethod.POST)
    public CommonResult<List<DmsDrugRedisParam>> getDrugPrescription(@RequestParam("registrationId") Long registrationId,
                                                                     @RequestParam("type") int type);


    @RequestMapping(value = "/redisSave/saveNonDrug", method = RequestMethod.POST)
    public CommonResult saveNonDrug(@RequestBody DmsNonDrugRedisParam dmsNonDrugRedisParam,
                                    @RequestParam("registrationId") Long registrationId,
                                    @RequestParam("type") int type);

    @RequestMapping(value = "/redisSave/getNonDrug", method = RequestMethod.POST)
    CommonResult<DmsNonDrugRedisParam> getNonDrug(@RequestParam("registrationId") Long registrationId,
                                                  @RequestParam("type") int type);
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/bms/BmsSettlementCatService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.bms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsSettlementCatParam;
import com.neu.his.cloud.api.pc.dto.bms.BmsSettlementCatResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-service-bms")
public interface BmsSettlementCatService {

    @RequestMapping(value = "/settleCat/create", method = RequestMethod.POST)
    CommonResult create(@RequestBody BmsSettlementCatParam bmsSettlementCatParam);


    @RequestMapping(value = "/settleCat/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/settleCat/update/{id}", method = RequestMethod.POST)
    CommonResult update(@PathVariable Long id, @RequestBody BmsSettlementCatParam bmsSettlementCatParam );

    @RequestMapping(value = "/settleCat/select", method = RequestMethod.POST)
    CommonResult<CommonPage<BmsSettlementCatResult>> list(@RequestBody BmsSettlementCatParam queryParam,
                                                                 @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                 @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

    @RequestMapping(value = "/settleCat/selectAll", method = RequestMethod.GET)
    CommonResult<List<BmsSettlementCatResult >> listAll();

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/controller/TestController.java<|end_filename|>
package com.neu.his.cloud.service.sms.controller;

import com.neu.his.cloud.service.sms.service.SmsDeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

@Api(tags = "SmsSkdController", description = "排班管理")
@RequestMapping("/skd")
@RestController
public class TestController {
    @Value("${server.port}")
    private String port;

    @Autowired
    private SmsDeptService smsDeptService;
    @ApiOperation("sayHI")
    @RequestMapping(value = "/hi", method = RequestMethod.GET)
    @ResponseBody
    public String sayHi(@RequestParam(value = "message") String message) {
        return String.format("Hi，your message is : %s i am from port : %s", message, port);
    }

//    @ApiOperation("科室查询测试")
//    @RequestMapping(value = "selectDept", method = RequestMethod.GET)
//    @ResponseBody
//    public List<SmsDeptResult> selectDept(@RequestParam(value = "message") String  test) {
//        SmsDeptParam smsDeptParam=new SmsDeptParam();
//        smsDeptParam.setCode("zk");
//        return smsDeptService.select(smsDeptParam,3,4);
//    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsNonDrugItem.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
@ToString
public class DmsNonDrugItem implements Serializable {

    private Long id;

    private String code;

    private String name;

    private String format;

    private BigDecimal price;

    private Long expClassId;

    private String mnemonicCode;

    private Integer recordType;

    private Date createDate;

    private Integer status;

    private Long deptId;



    private String deptName;

    private BigDecimal amount;

    private Long excuteDeptId;

    private Long noDrugId;

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/bms/BmsFeeService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.bms;


import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.*;
import com.neu.his.cloud.api.pc.dto.dms.DmsHerbalPrescriptionRecordResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;


@FeignClient(value = "his-cloud-service-bms")
public interface BmsFeeService {

    @RequestMapping(value = "/fee/listRegisteredPatient", method = RequestMethod.GET)
    CommonResult<CommonPage<BmsRegistrationPatientResult>> listRegisteredPatient(@RequestParam(required=false,name = "medicalRecordNo") String  medicalRecordNo,
                                                                                        @RequestParam(required=false,name="queryDate")@DateTimeFormat(pattern = "yyyy-MM-dd") Date queryDate,
                                                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);


    @RequestMapping(value = "/fee/charge", method = RequestMethod.POST)
    CommonResult charge(@RequestBody List<BmsChargeParam> bmsChargeParamList);


    @RequestMapping(value = "/fee/listRefundByRegistrationId", method = RequestMethod.GET)
     CommonResult<List<BmsRefundChargeResult>>  listRefundByRegistrationId(@RequestParam("registrationId") Long registrationId);


    @RequestMapping(value = "/fee/refundCharge", method = RequestMethod.POST)
     CommonResult refundCharge(@RequestBody List<BmsRefundChargeParam> bmsRefundChargeParamList);


    @RequestMapping(value = "/fee/refundRegistrationCharge", method = RequestMethod.POST)
     CommonResult refundRegistrationCharge(@RequestBody BmsRefundRegChargeParam bmsRefundRegChargeParam);



    @RequestMapping(value = "/fee/listChargeByRegistrationId", method = RequestMethod.GET)
    CommonResult<List<BmsChargeResult>>  listChargeByRegistrationId(@RequestParam("registrationId") Long registrationId);
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsNonDrugItemRecordService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;



import com.neu.his.cloud.service.dms.dto.app.AppCheckTestResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsNonDrugItemRecordListParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsNonDrugItemRecordResult;

import java.util.List;

/**
 * 非药品项
 */
public interface DmsNonDrugItemRecordService {
    /**
     * 描述：开立项目
     */
    List<Long> apply(DmsNonDrugItemRecordListParam dmsNonDrugItemRecordListParam);
    /**
     * 描述：作废项目
     */
    int invalid(List<Long> ids);
    /**
     * 描述：刷新项目
     */
    List<DmsNonDrugItemRecordResult>  listByRegAndType(Long registrationId, Integer type);

    /**
     * 描述：app端根据检查检验id查询结果
     */
    AppCheckTestResult appGetResult(Long id);
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/impl/BmsSettlementCatServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.bms.service.impl;


import com.neu.his.cloud.service.bms.dto.bms.BmsSettlementCatParam;
import com.neu.his.cloud.service.bms.dto.bms.BmsSettlementCatResult;
import com.neu.his.cloud.service.bms.mapper.BmsSettlementCatMapper;
import com.neu.his.cloud.service.bms.model.BmsSettlementCat;
import com.neu.his.cloud.service.bms.model.BmsSettlementCatExample;
import com.neu.his.cloud.service.bms.service.BmsSettlementCatService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.List;

@Service
public class BmsSettlementCatServiceImpl implements BmsSettlementCatService {

    @Autowired
    private BmsSettlementCatMapper bmsSettlementCatMapper;

    @Override
    public int create(BmsSettlementCatParam bmsSettlementCatParam){
        BmsSettlementCat bmsSettlementCat = new BmsSettlementCat();
        BeanUtils.copyProperties(bmsSettlementCatParam, bmsSettlementCat);
        bmsSettlementCat.setStatus(1);
        //查询是否有同name结算类别
        BmsSettlementCatExample example = new BmsSettlementCatExample();
        example.createCriteria().andNameEqualTo(bmsSettlementCat.getName());
        List<BmsSettlementCat> lists = bmsSettlementCatMapper.selectByExample(example);
        if (lists.size() > 0) {
            return 0;
        }
        //没有则插入数据
        return bmsSettlementCatMapper.insert(bmsSettlementCat);
    }

    @Override
    public int delete(List<Long> ids){
        BmsSettlementCat bmsSettlementCat = new BmsSettlementCat();
        bmsSettlementCat.setStatus(0);
        BmsSettlementCatExample example = new BmsSettlementCatExample();
        example.createCriteria().andIdIn(ids);
        return bmsSettlementCatMapper.updateByExampleSelective(bmsSettlementCat, example);
    }

    @Override
    public int update(Long id,BmsSettlementCatParam bmsSettlementCatParam){
        BmsSettlementCat bmsSettlementCat = new BmsSettlementCat();
        BeanUtils.copyProperties(bmsSettlementCatParam, bmsSettlementCat);
        bmsSettlementCat.setId(id);
        return bmsSettlementCatMapper.updateByPrimaryKeySelective(bmsSettlementCat);
    }

    @Override
    public List<BmsSettlementCatResult> select(BmsSettlementCatParam bmsSettlementCatParam){

        BmsSettlementCatExample example = new BmsSettlementCatExample();
        BmsSettlementCatExample.Criteria criteria = example.createCriteria();
        //如果没有指明state，返回不为0的
        if(bmsSettlementCatParam.getStatus() == null){
            criteria.andStatusNotEqualTo(0);
        }
        //是否按结算类别名、比例查询
        if(!StringUtils.isEmpty(bmsSettlementCatParam.getName())){
            criteria.andNameLike("%" + bmsSettlementCatParam.getName() + "%");
        }

        //返回数据包装成Result
        List<BmsSettlementCat> bsclist = bmsSettlementCatMapper.selectByExample(example);
        List<BmsSettlementCatResult> bscResults = new ArrayList<>();
        for (BmsSettlementCat b : bsclist) {
            BmsSettlementCatResult r = new BmsSettlementCatResult();
            BeanUtils.copyProperties(b, r);
            bscResults.add(r);
        }
        return bscResults;
    }

    @Override
    public List<BmsSettlementCatResult> selectAll(){
        BmsSettlementCatExample example = new BmsSettlementCatExample();
        example.createCriteria().andStatusNotEqualTo(0);
        //返回数据包装成Result
        List<BmsSettlementCat> bsclist = bmsSettlementCatMapper.selectByExample(example);
        List<BmsSettlementCatResult> bscResults = new ArrayList<>();
        for (BmsSettlementCat b : bsclist) {
            BmsSettlementCatResult r = new BmsSettlementCatResult();
            BeanUtils.copyProperties(b, r);
            bscResults.add(r);
        }
        return bscResults;
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/sms/ApiPcSmsStaffDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.sms;

import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.sms.SmsSkdDocParam;
import com.neu.his.cloud.zuul.dto.sms.SmsSkdDocResult;
import com.neu.his.cloud.zuul.dto.sms.SmsStaffParam;
import com.neu.his.cloud.zuul.dto.sms.SmsStaffResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcSmsStaffDistributionService {


    @RequestMapping(value = "/staff/listDocBySkd", method = RequestMethod.POST)
    CommonResult<List<SmsSkdDocResult>> listDocBySkd(@RequestBody SmsSkdDocParam smsSkdDocParam);

    @RequestMapping(value = "/staff/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/staff/update/{id}", method = RequestMethod.POST)
    CommonResult update(@PathVariable Long id, @RequestBody SmsStaffParam smsStaffParam);


    @RequestMapping(value = "/staff/select", method = RequestMethod.POST)
    CommonResult<CommonPage<SmsStaffResult>> list(@RequestBody SmsStaffParam queryParam,
                                                         @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

    @RequestMapping(value = "/staff/selectAll", method = RequestMethod.GET)
    CommonResult<List<SmsStaffResult>> listAll();

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsDrugModelService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsDrugModelParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsDrugModelResult;

import java.util.List;

/**
 * 药品模版服务
 */
public interface DmsDrugModelService {
    /**
     * 描述：创建模版
     */
    int createModel(DmsDrugModelParam dmsDrugModelParam);

    /**
     * 描述：删除模版
     */
    int deleteModel(List<Long> ids);


    /**
     * 描述：删除模版项
     */
    int deleteModelItem(Long modelId, List<Long> itemIds);


    /**
     * 描述：根据modelId更新model信息（删了重新创建）
     */
    int updateModel(Long modelId, DmsDrugModelParam dmsDrugModelParam);


    /**
     * 描述：查询模版
     */
    List<DmsDrugModelResult> selectModel(Integer isAdmin, DmsDrugModelParam queryParam, Integer pageSize, Integer pageNum);


}


<|start_filename|>HIS-web/src/api/outpatient/save.js<|end_filename|>
import request from '@/utils/request'
//redis暂存

//暂存病历首页
export function saveCasePage(data) {
  return request({
    url: '/redisSave/saveCasePage',
    method: 'post',
    params:{
      registrationId:data.registrationId
    },
    data
  })
}

//取出病历首页
export function getCasePage(data) {
  return request({
    url: '/redisSave/getCasePage',
    method: 'post',
    params:{
      registrationId:data
    },
    data
  })
}

//暂存非药品项目
export function saveNonDrug(data) {
  return request({
    url: '/redisSave/saveNonDrug',
    method: 'post',
    params:{
      registrationId:data.registrationId,
      type:data.type
    },
    data
  })
}

//取出病历首页
export function getNonDrug(data) {
  return request({
    url: '/redisSave/getNonDrug',
    method: 'post',
    params:{
      registrationId:data.registrationId,
      type:data.type
    },
    data
  })
}

//暂存药方
export function saveDrugPrescription(data,registrationId,type) {
  return request({
    url: '/redisSave/saveDrugPrescription',
    method: 'post',
    params:{
      registrationId:registrationId,
      type:type
    },
    data
  })
}

//取出药方
export function getDrugPrescription(data) {
  return request({
    url: '/redisSave/getDrugPrescription',
    method: 'post',
    params:{
      registrationId:data.registrationId,
      type:data.type
    }
  })
}



<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/impl/DmsFeeRabbitMQServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.dms.service.impl;

import com.neu.his.cloud.service.dms.mapper.DmsHerbalPrescriptionRecordMapper;
import com.neu.his.cloud.service.dms.mapper.DmsMedicinePrescriptionRecordMapper;
import com.neu.his.cloud.service.dms.mapper.DmsNonDrugItemRecordMapper;
import com.neu.his.cloud.service.dms.model.*;
import com.neu.his.cloud.service.dms.service.DmsFeeRabbitMQService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class DmsFeeRabbitMQServiceImpl implements DmsFeeRabbitMQService {

    @Autowired
    private DmsHerbalPrescriptionRecordMapper dmsHerbalPrescriptionRecordMapper;

    @Autowired
    private DmsMedicinePrescriptionRecordMapper dmsMedicinePrescriptionRecordMapper;

    @Autowired
    private DmsNonDrugItemRecordMapper dmsNonDrugItemRecordMapper;

    @Override
    public int herbalOutOfTime(Long prescriptionId){
        int count = 0;
        //草药处方超时未缴费处理（设置状态为4已过期）
        DmsHerbalPrescriptionRecord herbalRecord = new DmsHerbalPrescriptionRecord();
        herbalRecord.setStatus(4);
        DmsHerbalPrescriptionRecordExample example = new DmsHerbalPrescriptionRecordExample();
        example.createCriteria().andIdEqualTo(prescriptionId).andStatusEqualTo(1);
        count += dmsHerbalPrescriptionRecordMapper.updateByExampleSelective(herbalRecord,example);
        return count;
    }

    @Override
    public int medicineOutOfTime(Long prescriptionId){
        int count = 0;
        //成药处方超时未缴费处理（设置状态为4已过期）
        DmsMedicinePrescriptionRecord medicineRecord = new DmsMedicinePrescriptionRecord();
        medicineRecord.setStatus(4);
        DmsMedicinePrescriptionRecordExample example = new DmsMedicinePrescriptionRecordExample();
        example.createCriteria().andIdEqualTo(prescriptionId).andStatusEqualTo(1);
        count += dmsMedicinePrescriptionRecordMapper.updateByExampleSelective(medicineRecord,example);

        return count;
    }

    @Override
    public int nonDrugOutOfTime(Long prescriptionId){
        int count = 0;
        //非药品超时未缴费处理（设置状态为6已过期）
        DmsNonDrugItemRecord nonDrugRecord = new DmsNonDrugItemRecord();
        nonDrugRecord.setStatus(6);
        DmsNonDrugItemRecordExample example = new DmsNonDrugItemRecordExample();
        example.createCriteria().andIdEqualTo(prescriptionId).andStatusEqualTo(1);
        count += dmsNonDrugItemRecordMapper.updateByExampleSelective(nonDrugRecord,example);

        return count;
    }
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsDiseService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsDiseParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsDiseResult;


import java.util.List;

/**
 * 诊断
 */
public interface DmsDiseService {
    /**
     * 描述：新增一个诊断
     */
    int create(DmsDiseParam dmsDiseParam);
    /**
     * 描述：根据ids删除诊断
     */
    int delete(List<Long> ids);
    /**
     * 描述：根据id更新诊断
     */
    int update(Long id, DmsDiseParam dmsDiseParam);
    /**
     * 描述：查询诊断
     */
    List<DmsDiseResult> select(DmsDiseParam dmsDiseParam, Integer pageSize, Integer pageNum);
    /**
     * 描述：查询所有诊断
     */
    List<DmsDiseResult> selectAll();
    /**
     * 描述：根据id串获取诊断简单对象list
     */
    List<DmsDiseResult> parseList(String idsStr);
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/impl/BmsFeeQueryServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.bms.service.impl;


import com.neu.his.cloud.service.bms.dto.app.AppDrugItemResult;
import com.neu.his.cloud.service.bms.dto.app.AppHistoryRegResult;
import com.neu.his.cloud.service.bms.dto.bms.BmsDoctorPatientFeeResult;
import com.neu.his.cloud.service.bms.mapper.*;
import com.neu.his.cloud.service.bms.model.*;
import com.neu.his.cloud.service.bms.service.BmsFeeQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class BmsFeeQueryServiceImpl implements BmsFeeQueryService {

    @Autowired
    private DmsNonDrugItemRecordMapper dmsNonDrugItemRecordMapper;

    @Autowired
    private DmsNonDrugMapper dmsNonDrugMapper;

    @Autowired
    private DmsHerbalPrescriptionRecordMapper dmsHerbalPrescriptionRecordMapper;

    @Autowired
    private DmsHerbalItemRecordMapper dmsHerbalItemRecordMapper;

    @Autowired
    private DmsMedicinePrescriptionRecordMapper dmsMedicinePrescriptionRecordMapper;

    @Autowired
    private DmsMedicineItemRecordMapper dmsMedicineItemRecordMapper;

    @Autowired
    private DmsDrugMapper dmsDrugMapper;

    @Override
    public List<BmsDoctorPatientFeeResult> listFeeByRegistrationId(Long registrationId){
        List<BmsDoctorPatientFeeResult> resultList = new ArrayList<>();
        //查询非药品
        DmsNonDrugItemRecordExample nonDrugExample = new DmsNonDrugItemRecordExample();
        nonDrugExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<DmsNonDrugItemRecord> nonDrugList = dmsNonDrugItemRecordMapper.selectByExample(nonDrugExample);
        for(DmsNonDrugItemRecord item : nonDrugList){
            //封装非药品
            DmsNonDrug nonDrug = dmsNonDrugMapper.selectByPrimaryKey(item.getNoDrugId());
            if(nonDrug == null){
                continue;
            }
            BmsDoctorPatientFeeResult result = new BmsDoctorPatientFeeResult();
            result.setItemName(nonDrug.getName());
            result.setFormat(nonDrug.getFormat());
            result.setPrice(nonDrug.getPrice());
            result.setCurrentNum(new Long(1));
            result.setType(item.getType());
            result.setStatus(item.getStatus());
            //添加收费状态
            if(item.getStatus() == 2 || item.getStatus() == 3 || item.getStatus() == 4){
                result.setChargeStatus(1);
            }else{
                result.setChargeStatus(0);
            }
            resultList.add(result);
        }

        //查询草药
        DmsHerbalPrescriptionRecordExample herbalExample = new DmsHerbalPrescriptionRecordExample();
        herbalExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<DmsHerbalPrescriptionRecord> herbalList = dmsHerbalPrescriptionRecordMapper.selectByExample(herbalExample);
        //遍历多个处方单
        for(DmsHerbalPrescriptionRecord item : herbalList){
            DmsHerbalItemRecordExample herbalItemExample = new DmsHerbalItemRecordExample();
            herbalItemExample.createCriteria().andPrescriptionIdEqualTo(item.getId());
            List<DmsHerbalItemRecord> drugList = dmsHerbalItemRecordMapper.selectByExample(herbalItemExample);
            //遍历一个处方单多个处方项
            for(DmsHerbalItemRecord itemRecord : drugList){
                //封装药品
                DmsDrug drug = dmsDrugMapper.selectByPrimaryKey(itemRecord.getDrugId());
                if(drug == null){
                    continue;
                }
                BmsDoctorPatientFeeResult result = new BmsDoctorPatientFeeResult();
                result.setItemName(drug.getName());
                result.setFormat(drug.getFormat());
                result.setPrice(drug.getPrice());
                result.setCurrentNum(itemRecord.getCurrentNum());
                result.setType(4);
                result.setStatus(itemRecord.getStatus());
                //添加收费状态
                if(item.getStatus() == 2){
                    result.setChargeStatus(1);
                }else{
                    result.setChargeStatus(0);
                }
                resultList.add(result);
            }
        }

        //查询成药
        DmsMedicinePrescriptionRecordExample medicineExample = new DmsMedicinePrescriptionRecordExample();
        medicineExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<DmsMedicinePrescriptionRecord> medicineList = dmsMedicinePrescriptionRecordMapper.selectByExample(medicineExample);
        //遍历多个处方单
        for(DmsMedicinePrescriptionRecord item : medicineList){
            DmsMedicineItemRecordExample medicineItemExample = new DmsMedicineItemRecordExample();
            medicineItemExample.createCriteria().andPrescriptionIdEqualTo(item.getId());
            List<DmsMedicineItemRecord> drugList = dmsMedicineItemRecordMapper.selectByExample(medicineItemExample);
            //遍历一个处方单多个处方项
            for(DmsMedicineItemRecord itemRecord : drugList){
                //封装药品
                DmsDrug drug = dmsDrugMapper.selectByPrimaryKey(itemRecord.getDrugId());
                if(drug == null){
                    continue;
                }
                BmsDoctorPatientFeeResult result = new BmsDoctorPatientFeeResult();
                result.setItemName(drug.getName());
                result.setFormat(drug.getFormat());
                result.setPrice(drug.getPrice());
                result.setCurrentNum(itemRecord.getCurrentNum());
                result.setType(5);
                result.setStatus(itemRecord.getStatus());
                //添加收费状态
                if(item.getStatus() == 2){
                    result.setChargeStatus(1);
                }else{
                    result.setChargeStatus(0);
                }
                resultList.add(result);
            }
        }

        return resultList;
    }


    @Override
    public List<AppHistoryRegResult> listFeePrescription(Long registrationId){
        List<AppHistoryRegResult> resultList = new ArrayList<>();
        //查询非药品
        DmsNonDrugItemRecordExample nonDrugExample = new DmsNonDrugItemRecordExample();
        nonDrugExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<DmsNonDrugItemRecord> nonDrugList = dmsNonDrugItemRecordMapper.selectByExample(nonDrugExample);
        for(DmsNonDrugItemRecord item : nonDrugList){
            //封装非药品
            DmsNonDrug nonDrug = dmsNonDrugMapper.selectByPrimaryKey(item.getNoDrugId());
            if(nonDrug == null){
                continue;
            }
            AppHistoryRegResult result = new AppHistoryRegResult();
            result.setId(item.getId());
            result.setItemName(nonDrug.getName());
            result.setPrice(nonDrug.getPrice());
            result.setCurrentNum(new Long(1));
            result.setType(item.getType());
            result.setStatus(item.getStatus());
            resultList.add(result);
        }

        //查询草药
        DmsHerbalPrescriptionRecordExample herbalExample = new DmsHerbalPrescriptionRecordExample();
        herbalExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<DmsHerbalPrescriptionRecord> herbalList = dmsHerbalPrescriptionRecordMapper.selectByExample(herbalExample);
        //遍历多个处方单
        for(DmsHerbalPrescriptionRecord item : herbalList){
            AppHistoryRegResult result = new AppHistoryRegResult();
            result.setId(item.getId());
            result.setItemName(item.getName());
            result.setPrice(item.getAmount());
            result.setCurrentNum(item.getPairNum());
            result.setType(4);
            result.setStatus(item.getStatus());
            resultList.add(result);
        }

        //查询成药
        DmsMedicinePrescriptionRecordExample medicineExample = new DmsMedicinePrescriptionRecordExample();
        medicineExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<DmsMedicinePrescriptionRecord> medicineList = dmsMedicinePrescriptionRecordMapper.selectByExample(medicineExample);
        //遍历多个处方单
        for(DmsMedicinePrescriptionRecord item : medicineList){
            AppHistoryRegResult result = new AppHistoryRegResult();
            result.setId(item.getId());
            result.setItemName(item.getName());
            result.setPrice(item.getAmount());
            result.setCurrentNum(new Long(1));    //成药处方默认为一副
            result.setType(5);
            result.setStatus(item.getStatus());
            resultList.add(result);
        }

        return resultList;
    }

    @Override
    public List<AppDrugItemResult> listFeeItem(Long prescriptionId, int type){
        List<AppDrugItemResult> resultList = new ArrayList<>();
        if(type == 4){
            DmsHerbalItemRecordExample herbalItemExample = new DmsHerbalItemRecordExample();
            herbalItemExample.createCriteria().andPrescriptionIdEqualTo(prescriptionId);
            List<DmsHerbalItemRecord> drugList = dmsHerbalItemRecordMapper.selectByExample(herbalItemExample);
            //遍历一个处方单多个处方项
            for(DmsHerbalItemRecord itemRecord : drugList){
                //封装药品
                DmsDrug drug = dmsDrugMapper.selectByPrimaryKey(itemRecord.getDrugId());
                if(drug == null){
                    continue;
                }
                AppDrugItemResult result = new AppDrugItemResult();
                result.setDrugName(drug.getName());
                result.setFormat(drug.getFormat());
                result.setPrice(drug.getPrice());
                result.setCurrentNum(itemRecord.getCurrentNum());
                result.setStatus(itemRecord.getStatus());
                resultList.add(result);
            }
        }else if(type == 5){
            DmsMedicineItemRecordExample medicineItemExample = new DmsMedicineItemRecordExample();
            medicineItemExample.createCriteria().andPrescriptionIdEqualTo(prescriptionId);
            List<DmsMedicineItemRecord> drugList = dmsMedicineItemRecordMapper.selectByExample(medicineItemExample);
            //遍历一个处方单多个处方项
            for(DmsMedicineItemRecord itemRecord : drugList){
                //封装药品
                DmsDrug drug = dmsDrugMapper.selectByPrimaryKey(itemRecord.getDrugId());
                if(drug == null){
                    continue;
                }
                AppDrugItemResult result = new AppDrugItemResult();
                result.setDrugName(drug.getName());
                result.setFormat(drug.getFormat());
                result.setPrice(drug.getPrice());
                result.setCurrentNum(itemRecord.getCurrentNum());
                result.setStatus(itemRecord.getStatus());
                resultList.add(result);
            }
        }

        return resultList;
    }


}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/controller/SmsRegistrationRankController.java<|end_filename|>
package com.neu.his.cloud.service.sms.controller;


import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.service.sms.common.CommonPage;
import com.neu.his.cloud.service.sms.common.CommonResult;
import com.neu.his.cloud.service.sms.dto.sms.SmsRegistrationRankParam;
import com.neu.his.cloud.service.sms.dto.sms.SmsRegistrationRankResult;
import com.neu.his.cloud.service.sms.service.SmsRegistrationRankService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "SmsRegistrationRankController", description = "挂号级别管理")
@RequestMapping("/registerRank")
@CrossOrigin(allowCredentials = "true")
public class SmsRegistrationRankController {

    @Autowired
    private SmsRegistrationRankService smsRegistrationRankService;

    /**
     * 描述:新增一个挂号级别
     * <p>author: ma
     */
    @ApiOperation("新增一个挂号级别")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody SmsRegistrationRankParam smsRegistrationRankParam, BindingResult result){
        int count = smsRegistrationRankService.create(smsRegistrationRankParam);
        if(count > 0){
            return CommonResult.success(count, "添加成功");
        }
        return CommonResult.failed("添加失败");
    }

    /**
     * 描述:根据ids删除挂号级别
     * <p>author: ma
     */
    @ApiOperation("根据ids删除挂号级别")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        int count = smsRegistrationRankService.delete(ids);
        if(count > 0){
            return CommonResult.success(count,"删除成功");
        }
        return CommonResult.failed("删除失败");
    }

    /**
     * 描述:更新一个挂号级别的全部信息
     * <p>author: ma
     */
    @ApiOperation("更新一个挂号级别的全部信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable("id") Long id, @RequestBody SmsRegistrationRankParam smsRegistrationRankParam, BindingResult result){
        int count = smsRegistrationRankService.update(id,smsRegistrationRankParam);
        if(id > 0){
            return CommonResult.success(count,"更新成功");
        }
        return CommonResult.failed("更新失败");
    }

    /**
     * 描述:模糊查询挂号级别、且分页
     * <p>author: ma
     */
    @ApiOperation("模糊查询挂号级别、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsRegistrationRankResult>> list(@RequestBody SmsRegistrationRankParam queryParam,
                                                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

        Page page =PageHelper.startPage(pageNum, pageSize);
        List<SmsRegistrationRankResult> list = smsRegistrationRankService.select(queryParam);
        Long pageTotal=page.getTotal();
        return CommonResult.success(CommonPage.restPage(list,pageTotal));
    }

    /**
     * 描述:查询所有挂号级别
     * <p>author: ma
     */
    @ApiOperation("查询所有挂号级别")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsRegistrationRankResult>> listAll(){
        List<SmsRegistrationRankResult> list = smsRegistrationRankService.selectAll();
        return CommonResult.success(list);
    }
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/controller/DmsDrugController.java<|end_filename|>
package com.neu.his.cloud.service.dms.controller;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.service.dms.common.CommonPage;
import com.neu.his.cloud.service.dms.common.CommonResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsDosageResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsDrugParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsDrugResult;
import com.neu.his.cloud.service.dms.service.DmsDrugService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsDrugController", description = "药品管理")
@RequestMapping("/drug")
@CrossOrigin(allowCredentials = "true")
public class DmsDrugController {

    @Autowired
    private DmsDrugService dmsDrugService;

    /**
     * 描述:新增一个药品
     * <p>author: ma
     */
    @ApiOperation("新增一个药品")
    @RequestMapping(value = "/createDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createDrug(@RequestBody DmsDrugParam dmsDrugParam  , BindingResult result){
        int count = dmsDrugService.createDrug(dmsDrugParam);
        if(count > 0){
            return CommonResult.success(count, "添加科室成功");
        }
        return CommonResult.failed("添加科室失败");
    }

    /**
     * 描述:根据ids删除药品
     * <p>author: ma
     */
    @ApiOperation("根据ids删除药品")
    @RequestMapping(value = "/deleteDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteDrug(@RequestParam("ids") List<Long> ids){
        int count = dmsDrugService.deleteDrug(ids);
        if(count > 0){
            return CommonResult.success(count,"删除成功");
        }
        return CommonResult.failed("删除失败");
    }

    /**
     * 描述:更新一个药品的全部信息
     * <p>author: ma
     */
    @ApiOperation("更新一个药品的全部信息")
    @RequestMapping(value = "/updateDrug/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateDrug(@PathVariable Long id, @RequestBody DmsDrugParam dmsDrugParam , BindingResult result){
        int count = dmsDrugService.updateDrug(id,dmsDrugParam);
        if(id > 0){
            return CommonResult.success(count,"更新成功");
        }
        return CommonResult.failed("更新失败");
    }

    /**
     * 描述:模糊查询药品、且分页
     * <p>author: ma
     */
    @ApiOperation("模糊查询药品、且分页")
    @RequestMapping(value = "/selectDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<DmsDrugResult>> listDrug(@RequestBody DmsDrugParam queryParam,
                                                            @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        Page page =PageHelper.startPage(pageNum, pageSize);
        List<DmsDrugResult> list = dmsDrugService.selectDrug(queryParam,pageSize,pageNum);
        Long pageTotal=page.getTotal();
        return CommonResult.success(CommonPage.restPage(list,pageTotal));
    }

    /**
     * 描述:查询所有药品
     * <p>author: ma
     */
    @ApiOperation("查询所有药品")
    @RequestMapping(value = "/selectAllDrug", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<DmsDrugResult>> listAllDrug(){
        List<DmsDrugResult> list = dmsDrugService.selectAllDrug();
        return CommonResult.success(list);
    }

    /**
     * 描述:查询所有药品剂型
     * <p>author: ma
     */
    @ApiOperation("查询所有药品剂型")
    @RequestMapping(value = "/selectAllDosage", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<DmsDosageResult>> listAllDrugDosage(){
        List<DmsDosageResult> list = dmsDrugService.selectAllDosage();
        return CommonResult.success(list);
    }


    /**
     * 描述:根据id查询药品
     * <p>author: wang
     */
    @ApiOperation("根据id查询药品")
    @RequestMapping(value = "/selectById", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsDrugResult> selectById(@RequestParam("id") Long id){
        DmsDrugResult dmsDrugResult = dmsDrugService.selectById(id);
        return CommonResult.success(dmsDrugResult);
    }

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsHerbalPrescriptionRecordService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsHerbalPrescriptionRecordParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsHerbalPrescriptionRecordResult;


import java.util.List;

/**
 * 草药处方
 */
public interface DmsHerbalPrescriptionRecordService {

    /**
     * 描述：开立处方
     */
    Long apply(DmsHerbalPrescriptionRecordParam dmsHerbalPrescriptionRecordParam);

    /**
     * 描述：作废处方
     */
    int invalid(List<Long> ids);

    /**
     * 描述：根据门诊号查询处方
     */
    List<DmsHerbalPrescriptionRecordResult>  listByReg(Long registrationId);


    /**
     * 描述：根据处方ids查询处方详情
     */
    List<DmsHerbalPrescriptionRecordResult> listByIds(List<Long> ids);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/DmsDiseMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.DmsDise;
import com.neu.his.cloud.zuul.model.DmsDiseExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsDiseMapper {
    int countByExample(DmsDiseExample example);

    int deleteByExample(DmsDiseExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsDise record);

    int insertSelective(DmsDise record);

    List<DmsDise> selectByExample(DmsDiseExample example);

    DmsDise selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsDise record, @Param("example") DmsDiseExample example);

    int updateByExample(@Param("record") DmsDise record, @Param("example") DmsDiseExample example);

    int updateByPrimaryKeySelective(DmsDise record);

    int updateByPrimaryKey(DmsDise record);
}

<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/dms/DmsNonDrugController.java<|end_filename|>
package com.neu.his.api.controller.dms;


import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.common.api.CommonPage;
import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.dms.DmsNonDrugParam;
import com.neu.his.common.dto.dms.DmsNonDrugResult;
import com.neu.his.dms.service.DmsNonDrugService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@Controller
@Api(tags = "DmsNonDrugController", description = "非药品项目管理")
@RequestMapping("/DmsNonDrug")
@CrossOrigin(allowCredentials = "true")
public class DmsNonDrugController {
    @Autowired
    DmsNonDrugService dmsNonDrugService;

    @ApiOperation(value = "新增非药品")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsNonDrugParam dmsNonDrugParam , BindingResult result){
        CommonResult commonResult;
        int count = dmsNonDrugService.create(dmsNonDrugParam);
        if (count == 1) {
            commonResult = CommonResult.success(count);
        } else {
            commonResult = CommonResult.failed();
        }
        return commonResult;
    }

    @ApiOperation(value = "根据ids删除非药品")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        int count = dmsNonDrugService.delete(ids);
        if (count >= 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }
    @ApiOperation(value = "更新非药品信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody DmsNonDrugParam dmsNonDrugParam , BindingResult result){
        int count = dmsNonDrugService.update(id,dmsNonDrugParam);
        if (count > 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }

    @ApiOperation(value = "模糊查询非药品、且分页")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<DmsNonDrugResult>> list(DmsNonDrugParam queryParam,
                                                           @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        Page page = PageHelper.startPage(pageNum, pageSize);
        List<DmsNonDrugResult> list = dmsNonDrugService.select(queryParam);
        Long pageTotal=page.getTotal();
        return CommonResult.success(CommonPage.restPage(list,pageTotal));
    }
    @ApiOperation(value = "查询所有非药品")
    @RequestMapping(value = "/listAll", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsNonDrugResult>> listAll(){
        return CommonResult.success(dmsNonDrugService.selectAll());
    }
}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/dms/DmsNonDrugRedisParam.java<|end_filename|>
package com.neu.his.common.dto.dms;

import com.neu.his.common.dto.entity.DmsNonDrugItem;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class DmsNonDrugRedisParam  implements Serializable {

    @ApiModelProperty(value = "非药品项列表" )
    private List<DmsNonDrugItem> dmsNonDrugItemRecordParamList;
    @ApiModelProperty(value = "创建人id" )
    private Long createStaffId;
    @ApiModelProperty(value = "挂号号" )
    private Long registrationId;
    @ApiModelProperty(value = "非药品类型" )
    private Integer type;
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/dms/DmsRegistrationResult.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.dms;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

public class DmsRegistrationResult  implements Serializable {
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "患者id")
    private Long patientId;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "诊断状态")
    private Integer endAttendance;
    @ApiModelProperty(value = "状态")
    private Integer status;
    @ApiModelProperty(value = "排班id")
    private Long skdId;
    @ApiModelProperty(value = "是否需要病历本")
    private Integer needBook;
    @ApiModelProperty(value = "师生绑定状态")
    private Integer bindStatus;
    @ApiModelProperty(value = "科室id")
    private Long deptId;
    @ApiModelProperty(value = "就诊日期")
    private Date attendanceDate;

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/impl/DmsCaseModelServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.dms.service.impl;

import com.neu.his.cloud.service.dms.dto.dms.DmsCaseModelCatalogNode;
import com.neu.his.cloud.service.dms.dto.dms.DmsCaseModelListResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsCaseModelOrCatalogParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsCaseModelResult;
import com.neu.his.cloud.service.dms.mapper.DmsCaseModelCatalogMapper;
import com.neu.his.cloud.service.dms.mapper.DmsCaseModelMapper;
import com.neu.his.cloud.service.dms.mapper.SmsStaffMapper;
import com.neu.his.cloud.service.dms.model.*;
import com.neu.his.cloud.service.dms.service.DmsCaseModelService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;


@Service
public class DmsCaseModelServiceImpl implements DmsCaseModelService {
    @Autowired
    DmsCaseModelMapper dmsCaseModelMapper;

    @Autowired
    DmsCaseModelCatalogMapper dmsCaseModelCatalogMapper;
    @Autowired
    SmsStaffMapper smsStaffMapper;

    /**
     * 列出病历模板目录树
     */
    @Override
    public List<DmsCaseModelCatalogNode> listModelCatTree(Long ownId, Integer scope) {

        DmsCaseModelCatalogExample dmsCaseModelCatalogExample=new DmsCaseModelCatalogExample();
        dmsCaseModelCatalogExample.createCriteria().andOwnIdEqualTo(ownId).andScopeEqualTo(scope);
        List<DmsCaseModelCatalog> dmsCaseModelCatalogList = dmsCaseModelCatalogMapper.selectByExample(dmsCaseModelCatalogExample);

        List<DmsCaseModelCatalogNode> result = dmsCaseModelCatalogList.stream()
                .filter(catalog -> catalog.getParentId().equals(0L))// 筛选出pid为0的目录
                .map(catalog -> covert(catalog,dmsCaseModelCatalogList)).collect(Collectors.toList()); // 递归
        return result;
    }


    @Override
    public int createCatOrModel(DmsCaseModelOrCatalogParam dmsCaseModelOrCatalogParam) {
        if(dmsCaseModelOrCatalogParam.getType()==null){
            return 0;
        }else if(dmsCaseModelOrCatalogParam.getType()==1){//目录

            DmsCaseModelCatalog dmsCaseModelCatalog=new DmsCaseModelCatalog();
            BeanUtils.copyProperties(dmsCaseModelOrCatalogParam,dmsCaseModelCatalog);
            dmsCaseModelCatalog.setCreateTime(new Date());
            //获取父目录的level+1
            if(dmsCaseModelOrCatalogParam.getParentId()==null||dmsCaseModelCatalogMapper.selectByPrimaryKey(dmsCaseModelOrCatalogParam.getParentId())==null){
                dmsCaseModelCatalog.setLevel(1);// 找不到父目录设置为level1
                dmsCaseModelCatalog.setParentId(0L);
            }else{
                dmsCaseModelCatalog.setLevel(dmsCaseModelCatalogMapper.selectByPrimaryKey(dmsCaseModelOrCatalogParam.getParentId()).getLevel()+1);//+1
                dmsCaseModelCatalog.setParentId(dmsCaseModelOrCatalogParam.getParentId());
            }
            dmsCaseModelCatalog.setStatus(1);
            dmsCaseModelCatalog.setCreateTime(new Date());
            dmsCaseModelCatalogMapper.insert(dmsCaseModelCatalog);


        }else if(dmsCaseModelOrCatalogParam.getType()==2){//模板
            //先插入模板详细信息
            DmsCaseModel dmsCaseModel=new DmsCaseModel();
            BeanUtils.copyProperties(dmsCaseModelOrCatalogParam,dmsCaseModel);
            dmsCaseModel.setStatus(1);

            dmsCaseModelMapper.insert(dmsCaseModel);//插入后自动注入了模板id
            //插入记录
            DmsCaseModelCatalog dmsCaseModelCatalog=new DmsCaseModelCatalog();
            BeanUtils.copyProperties(dmsCaseModelOrCatalogParam,dmsCaseModelCatalog);
            dmsCaseModelCatalog.setCreateTime(new Date());
            //获取父目录的level+1
            if(dmsCaseModelOrCatalogParam.getParentId()==null||dmsCaseModelCatalogMapper.selectByPrimaryKey(dmsCaseModelOrCatalogParam.getParentId())==null){
                dmsCaseModelCatalog.setLevel(1);// 找不到父目录设置为level1
                dmsCaseModelCatalog.setParentId(0L);
            }else{
                dmsCaseModelCatalog.setLevel(dmsCaseModelCatalogMapper.selectByPrimaryKey(dmsCaseModelOrCatalogParam.getParentId()).getLevel()+1);//+1
                dmsCaseModelCatalog.setParentId(dmsCaseModelOrCatalogParam.getParentId());
            }
            dmsCaseModelCatalog.setStatus(1);
            dmsCaseModelCatalog.setCreateTime(new Date());
            dmsCaseModelCatalog.setModelId(dmsCaseModel.getId());
            dmsCaseModelCatalogMapper.insert(dmsCaseModelCatalog);

        }else{ //不为0或1
            return 0;
        }

        return 1;
    }

    @Override
    public int deleteModelOrCat(Long id) {
        DmsCaseModelCatalog dmsCaseModelCatalog= dmsCaseModelCatalogMapper.selectByPrimaryKey(id);
        if(null!=dmsCaseModelCatalog) {
            Long modelId=dmsCaseModelCatalog.getModelId();
            dmsCaseModelCatalogMapper.deleteByPrimaryKey(id);
            dmsCaseModelMapper.deleteByPrimaryKey(modelId);
            return 1;
        }
        return 0;
    }

    @Override
    public int updateModel(Long modelId, DmsCaseModel newDmsCaseModel) {

        //仅更新目录
       DmsCaseModel oldModel = dmsCaseModelMapper.selectByPrimaryKey(modelId);
       if(null==oldModel){
           return 0;
       }
        newDmsCaseModel.setStatus(oldModel.getStatus());
        newDmsCaseModel.setId(oldModel.getId());
        newDmsCaseModel.setName(oldModel.getName()); // 名字统一在更新名字的接口上改，因为模板名也会存在目录中
        dmsCaseModelMapper.updateByPrimaryKey(newDmsCaseModel);
        return 1;
    }

    @Override
    public int updateName(Long id, String name) { // 2 模板 1 目录
        DmsCaseModelCatalog dmsCaseModelCatalog = dmsCaseModelCatalogMapper.selectByPrimaryKey(id);
        int count =0;
        if(dmsCaseModelCatalog.getType()==1){
            DmsCaseModelCatalog dmsCaseModelCatalogName=new DmsCaseModelCatalog();
            dmsCaseModelCatalogName.setId(id);
            dmsCaseModelCatalogName.setName(name);
            count = dmsCaseModelCatalogMapper.updateByPrimaryKeySelective(dmsCaseModelCatalogName);
        }else if(dmsCaseModelCatalog.getType()==2){DmsCaseModelCatalog dmsCaseModelCatalogName=new DmsCaseModelCatalog();
            dmsCaseModelCatalogName.setId(id);
            dmsCaseModelCatalogName.setName(name);
            dmsCaseModelCatalogMapper.updateByPrimaryKeySelective(dmsCaseModelCatalogName);
            //如果是模板还需要更新模板表中的模板名（两个字段是同步的）
            DmsCaseModel dmsCaseModeName =new DmsCaseModel();
            dmsCaseModeName.setName(name);
            dmsCaseModeName.setId(dmsCaseModelCatalog.getModelId());
            count= dmsCaseModelMapper.updateByPrimaryKeySelective(dmsCaseModeName);
        }

        return count;

    }

    @Override
    public DmsCaseModel getModelDetail(Long id) {
        return dmsCaseModelMapper.selectByPrimaryKey(id);
    }

    @Override
    public DmsCaseModelListResult getAllStaffModel(Long staffId) {
        DmsCaseModelListResult caseModelListResult = new DmsCaseModelListResult();
        List<DmsCaseModelResult> modelList = new ArrayList<>();
        caseModelListResult.setStaffList(modelList);
        caseModelListResult.setDeptList(modelList);
        caseModelListResult.setHospitalList(modelList);
        if(staffId == null){
            return caseModelListResult;
        }
        SmsStaff staff = smsStaffMapper.selectByPrimaryKey(staffId);
        if(staff == null){
            return caseModelListResult;
        }

        //先查个人
        DmsCaseModelCatalogExample catalogExample = new DmsCaseModelCatalogExample();
        catalogExample.createCriteria().andOwnIdEqualTo(staffId)
                .andTypeEqualTo(2)
                .andStatusEqualTo(1)
                .andScopeEqualTo(0);
        List<DmsCaseModelCatalog> staffCatalogList = dmsCaseModelCatalogMapper.selectByExample(catalogExample);
        List<Long> staffCaseIdList = new ArrayList<>();
        for(DmsCaseModelCatalog catalog : staffCatalogList){
            staffCaseIdList.add(catalog.getModelId());
        }
        List<DmsCaseModelResult> staffList = new ArrayList<>();
        if(!staffCaseIdList.isEmpty()){
            DmsCaseModelExample modelExample = new DmsCaseModelExample();
            modelExample.createCriteria().andIdIn(staffCaseIdList);
            List<DmsCaseModel> staffCaseModelList = dmsCaseModelMapper.selectByExample(modelExample);
            //封装list
            for(DmsCaseModel model : staffCaseModelList){
                DmsCaseModelResult result = new DmsCaseModelResult();
                BeanUtils.copyProperties(model,result);
                result.setPriliminaryDiseIdList(strToList(model.getPriliminaryDiseIdList()));
                result.setPriliminaryDiseStrList(strToStrList(model.getPriliminaryDiseStrList()));
                staffList.add(result);
            }
        }
        caseModelListResult.setStaffList(staffList);

        //再查科室
        catalogExample.clear();
        catalogExample.createCriteria().andOwnIdEqualTo(staff.getDeptId())
                .andTypeEqualTo(2)
                .andStatusEqualTo(1)
                .andScopeEqualTo(1);
        List<DmsCaseModelCatalog> deptCatalogList = dmsCaseModelCatalogMapper.selectByExample(catalogExample);
        List<Long> deptCaseIdList = new ArrayList<>();
        for(DmsCaseModelCatalog catalog : deptCatalogList){
            deptCaseIdList.add(catalog.getModelId());
        }
        List<DmsCaseModelResult> deptList = new ArrayList<>();
        if(!deptCaseIdList.isEmpty()){
            DmsCaseModelExample modelExample = new DmsCaseModelExample();
            modelExample.createCriteria().andIdIn(deptCaseIdList);
            List<DmsCaseModel> deptCaseModelList = dmsCaseModelMapper.selectByExample(modelExample);
            //封装list
            for(DmsCaseModel model : deptCaseModelList){
                DmsCaseModelResult result = new DmsCaseModelResult();
                BeanUtils.copyProperties(model,result);
                result.setPriliminaryDiseIdList(strToList(model.getPriliminaryDiseIdList()));
                result.setPriliminaryDiseStrList(strToStrList(model.getPriliminaryDiseStrList()));
                deptList.add(result);
            }
        }
        caseModelListResult.setDeptList(deptList);

        //再查全院
        catalogExample.clear();
        catalogExample.createCriteria().andTypeEqualTo(2)
                .andStatusEqualTo(1)
                .andScopeEqualTo(2);
        List<DmsCaseModelCatalog> hospitalCatalogList = dmsCaseModelCatalogMapper.selectByExample(catalogExample);
        List<Long> hospitalCaseIdList = new ArrayList<>();
        for(DmsCaseModelCatalog catalog : hospitalCatalogList){
            hospitalCaseIdList.add(catalog.getModelId());
        }
        List<DmsCaseModelResult> hospitalList = new ArrayList<>();
        if(!hospitalCaseIdList.isEmpty()){
            DmsCaseModelExample modelExample = new DmsCaseModelExample();
            modelExample.createCriteria().andIdIn(hospitalCaseIdList);
            List<DmsCaseModel> hospitalCaseModelList = dmsCaseModelMapper.selectByExample(modelExample);
            //封装list
            for(DmsCaseModel model : hospitalCaseModelList){
                DmsCaseModelResult result = new DmsCaseModelResult();
                BeanUtils.copyProperties(model,result);
                result.setPriliminaryDiseIdList(strToList(model.getPriliminaryDiseIdList()));
                result.setPriliminaryDiseStrList(strToStrList(model.getPriliminaryDiseStrList()));
                hospitalList.add(result);
            }
        }
        caseModelListResult.setHospitalList(hospitalList);

        return caseModelListResult;
    }


    /**
     * 将病历模板目录转换为带有子级的目录对象
     * 当找不到子级目录的时候map操作不会再递归调用covert
     */
    private DmsCaseModelCatalogNode covert(DmsCaseModelCatalog dmsCaseModelCatalog, List<DmsCaseModelCatalog> dmsCaseModelCatalogList){
        DmsCaseModelCatalogNode node = new DmsCaseModelCatalogNode();
        BeanUtils.copyProperties(dmsCaseModelCatalog,node);
        List<DmsCaseModelCatalogNode> children = dmsCaseModelCatalogList.stream()
                .filter(subCatalog -> subCatalog.getParentId().equals(dmsCaseModelCatalog.getId()))
                .map(subCatalog -> covert(subCatalog,dmsCaseModelCatalogList)).collect(Collectors.toList());
        node.setChildren(children);
        return node;
    }

    private List<Long> strToList(String itemListStr) {
        List<Long> idList = new ArrayList<>();
        if(itemListStr == null || itemListStr.length() <= 0){
            return idList;
        }
        String[] idArray = itemListStr.split(",");
        for(int i=0;i < idArray.length;i++){
            idList.add(new Long(idArray[i]));
        }
        return idList;
    }

    private List<String> strToStrList(String itemListStr) {
        List<String> idList = new ArrayList<>();
        if(itemListStr == null || itemListStr.length() <= 0){
            return idList;
        }
        String[] idArray = itemListStr.split(",");
        for(int i=0;i < idArray.length;i++){
            idList.add(idArray[i]);
        }
        return idList;
    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/sms/SmsStaffService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.sms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsSkdDocParam;
import com.neu.his.cloud.api.pc.dto.sms.SmsSkdDocResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsStaffParam;
import com.neu.his.cloud.api.pc.dto.sms.SmsStaffResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-service-sms")
public interface SmsStaffService {



    @RequestMapping(value = "/staff/listDocBySkd", method = RequestMethod.POST)
    CommonResult<List<SmsSkdDocResult>> listDocBySkd(@RequestBody SmsSkdDocParam smsSkdDocPara);



    @RequestMapping(value = "/staff/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/staff/update/{id}", method = RequestMethod.POST)
     CommonResult update(@PathVariable Long id, @RequestBody SmsStaffParam smsStaffParam);


    @RequestMapping(value = "/staff/select", method = RequestMethod.POST)
    CommonResult<CommonPage<SmsStaffResult>> list(@RequestBody SmsStaffParam queryParam,
                                                         @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);


    @RequestMapping(value = "/staff/selectAll", method = RequestMethod.GET)
    CommonResult<List<SmsStaffResult>> listAll();





}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/model/DmsMedicineModelItemExample.java<|end_filename|>
package com.neu.his.cloud.service.pms.model;

import java.util.ArrayList;
import java.util.List;

public class DmsMedicineModelItemExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsMedicineModelItemExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andModelIdIsNull() {
            addCriterion("model_id is null");
            return (Criteria) this;
        }

        public Criteria andModelIdIsNotNull() {
            addCriterion("model_id is not null");
            return (Criteria) this;
        }

        public Criteria andModelIdEqualTo(Long value) {
            addCriterion("model_id =", value, "modelId");
            return (Criteria) this;
        }

        public Criteria andModelIdNotEqualTo(Long value) {
            addCriterion("model_id <>", value, "modelId");
            return (Criteria) this;
        }

        public Criteria andModelIdGreaterThan(Long value) {
            addCriterion("model_id >", value, "modelId");
            return (Criteria) this;
        }

        public Criteria andModelIdGreaterThanOrEqualTo(Long value) {
            addCriterion("model_id >=", value, "modelId");
            return (Criteria) this;
        }

        public Criteria andModelIdLessThan(Long value) {
            addCriterion("model_id <", value, "modelId");
            return (Criteria) this;
        }

        public Criteria andModelIdLessThanOrEqualTo(Long value) {
            addCriterion("model_id <=", value, "modelId");
            return (Criteria) this;
        }

        public Criteria andModelIdIn(List<Long> values) {
            addCriterion("model_id in", values, "modelId");
            return (Criteria) this;
        }

        public Criteria andModelIdNotIn(List<Long> values) {
            addCriterion("model_id not in", values, "modelId");
            return (Criteria) this;
        }

        public Criteria andModelIdBetween(Long value1, Long value2) {
            addCriterion("model_id between", value1, value2, "modelId");
            return (Criteria) this;
        }

        public Criteria andModelIdNotBetween(Long value1, Long value2) {
            addCriterion("model_id not between", value1, value2, "modelId");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andDrugIdIsNull() {
            addCriterion("drug_id is null");
            return (Criteria) this;
        }

        public Criteria andDrugIdIsNotNull() {
            addCriterion("drug_id is not null");
            return (Criteria) this;
        }

        public Criteria andDrugIdEqualTo(Long value) {
            addCriterion("drug_id =", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotEqualTo(Long value) {
            addCriterion("drug_id <>", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdGreaterThan(Long value) {
            addCriterion("drug_id >", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdGreaterThanOrEqualTo(Long value) {
            addCriterion("drug_id >=", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdLessThan(Long value) {
            addCriterion("drug_id <", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdLessThanOrEqualTo(Long value) {
            addCriterion("drug_id <=", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdIn(List<Long> values) {
            addCriterion("drug_id in", values, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotIn(List<Long> values) {
            addCriterion("drug_id not in", values, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdBetween(Long value1, Long value2) {
            addCriterion("drug_id between", value1, value2, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotBetween(Long value1, Long value2) {
            addCriterion("drug_id not between", value1, value2, "drugId");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageIsNull() {
            addCriterion("medicine_usage is null");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageIsNotNull() {
            addCriterion("medicine_usage is not null");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageEqualTo(Integer value) {
            addCriterion("medicine_usage =", value, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageNotEqualTo(Integer value) {
            addCriterion("medicine_usage <>", value, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageGreaterThan(Integer value) {
            addCriterion("medicine_usage >", value, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageGreaterThanOrEqualTo(Integer value) {
            addCriterion("medicine_usage >=", value, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageLessThan(Integer value) {
            addCriterion("medicine_usage <", value, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageLessThanOrEqualTo(Integer value) {
            addCriterion("medicine_usage <=", value, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageIn(List<Integer> values) {
            addCriterion("medicine_usage in", values, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageNotIn(List<Integer> values) {
            addCriterion("medicine_usage not in", values, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageBetween(Integer value1, Integer value2) {
            addCriterion("medicine_usage between", value1, value2, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andMedicineUsageNotBetween(Integer value1, Integer value2) {
            addCriterion("medicine_usage not between", value1, value2, "medicineUsage");
            return (Criteria) this;
        }

        public Criteria andFrequencyIsNull() {
            addCriterion("frequency is null");
            return (Criteria) this;
        }

        public Criteria andFrequencyIsNotNull() {
            addCriterion("frequency is not null");
            return (Criteria) this;
        }

        public Criteria andFrequencyEqualTo(Integer value) {
            addCriterion("frequency =", value, "frequency");
            return (Criteria) this;
        }

        public Criteria andFrequencyNotEqualTo(Integer value) {
            addCriterion("frequency <>", value, "frequency");
            return (Criteria) this;
        }

        public Criteria andFrequencyGreaterThan(Integer value) {
            addCriterion("frequency >", value, "frequency");
            return (Criteria) this;
        }

        public Criteria andFrequencyGreaterThanOrEqualTo(Integer value) {
            addCriterion("frequency >=", value, "frequency");
            return (Criteria) this;
        }

        public Criteria andFrequencyLessThan(Integer value) {
            addCriterion("frequency <", value, "frequency");
            return (Criteria) this;
        }

        public Criteria andFrequencyLessThanOrEqualTo(Integer value) {
            addCriterion("frequency <=", value, "frequency");
            return (Criteria) this;
        }

        public Criteria andFrequencyIn(List<Integer> values) {
            addCriterion("frequency in", values, "frequency");
            return (Criteria) this;
        }

        public Criteria andFrequencyNotIn(List<Integer> values) {
            addCriterion("frequency not in", values, "frequency");
            return (Criteria) this;
        }

        public Criteria andFrequencyBetween(Integer value1, Integer value2) {
            addCriterion("frequency between", value1, value2, "frequency");
            return (Criteria) this;
        }

        public Criteria andFrequencyNotBetween(Integer value1, Integer value2) {
            addCriterion("frequency not between", value1, value2, "frequency");
            return (Criteria) this;
        }

        public Criteria andDaysIsNull() {
            addCriterion("days is null");
            return (Criteria) this;
        }

        public Criteria andDaysIsNotNull() {
            addCriterion("days is not null");
            return (Criteria) this;
        }

        public Criteria andDaysEqualTo(Long value) {
            addCriterion("days =", value, "days");
            return (Criteria) this;
        }

        public Criteria andDaysNotEqualTo(Long value) {
            addCriterion("days <>", value, "days");
            return (Criteria) this;
        }

        public Criteria andDaysGreaterThan(Long value) {
            addCriterion("days >", value, "days");
            return (Criteria) this;
        }

        public Criteria andDaysGreaterThanOrEqualTo(Long value) {
            addCriterion("days >=", value, "days");
            return (Criteria) this;
        }

        public Criteria andDaysLessThan(Long value) {
            addCriterion("days <", value, "days");
            return (Criteria) this;
        }

        public Criteria andDaysLessThanOrEqualTo(Long value) {
            addCriterion("days <=", value, "days");
            return (Criteria) this;
        }

        public Criteria andDaysIn(List<Long> values) {
            addCriterion("days in", values, "days");
            return (Criteria) this;
        }

        public Criteria andDaysNotIn(List<Long> values) {
            addCriterion("days not in", values, "days");
            return (Criteria) this;
        }

        public Criteria andDaysBetween(Long value1, Long value2) {
            addCriterion("days between", value1, value2, "days");
            return (Criteria) this;
        }

        public Criteria andDaysNotBetween(Long value1, Long value2) {
            addCriterion("days not between", value1, value2, "days");
            return (Criteria) this;
        }

        public Criteria andNumIsNull() {
            addCriterion("num is null");
            return (Criteria) this;
        }

        public Criteria andNumIsNotNull() {
            addCriterion("num is not null");
            return (Criteria) this;
        }

        public Criteria andNumEqualTo(Long value) {
            addCriterion("num =", value, "num");
            return (Criteria) this;
        }

        public Criteria andNumNotEqualTo(Long value) {
            addCriterion("num <>", value, "num");
            return (Criteria) this;
        }

        public Criteria andNumGreaterThan(Long value) {
            addCriterion("num >", value, "num");
            return (Criteria) this;
        }

        public Criteria andNumGreaterThanOrEqualTo(Long value) {
            addCriterion("num >=", value, "num");
            return (Criteria) this;
        }

        public Criteria andNumLessThan(Long value) {
            addCriterion("num <", value, "num");
            return (Criteria) this;
        }

        public Criteria andNumLessThanOrEqualTo(Long value) {
            addCriterion("num <=", value, "num");
            return (Criteria) this;
        }

        public Criteria andNumIn(List<Long> values) {
            addCriterion("num in", values, "num");
            return (Criteria) this;
        }

        public Criteria andNumNotIn(List<Long> values) {
            addCriterion("num not in", values, "num");
            return (Criteria) this;
        }

        public Criteria andNumBetween(Long value1, Long value2) {
            addCriterion("num between", value1, value2, "num");
            return (Criteria) this;
        }

        public Criteria andNumNotBetween(Long value1, Long value2) {
            addCriterion("num not between", value1, value2, "num");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceIsNull() {
            addCriterion("medical_advice is null");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceIsNotNull() {
            addCriterion("medical_advice is not null");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceEqualTo(String value) {
            addCriterion("medical_advice =", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceNotEqualTo(String value) {
            addCriterion("medical_advice <>", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceGreaterThan(String value) {
            addCriterion("medical_advice >", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceGreaterThanOrEqualTo(String value) {
            addCriterion("medical_advice >=", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceLessThan(String value) {
            addCriterion("medical_advice <", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceLessThanOrEqualTo(String value) {
            addCriterion("medical_advice <=", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceLike(String value) {
            addCriterion("medical_advice like", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceNotLike(String value) {
            addCriterion("medical_advice not like", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceIn(List<String> values) {
            addCriterion("medical_advice in", values, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceNotIn(List<String> values) {
            addCriterion("medical_advice not in", values, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceBetween(String value1, String value2) {
            addCriterion("medical_advice between", value1, value2, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceNotBetween(String value1, String value2) {
            addCriterion("medical_advice not between", value1, value2, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andUsageNumIsNull() {
            addCriterion("usage_num is null");
            return (Criteria) this;
        }

        public Criteria andUsageNumIsNotNull() {
            addCriterion("usage_num is not null");
            return (Criteria) this;
        }

        public Criteria andUsageNumEqualTo(Long value) {
            addCriterion("usage_num =", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumNotEqualTo(Long value) {
            addCriterion("usage_num <>", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumGreaterThan(Long value) {
            addCriterion("usage_num >", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumGreaterThanOrEqualTo(Long value) {
            addCriterion("usage_num >=", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumLessThan(Long value) {
            addCriterion("usage_num <", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumLessThanOrEqualTo(Long value) {
            addCriterion("usage_num <=", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumIn(List<Long> values) {
            addCriterion("usage_num in", values, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumNotIn(List<Long> values) {
            addCriterion("usage_num not in", values, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumBetween(Long value1, Long value2) {
            addCriterion("usage_num between", value1, value2, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumNotBetween(Long value1, Long value2) {
            addCriterion("usage_num not between", value1, value2, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageMeansIsNull() {
            addCriterion("usage_means is null");
            return (Criteria) this;
        }

        public Criteria andUsageMeansIsNotNull() {
            addCriterion("usage_means is not null");
            return (Criteria) this;
        }

        public Criteria andUsageMeansEqualTo(Integer value) {
            addCriterion("usage_means =", value, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageMeansNotEqualTo(Integer value) {
            addCriterion("usage_means <>", value, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageMeansGreaterThan(Integer value) {
            addCriterion("usage_means >", value, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageMeansGreaterThanOrEqualTo(Integer value) {
            addCriterion("usage_means >=", value, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageMeansLessThan(Integer value) {
            addCriterion("usage_means <", value, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageMeansLessThanOrEqualTo(Integer value) {
            addCriterion("usage_means <=", value, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageMeansIn(List<Integer> values) {
            addCriterion("usage_means in", values, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageMeansNotIn(List<Integer> values) {
            addCriterion("usage_means not in", values, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageMeansBetween(Integer value1, Integer value2) {
            addCriterion("usage_means between", value1, value2, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageMeansNotBetween(Integer value1, Integer value2) {
            addCriterion("usage_means not between", value1, value2, "usageMeans");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitIsNull() {
            addCriterion("usage_num_unit is null");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitIsNotNull() {
            addCriterion("usage_num_unit is not null");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitEqualTo(Integer value) {
            addCriterion("usage_num_unit =", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitNotEqualTo(Integer value) {
            addCriterion("usage_num_unit <>", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitGreaterThan(Integer value) {
            addCriterion("usage_num_unit >", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitGreaterThanOrEqualTo(Integer value) {
            addCriterion("usage_num_unit >=", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitLessThan(Integer value) {
            addCriterion("usage_num_unit <", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitLessThanOrEqualTo(Integer value) {
            addCriterion("usage_num_unit <=", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitIn(List<Integer> values) {
            addCriterion("usage_num_unit in", values, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitNotIn(List<Integer> values) {
            addCriterion("usage_num_unit not in", values, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitBetween(Integer value1, Integer value2) {
            addCriterion("usage_num_unit between", value1, value2, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitNotBetween(Integer value1, Integer value2) {
            addCriterion("usage_num_unit not between", value1, value2, "usageNumUnit");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsHerbalPrescriptionRecordDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;

import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsHerbalPrescriptionRecordParam;
import com.neu.his.cloud.zuul.dto.dms.DmsHerbalPrescriptionRecordResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsHerbalPrescriptionRecordDistributionService {

    @RequestMapping(value = "/DmsHerbalPrescriptionRecord/apply", method = RequestMethod.POST)
    CommonResult apply(@RequestBody DmsHerbalPrescriptionRecordParam dmsHerbalPrescriptionRecordParam);


    @RequestMapping(value = "/DmsHerbalPrescriptionRecord/invalid", method = RequestMethod.POST)
    CommonResult invalid(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/DmsHerbalPrescriptionRecord/listByReg", method = RequestMethod.POST)
    CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByReg(@RequestParam("registrationId") Long registrationId);


    @RequestMapping(value = "/DmsHerbalPrescriptionRecord/listByIds", method = RequestMethod.POST)
    CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByIds(@RequestParam("ids") List<Long> ids);

}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/mapper/SmsDescriptionMapper.java<|end_filename|>
package com.neu.his.cloud.service.bms.mapper;

import com.neu.his.cloud.service.bms.model.SmsDescription;
import com.neu.his.cloud.service.bms.model.SmsDescriptionExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsDescriptionMapper {
    int countByExample(SmsDescriptionExample example);

    int deleteByExample(SmsDescriptionExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsDescription record);

    int insertSelective(SmsDescription record);

    List<SmsDescription> selectByExample(SmsDescriptionExample example);

    SmsDescription selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsDescription record, @Param("example") SmsDescriptionExample example);

    int updateByExample(@Param("record") SmsDescription record, @Param("example") SmsDescriptionExample example);

    int updateByPrimaryKeySelective(SmsDescription record);

    int updateByPrimaryKey(SmsDescription record);
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/sms/SmsPermissionNode.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.sms;

import com.neu.his.cloud.api.pc.model.SmsPermission;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

public class SmsPermissionNode extends SmsPermission implements Serializable {

    @Getter
    @Setter
    private List<SmsPermissionNode> children;
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/service/sms/impl/SmsStaffServiceImpl.java<|end_filename|>
package com.neu.his.cloud.zuul.service.sms.impl;


import com.neu.his.cloud.zuul.dto.sms.SmsStaffParam;
import com.neu.his.cloud.zuul.mapper.SmsStaffMapper;
import com.neu.his.cloud.zuul.model.SmsStaff;
import com.neu.his.cloud.zuul.model.SmsStaffExample;
import com.neu.his.cloud.zuul.service.sms.SmsStaffService;
import com.neu.his.cloud.zuul.util.JwtTokenUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
@Service
public class SmsStaffServiceImpl implements SmsStaffService {
    private static final Logger LOGGER = LoggerFactory.getLogger(SmsStaffServiceImpl.class);
    @Autowired
    private SmsStaffMapper smsStaffMapper;

    @Autowired
    private UserDetailsService userDetailsService;

    @Autowired
    private PasswordEncoder passwordEncoder;

    @Autowired
    private JwtTokenUtil jwtTokenUtil;


    @Value("${jwt.tokenHead}")  //application.yml
    private String tokenHead;

    public String test(){
       return tokenHead;
    }

    @Override
    public String login(String username, String password) {
        String token = null;
        //密码需要客户端加密后传递
        try {
            UserDetails userDetails = userDetailsService.loadUserByUsername(username);//返回的是一个userDetails的实现类AdminUserDetails
            if(!passwordEncoder.matches(password,userDetails.getPassword())){  //password是从前端过来未经过编译的，而userDetails.getPassword()是从数据库中出来经过编译的
                throw new BadCredentialsException("密码不正确");
            }
            //创建一个新的token
            UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
            SecurityContextHolder.getContext().setAuthentication(authentication);  //在securityContext中添加该验证信息
            token = jwtTokenUtil.generateToken(userDetails);
            //updateLoginTimeByUsername(username);
            //insertLoginLog(username);
        } catch (AuthenticationException e) {
            LOGGER.warn("登录异常:{}", e.getMessage());
        }
        return token;
    }
    @Override
    public SmsStaff selectByUserName(String username) {
        SmsStaffExample example = new SmsStaffExample();
        example.createCriteria().andUsernameEqualTo(username).andStatusNotEqualTo(0);//查找名字相同的且状态不为0的用户
        List<SmsStaff> smsStaffList = smsStaffMapper.selectByExample(example);
        if (smsStaffList != null && smsStaffList.size() > 0) {
            return smsStaffList.get(0);
        }
        return null;
    }


    /**
     *
     * zuul网关鉴权使用 其实不会有员工注册这个功能，只有创建员工
     * @param smsStaffParam
     * @return
     */
    @Override
    public SmsStaff register(SmsStaffParam smsStaffParam) {
        SmsStaff smsStaff = new SmsStaff();
        BeanUtils.copyProperties(smsStaffParam, smsStaff);
        //封装dto中没有传来的属性
        smsStaff.setCreateTime(new Date());
        smsStaff.setStatus(1);
        //查询是否有相同用户名的用户
        SmsStaffExample example = new SmsStaffExample();
        example.createCriteria().andUsernameEqualTo(smsStaff.getUsername());//spring MVC必须保证Username不为null
        List<SmsStaff> lists = smsStaffMapper.selectByExample(example);

        List<SmsStaff> staffList = smsStaffMapper.selectByExample(example);
        if (staffList.size() > 0) { //存在,若通过此接口进行创建，则重复数量只可能为1
            return null;
        }
        //将密码进行加密操作
        String encodePassword = passwordEncoder.encode(smsStaff.getPassword());
        smsStaff.setPassword(encodePassword);
        System.out.println(smsStaff.getPassword());
        smsStaffMapper.insert(smsStaff);
        return smsStaff;  //返回对象的密码是经过加密的
    }

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/SmsSkdService.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;

import com.neu.his.cloud.service.sms.dto.sms.*;
import java.util.Date;
import java.util.List;

/**
 * 排班
 */
public interface SmsSkdService {

    /**
     * 描述：新增排班规则
     */
    int createRule(SmsSkdRuleParam smsSkdRuleParam);

    /**
     * 描述：删除排班规则
     */
    int deleteRule(List<Long> ids);

    /**
     * 描述：根系排班规则
     */
    int updateRule(Long id, SmsSkdRuleParam smsSkdRuleParam);

    /**
     * 描述：根据deptId查找规则（不包括规则项）
     */
    List<SmsSkdRuleResult> selectRuleByDept(Long deptId);


    /**
     * 描述：查询规则（查询规则项）
     */
    SmsSkdRuleResult getRuleDetail(Long ruleId);

    /**
     * 描述：生成排班
     */
    int generateSkd(List<Long> ruleIds, Date startDate, Date endDate);

    /**
     * 描述：查询排班记录
     */
    List<SmsSkdResult> listSkd(SmsSkdParam smsSkdParam);

    /**
     * 描述：根据skd查询doc
     */
    List<SmsSkdDocResult> listDocBySkd(SmsSkdDocParam smsSkdDocParam);

    /**
     * 描述: 根据科室id列出所有的能排班的员工
     * <p>author: 赵煜
     */
    List<SmsSkdRuleItemResult> listCanSkdStaffByDept(Long deptId);
}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsNonDrugModelService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsNonDrugModelParam;
import com.neu.his.common.dto.dms.DmsNonDrugModelResult;

import java.util.List;

/**
 * 非药品模板
 */
public interface DmsNonDrugModelService {

    /**
     * 描述：创建模版
     */
    public int createModel(DmsNonDrugModelParam dmsNonDrugModelParam);

    /**
     * 描述：删除模版
     */
    int deleteModel(List<Long> ids);


    /**
     * 描述：删除模版项
     */
    int deleteModelItem(Long modelId, List<Long> itemIds);


    /**
     * 描述：根据modelId更新model信息（删了重新创建）
     */
    int updateModel(Long modelId, DmsNonDrugModelParam dmsNonDrugModelParam);


    /**
     * 描述：查询模板
     */
    List<DmsNonDrugModelResult> selectModel(Integer type, DmsNonDrugModelParam queryParam, Integer pageSize, Integer pageNum);


}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/model/DmsCaseHistoryExample.java<|end_filename|>
package com.neu.his.cloud.service.pms.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DmsCaseHistoryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsCaseHistoryExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintIsNull() {
            addCriterion("chief_complaint is null");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintIsNotNull() {
            addCriterion("chief_complaint is not null");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintEqualTo(String value) {
            addCriterion("chief_complaint =", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintNotEqualTo(String value) {
            addCriterion("chief_complaint <>", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintGreaterThan(String value) {
            addCriterion("chief_complaint >", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintGreaterThanOrEqualTo(String value) {
            addCriterion("chief_complaint >=", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintLessThan(String value) {
            addCriterion("chief_complaint <", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintLessThanOrEqualTo(String value) {
            addCriterion("chief_complaint <=", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintLike(String value) {
            addCriterion("chief_complaint like", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintNotLike(String value) {
            addCriterion("chief_complaint not like", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintIn(List<String> values) {
            addCriterion("chief_complaint in", values, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintNotIn(List<String> values) {
            addCriterion("chief_complaint not in", values, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintBetween(String value1, String value2) {
            addCriterion("chief_complaint between", value1, value2, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintNotBetween(String value1, String value2) {
            addCriterion("chief_complaint not between", value1, value2, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessIsNull() {
            addCriterion("history_of_present_illness is null");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessIsNotNull() {
            addCriterion("history_of_present_illness is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessEqualTo(String value) {
            addCriterion("history_of_present_illness =", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessNotEqualTo(String value) {
            addCriterion("history_of_present_illness <>", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessGreaterThan(String value) {
            addCriterion("history_of_present_illness >", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessGreaterThanOrEqualTo(String value) {
            addCriterion("history_of_present_illness >=", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessLessThan(String value) {
            addCriterion("history_of_present_illness <", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessLessThanOrEqualTo(String value) {
            addCriterion("history_of_present_illness <=", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessLike(String value) {
            addCriterion("history_of_present_illness like", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessNotLike(String value) {
            addCriterion("history_of_present_illness not like", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessIn(List<String> values) {
            addCriterion("history_of_present_illness in", values, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessNotIn(List<String> values) {
            addCriterion("history_of_present_illness not in", values, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessBetween(String value1, String value2) {
            addCriterion("history_of_present_illness between", value1, value2, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessNotBetween(String value1, String value2) {
            addCriterion("history_of_present_illness not between", value1, value2, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentIsNull() {
            addCriterion("history_of_treatment is null");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentIsNotNull() {
            addCriterion("history_of_treatment is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentEqualTo(String value) {
            addCriterion("history_of_treatment =", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentNotEqualTo(String value) {
            addCriterion("history_of_treatment <>", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentGreaterThan(String value) {
            addCriterion("history_of_treatment >", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentGreaterThanOrEqualTo(String value) {
            addCriterion("history_of_treatment >=", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentLessThan(String value) {
            addCriterion("history_of_treatment <", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentLessThanOrEqualTo(String value) {
            addCriterion("history_of_treatment <=", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentLike(String value) {
            addCriterion("history_of_treatment like", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentNotLike(String value) {
            addCriterion("history_of_treatment not like", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentIn(List<String> values) {
            addCriterion("history_of_treatment in", values, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentNotIn(List<String> values) {
            addCriterion("history_of_treatment not in", values, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentBetween(String value1, String value2) {
            addCriterion("history_of_treatment between", value1, value2, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentNotBetween(String value1, String value2) {
            addCriterion("history_of_treatment not between", value1, value2, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andPastHistoryIsNull() {
            addCriterion("past_history is null");
            return (Criteria) this;
        }

        public Criteria andPastHistoryIsNotNull() {
            addCriterion("past_history is not null");
            return (Criteria) this;
        }

        public Criteria andPastHistoryEqualTo(String value) {
            addCriterion("past_history =", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryNotEqualTo(String value) {
            addCriterion("past_history <>", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryGreaterThan(String value) {
            addCriterion("past_history >", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryGreaterThanOrEqualTo(String value) {
            addCriterion("past_history >=", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryLessThan(String value) {
            addCriterion("past_history <", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryLessThanOrEqualTo(String value) {
            addCriterion("past_history <=", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryLike(String value) {
            addCriterion("past_history like", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryNotLike(String value) {
            addCriterion("past_history not like", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryIn(List<String> values) {
            addCriterion("past_history in", values, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryNotIn(List<String> values) {
            addCriterion("past_history not in", values, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryBetween(String value1, String value2) {
            addCriterion("past_history between", value1, value2, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryNotBetween(String value1, String value2) {
            addCriterion("past_history not between", value1, value2, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andAllergiesIsNull() {
            addCriterion("allergies is null");
            return (Criteria) this;
        }

        public Criteria andAllergiesIsNotNull() {
            addCriterion("allergies is not null");
            return (Criteria) this;
        }

        public Criteria andAllergiesEqualTo(String value) {
            addCriterion("allergies =", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesNotEqualTo(String value) {
            addCriterion("allergies <>", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesGreaterThan(String value) {
            addCriterion("allergies >", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesGreaterThanOrEqualTo(String value) {
            addCriterion("allergies >=", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesLessThan(String value) {
            addCriterion("allergies <", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesLessThanOrEqualTo(String value) {
            addCriterion("allergies <=", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesLike(String value) {
            addCriterion("allergies like", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesNotLike(String value) {
            addCriterion("allergies not like", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesIn(List<String> values) {
            addCriterion("allergies in", values, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesNotIn(List<String> values) {
            addCriterion("allergies not in", values, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesBetween(String value1, String value2) {
            addCriterion("allergies between", value1, value2, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesNotBetween(String value1, String value2) {
            addCriterion("allergies not between", value1, value2, "allergies");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupIsNull() {
            addCriterion("health_checkup is null");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupIsNotNull() {
            addCriterion("health_checkup is not null");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupEqualTo(String value) {
            addCriterion("health_checkup =", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupNotEqualTo(String value) {
            addCriterion("health_checkup <>", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupGreaterThan(String value) {
            addCriterion("health_checkup >", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupGreaterThanOrEqualTo(String value) {
            addCriterion("health_checkup >=", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupLessThan(String value) {
            addCriterion("health_checkup <", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupLessThanOrEqualTo(String value) {
            addCriterion("health_checkup <=", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupLike(String value) {
            addCriterion("health_checkup like", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupNotLike(String value) {
            addCriterion("health_checkup not like", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupIn(List<String> values) {
            addCriterion("health_checkup in", values, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupNotIn(List<String> values) {
            addCriterion("health_checkup not in", values, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupBetween(String value1, String value2) {
            addCriterion("health_checkup between", value1, value2, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupNotBetween(String value1, String value2) {
            addCriterion("health_checkup not between", value1, value2, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNull() {
            addCriterion("registration_id is null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNotNull() {
            addCriterion("registration_id is not null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdEqualTo(Long value) {
            addCriterion("registration_id =", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotEqualTo(Long value) {
            addCriterion("registration_id <>", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThan(Long value) {
            addCriterion("registration_id >", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThanOrEqualTo(Long value) {
            addCriterion("registration_id >=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThan(Long value) {
            addCriterion("registration_id <", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThanOrEqualTo(Long value) {
            addCriterion("registration_id <=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIn(List<Long> values) {
            addCriterion("registration_id in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotIn(List<Long> values) {
            addCriterion("registration_id not in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdBetween(Long value1, Long value2) {
            addCriterion("registration_id between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotBetween(Long value1, Long value2) {
            addCriterion("registration_id not between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListIsNull() {
            addCriterion("priliminary_dise_str_list is null");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListIsNotNull() {
            addCriterion("priliminary_dise_str_list is not null");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListEqualTo(String value) {
            addCriterion("priliminary_dise_str_list =", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListNotEqualTo(String value) {
            addCriterion("priliminary_dise_str_list <>", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListGreaterThan(String value) {
            addCriterion("priliminary_dise_str_list >", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListGreaterThanOrEqualTo(String value) {
            addCriterion("priliminary_dise_str_list >=", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListLessThan(String value) {
            addCriterion("priliminary_dise_str_list <", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListLessThanOrEqualTo(String value) {
            addCriterion("priliminary_dise_str_list <=", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListLike(String value) {
            addCriterion("priliminary_dise_str_list like", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListNotLike(String value) {
            addCriterion("priliminary_dise_str_list not like", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListIn(List<String> values) {
            addCriterion("priliminary_dise_str_list in", values, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListNotIn(List<String> values) {
            addCriterion("priliminary_dise_str_list not in", values, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListBetween(String value1, String value2) {
            addCriterion("priliminary_dise_str_list between", value1, value2, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListNotBetween(String value1, String value2) {
            addCriterion("priliminary_dise_str_list not between", value1, value2, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andStartDateIsNull() {
            addCriterion("start_date is null");
            return (Criteria) this;
        }

        public Criteria andStartDateIsNotNull() {
            addCriterion("start_date is not null");
            return (Criteria) this;
        }

        public Criteria andStartDateEqualTo(Date value) {
            addCriterion("start_date =", value, "startDate");
            return (Criteria) this;
        }

        public Criteria andStartDateNotEqualTo(Date value) {
            addCriterion("start_date <>", value, "startDate");
            return (Criteria) this;
        }

        public Criteria andStartDateGreaterThan(Date value) {
            addCriterion("start_date >", value, "startDate");
            return (Criteria) this;
        }

        public Criteria andStartDateGreaterThanOrEqualTo(Date value) {
            addCriterion("start_date >=", value, "startDate");
            return (Criteria) this;
        }

        public Criteria andStartDateLessThan(Date value) {
            addCriterion("start_date <", value, "startDate");
            return (Criteria) this;
        }

        public Criteria andStartDateLessThanOrEqualTo(Date value) {
            addCriterion("start_date <=", value, "startDate");
            return (Criteria) this;
        }

        public Criteria andStartDateIn(List<Date> values) {
            addCriterion("start_date in", values, "startDate");
            return (Criteria) this;
        }

        public Criteria andStartDateNotIn(List<Date> values) {
            addCriterion("start_date not in", values, "startDate");
            return (Criteria) this;
        }

        public Criteria andStartDateBetween(Date value1, Date value2) {
            addCriterion("start_date between", value1, value2, "startDate");
            return (Criteria) this;
        }

        public Criteria andStartDateNotBetween(Date value1, Date value2) {
            addCriterion("start_date not between", value1, value2, "startDate");
            return (Criteria) this;
        }

        public Criteria andNameIsNull() {
            addCriterion("name is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("name is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("name =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("name <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("name >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("name >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("name <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("name <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("name like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("name not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("name in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("name not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("name between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("name not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andGenderIsNull() {
            addCriterion("gender is null");
            return (Criteria) this;
        }

        public Criteria andGenderIsNotNull() {
            addCriterion("gender is not null");
            return (Criteria) this;
        }

        public Criteria andGenderEqualTo(Integer value) {
            addCriterion("gender =", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotEqualTo(Integer value) {
            addCriterion("gender <>", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderGreaterThan(Integer value) {
            addCriterion("gender >", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderGreaterThanOrEqualTo(Integer value) {
            addCriterion("gender >=", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderLessThan(Integer value) {
            addCriterion("gender <", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderLessThanOrEqualTo(Integer value) {
            addCriterion("gender <=", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderIn(List<Integer> values) {
            addCriterion("gender in", values, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotIn(List<Integer> values) {
            addCriterion("gender not in", values, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderBetween(Integer value1, Integer value2) {
            addCriterion("gender between", value1, value2, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotBetween(Integer value1, Integer value2) {
            addCriterion("gender not between", value1, value2, "gender");
            return (Criteria) this;
        }

        public Criteria andAgeStrIsNull() {
            addCriterion("age_str is null");
            return (Criteria) this;
        }

        public Criteria andAgeStrIsNotNull() {
            addCriterion("age_str is not null");
            return (Criteria) this;
        }

        public Criteria andAgeStrEqualTo(String value) {
            addCriterion("age_str =", value, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrNotEqualTo(String value) {
            addCriterion("age_str <>", value, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrGreaterThan(String value) {
            addCriterion("age_str >", value, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrGreaterThanOrEqualTo(String value) {
            addCriterion("age_str >=", value, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrLessThan(String value) {
            addCriterion("age_str <", value, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrLessThanOrEqualTo(String value) {
            addCriterion("age_str <=", value, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrLike(String value) {
            addCriterion("age_str like", value, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrNotLike(String value) {
            addCriterion("age_str not like", value, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrIn(List<String> values) {
            addCriterion("age_str in", values, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrNotIn(List<String> values) {
            addCriterion("age_str not in", values, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrBetween(String value1, String value2) {
            addCriterion("age_str between", value1, value2, "ageStr");
            return (Criteria) this;
        }

        public Criteria andAgeStrNotBetween(String value1, String value2) {
            addCriterion("age_str not between", value1, value2, "ageStr");
            return (Criteria) this;
        }

        public Criteria andCheckStrListIsNull() {
            addCriterion("check_str_list is null");
            return (Criteria) this;
        }

        public Criteria andCheckStrListIsNotNull() {
            addCriterion("check_str_list is not null");
            return (Criteria) this;
        }

        public Criteria andCheckStrListEqualTo(String value) {
            addCriterion("check_str_list =", value, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListNotEqualTo(String value) {
            addCriterion("check_str_list <>", value, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListGreaterThan(String value) {
            addCriterion("check_str_list >", value, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListGreaterThanOrEqualTo(String value) {
            addCriterion("check_str_list >=", value, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListLessThan(String value) {
            addCriterion("check_str_list <", value, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListLessThanOrEqualTo(String value) {
            addCriterion("check_str_list <=", value, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListLike(String value) {
            addCriterion("check_str_list like", value, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListNotLike(String value) {
            addCriterion("check_str_list not like", value, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListIn(List<String> values) {
            addCriterion("check_str_list in", values, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListNotIn(List<String> values) {
            addCriterion("check_str_list not in", values, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListBetween(String value1, String value2) {
            addCriterion("check_str_list between", value1, value2, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andCheckStrListNotBetween(String value1, String value2) {
            addCriterion("check_str_list not between", value1, value2, "checkStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListIsNull() {
            addCriterion("disposition_str_list is null");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListIsNotNull() {
            addCriterion("disposition_str_list is not null");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListEqualTo(String value) {
            addCriterion("disposition_str_list =", value, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListNotEqualTo(String value) {
            addCriterion("disposition_str_list <>", value, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListGreaterThan(String value) {
            addCriterion("disposition_str_list >", value, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListGreaterThanOrEqualTo(String value) {
            addCriterion("disposition_str_list >=", value, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListLessThan(String value) {
            addCriterion("disposition_str_list <", value, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListLessThanOrEqualTo(String value) {
            addCriterion("disposition_str_list <=", value, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListLike(String value) {
            addCriterion("disposition_str_list like", value, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListNotLike(String value) {
            addCriterion("disposition_str_list not like", value, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListIn(List<String> values) {
            addCriterion("disposition_str_list in", values, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListNotIn(List<String> values) {
            addCriterion("disposition_str_list not in", values, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListBetween(String value1, String value2) {
            addCriterion("disposition_str_list between", value1, value2, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andDispositionStrListNotBetween(String value1, String value2) {
            addCriterion("disposition_str_list not between", value1, value2, "dispositionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListIsNull() {
            addCriterion("herbal_prescription_str_list is null");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListIsNotNull() {
            addCriterion("herbal_prescription_str_list is not null");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListEqualTo(String value) {
            addCriterion("herbal_prescription_str_list =", value, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListNotEqualTo(String value) {
            addCriterion("herbal_prescription_str_list <>", value, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListGreaterThan(String value) {
            addCriterion("herbal_prescription_str_list >", value, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListGreaterThanOrEqualTo(String value) {
            addCriterion("herbal_prescription_str_list >=", value, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListLessThan(String value) {
            addCriterion("herbal_prescription_str_list <", value, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListLessThanOrEqualTo(String value) {
            addCriterion("herbal_prescription_str_list <=", value, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListLike(String value) {
            addCriterion("herbal_prescription_str_list like", value, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListNotLike(String value) {
            addCriterion("herbal_prescription_str_list not like", value, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListIn(List<String> values) {
            addCriterion("herbal_prescription_str_list in", values, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListNotIn(List<String> values) {
            addCriterion("herbal_prescription_str_list not in", values, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListBetween(String value1, String value2) {
            addCriterion("herbal_prescription_str_list between", value1, value2, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andHerbalPrescriptionStrListNotBetween(String value1, String value2) {
            addCriterion("herbal_prescription_str_list not between", value1, value2, "herbalPrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListIsNull() {
            addCriterion("definite_dise_str_list is null");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListIsNotNull() {
            addCriterion("definite_dise_str_list is not null");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListEqualTo(String value) {
            addCriterion("definite_dise_str_list =", value, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListNotEqualTo(String value) {
            addCriterion("definite_dise_str_list <>", value, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListGreaterThan(String value) {
            addCriterion("definite_dise_str_list >", value, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListGreaterThanOrEqualTo(String value) {
            addCriterion("definite_dise_str_list >=", value, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListLessThan(String value) {
            addCriterion("definite_dise_str_list <", value, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListLessThanOrEqualTo(String value) {
            addCriterion("definite_dise_str_list <=", value, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListLike(String value) {
            addCriterion("definite_dise_str_list like", value, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListNotLike(String value) {
            addCriterion("definite_dise_str_list not like", value, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListIn(List<String> values) {
            addCriterion("definite_dise_str_list in", values, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListNotIn(List<String> values) {
            addCriterion("definite_dise_str_list not in", values, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListBetween(String value1, String value2) {
            addCriterion("definite_dise_str_list between", value1, value2, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andDefiniteDiseStrListNotBetween(String value1, String value2) {
            addCriterion("definite_dise_str_list not between", value1, value2, "definiteDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPatientIdIsNull() {
            addCriterion("patient_id is null");
            return (Criteria) this;
        }

        public Criteria andPatientIdIsNotNull() {
            addCriterion("patient_id is not null");
            return (Criteria) this;
        }

        public Criteria andPatientIdEqualTo(Long value) {
            addCriterion("patient_id =", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdNotEqualTo(Long value) {
            addCriterion("patient_id <>", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdGreaterThan(Long value) {
            addCriterion("patient_id >", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdGreaterThanOrEqualTo(Long value) {
            addCriterion("patient_id >=", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdLessThan(Long value) {
            addCriterion("patient_id <", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdLessThanOrEqualTo(Long value) {
            addCriterion("patient_id <=", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdIn(List<Long> values) {
            addCriterion("patient_id in", values, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdNotIn(List<Long> values) {
            addCriterion("patient_id not in", values, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdBetween(Long value1, Long value2) {
            addCriterion("patient_id between", value1, value2, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdNotBetween(Long value1, Long value2) {
            addCriterion("patient_id not between", value1, value2, "patientId");
            return (Criteria) this;
        }

        public Criteria andTestStrListIsNull() {
            addCriterion("test_str_list is null");
            return (Criteria) this;
        }

        public Criteria andTestStrListIsNotNull() {
            addCriterion("test_str_list is not null");
            return (Criteria) this;
        }

        public Criteria andTestStrListEqualTo(String value) {
            addCriterion("test_str_list =", value, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListNotEqualTo(String value) {
            addCriterion("test_str_list <>", value, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListGreaterThan(String value) {
            addCriterion("test_str_list >", value, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListGreaterThanOrEqualTo(String value) {
            addCriterion("test_str_list >=", value, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListLessThan(String value) {
            addCriterion("test_str_list <", value, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListLessThanOrEqualTo(String value) {
            addCriterion("test_str_list <=", value, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListLike(String value) {
            addCriterion("test_str_list like", value, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListNotLike(String value) {
            addCriterion("test_str_list not like", value, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListIn(List<String> values) {
            addCriterion("test_str_list in", values, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListNotIn(List<String> values) {
            addCriterion("test_str_list not in", values, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListBetween(String value1, String value2) {
            addCriterion("test_str_list between", value1, value2, "testStrList");
            return (Criteria) this;
        }

        public Criteria andTestStrListNotBetween(String value1, String value2) {
            addCriterion("test_str_list not between", value1, value2, "testStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListIsNull() {
            addCriterion("medicine_prescription_str_list is null");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListIsNotNull() {
            addCriterion("medicine_prescription_str_list is not null");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListEqualTo(String value) {
            addCriterion("medicine_prescription_str_list =", value, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListNotEqualTo(String value) {
            addCriterion("medicine_prescription_str_list <>", value, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListGreaterThan(String value) {
            addCriterion("medicine_prescription_str_list >", value, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListGreaterThanOrEqualTo(String value) {
            addCriterion("medicine_prescription_str_list >=", value, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListLessThan(String value) {
            addCriterion("medicine_prescription_str_list <", value, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListLessThanOrEqualTo(String value) {
            addCriterion("medicine_prescription_str_list <=", value, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListLike(String value) {
            addCriterion("medicine_prescription_str_list like", value, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListNotLike(String value) {
            addCriterion("medicine_prescription_str_list not like", value, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListIn(List<String> values) {
            addCriterion("medicine_prescription_str_list in", values, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListNotIn(List<String> values) {
            addCriterion("medicine_prescription_str_list not in", values, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListBetween(String value1, String value2) {
            addCriterion("medicine_prescription_str_list between", value1, value2, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andMedicinePrescriptionStrListNotBetween(String value1, String value2) {
            addCriterion("medicine_prescription_str_list not between", value1, value2, "medicinePrescriptionStrList");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListIsNull() {
            addCriterion("priliminary_dise_id_list is null");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListIsNotNull() {
            addCriterion("priliminary_dise_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListEqualTo(String value) {
            addCriterion("priliminary_dise_id_list =", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListNotEqualTo(String value) {
            addCriterion("priliminary_dise_id_list <>", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListGreaterThan(String value) {
            addCriterion("priliminary_dise_id_list >", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListGreaterThanOrEqualTo(String value) {
            addCriterion("priliminary_dise_id_list >=", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListLessThan(String value) {
            addCriterion("priliminary_dise_id_list <", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListLessThanOrEqualTo(String value) {
            addCriterion("priliminary_dise_id_list <=", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListLike(String value) {
            addCriterion("priliminary_dise_id_list like", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListNotLike(String value) {
            addCriterion("priliminary_dise_id_list not like", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListIn(List<String> values) {
            addCriterion("priliminary_dise_id_list in", values, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListNotIn(List<String> values) {
            addCriterion("priliminary_dise_id_list not in", values, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListBetween(String value1, String value2) {
            addCriterion("priliminary_dise_id_list between", value1, value2, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListNotBetween(String value1, String value2) {
            addCriterion("priliminary_dise_id_list not between", value1, value2, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andCheckResultIsNull() {
            addCriterion("check_result is null");
            return (Criteria) this;
        }

        public Criteria andCheckResultIsNotNull() {
            addCriterion("check_result is not null");
            return (Criteria) this;
        }

        public Criteria andCheckResultEqualTo(String value) {
            addCriterion("check_result =", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultNotEqualTo(String value) {
            addCriterion("check_result <>", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultGreaterThan(String value) {
            addCriterion("check_result >", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultGreaterThanOrEqualTo(String value) {
            addCriterion("check_result >=", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultLessThan(String value) {
            addCriterion("check_result <", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultLessThanOrEqualTo(String value) {
            addCriterion("check_result <=", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultLike(String value) {
            addCriterion("check_result like", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultNotLike(String value) {
            addCriterion("check_result not like", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultIn(List<String> values) {
            addCriterion("check_result in", values, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultNotIn(List<String> values) {
            addCriterion("check_result not in", values, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultBetween(String value1, String value2) {
            addCriterion("check_result between", value1, value2, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultNotBetween(String value1, String value2) {
            addCriterion("check_result not between", value1, value2, "checkResult");
            return (Criteria) this;
        }

        public Criteria andTestResultIsNull() {
            addCriterion("test_result is null");
            return (Criteria) this;
        }

        public Criteria andTestResultIsNotNull() {
            addCriterion("test_result is not null");
            return (Criteria) this;
        }

        public Criteria andTestResultEqualTo(String value) {
            addCriterion("test_result =", value, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultNotEqualTo(String value) {
            addCriterion("test_result <>", value, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultGreaterThan(String value) {
            addCriterion("test_result >", value, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultGreaterThanOrEqualTo(String value) {
            addCriterion("test_result >=", value, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultLessThan(String value) {
            addCriterion("test_result <", value, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultLessThanOrEqualTo(String value) {
            addCriterion("test_result <=", value, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultLike(String value) {
            addCriterion("test_result like", value, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultNotLike(String value) {
            addCriterion("test_result not like", value, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultIn(List<String> values) {
            addCriterion("test_result in", values, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultNotIn(List<String> values) {
            addCriterion("test_result not in", values, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultBetween(String value1, String value2) {
            addCriterion("test_result between", value1, value2, "testResult");
            return (Criteria) this;
        }

        public Criteria andTestResultNotBetween(String value1, String value2) {
            addCriterion("test_result not between", value1, value2, "testResult");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/bms/BmsDailySettlementController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.bms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsDailySettleRecordResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsSettleListItemResult;
import com.neu.his.cloud.api.pc.service.bms.BmsDailySettlementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "BmsDailySettlementController", description = "日结管理")
@RequestMapping("/dailySettlement")
@CrossOrigin(allowCredentials = "true")
public class BmsDailySettlementController {
    @Autowired
    BmsDailySettlementService bmsDailySettlementService;

    @ApiOperation(value = "根据收费员Id在日结记录表中查询最近的end_datetime")
    @RequestMapping(value = "/queryRecentEndDatetime", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult queryRecentEndDatetime(@RequestBody Long cashierId){
        System.err.println(cashierId);
        CommonResult commonResult=bmsDailySettlementService.queryRecentEndDatetime(cashierId);
        return commonResult;
    }

    @ApiOperation(value = "根据起始、结束时间和收费员Id日结信息")
    @RequestMapping(value = "/statisticDailySettlement", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<BmsDailySettleRecordResult>  statisticDailySettlement(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime){
       return bmsDailySettlementService.statisticDailySettlement(cashierId, startDatetime, endDatetime);
    }

    @ApiOperation(value = "根据起始、结束时间和收费员Id列出日结历史")
    @RequestMapping(value = "/listDailySettleListRecord", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsSettleListItemResult>>  listDailySettleListRecord(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime){
      return bmsDailySettlementService.listDailySettleListRecord(cashierId, startDatetime, endDatetime);
    }

    @ApiOperation(value = "根据日结记录id查询日结详细信息")
    @RequestMapping(value = "/querySettleDetailById", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<BmsDailySettleRecordResult>  querySettleDetailById(@RequestParam("id") Long id){
         return bmsDailySettlementService.querySettleDetailById(id);
    }

    @ApiOperation(value = "根据起始、结束时间和收费员id统计日结信息并日结")
    @RequestMapping(value = "/dailySettle", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult dailySettle(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime){
        return bmsDailySettlementService.dailySettle(cashierId, startDatetime, endDatetime);
    }

    @ApiOperation(value = "对账")
    @RequestMapping(value = "/verifySettle", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult  verifySettle(@RequestParam("verifyOperatorId") Long verifyOperatorId, @RequestParam("settleRecordId") Long settleRecordId){
       return bmsDailySettlementService.verifySettle(verifyOperatorId, settleRecordId);
    }
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/TestController.java<|end_filename|>
package com.neu.his.api.controller;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.sms.SmsDeptParam;
import com.neu.his.sms.SmsRoleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/test")
@CrossOrigin(allowCredentials = "true")
public class TestController {

    @Autowired
    SmsRoleService smsRoleService;

    @ApiOperation("热部署测试")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public  String list(){
        return "dev hot";
    }

//    public CommonResult create(@RequestBody SmsDeptParam smsDeptParam, BindingResult result){
//
//    }


}


<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/mapper/BmsOperatorSettleRecordMapper.java<|end_filename|>
package com.neu.his.mbg.mapper;

import com.neu.his.mbg.model.BmsOperatorSettleRecord;
import com.neu.his.mbg.model.BmsOperatorSettleRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface BmsOperatorSettleRecordMapper {
    int countByExample(BmsOperatorSettleRecordExample example);

    int deleteByExample(BmsOperatorSettleRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(BmsOperatorSettleRecord record);

    int insertSelective(BmsOperatorSettleRecord record);

    List<BmsOperatorSettleRecord> selectByExample(BmsOperatorSettleRecordExample example);

    BmsOperatorSettleRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") BmsOperatorSettleRecord record, @Param("example") BmsOperatorSettleRecordExample example);

    int updateByExample(@Param("record") BmsOperatorSettleRecord record, @Param("example") BmsOperatorSettleRecordExample example);

    int updateByPrimaryKeySelective(BmsOperatorSettleRecord record);

    int updateByPrimaryKey(BmsOperatorSettleRecord record);
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsHerbalPrescriptionRecordController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsHerbalPrescriptionRecordParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsHerbalPrescriptionRecordResult;
import com.neu.his.cloud.api.pc.service.dms.DmsHerbalPrescriptionRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsHerbalPrescriptionRecordController", description = "草药处方管理")
@RequestMapping("/DmsHerbalPrescriptionRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsHerbalPrescriptionRecordController {

    @Autowired
    private DmsHerbalPrescriptionRecordService dmsHerbalPrescriptionRecordService;

    @ApiOperation(value = "开立处方")
    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult apply(@RequestBody DmsHerbalPrescriptionRecordParam dmsHerbalPrescriptionRecordParam, BindingResult result){
      return dmsHerbalPrescriptionRecordService.apply(dmsHerbalPrescriptionRecordParam);
    }


    @ApiOperation(value = "作废处方")
    @RequestMapping(value = "/invalid", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult invalid(@RequestParam("ids") List<Long> ids){
       return dmsHerbalPrescriptionRecordService.invalid(ids);
    }


    @ApiOperation(value = "根据挂号Id查询处方")
    @RequestMapping(value = "/listByReg", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByReg(@RequestParam("registrationId") Long registrationId){
        return dmsHerbalPrescriptionRecordService.listByReg(registrationId);
    }


    @ApiOperation(value = "根据ids查询草药处方")
    @RequestMapping(value = "/listByIds", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByIds(@RequestParam("ids") List<Long> ids){
        return dmsHerbalPrescriptionRecordService.listByIds(ids);
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/sms/SmsDeptDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.sms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.sms.ApiPcSmsDeptDistributionService;
import com.neu.his.cloud.zuul.dto.sms.SmsDeptParam;
import com.neu.his.cloud.zuul.dto.sms.SmsDeptResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "SmsDeptDistributionController", description = "科室管理")
@RequestMapping("/dept")
@CrossOrigin(allowCredentials = "true")
public class SmsDeptDistributionController {

    @Autowired
    private ApiPcSmsDeptDistributionService apiPcSmsDeptDistributionService;


    @HystrixCommand(fallbackMethod = "createFallbackInfo")
    @ApiOperation("新增科室")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody SmsDeptParam smsDeptParam, BindingResult result){
            return apiPcSmsDeptDistributionService.create(smsDeptParam);
    }
   private CommonResult createFallbackInfo( SmsDeptParam smsDeptParam, BindingResult result){
       return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "deleteFallbackInfo")
    @ApiOperation("根据ids删除科室")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        return   apiPcSmsDeptDistributionService.delete(ids);
    }
    private  CommonResult deleteFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }



    @HystrixCommand(fallbackMethod = "updateFallbackInfo")
    @ApiOperation("更新科室信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable("id") Long id,@RequestBody SmsDeptParam smsDeptParam, BindingResult result){
        return  apiPcSmsDeptDistributionService.update(id,smsDeptParam);
    }
    private CommonResult updateFallbackInfo( Long id, SmsDeptParam smsDeptParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }



    @HystrixCommand(fallbackMethod = "listFallbackInfo")
    @ApiOperation("模糊查询科室、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsDeptResult>> list(@RequestBody SmsDeptParam queryParam,
                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

        return apiPcSmsDeptDistributionService.list(queryParam,pageSize,pageNum);
    }
   private CommonResult<CommonPage<SmsDeptResult>> listFallbackInfo(SmsDeptParam queryParam,Integer pageSize,Integer pageNum){
       return CommonResult.success(null,"请检查您的网络") ;
   }




    @HystrixCommand(fallbackMethod = "listAllFallbackInfo")
    @ApiOperation("查询所有科室")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsDeptResult>> listAll(){
        return  apiPcSmsDeptDistributionService.listAll();
    }
    private CommonResult<List<SmsDeptResult>> listAllFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }


}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/model/BmsBillsRecord.java<|end_filename|>
package com.neu.his.cloud.service.pms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

public class BmsBillsRecord implements Serializable {
    private Long id;

    private Integer type;

    private String billNo;

    private Date createTime;

    private Integer status;

    private Integer invoiceNum;

    private Long registrationId;

    private String recordList;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getBillNo() {
        return billNo;
    }

    public void setBillNo(String billNo) {
        this.billNo = billNo;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getInvoiceNum() {
        return invoiceNum;
    }

    public void setInvoiceNum(Integer invoiceNum) {
        this.invoiceNum = invoiceNum;
    }

    public Long getRegistrationId() {
        return registrationId;
    }

    public void setRegistrationId(Long registrationId) {
        this.registrationId = registrationId;
    }

    public String getRecordList() {
        return recordList;
    }

    public void setRecordList(String recordList) {
        this.recordList = recordList;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", type=").append(type);
        sb.append(", billNo=").append(billNo);
        sb.append(", createTime=").append(createTime);
        sb.append(", status=").append(status);
        sb.append(", invoiceNum=").append(invoiceNum);
        sb.append(", registrationId=").append(registrationId);
        sb.append(", recordList=").append(recordList);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/sms/SmsSkdDocResult.java<|end_filename|>
package com.neu.his.common.dto.sms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

@Setter
@Getter
@ToString
public class SmsSkdDocResult  implements Serializable {

    @ApiModelProperty(value = "医生姓名")
    private String name;
    @ApiModelProperty(value = "排班id")
    private Long skdId;
    @ApiModelProperty(value = "挂号费")
    private BigDecimal amount;


}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/model/PmsPatientExample.java<|end_filename|>
package com.neu.his.cloud.service.dms.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class PmsPatientExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public PmsPatientExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andNameIsNull() {
            addCriterion("name is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("name is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("name =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("name <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("name >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("name >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("name <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("name <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("name like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("name not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("name in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("name not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("name between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("name not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthIsNull() {
            addCriterion("date_of_birth is null");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthIsNotNull() {
            addCriterion("date_of_birth is not null");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthEqualTo(Date value) {
            addCriterion("date_of_birth =", value, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthNotEqualTo(Date value) {
            addCriterion("date_of_birth <>", value, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthGreaterThan(Date value) {
            addCriterion("date_of_birth >", value, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthGreaterThanOrEqualTo(Date value) {
            addCriterion("date_of_birth >=", value, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthLessThan(Date value) {
            addCriterion("date_of_birth <", value, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthLessThanOrEqualTo(Date value) {
            addCriterion("date_of_birth <=", value, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthIn(List<Date> values) {
            addCriterion("date_of_birth in", values, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthNotIn(List<Date> values) {
            addCriterion("date_of_birth not in", values, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthBetween(Date value1, Date value2) {
            addCriterion("date_of_birth between", value1, value2, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andDateOfBirthNotBetween(Date value1, Date value2) {
            addCriterion("date_of_birth not between", value1, value2, "dateOfBirth");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoIsNull() {
            addCriterion("identification_no is null");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoIsNotNull() {
            addCriterion("identification_no is not null");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoEqualTo(String value) {
            addCriterion("identification_no =", value, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoNotEqualTo(String value) {
            addCriterion("identification_no <>", value, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoGreaterThan(String value) {
            addCriterion("identification_no >", value, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoGreaterThanOrEqualTo(String value) {
            addCriterion("identification_no >=", value, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoLessThan(String value) {
            addCriterion("identification_no <", value, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoLessThanOrEqualTo(String value) {
            addCriterion("identification_no <=", value, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoLike(String value) {
            addCriterion("identification_no like", value, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoNotLike(String value) {
            addCriterion("identification_no not like", value, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoIn(List<String> values) {
            addCriterion("identification_no in", values, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoNotIn(List<String> values) {
            addCriterion("identification_no not in", values, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoBetween(String value1, String value2) {
            addCriterion("identification_no between", value1, value2, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andIdentificationNoNotBetween(String value1, String value2) {
            addCriterion("identification_no not between", value1, value2, "identificationNo");
            return (Criteria) this;
        }

        public Criteria andHomeAddressIsNull() {
            addCriterion("home_address is null");
            return (Criteria) this;
        }

        public Criteria andHomeAddressIsNotNull() {
            addCriterion("home_address is not null");
            return (Criteria) this;
        }

        public Criteria andHomeAddressEqualTo(String value) {
            addCriterion("home_address =", value, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressNotEqualTo(String value) {
            addCriterion("home_address <>", value, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressGreaterThan(String value) {
            addCriterion("home_address >", value, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressGreaterThanOrEqualTo(String value) {
            addCriterion("home_address >=", value, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressLessThan(String value) {
            addCriterion("home_address <", value, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressLessThanOrEqualTo(String value) {
            addCriterion("home_address <=", value, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressLike(String value) {
            addCriterion("home_address like", value, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressNotLike(String value) {
            addCriterion("home_address not like", value, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressIn(List<String> values) {
            addCriterion("home_address in", values, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressNotIn(List<String> values) {
            addCriterion("home_address not in", values, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressBetween(String value1, String value2) {
            addCriterion("home_address between", value1, value2, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andHomeAddressNotBetween(String value1, String value2) {
            addCriterion("home_address not between", value1, value2, "homeAddress");
            return (Criteria) this;
        }

        public Criteria andPhoneNoIsNull() {
            addCriterion("phone_no is null");
            return (Criteria) this;
        }

        public Criteria andPhoneNoIsNotNull() {
            addCriterion("phone_no is not null");
            return (Criteria) this;
        }

        public Criteria andPhoneNoEqualTo(String value) {
            addCriterion("phone_no =", value, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoNotEqualTo(String value) {
            addCriterion("phone_no <>", value, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoGreaterThan(String value) {
            addCriterion("phone_no >", value, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoGreaterThanOrEqualTo(String value) {
            addCriterion("phone_no >=", value, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoLessThan(String value) {
            addCriterion("phone_no <", value, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoLessThanOrEqualTo(String value) {
            addCriterion("phone_no <=", value, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoLike(String value) {
            addCriterion("phone_no like", value, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoNotLike(String value) {
            addCriterion("phone_no not like", value, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoIn(List<String> values) {
            addCriterion("phone_no in", values, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoNotIn(List<String> values) {
            addCriterion("phone_no not in", values, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoBetween(String value1, String value2) {
            addCriterion("phone_no between", value1, value2, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andPhoneNoNotBetween(String value1, String value2) {
            addCriterion("phone_no not between", value1, value2, "phoneNo");
            return (Criteria) this;
        }

        public Criteria andGenderIsNull() {
            addCriterion("gender is null");
            return (Criteria) this;
        }

        public Criteria andGenderIsNotNull() {
            addCriterion("gender is not null");
            return (Criteria) this;
        }

        public Criteria andGenderEqualTo(Integer value) {
            addCriterion("gender =", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotEqualTo(Integer value) {
            addCriterion("gender <>", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderGreaterThan(Integer value) {
            addCriterion("gender >", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderGreaterThanOrEqualTo(Integer value) {
            addCriterion("gender >=", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderLessThan(Integer value) {
            addCriterion("gender <", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderLessThanOrEqualTo(Integer value) {
            addCriterion("gender <=", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderIn(List<Integer> values) {
            addCriterion("gender in", values, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotIn(List<Integer> values) {
            addCriterion("gender not in", values, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderBetween(Integer value1, Integer value2) {
            addCriterion("gender between", value1, value2, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotBetween(Integer value1, Integer value2) {
            addCriterion("gender not between", value1, value2, "gender");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoIsNull() {
            addCriterion("medical_record_no is null");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoIsNotNull() {
            addCriterion("medical_record_no is not null");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoEqualTo(String value) {
            addCriterion("medical_record_no =", value, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoNotEqualTo(String value) {
            addCriterion("medical_record_no <>", value, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoGreaterThan(String value) {
            addCriterion("medical_record_no >", value, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoGreaterThanOrEqualTo(String value) {
            addCriterion("medical_record_no >=", value, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoLessThan(String value) {
            addCriterion("medical_record_no <", value, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoLessThanOrEqualTo(String value) {
            addCriterion("medical_record_no <=", value, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoLike(String value) {
            addCriterion("medical_record_no like", value, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoNotLike(String value) {
            addCriterion("medical_record_no not like", value, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoIn(List<String> values) {
            addCriterion("medical_record_no in", values, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoNotIn(List<String> values) {
            addCriterion("medical_record_no not in", values, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoBetween(String value1, String value2) {
            addCriterion("medical_record_no between", value1, value2, "medicalRecordNo");
            return (Criteria) this;
        }

        public Criteria andMedicalRecordNoNotBetween(String value1, String value2) {
            addCriterion("medical_record_no not between", value1, value2, "medicalRecordNo");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/bms/BmsFeeDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.bms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.bms.ApiPcBmsFeeDistributionService;
import com.neu.his.cloud.zuul.dto.bms.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "BmsFeeDistributionController", description = "收退费管理")
@RequestMapping("/fee")
@CrossOrigin(allowCredentials = "true")
public class BmsFeeDistributionController {

    @Autowired
    ApiPcBmsFeeDistributionService apiPcBmsFeeDistributionService;


    @HystrixCommand(fallbackMethod = "listRegisteredPatientFallbackInfo")
    @ApiOperation(value = "查询挂号人")
    @RequestMapping(value = "/listRegisteredPatient", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<BmsRegistrationPatientResult>> listRegisteredPatient(@RequestParam(required=false,name = "medicalRecordNo") String  medicalRecordNo,
                                                                                        @RequestParam(required=false,name="queryDate")@DateTimeFormat(pattern = "yyyy-MM-dd") Date queryDate,
                                                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
       return apiPcBmsFeeDistributionService.listRegisteredPatient(medicalRecordNo,queryDate,pageSize,pageNum);
    }
    private CommonResult<CommonPage<BmsRegistrationPatientResult>> listRegisteredPatientFallbackInfo(String  medicalRecordNo, Date queryDate,Integer pageSize, Integer pageNum){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "chargeFallbackInfo")
    @ApiOperation(value = "收费")
    @RequestMapping(value = "/charge", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult charge(@RequestBody List<BmsChargeParam> bmsChargeParamList){
        return apiPcBmsFeeDistributionService.charge(bmsChargeParamList);
    }
    private CommonResult chargeFallbackInfo(List<BmsChargeParam> bmsChargeParamList){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listRefundByRegistrationIdFallbackInfo")
    @ApiOperation(value = "根据挂号id查询未缴费项目")
    @RequestMapping(value = "/listRefundByRegistrationId", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsRefundChargeResult>>  listRefundByRegistrationId(@RequestParam("registrationId") Long registrationId){
       return apiPcBmsFeeDistributionService.listRefundByRegistrationId(registrationId);
    }
    private CommonResult<List<BmsRefundChargeResult>>  listRefundByRegistrationIdFallbackInfo(Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "refundChargeFallbackInfo")
    @ApiOperation(value = "非药品、药品退费")
    @RequestMapping(value = "/refundCharge", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult refundCharge(@RequestBody List<BmsRefundChargeParam> bmsRefundChargeParamList){
       return apiPcBmsFeeDistributionService.refundCharge(bmsRefundChargeParamList);
    }
    private CommonResult refundChargeFallbackInfo(List<BmsRefundChargeParam> bmsRefundChargeParamList){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "refundRegistrationChargeFallbackInfo")
    @ApiOperation(value = "挂号退费")
    @RequestMapping(value = "/refundRegistrationCharge", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult refundRegistrationCharge(@RequestBody BmsRefundRegChargeParam bmsRefundRegChargeParam){
       return apiPcBmsFeeDistributionService.refundRegistrationCharge(bmsRefundRegChargeParam);
    }
    private CommonResult refundRegistrationChargeFallbackInfo(BmsRefundRegChargeParam bmsRefundRegChargeParam){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listChargeByRegistrationIdFallbackInfo")
    @ApiOperation(value = "根据挂号Id查询所有未交费项目")
    @RequestMapping(value = "/listChargeByRegistrationId", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsChargeResult>>  listChargeByRegistrationId(@RequestParam("registrationId") Long registrationId){
        return apiPcBmsFeeDistributionService.listChargeByRegistrationId(registrationId);
    }
    private CommonResult<List<BmsChargeResult>>  listChargeByRegistrationIdFallbackInfo( Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/dms/DmsRefundDrugParam.java<|end_filename|>
package com.neu.his.cloud.service.dms.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

@Setter
@Getter
@ToString

public class DmsRefundDrugParam  implements Serializable {

    @ApiModelProperty(value = "退药处方项Id")
    Long refundPrescriptionItemId;
    @ApiModelProperty(value = "退药数量")
    Long refundNum;
    @ApiModelProperty(value = "退药处方项类型")
    Integer type;

}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/dto/sms/SmsDeptResult.java<|end_filename|>
package com.neu.his.cloud.api.app.dto.sms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class SmsDeptResult {
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "科室编码")
    private String code;
    @ApiModelProperty(value = "科室分类")
    private Integer catId;
    @ApiModelProperty(value = "科室名称")
    private String name;
    @ApiModelProperty(value = "科室类型")
    private Integer type;
    @ApiModelProperty(value = "状态：0->无效;1->有效")
    private Integer status;
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/app/controller/AppRegistrationController.java<|end_filename|>
package com.neu.his.api.app.controller;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.app.AppDocSkdResult;
import com.neu.his.common.dto.app.AppRegistrationParam;
import com.neu.his.common.dto.app.AppStaffDescriptionResult;
import com.neu.his.common.dto.pms.PmsPatientResult;
import com.neu.his.common.dto.sms.SmsDeptResult;
import com.neu.his.common.dto.sms.SmsSkdParam;
import com.neu.his.common.dto.sms.SmsSkdResult;
import com.neu.his.dms.service.DmsRegistrationService;
import com.neu.his.pms.service.PmsPatientService;
import com.neu.his.sms.SmsDeptService;
import com.neu.his.sms.SmsDescriptionService;
import com.neu.his.sms.SmsSkdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

@Controller
@Api(tags = "AppRegistrationController", description = "APP 挂号管理")
@RequestMapping("/appRegistration")
@CrossOrigin(allowCredentials = "true")
public class AppRegistrationController {

    @Autowired
    private SmsDeptService smsDeptService;

    @Autowired
    private SmsSkdService smsSkdService;

    @Autowired
    private DmsRegistrationService dmsRegistrationService;

    @Autowired
    private PmsPatientService pmsPatientService;

    @Autowired
    private SmsDescriptionService smsDescriptionService;
    /**
     * 描述:患者手机端登录
     * <p>author: ma
     */
    @ApiOperation("患者 手机端登录")
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsPatientResult> login(@RequestParam("identificationNo") String identificationNo,
                                                @RequestParam("medicalRecordNo") String medicalRecordNo){
        PmsPatientResult result = pmsPatientService.patientLogin(identificationNo ,medicalRecordNo);
        if(result == null){
            return  CommonResult.failed("登录失败");
        }else {
            return CommonResult.success(result,"登录成功");
        }
    }

    /**
     * 描述:查询所有科室
     * <p>author: ma
     */
    @ApiOperation("查询所有科室")
    @RequestMapping(value = "/listAllDept", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsDeptResult>> listAllDept(){
        List<SmsDeptResult> list = smsDeptService.selectAll();
        return CommonResult.success(list);
    }

    /**
     * 描述:查询对应科室所有专家
     * <p>author: ma
     */
    @ApiOperation("查询某个科室所有专家")
    @RequestMapping(value = "/listDeptDoctor", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppStaffDescriptionResult>> listDeptDoctor(@RequestParam("deptId") Long deptId){
        List<AppStaffDescriptionResult> list = smsDescriptionService.getDetailListByDept(deptId);
        return CommonResult.success(list);
    }

    /**
     * 描述:查询对应专家所有排班及描述信息
     * <p>author: ma
     */
    @ApiOperation("查询某个专家所有排班及描述信息")
    @RequestMapping(value = "/listDoctorSkd", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<AppDocSkdResult> listDoctorSkd(@RequestParam("staffId") Long staffId,
                                                       @RequestParam(value = "endDate",required = false) Date endDate){
        SmsSkdParam smsSkdParam = new SmsSkdParam();
        smsSkdParam.setStaffId(staffId);
        Calendar calendar = Calendar.getInstance();
        //设置起始时间为当天00:00:00.0
        calendar.setTime(new Date());
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        smsSkdParam.setStartDate(calendar.getTime());

        //设置截止时间为最后一天23:59:59.0
        if(endDate != null){
            calendar.setTime(endDate);
            calendar.set(Calendar.HOUR_OF_DAY, 23);
            calendar.set(Calendar.MINUTE, 59);
            calendar.set(Calendar.SECOND, 59);
            calendar.set(Calendar.MILLISECOND, 0);
            smsSkdParam.setEndDate(calendar.getTime());
        }

        List<SmsSkdResult> skdResultList = smsSkdService.listSkd(smsSkdParam);
        AppDocSkdResult result = smsDescriptionService.getDetailById(staffId);
        if(result != null){
            result.setSkdResultList(skdResultList);
        }

        return CommonResult.success(result);
    }

    /**
     * 描述:手机端挂号
     * <p>author: ma
     */
    @ApiOperation("挂号")
    @RequestMapping(value = "/appReg", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult registration(@RequestBody AppRegistrationParam appRegistrationParam, BindingResult result){
        int count = dmsRegistrationService.appRegistration(appRegistrationParam);
        if(count > 0){
            return CommonResult.success(count, "挂号成功");
        }
        return CommonResult.failed("挂号失败");
    }
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/model/SmsSkdRule.java<|end_filename|>
package com.neu.his.cloud.service.bms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

public class SmsSkdRule implements Serializable {
    private Long id;

    private Integer status;

    private Long operatorId;

    private Date operateTime;

    private String ruleName;

    private String description;

    private Long deptId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public Date getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }

    public String getRuleName() {
        return ruleName;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", status=").append(status);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", operateTime=").append(operateTime);
        sb.append(", ruleName=").append(ruleName);
        sb.append(", description=").append(description);
        sb.append(", deptId=").append(deptId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/DmsMedicinePrescriptionRecordServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;

import com.neu.his.common.dto.dms.DmsHerbalItemRecordResult;
import com.neu.his.common.dto.dms.DmsMedicineItemRecordResult;
import com.neu.his.common.dto.dms.DmsMedicinePrescriptionRecordParam;
import com.neu.his.common.dto.dms.DmsMedicinePrescriptionRecordResult;
import com.neu.his.dms.service.DmsMedicinePrescriptionRecordService;
import com.neu.his.mbg.mapper.DmsDrugMapper;
import com.neu.his.mbg.mapper.DmsMedicineItemRecordMapper;
import com.neu.his.mbg.mapper.DmsMedicinePrescriptionRecordMapper;
import com.neu.his.mbg.mapper.SmsStaffMapper;
import com.neu.his.mbg.model.*;
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class DmsMedicinePrescriptionRecordServiceImpl implements DmsMedicinePrescriptionRecordService {

    @Autowired
    private DmsMedicinePrescriptionRecordMapper dmsMedicinePrescriptionRecordMapper;

    @Autowired
    private DmsMedicineItemRecordMapper dmsMedicineItemRecordMapper;

    @Autowired
    private SmsStaffMapper smsStaffMapper;
    @Autowired
    private DmsDrugMapper dmsDrugMapper;

    @Override
    public Long apply(DmsMedicinePrescriptionRecordParam dmsMedicinePrescriptionRecordParam){
        DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord = new DmsMedicinePrescriptionRecord();
        BeanUtils.copyProperties(dmsMedicinePrescriptionRecordParam,dmsMedicinePrescriptionRecord);
        dmsMedicinePrescriptionRecord.setStatus(1);
        dmsMedicinePrescriptionRecord.setCreateTime(new Date());
        int insertCount = dmsMedicinePrescriptionRecordMapper.insert(dmsMedicinePrescriptionRecord);
        if(insertCount <=0){
            return new Long(0);
        }

        DmsMedicinePrescriptionRecordExample recordExample = new DmsMedicinePrescriptionRecordExample();
        recordExample.createCriteria().andRegistrationIdEqualTo(dmsMedicinePrescriptionRecordParam.getRegistrationId());
        recordExample.setOrderByClause("create_time desc");
        Long currentId = dmsMedicinePrescriptionRecordMapper.selectByExample(recordExample).get(0).getId();

        List<DmsMedicineItemRecord> dmsMedicineItemRecordList = dmsMedicinePrescriptionRecordParam.getDmsMedicineItemRecordList();
        for(DmsMedicineItemRecord dmsMedicineItemRecord : dmsMedicineItemRecordList){
            dmsMedicineItemRecord.setId(null);
            dmsMedicineItemRecord.setStatus(1);
            dmsMedicineItemRecord.setPrescriptionId(currentId);
            dmsMedicineItemRecord.setCurrentNum(dmsMedicineItemRecord.getNum());
            dmsMedicineItemRecord.setRefundNum(new Long(0));
            insertCount += dmsMedicineItemRecordMapper.insert(dmsMedicineItemRecord);
        }
        return currentId;
    }

    @Override
    public int invalid(List<Long> ids){
        DmsMedicinePrescriptionRecordExample example = new DmsMedicinePrescriptionRecordExample();
        example.createCriteria().andIdIn(ids).andStatusEqualTo(1);
        DmsMedicinePrescriptionRecord record = new DmsMedicinePrescriptionRecord();
        record.setStatus(0);
        int updateCount = dmsMedicinePrescriptionRecordMapper.updateByExampleSelective(record,example);

        DmsMedicineItemRecordExample itemRecordExample = new DmsMedicineItemRecordExample();
        itemRecordExample.createCriteria().andPrescriptionIdIn(ids);
        DmsMedicineItemRecord itemRecord = new DmsMedicineItemRecord();
        itemRecord.setStatus(0);
        updateCount += dmsMedicineItemRecordMapper.updateByExampleSelective(itemRecord,itemRecordExample);

        return updateCount;
    }


    /**
     * 描述:1.根据挂号id查询状态不为0的处方
     * <p>author: ma
     * <p>20190614 赵煜 modify:DmsMedicineItemRecord->DmsMedicineItemRecordResult
     */
    @Override
    public List<DmsMedicinePrescriptionRecordResult> listByReg(Long registrationId){
        DmsMedicinePrescriptionRecordExample example = new DmsMedicinePrescriptionRecordExample();
        example.createCriteria().andRegistrationIdEqualTo(registrationId).andStatusNotEqualTo(0);
        List<DmsMedicinePrescriptionRecord> recordList= dmsMedicinePrescriptionRecordMapper.selectByExample(example);

        List<DmsMedicinePrescriptionRecordResult> recordResultList = new ArrayList<>();
        for(DmsMedicinePrescriptionRecord record : recordList){
            DmsMedicinePrescriptionRecordResult recordResult = new DmsMedicinePrescriptionRecordResult();
            BeanUtils.copyProperties(record,recordResult);

            DmsMedicineItemRecordExample itemRecordExample = new DmsMedicineItemRecordExample();
            itemRecordExample.createCriteria().andPrescriptionIdEqualTo(record.getId()).andStatusNotEqualTo(0);
            List<DmsMedicineItemRecord> itemRecordList = dmsMedicineItemRecordMapper.selectByExample(itemRecordExample);


            //将DmsMedicineItemRecord封装为DmsMedicineItemRecordResult
            List<DmsMedicineItemRecordResult> dmsMedicineItemRecordResultList=new ArrayList<>();

            for(DmsMedicineItemRecord dmsMedicineItemRecord:itemRecordList){

                DmsMedicineItemRecordResult dmsMedicineItemRecordResult=new DmsMedicineItemRecordResult();
                BeanUtils.copyProperties(dmsMedicineItemRecord,dmsMedicineItemRecordResult);
                BigDecimal price = dmsDrugMapper.selectByPrimaryKey(dmsMedicineItemRecordResult.getDrugId()).getPrice();
                String drugName=dmsDrugMapper.selectByPrimaryKey(dmsMedicineItemRecordResult.getDrugId()).getName();
                dmsMedicineItemRecordResult.setDrugName(drugName);
                dmsMedicineItemRecordResult.setPrice(price);
                dmsMedicineItemRecordResultList.add(dmsMedicineItemRecordResult);

            }

            recordResult.setDmsMedicineItemRecordResultList(dmsMedicineItemRecordResultList);

            SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(record.getCreateStaffId());
            if(smsStaff == null){
                return null;
            }
            recordResult.setCreateStaffName(smsStaff.getName());
            recordResultList.add(recordResult);
        }
        return recordResultList;
    }


    @Override
    public List<DmsMedicinePrescriptionRecordResult> listByIds(List<Long> ids) {

        List<DmsMedicinePrescriptionRecord> dmsMedicinePrescriptionRecordList=new ArrayList<>();
        List<DmsMedicinePrescriptionRecordResult> dmsMedicinePrescriptionRecordResultList=new ArrayList<>();
        DmsMedicinePrescriptionRecordExample dmsMedicinePrescriptionRecordExample = new DmsMedicinePrescriptionRecordExample();
        dmsMedicinePrescriptionRecordExample.createCriteria().andIdIn(ids);
        dmsMedicinePrescriptionRecordList = dmsMedicinePrescriptionRecordMapper.selectByExample(dmsMedicinePrescriptionRecordExample);

        //封装订单
        for(DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord:dmsMedicinePrescriptionRecordList){
            DmsMedicinePrescriptionRecordResult dmsMedicinePrescriptionRecordResult=new DmsMedicinePrescriptionRecordResult();
            BeanUtils.copyProperties(dmsMedicinePrescriptionRecord,dmsMedicinePrescriptionRecordResult);
            //需要单独封装createStaffName
            SmsStaff smsStaff =smsStaffMapper.selectByPrimaryKey(dmsMedicinePrescriptionRecord.getCreateStaffId());
            if(null!=smsStaff){
                dmsMedicinePrescriptionRecordResult.setCreateStaffName(smsStaff.getName());
            }
            //封装处方项
            //将DmsMedicineItemRecord封装为DmsMedicineItemRecordResult
            List<DmsMedicineItemRecordResult> dmsMedicineItemRecordResultList=new ArrayList<>();

            DmsMedicineItemRecordExample itemRecordExample = new DmsMedicineItemRecordExample();
            itemRecordExample.createCriteria().andPrescriptionIdEqualTo(dmsMedicinePrescriptionRecord.getId());
            List<DmsMedicineItemRecord> itemRecordList = dmsMedicineItemRecordMapper.selectByExample(itemRecordExample);

            for(DmsMedicineItemRecord dmsMedicineItemRecord:itemRecordList){
                DmsMedicineItemRecordResult dmsMedicineItemRecordResult=new DmsMedicineItemRecordResult();
                BeanUtils.copyProperties(dmsMedicineItemRecord,dmsMedicineItemRecordResult);
                BigDecimal price = dmsDrugMapper.selectByPrimaryKey(dmsMedicineItemRecord.getDrugId()).getPrice();
                String drugName=dmsDrugMapper.selectByPrimaryKey(dmsMedicineItemRecord.getDrugId()).getName();
                dmsMedicineItemRecordResult.setDrugName(drugName);
                dmsMedicineItemRecordResult.setPrice(price);
                dmsMedicineItemRecordResultList.add(dmsMedicineItemRecordResult);
            }

            dmsMedicinePrescriptionRecordResult.setDmsMedicineItemRecordResultList(dmsMedicineItemRecordResultList);//向处方中加入处方项列表

            dmsMedicinePrescriptionRecordResultList.add(dmsMedicinePrescriptionRecordResult); // 向处方列表中加入处方
        }

            return dmsMedicinePrescriptionRecordResultList;
    }





}


<|start_filename|>HIS-web/src/api/dayreport.js<|end_filename|>
import request from '@/utils/request'
// 查询报账员上一次报账的最后日期
export function queryRecentEndDatetime(data) {
  return request({
    url: '/dailySettlement/queryRecentEndDatetime',
    method: 'get',
    params: {
      cashierId:data
    }
  })
}
//查询发票信息
export function queryInvoiceInfo(data) {
  return request({
    url: '/invoice/queryInvoiceInfo',
    method: 'get',
    params: data
  })
}
//统计日结信息并日结
export function dailySettle(data) {
  return request({
    url: '/dailySettlement/dailySettle',
    method: 'get',
    params: data
  })
}

//根据日结记录id查询日结详细信息
export function querySettleDetailById(data) {
  return request({
    url: '/dailySettlement/querySettleDetailById',
    method: 'get',
    params: {
      id:data
    }
  })
}

//根据时间id查询日结历史
export function listDailySettleListRecord(data) {
  return request({
    url: '/dailySettlement/listDailySettleListRecord',
    method: 'get',
    params: data
  })
}

//根据日结id返回发票
export function queryInvoiceInfoBySettleId(data) {
  return request({
    url: '/invoice/queryInvoiceInfoBySettleId',
    method: 'get',
    params: {
      settleRecordId:data
    }
  })
}

//
export function verifySettle(data) {
  return request({
    url: '/dailySettlement/verifySettle',
    method: 'get',
    params: data
  })
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/dms/DmsCaseModelCatalogNode.java<|end_filename|>
package com.neu.his.cloud.service.dms.dto.dms;

import com.neu.his.cloud.service.dms.model.DmsCaseModelCatalog;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

/**
 * 病历模板目录
 */
public class DmsCaseModelCatalogNode extends DmsCaseModelCatalog implements Serializable {
    @Setter
    @Getter
    List<DmsCaseModelCatalogNode> children;
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/ServiceBmsApplication.java<|end_filename|>
package com.neu.his.cloud.service.bms;



import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(scanBasePackages = "com.neu.his.cloud.service.bms")
@EnableEurekaClient
@MapperScan("com.neu.his.cloud.service.bms.mapper")
public class ServiceBmsApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceBmsApplication.class,args);
    }
}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/bms/BmsChargeResult.java<|end_filename|>
package com.neu.his.common.dto.bms;


import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
@ToString
public class BmsChargeResult  implements Serializable {

    @ApiModelProperty(value = "缴费项id")
    Long id;
    @ApiModelProperty(value = "缴费项名称")
    String name;
    @ApiModelProperty(value = "总金额")
    BigDecimal amount;
    @ApiModelProperty(value = "类型：0 挂号 1检查 2检验 3处置 4草药 5 成药")
    Integer type;
    @ApiModelProperty(value = "状态")
    Integer status;
    @ApiModelProperty(value = "开立时间")
    Date createTime;

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsNonDrugItemRecordParam.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

@Setter
@Getter
@ToString
public class DmsNonDrugItemRecordParam  implements Serializable {
   @ApiModelProperty(value = "目的")
   String aim;
    @ApiModelProperty(value = "要求")
    String demand;
    @ApiModelProperty(value = "临床印象")
    String clinicalImpression;
    @ApiModelProperty(value = "临床诊断")
    String clinicalDiagnosis;
    @ApiModelProperty(value = "非药品Id")
    Long  noDrugId;
    @ApiModelProperty(value = "检查部位")
    String  checkParts;
    @ApiModelProperty(value = "执行科室id")
    Long  excuteDeptId;
   @ApiModelProperty(value = "项目金额")
    BigDecimal amount;

}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/dto/pms/PmsDiagnosisPatientResult.java<|end_filename|>
package com.neu.his.cloud.service.pms.dto.pms;


import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class PmsDiagnosisPatientResult {
    @ApiModelProperty(value = "病人Id")
    Long patientId;
    @ApiModelProperty(value = "病人姓名")
    String patientName;
    @ApiModelProperty(value = "病人年龄")
    String patientAge;
    @ApiModelProperty(value = "病人家庭住址")
    String patientHomeAdress;
    @ApiModelProperty(value = "病人性别")
    Integer patientGender;
    @ApiModelProperty(value = "病人病历号")
    String patientMedicalRecordNo;
    @ApiModelProperty(value = "就诊号(挂号号)")
    Long registrationId;
    @ApiModelProperty(value = "就诊状态")
    Integer registrationStatus;
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/pms/PmsDiagnosisPatientController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.pms;


import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseHistoryResult;
import com.neu.his.cloud.api.pc.dto.pms.PmsDiagnosisPatientListResult;
import com.neu.his.cloud.api.pc.dto.pms.PmsPatientResult;
import com.neu.his.cloud.api.pc.service.pms.PmsPatientService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "PmsDiagnosisPatientController", description = "诊断病人管理")
@RequestMapping("/diagnosisPatient")
@CrossOrigin(allowCredentials = "true")
public class PmsDiagnosisPatientController {
    @Autowired
    PmsPatientService pmsPatientService;


    @ApiOperation(value = "根据身份证号查询患者基本信息")
    @RequestMapping(value = "/selectPatientByIdNo", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsPatientResult> selectPatientByIdNo(@RequestParam("identificationNo") String identificationNo){
        return  pmsPatientService.selectPatientByIdNo(identificationNo);
    }



    @RequestMapping(value = "/refreshPatient", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsDiagnosisPatientListResult> refreshPatient(@RequestParam("staffId") Long staffId){
       return pmsPatientService.refreshPatient(staffId);

    }


    @RequestMapping(value = "/bindPatient", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult bindPatient(@RequestParam("registrationId") Long registrationId, @RequestParam("staffId") Long staffId){
         return pmsPatientService.bindPatient(registrationId,staffId);
    }


    @RequestMapping(value = "/startDiagnosis", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseHistoryResult> startDiagnosis(@RequestParam("registrationId") Long registrationId){
       return pmsPatientService.startDiagnosis(registrationId);
    }




}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/sms/ApiPcSmsDeptDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.sms;

import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.sms.SmsDeptParam;
import com.neu.his.cloud.zuul.dto.sms.SmsDeptResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcSmsDeptDistributionService {
    @RequestMapping(value = "/dept/create", method = RequestMethod.POST)
    CommonResult create(@RequestBody SmsDeptParam smsDeptParam);

    @RequestMapping(value = "/dept/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);

    @RequestMapping(value = "/dept/update/{id}", method = RequestMethod.POST)
    CommonResult update(@PathVariable("id") Long id, @RequestBody SmsDeptParam smsDeptParam);

    @RequestMapping(value = "/dept/select", method = RequestMethod.POST)
    CommonResult<CommonPage<SmsDeptResult>> list(@RequestBody SmsDeptParam queryParam,
                                                 @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                 @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);
    @RequestMapping(value = "/dept/selectAll", method = RequestMethod.GET)
    CommonResult<List<SmsDeptResult>> listAll();

}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/dto/dms/DmsHerbalItemRecordResult.java<|end_filename|>
package com.neu.his.cloud.service.bms.dto.dms;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

@Setter
@Getter
@ToString
public class DmsHerbalItemRecordResult implements Serializable {

    private Long id;

    private Integer status;

    private Long prescriptionId;

    private String medicalAdvice;

    private String footnote;

    private Long drugId;

    private Long usageNum;

    private Integer usageNumUnit;

    private Long totalNum;

    private BigDecimal price;

    private String drugName;


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsDiseController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsDiseParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsDiseResult;
import com.neu.his.cloud.api.pc.service.dms.DmsDiseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsDiseController", description = "诊断管理")
@RequestMapping("/DmsDise")
@CrossOrigin(allowCredentials = "true")
public class DmsDiseController {
    @Autowired
    DmsDiseService dmsDiseService;

    @ApiOperation(value = "新增诊断")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsDiseParam dmsDiseParam , BindingResult result){

       return  dmsDiseService.create(dmsDiseParam);

    }

    @ApiOperation(value = "根据ids删除诊断")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        return dmsDiseService.delete(ids);
    }

    @ApiOperation(value = "更新诊断信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody DmsDiseParam dmsDiseParam , BindingResult result){
       return dmsDiseService.update(id,dmsDiseParam);
    }

    @ApiOperation(value = "模糊查询诊断、且分页")
    @RequestMapping(value = "/list", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<DmsDiseResult>> list(@RequestBody DmsDiseParam queryParam,
                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

       return  dmsDiseService.list(queryParam, pageSize, pageNum);

    }

    @ApiOperation(value = "查询所有诊断")
    @RequestMapping(value = "/listAll", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDiseResult>> listAll(){
        return dmsDiseService.listAll();
    }


    @ApiOperation(value = "根据id串获取诊断简单对象list")
    @RequestMapping(value = "/parseList", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDiseResult>> parseList( @RequestParam(value = "idsStr") String idsStr){
        return dmsDiseService.parseList(idsStr);
    }

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/dms/DmsNonDrugRedisParam.java<|end_filename|>
package com.neu.his.cloud.service.dms.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class DmsNonDrugRedisParam implements Serializable {

    @ApiModelProperty(value = "非药品项列表" )
    private List<DmsNonDrugItem> dmsNonDrugItemRecordParamList;
    @ApiModelProperty(value = "创建人id" )
    private Long createStaffId;
    @ApiModelProperty(value = "挂号号" )
    private Long registrationId;
    @ApiModelProperty(value = "非药品类型" )
    private Integer type;
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/bms/BmsFeeQueryController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.bms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsDoctorPatientFeeResult;
import com.neu.his.cloud.api.pc.service.bms.BmsFeeQueryService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "BmsFeeQueryController", description = "费用查询")
@RequestMapping("/feeQuery")
@CrossOrigin(allowCredentials = "true")
public class BmsFeeQueryController {

    @Autowired
    private BmsFeeQueryService bmsFeeQueryService;

    @ApiOperation("根据挂号Id查询患者费用")
    @RequestMapping(value = "/listByRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<BmsDoctorPatientFeeResult>> listFeeByRegistrationId(@RequestParam("registrationId") Long registrationId){
       return  bmsFeeQueryService.listFeeByRegistrationId(registrationId);
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/model/DmsCaseHistory.java<|end_filename|>
package com.neu.his.cloud.zuul.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

public class DmsCaseHistory implements Serializable {
    private Long id;

    private String chiefComplaint;

    private String historyOfPresentIllness;

    private String historyOfTreatment;

    private String pastHistory;

    private String allergies;

    private String healthCheckup;

    private Long registrationId;

    private String priliminaryDiseStrList;

    private Date startDate;

    private String name;

    private Integer gender;

    private String ageStr;

    private String checkStrList;

    private String dispositionStrList;

    private String herbalPrescriptionStrList;

    private Date createTime;

    private String definiteDiseStrList;

    private Long patientId;

    private String testStrList;

    private String medicinePrescriptionStrList;

    private Integer status;

    private String priliminaryDiseIdList;

    private String checkResult;

    private String testResult;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getChiefComplaint() {
        return chiefComplaint;
    }

    public void setChiefComplaint(String chiefComplaint) {
        this.chiefComplaint = chiefComplaint;
    }

    public String getHistoryOfPresentIllness() {
        return historyOfPresentIllness;
    }

    public void setHistoryOfPresentIllness(String historyOfPresentIllness) {
        this.historyOfPresentIllness = historyOfPresentIllness;
    }

    public String getHistoryOfTreatment() {
        return historyOfTreatment;
    }

    public void setHistoryOfTreatment(String historyOfTreatment) {
        this.historyOfTreatment = historyOfTreatment;
    }

    public String getPastHistory() {
        return pastHistory;
    }

    public void setPastHistory(String pastHistory) {
        this.pastHistory = pastHistory;
    }

    public String getAllergies() {
        return allergies;
    }

    public void setAllergies(String allergies) {
        this.allergies = allergies;
    }

    public String getHealthCheckup() {
        return healthCheckup;
    }

    public void setHealthCheckup(String healthCheckup) {
        this.healthCheckup = healthCheckup;
    }

    public Long getRegistrationId() {
        return registrationId;
    }

    public void setRegistrationId(Long registrationId) {
        this.registrationId = registrationId;
    }

    public String getPriliminaryDiseStrList() {
        return priliminaryDiseStrList;
    }

    public void setPriliminaryDiseStrList(String priliminaryDiseStrList) {
        this.priliminaryDiseStrList = priliminaryDiseStrList;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getAgeStr() {
        return ageStr;
    }

    public void setAgeStr(String ageStr) {
        this.ageStr = ageStr;
    }

    public String getCheckStrList() {
        return checkStrList;
    }

    public void setCheckStrList(String checkStrList) {
        this.checkStrList = checkStrList;
    }

    public String getDispositionStrList() {
        return dispositionStrList;
    }

    public void setDispositionStrList(String dispositionStrList) {
        this.dispositionStrList = dispositionStrList;
    }

    public String getHerbalPrescriptionStrList() {
        return herbalPrescriptionStrList;
    }

    public void setHerbalPrescriptionStrList(String herbalPrescriptionStrList) {
        this.herbalPrescriptionStrList = herbalPrescriptionStrList;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getDefiniteDiseStrList() {
        return definiteDiseStrList;
    }

    public void setDefiniteDiseStrList(String definiteDiseStrList) {
        this.definiteDiseStrList = definiteDiseStrList;
    }

    public Long getPatientId() {
        return patientId;
    }

    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    public String getTestStrList() {
        return testStrList;
    }

    public void setTestStrList(String testStrList) {
        this.testStrList = testStrList;
    }

    public String getMedicinePrescriptionStrList() {
        return medicinePrescriptionStrList;
    }

    public void setMedicinePrescriptionStrList(String medicinePrescriptionStrList) {
        this.medicinePrescriptionStrList = medicinePrescriptionStrList;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getPriliminaryDiseIdList() {
        return priliminaryDiseIdList;
    }

    public void setPriliminaryDiseIdList(String priliminaryDiseIdList) {
        this.priliminaryDiseIdList = priliminaryDiseIdList;
    }

    public String getCheckResult() {
        return checkResult;
    }

    public void setCheckResult(String checkResult) {
        this.checkResult = checkResult;
    }

    public String getTestResult() {
        return testResult;
    }

    public void setTestResult(String testResult) {
        this.testResult = testResult;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", chiefComplaint=").append(chiefComplaint);
        sb.append(", historyOfPresentIllness=").append(historyOfPresentIllness);
        sb.append(", historyOfTreatment=").append(historyOfTreatment);
        sb.append(", pastHistory=").append(pastHistory);
        sb.append(", allergies=").append(allergies);
        sb.append(", healthCheckup=").append(healthCheckup);
        sb.append(", registrationId=").append(registrationId);
        sb.append(", priliminaryDiseStrList=").append(priliminaryDiseStrList);
        sb.append(", startDate=").append(startDate);
        sb.append(", name=").append(name);
        sb.append(", gender=").append(gender);
        sb.append(", ageStr=").append(ageStr);
        sb.append(", checkStrList=").append(checkStrList);
        sb.append(", dispositionStrList=").append(dispositionStrList);
        sb.append(", herbalPrescriptionStrList=").append(herbalPrescriptionStrList);
        sb.append(", createTime=").append(createTime);
        sb.append(", definiteDiseStrList=").append(definiteDiseStrList);
        sb.append(", patientId=").append(patientId);
        sb.append(", testStrList=").append(testStrList);
        sb.append(", medicinePrescriptionStrList=").append(medicinePrescriptionStrList);
        sb.append(", status=").append(status);
        sb.append(", priliminaryDiseIdList=").append(priliminaryDiseIdList);
        sb.append(", checkResult=").append(checkResult);
        sb.append(", testResult=").append(testResult);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsDrugStoreService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsRefundDrugListParam;
import com.neu.his.common.dto.pms.PmsDrugStorePatientListResult;

import java.util.Date;

/**
 * 药房
 */
public interface DmsDrugStoreService {

    /**
     * 描述：列出患者
     */
    PmsDrugStorePatientListResult listPatient(Date date, String medicalRecordNo, Integer type);

    /**
     * 描述：发药
     */
    int releaseDrug(Long prescriptionId, Integer type);

    /**
     * 描述：退药
     */
    int refundDrug(DmsRefundDrugListParam dmsRefundDrugListParam);

}


<|start_filename|>HIS-web/src/api/drugstore.js<|end_filename|>
import request from '@/utils/request'
export function listPatient(data) {
  return request({
    url: '/drugStore/listPatient',
    method: 'post',
    params: data
  })
}

export function releaseDrug(data,type) {
  return request({
    url: '/drugStore/releaseDrug',
    method: 'post',
    params: {
      prescriptionId:data,
      type:type
    }
  })
}

export function refundDrug(data) {
  return request({
    url: '/drugStore/refundDrug',
    method: 'post',
    data
  })
}

<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/sms/SmsWorkloadController.java<|end_filename|>
package com.neu.his.api.controller.sms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.sms.SmsWorkloadResult;
import com.neu.his.sms.SmsWorkloadService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@Controller
@Api(tags = "SmsWorkloadController", description = "工作量统计")
@RequestMapping("/workload")
@CrossOrigin(allowCredentials = "true")
public class SmsWorkloadController {

    @Autowired
    private SmsWorkloadService smsWorkloadService;

    /**
     * 描述：根据时间段查询某个人工作量
     * <p>author: ma
     */
    @ApiOperation("根据时间段查询某个人工作量")
    @RequestMapping(value = "/queryPersonal", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsWorkloadResult> queryPersonalWorkload(@RequestParam("staffId") Long staffId,
                                                                 @RequestParam("startDatetime")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startDatetime,
                                                                 @RequestParam("endDatetime")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDatetime){
        return CommonResult.success(smsWorkloadService.queryPersonalWorkloadPeriod(staffId,startDatetime,endDatetime));
    }

    /**
     * 描述：根据时间段统计某个科室工作量
     * <p>author: ma
     */
    @ApiOperation("根据时间段统计某个科室工作量")
    @RequestMapping(value = "/queryDept", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsWorkloadResult>  queryDeptWorkload(@RequestParam("deptId") Long deptId,
                                                              @RequestParam("startDatetime")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")Date startDatetime,
                                                              @RequestParam("endDatetime")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDatetime){
        return CommonResult.success(smsWorkloadService.queryDeptWorkloadPeriod(deptId,startDatetime,endDatetime));
    }

    /**
     * 描述:根据时间段统计所有科室工作量
     * <p>author: ma
     */
    @ApiOperation("根据时间段统计所有科室工作量")
    @RequestMapping(value = "/queryDeptWorkloadList", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<SmsWorkloadResult>> queryDeptWorkloadList(@RequestParam("startDatetime") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")Date startDatetime,
                                                                        @RequestParam("endDatetime")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDatetime){
        return CommonResult.success(smsWorkloadService.queryDeptWorkloadList(startDatetime,endDatetime));
    }

    /**
     * 描述：根据时间段统计科室所有人工作量(一个科室所有人)
     * <p>author: ma
     */
    @ApiOperation("根据时间段统计科室所有人工作量(一个科室所有人)")
    @RequestMapping(value = "/queryDeptPersonalWorkloadList", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<SmsWorkloadResult>>  queryDeptPersonalWorkloadList(@RequestParam("deptId") Long deptId,
                                                                                @RequestParam("startDatetime")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startDatetime,
                                                                                @RequestParam("endDatetime")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDatetime){
        return CommonResult.success(smsWorkloadService.queryDeptPersonalWorkloadList(deptId,startDatetime,endDatetime));
    }

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsCaseModelService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsCaseModelCatalogNode;
import com.neu.his.cloud.service.dms.dto.dms.DmsCaseModelListResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsCaseModelOrCatalogParam;
import com.neu.his.cloud.service.dms.model.DmsCaseModel;


import java.util.List;

/**
 * 病例模版
 */
public interface DmsCaseModelService {

    /**
     * 描述：列出病历模板目录树
     */
    List<DmsCaseModelCatalogNode> listModelCatTree(Long ownId, Integer scope);
    /**
     * 描述：新增目录或模板
     */
    int createCatOrModel(DmsCaseModelOrCatalogParam dmsCaseModelOrCatalogParam);
    /**
     * 描述：删除目录或模板（id即可）
     */
    int deleteModelOrCat(Long id);

    /**
     * 描述：根据模板id更新模板（只更新模板表（除name））
     */
    int updateModel(Long modelId, DmsCaseModel newDmsCaseModel);

    /**
     * 描述：根据模板id更新模板和目录的名字
     */
    int updateName(Long id, String name);

    /**
     * 描述：根据模板id获取模板详细信息
     */
    DmsCaseModel getModelDetail(Long id);

    /**
     * 描述:根据staffId获取所有病历模板
     */
    DmsCaseModelListResult getAllStaffModel(Long staffId);
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsHerbalPrescriptionRecordService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;


import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsHerbalPrescriptionRecordParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsHerbalPrescriptionRecordResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@FeignClient(value = "his-cloud-service-dms")
public interface DmsHerbalPrescriptionRecordService {



    @RequestMapping(value = "/DmsHerbalPrescriptionRecord/apply", method = RequestMethod.POST)
     CommonResult apply(@RequestBody DmsHerbalPrescriptionRecordParam dmsHerbalPrescriptionRecordParam);


    @RequestMapping(value = "/DmsHerbalPrescriptionRecord/invalid", method = RequestMethod.POST)
     CommonResult invalid(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/DmsHerbalPrescriptionRecord/listByReg", method = RequestMethod.POST)
     CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByReg(@RequestParam("registrationId") Long registrationId);


    @RequestMapping(value = "/DmsHerbalPrescriptionRecord/listByIds", method = RequestMethod.POST)
     CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByIds(@RequestParam("ids") List<Long> ids);
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/mapper/SmsSkdRuleItemMapper.java<|end_filename|>
package com.neu.his.cloud.service.dms.mapper;

import com.neu.his.cloud.service.dms.model.SmsSkdRuleItem;
import com.neu.his.cloud.service.dms.model.SmsSkdRuleItemExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsSkdRuleItemMapper {
    int countByExample(SmsSkdRuleItemExample example);

    int deleteByExample(SmsSkdRuleItemExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsSkdRuleItem record);

    int insertSelective(SmsSkdRuleItem record);

    List<SmsSkdRuleItem> selectByExample(SmsSkdRuleItemExample example);

    SmsSkdRuleItem selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsSkdRuleItem record, @Param("example") SmsSkdRuleItemExample example);

    int updateByExample(@Param("record") SmsSkdRuleItem record, @Param("example") SmsSkdRuleItemExample example);

    int updateByPrimaryKeySelective(SmsSkdRuleItem record);

    int updateByPrimaryKey(SmsSkdRuleItem record);
}

<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/model/BmsBillsRecordExample.java<|end_filename|>
package com.neu.his.cloud.service.sms.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BmsBillsRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BmsBillsRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(Integer value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(Integer value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(Integer value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(Integer value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(Integer value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<Integer> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<Integer> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(Integer value1, Integer value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andBillNoIsNull() {
            addCriterion("bill_no is null");
            return (Criteria) this;
        }

        public Criteria andBillNoIsNotNull() {
            addCriterion("bill_no is not null");
            return (Criteria) this;
        }

        public Criteria andBillNoEqualTo(String value) {
            addCriterion("bill_no =", value, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoNotEqualTo(String value) {
            addCriterion("bill_no <>", value, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoGreaterThan(String value) {
            addCriterion("bill_no >", value, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoGreaterThanOrEqualTo(String value) {
            addCriterion("bill_no >=", value, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoLessThan(String value) {
            addCriterion("bill_no <", value, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoLessThanOrEqualTo(String value) {
            addCriterion("bill_no <=", value, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoLike(String value) {
            addCriterion("bill_no like", value, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoNotLike(String value) {
            addCriterion("bill_no not like", value, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoIn(List<String> values) {
            addCriterion("bill_no in", values, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoNotIn(List<String> values) {
            addCriterion("bill_no not in", values, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoBetween(String value1, String value2) {
            addCriterion("bill_no between", value1, value2, "billNo");
            return (Criteria) this;
        }

        public Criteria andBillNoNotBetween(String value1, String value2) {
            addCriterion("bill_no not between", value1, value2, "billNo");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumIsNull() {
            addCriterion("invoice_num is null");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumIsNotNull() {
            addCriterion("invoice_num is not null");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumEqualTo(Integer value) {
            addCriterion("invoice_num =", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumNotEqualTo(Integer value) {
            addCriterion("invoice_num <>", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumGreaterThan(Integer value) {
            addCriterion("invoice_num >", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("invoice_num >=", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumLessThan(Integer value) {
            addCriterion("invoice_num <", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumLessThanOrEqualTo(Integer value) {
            addCriterion("invoice_num <=", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumIn(List<Integer> values) {
            addCriterion("invoice_num in", values, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumNotIn(List<Integer> values) {
            addCriterion("invoice_num not in", values, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumBetween(Integer value1, Integer value2) {
            addCriterion("invoice_num between", value1, value2, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumNotBetween(Integer value1, Integer value2) {
            addCriterion("invoice_num not between", value1, value2, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNull() {
            addCriterion("registration_id is null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNotNull() {
            addCriterion("registration_id is not null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdEqualTo(Long value) {
            addCriterion("registration_id =", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotEqualTo(Long value) {
            addCriterion("registration_id <>", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThan(Long value) {
            addCriterion("registration_id >", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThanOrEqualTo(Long value) {
            addCriterion("registration_id >=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThan(Long value) {
            addCriterion("registration_id <", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThanOrEqualTo(Long value) {
            addCriterion("registration_id <=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIn(List<Long> values) {
            addCriterion("registration_id in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotIn(List<Long> values) {
            addCriterion("registration_id not in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdBetween(Long value1, Long value2) {
            addCriterion("registration_id between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotBetween(Long value1, Long value2) {
            addCriterion("registration_id not between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRecordListIsNull() {
            addCriterion("record_list is null");
            return (Criteria) this;
        }

        public Criteria andRecordListIsNotNull() {
            addCriterion("record_list is not null");
            return (Criteria) this;
        }

        public Criteria andRecordListEqualTo(String value) {
            addCriterion("record_list =", value, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListNotEqualTo(String value) {
            addCriterion("record_list <>", value, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListGreaterThan(String value) {
            addCriterion("record_list >", value, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListGreaterThanOrEqualTo(String value) {
            addCriterion("record_list >=", value, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListLessThan(String value) {
            addCriterion("record_list <", value, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListLessThanOrEqualTo(String value) {
            addCriterion("record_list <=", value, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListLike(String value) {
            addCriterion("record_list like", value, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListNotLike(String value) {
            addCriterion("record_list not like", value, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListIn(List<String> values) {
            addCriterion("record_list in", values, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListNotIn(List<String> values) {
            addCriterion("record_list not in", values, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListBetween(String value1, String value2) {
            addCriterion("record_list between", value1, value2, "recordList");
            return (Criteria) this;
        }

        public Criteria andRecordListNotBetween(String value1, String value2) {
            addCriterion("record_list not between", value1, value2, "recordList");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/dms/DmsCaseModelController.java<|end_filename|>
package com.neu.his.api.controller.dms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.dms.*;
import com.neu.his.dms.service.DmsCaseModelService;
import com.neu.his.mbg.model.DmsCaseModel;
import com.neu.his.mbg.model.DmsCaseModelCatalog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsCaseModelController", description = "病历模板管理")
@RequestMapping("/DmsCaseModel")
@CrossOrigin(allowCredentials = "true")
public class DmsCaseModelController {
    @Autowired
    DmsCaseModelService dmsCaseModelService;

    /**
     * 增加时需要传入{parentId}
     * <p>author:赵煜
     */
    @ApiOperation(value = "新增病历模板目录或模板")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsCaseModelOrCatalogParam dmsCaseModelOrCatalogParam, BindingResult result) {
        int count = dmsCaseModelService.createCatOrModel(dmsCaseModelOrCatalogParam);
        if (count > 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }

    //合并个人、科室、全院的模板查询
    @ApiOperation(value = "显示病历模板目录树")
    @RequestMapping(value = "/listModelCatTree", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsCaseModelCatalogNode>> listModelCatTree(@RequestParam Long ownId,@RequestParam Integer scope) {
        List<DmsCaseModelCatalogNode> dmsCaseModelCatalogTree = dmsCaseModelService.listModelCatTree(ownId,scope);
            return CommonResult.success(dmsCaseModelCatalogTree);
    }



    @ApiOperation(value = "删除病历模版或目录")
    @RequestMapping(value = "/deleteModelOrCat", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModelOrCat(@RequestParam("id") Long id){
        int count = dmsCaseModelService.deleteModelOrCat(id);
        if (count > 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }


    @ApiOperation(value = "更新病历模版信息")
    @RequestMapping(value = "/updateModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsCaseModel dmsCaseModel, BindingResult result){
        int count = dmsCaseModelService.updateModel(modelId,dmsCaseModel);
        if (count > 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }


    @ApiOperation(value = "更新目录或模板的名字")
    @RequestMapping(value = "/updateModel/{id}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult updateName(@PathVariable("id") Long id,@RequestParam("name")String name){
        int count = dmsCaseModelService.updateName(id,name);
        if (count > 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }


    @ApiOperation(value = "根据模板id查询模板详细信息")
    @RequestMapping(value = "/getModelDetail/{id}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseModel> getModelDetail(@PathVariable("id") Long id){
        DmsCaseModel dmsCaseModel = dmsCaseModelService.getModelDetail(id);
        if(null!=dmsCaseModel){
            return CommonResult.success(dmsCaseModel);
        }else{
            return CommonResult.failed("查询模板详细信息失败");
        }
    }

    @ApiOperation(value = "根据staffId获取所有病历模板")
    @RequestMapping(value = "/getAllStaffModel", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseModelListResult> getAllStaffModel(@RequestParam("staffId") Long staffId){
        return CommonResult.success(dmsCaseModelService.getAllStaffModel(staffId));
    }

}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/dto/pms/PmsDrugStorePatientResult.java<|end_filename|>
package com.neu.his.cloud.service.pms.dto.pms;

import io.swagger.annotations.ApiModelProperty;

import java.util.List;

public class PmsDrugStorePatientResult {
    @ApiModelProperty(value = "处方Ids")
    List<Long> prescriptionIdList;
    @ApiModelProperty(value = "患者名")
    String patientName;
    @ApiModelProperty(value = "患者Id")
    Long patientId;
    @ApiModelProperty(value = "患者病历号")
    String medicalRecordNo;

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsRedisSaveDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;




import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsRedisSaveDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseHistoryParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugRedisParam;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugRedisParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsRedisSaveController", description = "redis暂存管理")
@RequestMapping("/redisSave")
@CrossOrigin(allowCredentials = "true")
public class DmsRedisSaveDistributionController {

    @Autowired
    ApiPcDmsRedisSaveDistributionService apiPcDmsRedisSaveDistributionService;

    @HystrixCommand(fallbackMethod = "saveCasePageFallbackInfo")
    @ApiOperation(value = "暂存病历首页（根据挂号号）")
    @RequestMapping(value = "/saveCasePage", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult saveCasePage(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam,
                                     @RequestParam("registrationId") Long registrationId){

        return apiPcDmsRedisSaveDistributionService.saveCasePage(dmsCaseHistoryParam,registrationId);
    }
    private CommonResult saveCasePageFallbackInfo(DmsCaseHistoryParam dmsCaseHistoryParam, Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "getCasePageFallbackInfo")
    @ApiOperation(value = "取出病历首页（根据挂号号）")
    @RequestMapping(value = "/getCasePage", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<DmsCaseHistoryParam> getCasePage(@RequestParam("registrationId") Long registrationId){

        return apiPcDmsRedisSaveDistributionService.getCasePage(registrationId);
    }
    private CommonResult<DmsCaseHistoryParam> getCasePageFallbackInfo(Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "saveDrugPrescriptionFallbackInfo")
    @ApiOperation(value = "暂存药方（根据挂号号和类型（4成药、5草药））")
    @RequestMapping(value = "/saveDrugPrescription", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult saveDrugPrescription(@RequestBody List<DmsDrugRedisParam> dmsDrugRedisParam,
                                             @RequestParam("registrationId") Long registrationId,
                                             @RequestParam("type") int type){
        return apiPcDmsRedisSaveDistributionService.saveDrugPrescription(dmsDrugRedisParam,registrationId,type);
    }
    private CommonResult saveDrugPrescriptionFallbackInfo( List<DmsDrugRedisParam> dmsDrugRedisParam, Long registrationId,int type){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "getDrugPrescriptionFallbackInfo")
    @ApiOperation(value = "取出药方（根据挂号号和类型（4成药、5草药））")
    @RequestMapping(value = "/getDrugPrescription", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDrugRedisParam>> getDrugPrescription(@RequestParam("registrationId") Long registrationId,
                                                                     @RequestParam("type") int type){
        return apiPcDmsRedisSaveDistributionService.getDrugPrescription(registrationId,type);
    }
    private CommonResult<List<DmsDrugRedisParam>> getDrugPrescriptionFallbackInfo(Long registrationId, int type){
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "saveNonDrugFallbackInfo")
    @ApiOperation(value = "暂存开立非药品项目（根据挂号号和类型（0检查、1检验、2处置））")
    @RequestMapping(value = "/saveNonDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult saveNonDrug(@RequestBody DmsNonDrugRedisParam dmsNonDrugRedisParam,
                                    @RequestParam("registrationId") Long registrationId,
                                    @RequestParam("type") int type){
        return apiPcDmsRedisSaveDistributionService.saveNonDrug(dmsNonDrugRedisParam,registrationId,type);
    }
    private CommonResult saveNonDrugFallbackInfo(DmsNonDrugRedisParam dmsNonDrugRedisParam,Long registrationId,int type){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "getNonDrugFallbackInfo")
    @ApiOperation(value = "取出开立非药品项目（根据挂号号和类型（0检查、1检验、2处置））")
    @RequestMapping(value = "/getNonDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<DmsNonDrugRedisParam> getNonDrug(@RequestParam("registrationId") Long registrationId,
                                                           @RequestParam("type") int type){
        return apiPcDmsRedisSaveDistributionService.getNonDrug(registrationId,type);
    }
    private CommonResult<DmsNonDrugRedisParam> getNonDrugFallbackInfo( Long registrationId,int type){
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/bo/WebLog.java<|end_filename|>
package com.neu.his.bo;
/**
 * @ClassName: WebLog
 * @description: TODO
 * @author Zain
 * @date 2019/5/319:58
 */
public class WebLog {
    /**
     * 操作描述
     */
    private String description;

    /**
     * 操作用户
     */
    private String username;

    /**
     * 操作时间
     */
    private Long startTime;

    /**
     * 消耗时间
     */
    private Integer spendTime;

    /**
     * 根路径
     */
    private String basePath;

    /**
     * URI
     */
    private String uri;

    /**
     * URL
     */
    private String url;

    /**
     * 请求类型
     */
    private String method;

    /**
     * IP地址
     */
    private String ip;

    private Object parameter;

    private Object result;

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Integer getSpendTime() {
        return spendTime;
    }

    public void setSpendTime(Integer spendTime) {
        this.spendTime = spendTime;
    }

    public String getBasePath() {
        return basePath;
    }

    public void setBasePath(String basePath) {
        this.basePath = basePath;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Object getParameter() {
        return parameter;
    }

    public void setParameter(Object parameter) {
        this.parameter = parameter;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/sms/SmsSkdDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.sms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.sms.ApiPcSmsSkdDistributionService;
import com.neu.his.cloud.zuul.dto.sms.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "SmsSkdDistributionController", description = "排班管理")
@RequestMapping("/skd")
@CrossOrigin(allowCredentials = "true")
public class SmsSkdDistributionController {

    @Autowired
    private ApiPcSmsSkdDistributionService apiPcSmsSkdDistributionService;

    @HystrixCommand(fallbackMethod = "createRuleFallbackInfo")
    @ApiOperation("新增排班规则")
    @RequestMapping(value = "/createRule", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createRule(@RequestBody SmsSkdRuleParam smsSkdRuleParam, BindingResult result){
       return apiPcSmsSkdDistributionService.createRule(smsSkdRuleParam);
    }
    private CommonResult createRuleFallbackInfo( SmsSkdRuleParam smsSkdRuleParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteRuleFallbackInfo")
    @ApiOperation("删除排班规则")
    @RequestMapping(value = "/deleteRule", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteRule(@RequestParam("ids") List<Long> ids){
        return apiPcSmsSkdDistributionService.deleteRule(ids);
    }
    private CommonResult deleteRuleFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateRuleFallbackInfo")
    @ApiOperation("更新排班规则")
    @RequestMapping(value = "/updateRule/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateRule(@PathVariable Long id, @RequestBody SmsSkdRuleParam smsSkdRuleParam , BindingResult result){
     return  apiPcSmsSkdDistributionService.updateRule(id,smsSkdRuleParam);
    }
    private CommonResult updateRuleFallbackInfo( Long id, SmsSkdRuleParam smsSkdRuleParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listRuleFallbackInfo")
    @ApiOperation("根据部门id筛选排版规则基本信息、分页")
    @RequestMapping(value = "/listRule", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsSkdRuleResult>> listRule(@RequestParam("deptId")  Long deptId,
                                                               @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                               @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

     return apiPcSmsSkdDistributionService.listRule(deptId,pageSize,pageNum);
    }
    private CommonResult<CommonPage<SmsSkdRuleResult>> listRuleFallbackInfo( Long deptId, Integer pageSize, Integer pageNum){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "getRuleDetailFallbackInfo")
    @ApiOperation("根据规则id查询一条规则详情")
    @RequestMapping(value = "/getRuleDetail", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsSkdRuleResult> getRuleDetail(@RequestParam("ruleId") Long ruleId){
       return apiPcSmsSkdDistributionService.getRuleDetail(ruleId);
    }
    private CommonResult<SmsSkdRuleResult> getRuleDetailFallbackInfo(Long ruleId){
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "generateSkdFallbackInfo")
    @ApiOperation("根据多条排班规则生成skd")
    @RequestMapping(value = "/generateSkd", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult generateSkd(@RequestParam("ruleIds") List<Long> ruleIds, @RequestParam("startDate")String startDate, @RequestParam("endDate") String endDate){
        return apiPcSmsSkdDistributionService.generateSkd(ruleIds,startDate,endDate);
    }
    private CommonResult generateSkdFallbackInfo( List<Long> ruleIds,String startDate, String endDate){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listSkdFallbackInfo")
    @ApiOperation("查找排班记录、分页")
    @RequestMapping(value = "/listSkd", method = RequestMethod.POST)
    @ResponseBody
    public  CommonResult<CommonPage<SmsSkdResult>> listSkd(SmsSkdParam queryParam,
                                                           @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

        return apiPcSmsSkdDistributionService.listSkd(queryParam,pageSize,pageNum);
    }
    private  CommonResult<CommonPage<SmsSkdResult>> listSkdFallbackInfo(SmsSkdParam queryParam,Integer pageSize, Integer pageNum){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listCanSkdStaffFallbackInfo")
    @ApiOperation("新增时候列出的科室下员工信息")
    @RequestMapping(value = "/listCanSkdStaff/{deptId}", method = RequestMethod.POST)
    @ResponseBody
    public  CommonResult<List<SmsSkdRuleItemResult>> listCanSkdStaff(@PathVariable Long deptId){
       return apiPcSmsSkdDistributionService.listCanSkdStaff(deptId);
    }
    private  CommonResult<List<SmsSkdRuleItemResult>> listCanSkdStaffFallbackInfo(Long deptId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/model/BmsOperatorSettleRecordExample.java<|end_filename|>
package com.neu.his.cloud.api.pc.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BmsOperatorSettleRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BmsOperatorSettleRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeIsNull() {
            addCriterion("start_datetime is null");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeIsNotNull() {
            addCriterion("start_datetime is not null");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeEqualTo(Date value) {
            addCriterion("start_datetime =", value, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeNotEqualTo(Date value) {
            addCriterion("start_datetime <>", value, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeGreaterThan(Date value) {
            addCriterion("start_datetime >", value, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("start_datetime >=", value, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeLessThan(Date value) {
            addCriterion("start_datetime <", value, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeLessThanOrEqualTo(Date value) {
            addCriterion("start_datetime <=", value, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeIn(List<Date> values) {
            addCriterion("start_datetime in", values, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeNotIn(List<Date> values) {
            addCriterion("start_datetime not in", values, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeBetween(Date value1, Date value2) {
            addCriterion("start_datetime between", value1, value2, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andStartDatetimeNotBetween(Date value1, Date value2) {
            addCriterion("start_datetime not between", value1, value2, "startDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeIsNull() {
            addCriterion("end_datetime is null");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeIsNotNull() {
            addCriterion("end_datetime is not null");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeEqualTo(Date value) {
            addCriterion("end_datetime =", value, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeNotEqualTo(Date value) {
            addCriterion("end_datetime <>", value, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeGreaterThan(Date value) {
            addCriterion("end_datetime >", value, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("end_datetime >=", value, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeLessThan(Date value) {
            addCriterion("end_datetime <", value, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeLessThanOrEqualTo(Date value) {
            addCriterion("end_datetime <=", value, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeIn(List<Date> values) {
            addCriterion("end_datetime in", values, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeNotIn(List<Date> values) {
            addCriterion("end_datetime not in", values, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeBetween(Date value1, Date value2) {
            addCriterion("end_datetime between", value1, value2, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andEndDatetimeNotBetween(Date value1, Date value2) {
            addCriterion("end_datetime not between", value1, value2, "endDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeIsNull() {
            addCriterion("create_datetime is null");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeIsNotNull() {
            addCriterion("create_datetime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeEqualTo(Date value) {
            addCriterion("create_datetime =", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeNotEqualTo(Date value) {
            addCriterion("create_datetime <>", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeGreaterThan(Date value) {
            addCriterion("create_datetime >", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_datetime >=", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeLessThan(Date value) {
            addCriterion("create_datetime <", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeLessThanOrEqualTo(Date value) {
            addCriterion("create_datetime <=", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeIn(List<Date> values) {
            addCriterion("create_datetime in", values, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeNotIn(List<Date> values) {
            addCriterion("create_datetime not in", values, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeBetween(Date value1, Date value2) {
            addCriterion("create_datetime between", value1, value2, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeNotBetween(Date value1, Date value2) {
            addCriterion("create_datetime not between", value1, value2, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCashierIdIsNull() {
            addCriterion("cashier_id is null");
            return (Criteria) this;
        }

        public Criteria andCashierIdIsNotNull() {
            addCriterion("cashier_id is not null");
            return (Criteria) this;
        }

        public Criteria andCashierIdEqualTo(Long value) {
            addCriterion("cashier_id =", value, "cashierId");
            return (Criteria) this;
        }

        public Criteria andCashierIdNotEqualTo(Long value) {
            addCriterion("cashier_id <>", value, "cashierId");
            return (Criteria) this;
        }

        public Criteria andCashierIdGreaterThan(Long value) {
            addCriterion("cashier_id >", value, "cashierId");
            return (Criteria) this;
        }

        public Criteria andCashierIdGreaterThanOrEqualTo(Long value) {
            addCriterion("cashier_id >=", value, "cashierId");
            return (Criteria) this;
        }

        public Criteria andCashierIdLessThan(Long value) {
            addCriterion("cashier_id <", value, "cashierId");
            return (Criteria) this;
        }

        public Criteria andCashierIdLessThanOrEqualTo(Long value) {
            addCriterion("cashier_id <=", value, "cashierId");
            return (Criteria) this;
        }

        public Criteria andCashierIdIn(List<Long> values) {
            addCriterion("cashier_id in", values, "cashierId");
            return (Criteria) this;
        }

        public Criteria andCashierIdNotIn(List<Long> values) {
            addCriterion("cashier_id not in", values, "cashierId");
            return (Criteria) this;
        }

        public Criteria andCashierIdBetween(Long value1, Long value2) {
            addCriterion("cashier_id between", value1, value2, "cashierId");
            return (Criteria) this;
        }

        public Criteria andCashierIdNotBetween(Long value1, Long value2) {
            addCriterion("cashier_id not between", value1, value2, "cashierId");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumIsNull() {
            addCriterion("invoice_num is null");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumIsNotNull() {
            addCriterion("invoice_num is not null");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumEqualTo(Long value) {
            addCriterion("invoice_num =", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumNotEqualTo(Long value) {
            addCriterion("invoice_num <>", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumGreaterThan(Long value) {
            addCriterion("invoice_num >", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumGreaterThanOrEqualTo(Long value) {
            addCriterion("invoice_num >=", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumLessThan(Long value) {
            addCriterion("invoice_num <", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumLessThanOrEqualTo(Long value) {
            addCriterion("invoice_num <=", value, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumIn(List<Long> values) {
            addCriterion("invoice_num in", values, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumNotIn(List<Long> values) {
            addCriterion("invoice_num not in", values, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumBetween(Long value1, Long value2) {
            addCriterion("invoice_num between", value1, value2, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andInvoiceNumNotBetween(Long value1, Long value2) {
            addCriterion("invoice_num not between", value1, value2, "invoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumIsNull() {
            addCriterion("rush_invoice_num is null");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumIsNotNull() {
            addCriterion("rush_invoice_num is not null");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumEqualTo(Long value) {
            addCriterion("rush_invoice_num =", value, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumNotEqualTo(Long value) {
            addCriterion("rush_invoice_num <>", value, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumGreaterThan(Long value) {
            addCriterion("rush_invoice_num >", value, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumGreaterThanOrEqualTo(Long value) {
            addCriterion("rush_invoice_num >=", value, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumLessThan(Long value) {
            addCriterion("rush_invoice_num <", value, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumLessThanOrEqualTo(Long value) {
            addCriterion("rush_invoice_num <=", value, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumIn(List<Long> values) {
            addCriterion("rush_invoice_num in", values, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumNotIn(List<Long> values) {
            addCriterion("rush_invoice_num not in", values, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumBetween(Long value1, Long value2) {
            addCriterion("rush_invoice_num between", value1, value2, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceNumNotBetween(Long value1, Long value2) {
            addCriterion("rush_invoice_num not between", value1, value2, "rushInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumIsNull() {
            addCriterion("reprint_invoice_num is null");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumIsNotNull() {
            addCriterion("reprint_invoice_num is not null");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumEqualTo(Long value) {
            addCriterion("reprint_invoice_num =", value, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumNotEqualTo(Long value) {
            addCriterion("reprint_invoice_num <>", value, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumGreaterThan(Long value) {
            addCriterion("reprint_invoice_num >", value, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumGreaterThanOrEqualTo(Long value) {
            addCriterion("reprint_invoice_num >=", value, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumLessThan(Long value) {
            addCriterion("reprint_invoice_num <", value, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumLessThanOrEqualTo(Long value) {
            addCriterion("reprint_invoice_num <=", value, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumIn(List<Long> values) {
            addCriterion("reprint_invoice_num in", values, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumNotIn(List<Long> values) {
            addCriterion("reprint_invoice_num not in", values, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumBetween(Long value1, Long value2) {
            addCriterion("reprint_invoice_num between", value1, value2, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceNumNotBetween(Long value1, Long value2) {
            addCriterion("reprint_invoice_num not between", value1, value2, "reprintInvoiceNum");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrIsNull() {
            addCriterion("start_end_invoice_id_str is null");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrIsNotNull() {
            addCriterion("start_end_invoice_id_str is not null");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrEqualTo(String value) {
            addCriterion("start_end_invoice_id_str =", value, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrNotEqualTo(String value) {
            addCriterion("start_end_invoice_id_str <>", value, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrGreaterThan(String value) {
            addCriterion("start_end_invoice_id_str >", value, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrGreaterThanOrEqualTo(String value) {
            addCriterion("start_end_invoice_id_str >=", value, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrLessThan(String value) {
            addCriterion("start_end_invoice_id_str <", value, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrLessThanOrEqualTo(String value) {
            addCriterion("start_end_invoice_id_str <=", value, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrLike(String value) {
            addCriterion("start_end_invoice_id_str like", value, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrNotLike(String value) {
            addCriterion("start_end_invoice_id_str not like", value, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrIn(List<String> values) {
            addCriterion("start_end_invoice_id_str in", values, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrNotIn(List<String> values) {
            addCriterion("start_end_invoice_id_str not in", values, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrBetween(String value1, String value2) {
            addCriterion("start_end_invoice_id_str between", value1, value2, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andStartEndInvoiceIdStrNotBetween(String value1, String value2) {
            addCriterion("start_end_invoice_id_str not between", value1, value2, "startEndInvoiceIdStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrIsNull() {
            addCriterion("rush_invoice_id_list_str is null");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrIsNotNull() {
            addCriterion("rush_invoice_id_list_str is not null");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrEqualTo(String value) {
            addCriterion("rush_invoice_id_list_str =", value, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrNotEqualTo(String value) {
            addCriterion("rush_invoice_id_list_str <>", value, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrGreaterThan(String value) {
            addCriterion("rush_invoice_id_list_str >", value, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrGreaterThanOrEqualTo(String value) {
            addCriterion("rush_invoice_id_list_str >=", value, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrLessThan(String value) {
            addCriterion("rush_invoice_id_list_str <", value, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrLessThanOrEqualTo(String value) {
            addCriterion("rush_invoice_id_list_str <=", value, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrLike(String value) {
            addCriterion("rush_invoice_id_list_str like", value, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrNotLike(String value) {
            addCriterion("rush_invoice_id_list_str not like", value, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrIn(List<String> values) {
            addCriterion("rush_invoice_id_list_str in", values, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrNotIn(List<String> values) {
            addCriterion("rush_invoice_id_list_str not in", values, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrBetween(String value1, String value2) {
            addCriterion("rush_invoice_id_list_str between", value1, value2, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andRushInvoiceIdListStrNotBetween(String value1, String value2) {
            addCriterion("rush_invoice_id_list_str not between", value1, value2, "rushInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrIsNull() {
            addCriterion("reprint_invoice_id_list_str is null");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrIsNotNull() {
            addCriterion("reprint_invoice_id_list_str is not null");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrEqualTo(String value) {
            addCriterion("reprint_invoice_id_list_str =", value, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrNotEqualTo(String value) {
            addCriterion("reprint_invoice_id_list_str <>", value, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrGreaterThan(String value) {
            addCriterion("reprint_invoice_id_list_str >", value, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrGreaterThanOrEqualTo(String value) {
            addCriterion("reprint_invoice_id_list_str >=", value, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrLessThan(String value) {
            addCriterion("reprint_invoice_id_list_str <", value, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrLessThanOrEqualTo(String value) {
            addCriterion("reprint_invoice_id_list_str <=", value, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrLike(String value) {
            addCriterion("reprint_invoice_id_list_str like", value, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrNotLike(String value) {
            addCriterion("reprint_invoice_id_list_str not like", value, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrIn(List<String> values) {
            addCriterion("reprint_invoice_id_list_str in", values, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrNotIn(List<String> values) {
            addCriterion("reprint_invoice_id_list_str not in", values, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrBetween(String value1, String value2) {
            addCriterion("reprint_invoice_id_list_str between", value1, value2, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andReprintInvoiceIdListStrNotBetween(String value1, String value2) {
            addCriterion("reprint_invoice_id_list_str not between", value1, value2, "reprintInvoiceIdListStr");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountIsNull() {
            addCriterion("medicine_amount is null");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountIsNotNull() {
            addCriterion("medicine_amount is not null");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountEqualTo(BigDecimal value) {
            addCriterion("medicine_amount =", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountNotEqualTo(BigDecimal value) {
            addCriterion("medicine_amount <>", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountGreaterThan(BigDecimal value) {
            addCriterion("medicine_amount >", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("medicine_amount >=", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountLessThan(BigDecimal value) {
            addCriterion("medicine_amount <", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("medicine_amount <=", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountIn(List<BigDecimal> values) {
            addCriterion("medicine_amount in", values, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountNotIn(List<BigDecimal> values) {
            addCriterion("medicine_amount not in", values, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("medicine_amount between", value1, value2, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("medicine_amount not between", value1, value2, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountIsNull() {
            addCriterion("herbal_amount is null");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountIsNotNull() {
            addCriterion("herbal_amount is not null");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountEqualTo(BigDecimal value) {
            addCriterion("herbal_amount =", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountNotEqualTo(BigDecimal value) {
            addCriterion("herbal_amount <>", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountGreaterThan(BigDecimal value) {
            addCriterion("herbal_amount >", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("herbal_amount >=", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountLessThan(BigDecimal value) {
            addCriterion("herbal_amount <", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("herbal_amount <=", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountIn(List<BigDecimal> values) {
            addCriterion("herbal_amount in", values, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountNotIn(List<BigDecimal> values) {
            addCriterion("herbal_amount not in", values, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("herbal_amount between", value1, value2, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("herbal_amount not between", value1, value2, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountIsNull() {
            addCriterion("check_amount is null");
            return (Criteria) this;
        }

        public Criteria andCheckAmountIsNotNull() {
            addCriterion("check_amount is not null");
            return (Criteria) this;
        }

        public Criteria andCheckAmountEqualTo(BigDecimal value) {
            addCriterion("check_amount =", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountNotEqualTo(BigDecimal value) {
            addCriterion("check_amount <>", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountGreaterThan(BigDecimal value) {
            addCriterion("check_amount >", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("check_amount >=", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountLessThan(BigDecimal value) {
            addCriterion("check_amount <", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("check_amount <=", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountIn(List<BigDecimal> values) {
            addCriterion("check_amount in", values, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountNotIn(List<BigDecimal> values) {
            addCriterion("check_amount not in", values, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("check_amount between", value1, value2, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("check_amount not between", value1, value2, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountIsNull() {
            addCriterion("disposition_amount is null");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountIsNotNull() {
            addCriterion("disposition_amount is not null");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountEqualTo(BigDecimal value) {
            addCriterion("disposition_amount =", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountNotEqualTo(BigDecimal value) {
            addCriterion("disposition_amount <>", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountGreaterThan(BigDecimal value) {
            addCriterion("disposition_amount >", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("disposition_amount >=", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountLessThan(BigDecimal value) {
            addCriterion("disposition_amount <", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("disposition_amount <=", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountIn(List<BigDecimal> values) {
            addCriterion("disposition_amount in", values, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountNotIn(List<BigDecimal> values) {
            addCriterion("disposition_amount not in", values, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("disposition_amount between", value1, value2, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("disposition_amount not between", value1, value2, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountIsNull() {
            addCriterion("registration_amount is null");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountIsNotNull() {
            addCriterion("registration_amount is not null");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountEqualTo(BigDecimal value) {
            addCriterion("registration_amount =", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountNotEqualTo(BigDecimal value) {
            addCriterion("registration_amount <>", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountGreaterThan(BigDecimal value) {
            addCriterion("registration_amount >", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("registration_amount >=", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountLessThan(BigDecimal value) {
            addCriterion("registration_amount <", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("registration_amount <=", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountIn(List<BigDecimal> values) {
            addCriterion("registration_amount in", values, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountNotIn(List<BigDecimal> values) {
            addCriterion("registration_amount not in", values, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("registration_amount between", value1, value2, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("registration_amount not between", value1, value2, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountIsNull() {
            addCriterion("test_amount is null");
            return (Criteria) this;
        }

        public Criteria andTestAmountIsNotNull() {
            addCriterion("test_amount is not null");
            return (Criteria) this;
        }

        public Criteria andTestAmountEqualTo(BigDecimal value) {
            addCriterion("test_amount =", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountNotEqualTo(BigDecimal value) {
            addCriterion("test_amount <>", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountGreaterThan(BigDecimal value) {
            addCriterion("test_amount >", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("test_amount >=", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountLessThan(BigDecimal value) {
            addCriterion("test_amount <", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("test_amount <=", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountIn(List<BigDecimal> values) {
            addCriterion("test_amount in", values, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountNotIn(List<BigDecimal> values) {
            addCriterion("test_amount not in", values, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("test_amount between", value1, value2, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("test_amount not between", value1, value2, "testAmount");
            return (Criteria) this;
        }

        public Criteria andAmountIsNull() {
            addCriterion("amount is null");
            return (Criteria) this;
        }

        public Criteria andAmountIsNotNull() {
            addCriterion("amount is not null");
            return (Criteria) this;
        }

        public Criteria andAmountEqualTo(BigDecimal value) {
            addCriterion("amount =", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotEqualTo(BigDecimal value) {
            addCriterion("amount <>", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThan(BigDecimal value) {
            addCriterion("amount >", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("amount >=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThan(BigDecimal value) {
            addCriterion("amount <", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("amount <=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountIn(List<BigDecimal> values) {
            addCriterion("amount in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotIn(List<BigDecimal> values) {
            addCriterion("amount not in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount not between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andCashAmountIsNull() {
            addCriterion("cash_amount is null");
            return (Criteria) this;
        }

        public Criteria andCashAmountIsNotNull() {
            addCriterion("cash_amount is not null");
            return (Criteria) this;
        }

        public Criteria andCashAmountEqualTo(BigDecimal value) {
            addCriterion("cash_amount =", value, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andCashAmountNotEqualTo(BigDecimal value) {
            addCriterion("cash_amount <>", value, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andCashAmountGreaterThan(BigDecimal value) {
            addCriterion("cash_amount >", value, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andCashAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("cash_amount >=", value, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andCashAmountLessThan(BigDecimal value) {
            addCriterion("cash_amount <", value, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andCashAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("cash_amount <=", value, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andCashAmountIn(List<BigDecimal> values) {
            addCriterion("cash_amount in", values, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andCashAmountNotIn(List<BigDecimal> values) {
            addCriterion("cash_amount not in", values, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andCashAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("cash_amount between", value1, value2, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andCashAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("cash_amount not between", value1, value2, "cashAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountIsNull() {
            addCriterion("insurance_amount is null");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountIsNotNull() {
            addCriterion("insurance_amount is not null");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountEqualTo(BigDecimal value) {
            addCriterion("insurance_amount =", value, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountNotEqualTo(BigDecimal value) {
            addCriterion("insurance_amount <>", value, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountGreaterThan(BigDecimal value) {
            addCriterion("insurance_amount >", value, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("insurance_amount >=", value, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountLessThan(BigDecimal value) {
            addCriterion("insurance_amount <", value, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("insurance_amount <=", value, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountIn(List<BigDecimal> values) {
            addCriterion("insurance_amount in", values, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountNotIn(List<BigDecimal> values) {
            addCriterion("insurance_amount not in", values, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("insurance_amount between", value1, value2, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andInsuranceAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("insurance_amount not between", value1, value2, "insuranceAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountIsNull() {
            addCriterion("bank_card_amount is null");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountIsNotNull() {
            addCriterion("bank_card_amount is not null");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountEqualTo(BigDecimal value) {
            addCriterion("bank_card_amount =", value, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountNotEqualTo(BigDecimal value) {
            addCriterion("bank_card_amount <>", value, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountGreaterThan(BigDecimal value) {
            addCriterion("bank_card_amount >", value, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("bank_card_amount >=", value, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountLessThan(BigDecimal value) {
            addCriterion("bank_card_amount <", value, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("bank_card_amount <=", value, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountIn(List<BigDecimal> values) {
            addCriterion("bank_card_amount in", values, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountNotIn(List<BigDecimal> values) {
            addCriterion("bank_card_amount not in", values, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("bank_card_amount between", value1, value2, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andBankCardAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("bank_card_amount not between", value1, value2, "bankCardAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountIsNull() {
            addCriterion("alipay_amount is null");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountIsNotNull() {
            addCriterion("alipay_amount is not null");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountEqualTo(BigDecimal value) {
            addCriterion("alipay_amount =", value, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountNotEqualTo(BigDecimal value) {
            addCriterion("alipay_amount <>", value, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountGreaterThan(BigDecimal value) {
            addCriterion("alipay_amount >", value, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("alipay_amount >=", value, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountLessThan(BigDecimal value) {
            addCriterion("alipay_amount <", value, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("alipay_amount <=", value, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountIn(List<BigDecimal> values) {
            addCriterion("alipay_amount in", values, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountNotIn(List<BigDecimal> values) {
            addCriterion("alipay_amount not in", values, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("alipay_amount between", value1, value2, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andAlipayAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("alipay_amount not between", value1, value2, "alipayAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountIsNull() {
            addCriterion("wechat_amount is null");
            return (Criteria) this;
        }

        public Criteria andWechatAmountIsNotNull() {
            addCriterion("wechat_amount is not null");
            return (Criteria) this;
        }

        public Criteria andWechatAmountEqualTo(BigDecimal value) {
            addCriterion("wechat_amount =", value, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountNotEqualTo(BigDecimal value) {
            addCriterion("wechat_amount <>", value, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountGreaterThan(BigDecimal value) {
            addCriterion("wechat_amount >", value, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("wechat_amount >=", value, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountLessThan(BigDecimal value) {
            addCriterion("wechat_amount <", value, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("wechat_amount <=", value, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountIn(List<BigDecimal> values) {
            addCriterion("wechat_amount in", values, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountNotIn(List<BigDecimal> values) {
            addCriterion("wechat_amount not in", values, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("wechat_amount between", value1, value2, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andWechatAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("wechat_amount not between", value1, value2, "wechatAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountIsNull() {
            addCriterion("credit_card_amount is null");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountIsNotNull() {
            addCriterion("credit_card_amount is not null");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountEqualTo(BigDecimal value) {
            addCriterion("credit_card_amount =", value, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountNotEqualTo(BigDecimal value) {
            addCriterion("credit_card_amount <>", value, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountGreaterThan(BigDecimal value) {
            addCriterion("credit_card_amount >", value, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("credit_card_amount >=", value, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountLessThan(BigDecimal value) {
            addCriterion("credit_card_amount <", value, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("credit_card_amount <=", value, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountIn(List<BigDecimal> values) {
            addCriterion("credit_card_amount in", values, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountNotIn(List<BigDecimal> values) {
            addCriterion("credit_card_amount not in", values, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("credit_card_amount between", value1, value2, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andCreditCardAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("credit_card_amount not between", value1, value2, "creditCardAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountIsNull() {
            addCriterion("other_amount is null");
            return (Criteria) this;
        }

        public Criteria andOtherAmountIsNotNull() {
            addCriterion("other_amount is not null");
            return (Criteria) this;
        }

        public Criteria andOtherAmountEqualTo(BigDecimal value) {
            addCriterion("other_amount =", value, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountNotEqualTo(BigDecimal value) {
            addCriterion("other_amount <>", value, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountGreaterThan(BigDecimal value) {
            addCriterion("other_amount >", value, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("other_amount >=", value, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountLessThan(BigDecimal value) {
            addCriterion("other_amount <", value, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("other_amount <=", value, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountIn(List<BigDecimal> values) {
            addCriterion("other_amount in", values, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountNotIn(List<BigDecimal> values) {
            addCriterion("other_amount not in", values, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("other_amount between", value1, value2, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andOtherAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("other_amount not between", value1, value2, "otherAmount");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdIsNull() {
            addCriterion("verify_operator_id is null");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdIsNotNull() {
            addCriterion("verify_operator_id is not null");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdEqualTo(Long value) {
            addCriterion("verify_operator_id =", value, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdNotEqualTo(Long value) {
            addCriterion("verify_operator_id <>", value, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdGreaterThan(Long value) {
            addCriterion("verify_operator_id >", value, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdGreaterThanOrEqualTo(Long value) {
            addCriterion("verify_operator_id >=", value, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdLessThan(Long value) {
            addCriterion("verify_operator_id <", value, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdLessThanOrEqualTo(Long value) {
            addCriterion("verify_operator_id <=", value, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdIn(List<Long> values) {
            addCriterion("verify_operator_id in", values, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdNotIn(List<Long> values) {
            addCriterion("verify_operator_id not in", values, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdBetween(Long value1, Long value2) {
            addCriterion("verify_operator_id between", value1, value2, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyOperatorIdNotBetween(Long value1, Long value2) {
            addCriterion("verify_operator_id not between", value1, value2, "verifyOperatorId");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeIsNull() {
            addCriterion("verify_datetime is null");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeIsNotNull() {
            addCriterion("verify_datetime is not null");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeEqualTo(Date value) {
            addCriterion("verify_datetime =", value, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeNotEqualTo(Date value) {
            addCriterion("verify_datetime <>", value, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeGreaterThan(Date value) {
            addCriterion("verify_datetime >", value, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("verify_datetime >=", value, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeLessThan(Date value) {
            addCriterion("verify_datetime <", value, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeLessThanOrEqualTo(Date value) {
            addCriterion("verify_datetime <=", value, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeIn(List<Date> values) {
            addCriterion("verify_datetime in", values, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeNotIn(List<Date> values) {
            addCriterion("verify_datetime not in", values, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeBetween(Date value1, Date value2) {
            addCriterion("verify_datetime between", value1, value2, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyDatetimeNotBetween(Date value1, Date value2) {
            addCriterion("verify_datetime not between", value1, value2, "verifyDatetime");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusIsNull() {
            addCriterion("verify_status is null");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusIsNotNull() {
            addCriterion("verify_status is not null");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusEqualTo(Integer value) {
            addCriterion("verify_status =", value, "verifyStatus");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusNotEqualTo(Integer value) {
            addCriterion("verify_status <>", value, "verifyStatus");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusGreaterThan(Integer value) {
            addCriterion("verify_status >", value, "verifyStatus");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("verify_status >=", value, "verifyStatus");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusLessThan(Integer value) {
            addCriterion("verify_status <", value, "verifyStatus");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusLessThanOrEqualTo(Integer value) {
            addCriterion("verify_status <=", value, "verifyStatus");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusIn(List<Integer> values) {
            addCriterion("verify_status in", values, "verifyStatus");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusNotIn(List<Integer> values) {
            addCriterion("verify_status not in", values, "verifyStatus");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusBetween(Integer value1, Integer value2) {
            addCriterion("verify_status between", value1, value2, "verifyStatus");
            return (Criteria) this;
        }

        public Criteria andVerifyStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("verify_status not between", value1, value2, "verifyStatus");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiOssServiceDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;


import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.oss.OssCallbackResult;
import com.neu.his.cloud.zuul.dto.oss.OssPolicyResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
@FeignClient(value = "his-cloud-api-pc")
public interface ApiOssServiceDistributionService {
    @RequestMapping(value = "/aliyun/oss/policy", method = RequestMethod.GET)
     CommonResult<OssPolicyResult> policy();


    @RequestMapping(value = "/aliyun/oss/callback", method = RequestMethod.POST)
     CommonResult<OssCallbackResult> callback(HttpServletRequest request);
}


<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/impl/SmsWorkloadServiceImpl.java<|end_filename|>
package com.neu.his.sms.impl;

import com.neu.his.common.dto.sms.SmsWorkloadResult;
import com.neu.his.mbg.mapper.*;
import com.neu.his.mbg.model.*;
import com.neu.his.sms.SmsWorkloadService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.*;
/**
 * 工作量
 */
@Service
public class SmsWorkloadServiceImpl implements SmsWorkloadService {

    @Autowired
    private SmsStaffMapper smsStaffMapper;

    @Autowired
    private SmsDeptMapper smsDeptMapper;

    @Autowired
    private DmsMedicinePrescriptionRecordMapper dmsMedicinePrescriptionRecordMapper;

    @Autowired
    private DmsHerbalPrescriptionRecordMapper dmsHerbalPrescriptionRecordMapper;

    @Autowired
    private DmsNonDrugItemRecordMapper dmsNonDrugItemRecordMapper;

    @Autowired
    private SmsSkdMapper smsSkdMapper;

    @Autowired
    private DmsRegistrationMapper dmsRegistrationMapper;

    @Autowired
    private SmsRegistrationRankMapper smsRegistrationRankMapper;

    @Autowired
    private SmsWorkloadRecordMapper smsWorkloadRecordMapper;

    //个人工作量统计
    @Override
    public SmsWorkloadResult workloadPersonalStatistic(Long staffId, Date date){
        SmsWorkloadResult workload = new SmsWorkloadResult();
        workload.setWorkloadId(null);
        workload.setCreateTime(new Date());
        workload.setDate(date);

        //查询员工和挂号级别信息
        SmsStaff staff = smsStaffMapper.selectByPrimaryKey(staffId);
        if(staff == null){
            return null;
        }
        workload.setStaffId(staffId);
        workload.setStaffName(staff.getName());
        SmsRegistrationRank rank = smsRegistrationRankMapper.selectByPrimaryKey(staff.getRegistrationRankId());
        if(rank == null){
            return null;
        }

        //查询部门信息
        SmsDept dept = smsDeptMapper.selectByPrimaryKey(staff.getDeptId());
        if(dept == null){
            return null;
        }
        workload.setDeptId(dept.getId());
        workload.setDeptName(dept.getName());

        //设置处方单状态
        List<Integer> statusList = new ArrayList<>();
        statusList.add(2);
        statusList.add(3);
        //设置起始时间
        Date startDate = getBeginDate(date);
        //查询开立成药
        DmsMedicinePrescriptionRecordExample medicineExample = new DmsMedicinePrescriptionRecordExample();
        medicineExample.createCriteria().andCreateTimeBetween(startDate,date)
                .andCreateStaffIdEqualTo(staffId)
                .andStatusIn(statusList);
        List<DmsMedicinePrescriptionRecord> medicineList = dmsMedicinePrescriptionRecordMapper.selectByExample(medicineExample);
        BigDecimal medicineAmount = new BigDecimal(0);
        for(DmsMedicinePrescriptionRecord record : medicineList){
            medicineAmount = medicineAmount.add(record.getAmount());
        }
        workload.setMedicineAmount(medicineAmount);
        //查询开立草药
        DmsHerbalPrescriptionRecordExample herbalExample = new DmsHerbalPrescriptionRecordExample();
        herbalExample.createCriteria().andCreateTimeBetween(startDate,date)
                .andStatusIn(statusList)
                .andCreateStaffIdEqualTo(staffId);
        List<DmsHerbalPrescriptionRecord> herbalList = dmsHerbalPrescriptionRecordMapper.selectByExample(herbalExample);
        BigDecimal herbalAmount = new BigDecimal(0);
        for(DmsHerbalPrescriptionRecord record : herbalList){
            herbalAmount = herbalAmount.add(record.getAmount());
        }
        workload.setHerbalAmount(herbalAmount);

        //设置处方单状态
        List<Integer> nonDrugStatus = new ArrayList<>();
        nonDrugStatus.add(2);
        nonDrugStatus.add(3);
        nonDrugStatus.add(4);
        //查询检查
        DmsNonDrugItemRecordExample createCheckExample = new DmsNonDrugItemRecordExample();
        createCheckExample.createCriteria().andCreateTimeBetween(startDate,date)
                .andCreateStaffIdEqualTo(staffId)
                .andStatusIn(nonDrugStatus)
                .andTypeEqualTo(0);
        List<DmsNonDrugItemRecord> checkList = dmsNonDrugItemRecordMapper.selectByExample(createCheckExample);
        BigDecimal checkAmount = new BigDecimal(0);
        for(DmsNonDrugItemRecord record : checkList){
            checkAmount = checkAmount.add(record.getAmount());
        }
        workload.setCheckAmount(checkAmount);
        //查询检验
        DmsNonDrugItemRecordExample createTestExample = new DmsNonDrugItemRecordExample();
        createTestExample.createCriteria().andCreateTimeBetween(startDate,date)
                .andCreateStaffIdEqualTo(staffId)
                .andStatusIn(nonDrugStatus)
                .andTypeEqualTo(1);
        List<DmsNonDrugItemRecord> testList = dmsNonDrugItemRecordMapper.selectByExample(createTestExample);
        BigDecimal testAmount = new BigDecimal(0);
        for(DmsNonDrugItemRecord record : testList){
            testAmount = testAmount.add(record.getAmount());
        }
        workload.setTestAmount(testAmount);
        //查询处置
        DmsNonDrugItemRecordExample createDispositionExample = new DmsNonDrugItemRecordExample();
        createDispositionExample.createCriteria().andCreateTimeBetween(startDate,date)
                .andCreateStaffIdEqualTo(staffId)
                .andStatusIn(nonDrugStatus)
                .andTypeEqualTo(2);
        List<DmsNonDrugItemRecord> dispositionList = dmsNonDrugItemRecordMapper.selectByExample(createDispositionExample);
        BigDecimal dispositionAmount = new BigDecimal(0);
        for(DmsNonDrugItemRecord record : dispositionList){
            dispositionAmount = dispositionAmount.add(record.getAmount());
        }
        workload.setDispositionAmount(dispositionAmount);

        //查询挂号:通过医生id和日期，在sms-skd中找出skd_id（一天、可能为2个skd）,根据skd_id查询挂号表（count，status=2 or 3）
        SmsSkdExample skdExample = new SmsSkdExample();
        skdExample.createCriteria().andDateBetween(startDate,date).andStaffIdEqualTo(staffId);
        List<SmsSkd> skdList = smsSkdMapper.selectByExample(skdExample);
        List<Long> skdIdList = new ArrayList<>();
        for(SmsSkd skd : skdList){
            skdIdList.add(skd.getId());
        }
        if(skdIdList.isEmpty()){
            workload.setRegistrationAmount(new BigDecimal(0));
            workload.setRegistrationNum(new Long(0));
        }else{
            DmsRegistrationExample registrationExample = new DmsRegistrationExample();
            //设置挂号表状态
            List<Integer> registrationStatus = new ArrayList<>();
            registrationStatus.add(2);
            registrationStatus.add(3);
            registrationExample.createCriteria()
                    .andStatusIn(registrationStatus)
                    .andSkdIdIn(skdIdList)
                    .andAttendanceDateBetween(startDate,date);
            int size = dmsRegistrationMapper.countByExample(registrationExample);
            workload.setRegistrationNum(new Long(size));
            workload.setRegistrationAmount(rank.getPrice().multiply(new BigDecimal(size)));
        }

        //开立总钱数
        BigDecimal sum = medicineAmount.add(herbalAmount).add(checkAmount).add(testAmount).add(dispositionAmount).add(workload.getRegistrationAmount());
        workload.setAmount(sum);

        //执行检查总钱数
        DmsNonDrugItemRecordExample excuteCheckExample = new DmsNonDrugItemRecordExample();
        excuteCheckExample.createCriteria().andExcuteTimeBetween(startDate,date)
                .andExcuteStaffIdEqualTo(staffId)
                .andStatusEqualTo(4)
                .andTypeEqualTo(0);
        List<DmsNonDrugItemRecord> excuteCkeckList = dmsNonDrugItemRecordMapper.selectByExample(excuteCheckExample);
        BigDecimal excuteCkeckAmount = new BigDecimal(0);
        for(DmsNonDrugItemRecord record : excuteCkeckList){
            excuteCkeckAmount = excuteCkeckAmount.add(record.getAmount());
        }
        workload.setExcuteCheckAmount(excuteCkeckAmount);
        //执行检验总钱数
        DmsNonDrugItemRecordExample excuteTestExample = new DmsNonDrugItemRecordExample();
        excuteTestExample.createCriteria().andExcuteTimeBetween(startDate,date)
                .andExcuteStaffIdEqualTo(staffId)
                .andStatusEqualTo(4)
                .andTypeEqualTo(1);
        List<DmsNonDrugItemRecord> excuteTestList = dmsNonDrugItemRecordMapper.selectByExample(excuteTestExample);
        BigDecimal excuteTestAmount = new BigDecimal(0);
        for(DmsNonDrugItemRecord record : excuteTestList){
            excuteTestAmount = excuteTestAmount.add(record.getAmount());
        }
        workload.setExcuteTestAmount(excuteTestAmount);
        //执行处置总钱数
        DmsNonDrugItemRecordExample excuteDispositionExample = new DmsNonDrugItemRecordExample();
        excuteDispositionExample.createCriteria().andExcuteTimeBetween(startDate,date)
                .andExcuteStaffIdEqualTo(staffId)
                .andStatusEqualTo(4)
                .andTypeEqualTo(2);
        List<DmsNonDrugItemRecord> excuteDispositionList = dmsNonDrugItemRecordMapper.selectByExample(excuteDispositionExample);
        BigDecimal excuteDispositionAmount = new BigDecimal(0);
        for(DmsNonDrugItemRecord record : excuteDispositionList){
            excuteDispositionAmount = excuteDispositionAmount.add(record.getAmount());
        }
        workload.setExcuteDispositionAmount(excuteDispositionAmount);

        //执行人次
        DmsNonDrugItemRecordExample countExample = new DmsNonDrugItemRecordExample();
        countExample.createCriteria().andExcuteTimeBetween(startDate,date)
                .andExcuteStaffIdEqualTo(staffId)
                .andStatusEqualTo(4);
        workload.setExcuteNum(new Long(dmsNonDrugItemRecordMapper.countByExample(countExample)));

        //type设置为 0(个人)
        workload.setType(0);
        workload.setStatus(1);

        return workload;
    }

    //个人工作量时间段查询
    @Override
    public SmsWorkloadResult queryPersonalWorkloadPeriod(Long staffId ,Date startDatetime,Date endDatetime){
        //最后一天之前的，使用between,并累加
        SmsWorkloadRecordExample workloadRecordExample = new SmsWorkloadRecordExample();
        workloadRecordExample.createCriteria().andDateBetween(getBeginDate(startDatetime),getBeginDate(endDatetime))
                .andStaffIdEqualTo(staffId)
                .andStatusEqualTo(1)
                .andTypeEqualTo(0);
        List<SmsWorkloadRecord> workloadRecordList = smsWorkloadRecordMapper.selectByExample(workloadRecordExample);

        //添加最后一天的
        SmsWorkloadResult lastResult = workloadPersonalStatistic(staffId,endDatetime);
        SmsWorkloadRecord beforeRecord = addAll(workloadRecordList);

        //合并两个
        lastResult.setMedicineAmount(lastResult.getMedicineAmount().add(beforeRecord.getMedicineAmount()));
        lastResult.setHerbalAmount(lastResult.getHerbalAmount().add(beforeRecord.getHerbalAmount()));
        lastResult.setCheckAmount(lastResult.getCheckAmount().add(beforeRecord.getCheckAmount()));
        lastResult.setTestAmount(lastResult.getTestAmount().add(beforeRecord.getTestAmount()));
        lastResult.setDispositionAmount(lastResult.getDispositionAmount().add(beforeRecord.getDispositionAmount()));
        lastResult.setRegistrationAmount(lastResult.getRegistrationAmount().add(beforeRecord.getRegistrationAmount()));
        lastResult.setAmount(lastResult.getAmount().add(beforeRecord.getAmount()));

        lastResult.setRegistrationNum(lastResult.getRegistrationNum() + beforeRecord.getRegistrationNum());
        lastResult.setExcuteCheckAmount(lastResult.getExcuteCheckAmount().add(beforeRecord.getExcuteCheckAmount()));
        lastResult.setExcuteTestAmount(lastResult.getExcuteTestAmount().add(beforeRecord.getExcuteTestAmount()));
        lastResult.setExcuteDispositionAmount(lastResult.getExcuteDispositionAmount().add(beforeRecord.getExcuteDispositionAmount()));
        lastResult.setExcuteNum(lastResult.getExcuteNum() + beforeRecord.getExcuteNum());

        return lastResult;
    }

    //计算某个科室某一天
    @Override
    public SmsWorkloadResult workloadDeptStatistic(Long deptId,Date date){
        //在staff表中中根据科室id查找staffIds
        SmsStaffExample staffExample = new SmsStaffExample();
        staffExample.createCriteria().andDeptIdEqualTo(deptId).andStatusEqualTo(1);
        List<SmsStaff> staffList = smsStaffMapper.selectByExample(staffExample);
        List<Long> staffIdList = new ArrayList<>();
        for(SmsStaff staff : staffList){
            staffIdList.add(staff.getId());
        }
        List<SmsWorkloadRecord> workloadRecordList;
        if(staffIdList.isEmpty()){
            //当部门没有员工
            workloadRecordList = new ArrayList<>();
        }else{
            //根据staffIds、date、type为0，查找工作记录表中的记录，并求和(注：先查找type为0  个人的)
            SmsWorkloadRecordExample workloadRecordExample = new SmsWorkloadRecordExample();
            workloadRecordExample.createCriteria().andStatusEqualTo(1)
                    .andStaffIdIn(staffIdList)
                    .andDateBetween(getBeginDate(date),getEndDate(date))
                    .andTypeEqualTo(0);
            workloadRecordList = smsWorkloadRecordMapper.selectByExample(workloadRecordExample);
        }
        SmsWorkloadRecord workloadRecordSum = addAll(workloadRecordList);

        //数据封装成result
        SmsWorkloadResult result = new SmsWorkloadResult();
        BeanUtils.copyProperties(workloadRecordSum,result);
        result.setWorkloadId(null);
        result.setCreateTime(new Date());
        result.setDate(date);
        SmsDept dept = smsDeptMapper.selectByPrimaryKey(deptId);
        if(dept == null){
            return null;
        }
        result.setDeptName(dept.getName());
        result.setStatus(1);
        result.setType(1);
        result.setDeptId(dept.getId());

        return result;
    }

    //某个科室工作量时间段查询
    @Override
    public SmsWorkloadResult queryDeptWorkloadPeriod(Long deptId,Date startDatetime,Date endDatetime){
        //今日之前的，使用between,并累加
        SmsWorkloadRecordExample workloadRecordExample = new SmsWorkloadRecordExample();
        workloadRecordExample.createCriteria().andStatusEqualTo(1)
                .andTypeEqualTo(1)
                .andDeptIdEqualTo(deptId)
                .andDateBetween(getBeginDate(startDatetime),getBeginDate(endDatetime));
        List<SmsWorkloadRecord> workloadRecordList = smsWorkloadRecordMapper.selectByExample(workloadRecordExample);
        SmsWorkloadRecord workloadRecordSum = addAll(workloadRecordList);

        //封装result
        SmsWorkloadResult result = new SmsWorkloadResult();
        BeanUtils.copyProperties(workloadRecordSum,result);
        result.setWorkloadId(null);
        result.setCreateTime(new Date());
        result.setDate(null);
        SmsDept dept = smsDeptMapper.selectByPrimaryKey(deptId);
        if(dept == null){
            return null;
        }
        result.setDeptName(dept.getName());
        result.setStatus(1);
        result.setType(1);
        result.setDeptId(dept.getId());

        return result;
    }

    //所有科室工作量时间段统计
    @Override
    public List<SmsWorkloadResult> queryDeptWorkloadList(Date startDatetime,Date endDatetime){
        //在科室表中查询List<科室(Id,name)>遍历
        SmsDeptExample deptExample = new SmsDeptExample();
        deptExample.createCriteria().andStatusEqualTo(1);
        List<SmsDept> deptList = smsDeptMapper.selectByExample(deptExample);
        Map<Long, String> deptMap = new Hashtable<>();
        for(SmsDept dept : deptList){
            deptMap.put(dept.getId(),dept.getName());
        }

        //对每个科室Id调用科室工作量时间段统计(queryDeptWorkloadPeriod)
        List<SmsWorkloadResult> resultList = new ArrayList<>();
        for(Long key : deptMap.keySet()){
            resultList.add(queryDeptWorkloadPeriod(key,startDatetime,endDatetime));
        }

        return resultList;
    }

    //查询某个科室所有员工工作量时间段统计
    @Override
    public List<SmsWorkloadResult> queryDeptPersonalWorkloadList(Long deptId, Date startDatetime,Date endDatetime){
        //根据科室id查询List<员工(id，name)>
        SmsStaffExample staffExample = new SmsStaffExample();
        staffExample.createCriteria().andDeptIdEqualTo(deptId).andStatusEqualTo(1);
        List<SmsStaff> staffList = smsStaffMapper.selectByExample(staffExample);
        List<Long> staffIdList = new ArrayList<>();
        for(SmsStaff staff : staffList){
            staffIdList.add(staff.getId());
        }

        //遍历 调用个人工作量时间段查询
        List<SmsWorkloadResult> resultList = new ArrayList<>();
        for(Long id : staffIdList){
            SmsWorkloadResult result = queryPersonalWorkloadPeriod(id,startDatetime,endDatetime);
            resultList.add(result);
        }

        return resultList;
    }

    //工作量插入
    @Override
    public int insertWorkload(SmsWorkloadResult smsWorkLoadResult){
        //数据封装
        SmsWorkloadRecord record = new SmsWorkloadRecord();
        BeanUtils.copyProperties(smsWorkLoadResult,record);
        record.setId(null);
        record.setCreateTime(new Date());

        //结果插入统计表中
        return smsWorkloadRecordMapper.insertSelective(record);
    }

    //每日个人统计插入
    @Override
    public int dailyPersonalStatistic(Date date){
        SmsStaffExample staffExample = new SmsStaffExample();
        staffExample.createCriteria().andStatusEqualTo(1);
        List<SmsStaff> staffList = smsStaffMapper.selectByExample(staffExample);
        int countSum = 0;
        for(SmsStaff staff : staffList){
            SmsWorkloadResult result = workloadPersonalStatistic(staff.getId(),getEndDate(date));
            result.setDeptId(null);     //部门id设置为空
            countSum += insertWorkload(result);
        }

        return countSum;
    }

    //每日科室统计插入
    @Override
    public int dailyDeptStatistic(Date date){
        SmsDeptExample deptExample = new SmsDeptExample();
        deptExample.createCriteria().andStatusEqualTo(1);
        List<SmsDept> deptList = smsDeptMapper.selectByExample(deptExample);
        int countSum = 0;
        for(SmsDept dept : deptList){
            SmsWorkloadResult result = workloadDeptStatistic(dept.getId(),getEndDate(date));
            countSum += insertWorkload(result);
        }

        return countSum;
    }

    //每日统计插入
    @Override
    public int statistic(Date date){
        int countSum = 0;
        countSum += dailyPersonalStatistic(date);
        countSum += dailyDeptStatistic(date);
        return countSum;
    }

    //求和
    public SmsWorkloadRecord addAll(List<SmsWorkloadRecord> recordList){
        SmsWorkloadRecord resultRecord = new SmsWorkloadRecord();

        resultRecord.setMedicineAmount(new BigDecimal(0));
        resultRecord.setHerbalAmount(new BigDecimal(0));
        resultRecord.setCheckAmount(new BigDecimal(0));
        resultRecord.setTestAmount(new BigDecimal(0));
        resultRecord.setDispositionAmount(new BigDecimal(0));
        resultRecord.setRegistrationAmount(new BigDecimal(0));
        resultRecord.setAmount(new BigDecimal(0));

        resultRecord.setRegistrationNum(new Long(0));
        resultRecord.setExcuteCheckAmount(new BigDecimal(0));
        resultRecord.setExcuteTestAmount(new BigDecimal(0));
        resultRecord.setExcuteDispositionAmount(new BigDecimal(0));
        resultRecord.setExcuteNum(new Long(0));
        for(SmsWorkloadRecord record : recordList){
            resultRecord.setMedicineAmount(resultRecord.getMedicineAmount().add(record.getMedicineAmount()));
            resultRecord.setHerbalAmount(resultRecord.getHerbalAmount().add(record.getHerbalAmount()));
            resultRecord.setCheckAmount(resultRecord.getCheckAmount().add(record.getCheckAmount()));
            resultRecord.setTestAmount(resultRecord.getTestAmount().add(record.getTestAmount()));
            resultRecord.setDispositionAmount(resultRecord.getDispositionAmount().add(record.getDispositionAmount()));
            resultRecord.setRegistrationAmount(resultRecord.getRegistrationAmount().add(record.getRegistrationAmount()));
            resultRecord.setAmount(resultRecord.getAmount().add(record.getAmount()));

            resultRecord.setRegistrationNum(resultRecord.getRegistrationNum() + record.getRegistrationNum());
            resultRecord.setExcuteCheckAmount(resultRecord.getExcuteCheckAmount().add(record.getExcuteCheckAmount()));
            resultRecord.setExcuteTestAmount(resultRecord.getExcuteTestAmount().add(record.getExcuteTestAmount()));
            resultRecord.setExcuteDispositionAmount(resultRecord.getExcuteDispositionAmount().add(record.getExcuteDispositionAmount()));
            resultRecord.setExcuteNum(resultRecord.getExcuteNum() + record.getExcuteNum());
        }
        return resultRecord;
    }

    //获取给定时间的零点
    public Date getBeginDate(Date date){
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        // 设置时分秒毫秒为0:0:0.0
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        return calendar.getTime();
    }

    //获取给定时间的最后时间
    public Date getEndDate(Date date){
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        // 设置时分秒毫秒为23:59:59.0
        calendar.set(Calendar.HOUR_OF_DAY, 23);
        calendar.set(Calendar.MINUTE, 59);
        calendar.set(Calendar.SECOND, 59);
        calendar.set(Calendar.MILLISECOND, 0);
        return calendar.getTime();
    }

//    //定时任务测试
//    public int timeTest(){
//        Date date = new Date();
//        System.out.println("正在执行定时任务，当前时间" + date);
//        return 0;
//    }

//    public static void main(String[] args){
//        BigDecimal a = new BigDecimal(0);
//        System.out.println("1:" + a.toString());
//        a = a.add(new BigDecimal(10));
//        a.
//        System.out.println("2:" + a.toString());
//    }

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/model/DmsHerbalItemRecordExample.java<|end_filename|>
package com.neu.his.cloud.service.dms.model;

import java.util.ArrayList;
import java.util.List;

public class DmsHerbalItemRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsHerbalItemRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdIsNull() {
            addCriterion("prescription_id is null");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdIsNotNull() {
            addCriterion("prescription_id is not null");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdEqualTo(Long value) {
            addCriterion("prescription_id =", value, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdNotEqualTo(Long value) {
            addCriterion("prescription_id <>", value, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdGreaterThan(Long value) {
            addCriterion("prescription_id >", value, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdGreaterThanOrEqualTo(Long value) {
            addCriterion("prescription_id >=", value, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdLessThan(Long value) {
            addCriterion("prescription_id <", value, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdLessThanOrEqualTo(Long value) {
            addCriterion("prescription_id <=", value, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdIn(List<Long> values) {
            addCriterion("prescription_id in", values, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdNotIn(List<Long> values) {
            addCriterion("prescription_id not in", values, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdBetween(Long value1, Long value2) {
            addCriterion("prescription_id between", value1, value2, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andPrescriptionIdNotBetween(Long value1, Long value2) {
            addCriterion("prescription_id not between", value1, value2, "prescriptionId");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceIsNull() {
            addCriterion("medical_advice is null");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceIsNotNull() {
            addCriterion("medical_advice is not null");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceEqualTo(String value) {
            addCriterion("medical_advice =", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceNotEqualTo(String value) {
            addCriterion("medical_advice <>", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceGreaterThan(String value) {
            addCriterion("medical_advice >", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceGreaterThanOrEqualTo(String value) {
            addCriterion("medical_advice >=", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceLessThan(String value) {
            addCriterion("medical_advice <", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceLessThanOrEqualTo(String value) {
            addCriterion("medical_advice <=", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceLike(String value) {
            addCriterion("medical_advice like", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceNotLike(String value) {
            addCriterion("medical_advice not like", value, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceIn(List<String> values) {
            addCriterion("medical_advice in", values, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceNotIn(List<String> values) {
            addCriterion("medical_advice not in", values, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceBetween(String value1, String value2) {
            addCriterion("medical_advice between", value1, value2, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andMedicalAdviceNotBetween(String value1, String value2) {
            addCriterion("medical_advice not between", value1, value2, "medicalAdvice");
            return (Criteria) this;
        }

        public Criteria andFootnoteIsNull() {
            addCriterion("footnote is null");
            return (Criteria) this;
        }

        public Criteria andFootnoteIsNotNull() {
            addCriterion("footnote is not null");
            return (Criteria) this;
        }

        public Criteria andFootnoteEqualTo(String value) {
            addCriterion("footnote =", value, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteNotEqualTo(String value) {
            addCriterion("footnote <>", value, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteGreaterThan(String value) {
            addCriterion("footnote >", value, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteGreaterThanOrEqualTo(String value) {
            addCriterion("footnote >=", value, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteLessThan(String value) {
            addCriterion("footnote <", value, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteLessThanOrEqualTo(String value) {
            addCriterion("footnote <=", value, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteLike(String value) {
            addCriterion("footnote like", value, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteNotLike(String value) {
            addCriterion("footnote not like", value, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteIn(List<String> values) {
            addCriterion("footnote in", values, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteNotIn(List<String> values) {
            addCriterion("footnote not in", values, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteBetween(String value1, String value2) {
            addCriterion("footnote between", value1, value2, "footnote");
            return (Criteria) this;
        }

        public Criteria andFootnoteNotBetween(String value1, String value2) {
            addCriterion("footnote not between", value1, value2, "footnote");
            return (Criteria) this;
        }

        public Criteria andDrugIdIsNull() {
            addCriterion("drug_id is null");
            return (Criteria) this;
        }

        public Criteria andDrugIdIsNotNull() {
            addCriterion("drug_id is not null");
            return (Criteria) this;
        }

        public Criteria andDrugIdEqualTo(Long value) {
            addCriterion("drug_id =", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotEqualTo(Long value) {
            addCriterion("drug_id <>", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdGreaterThan(Long value) {
            addCriterion("drug_id >", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdGreaterThanOrEqualTo(Long value) {
            addCriterion("drug_id >=", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdLessThan(Long value) {
            addCriterion("drug_id <", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdLessThanOrEqualTo(Long value) {
            addCriterion("drug_id <=", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdIn(List<Long> values) {
            addCriterion("drug_id in", values, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotIn(List<Long> values) {
            addCriterion("drug_id not in", values, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdBetween(Long value1, Long value2) {
            addCriterion("drug_id between", value1, value2, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotBetween(Long value1, Long value2) {
            addCriterion("drug_id not between", value1, value2, "drugId");
            return (Criteria) this;
        }

        public Criteria andUsageNumIsNull() {
            addCriterion("usage_num is null");
            return (Criteria) this;
        }

        public Criteria andUsageNumIsNotNull() {
            addCriterion("usage_num is not null");
            return (Criteria) this;
        }

        public Criteria andUsageNumEqualTo(Long value) {
            addCriterion("usage_num =", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumNotEqualTo(Long value) {
            addCriterion("usage_num <>", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumGreaterThan(Long value) {
            addCriterion("usage_num >", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumGreaterThanOrEqualTo(Long value) {
            addCriterion("usage_num >=", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumLessThan(Long value) {
            addCriterion("usage_num <", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumLessThanOrEqualTo(Long value) {
            addCriterion("usage_num <=", value, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumIn(List<Long> values) {
            addCriterion("usage_num in", values, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumNotIn(List<Long> values) {
            addCriterion("usage_num not in", values, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumBetween(Long value1, Long value2) {
            addCriterion("usage_num between", value1, value2, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumNotBetween(Long value1, Long value2) {
            addCriterion("usage_num not between", value1, value2, "usageNum");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitIsNull() {
            addCriterion("usage_num_unit is null");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitIsNotNull() {
            addCriterion("usage_num_unit is not null");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitEqualTo(Integer value) {
            addCriterion("usage_num_unit =", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitNotEqualTo(Integer value) {
            addCriterion("usage_num_unit <>", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitGreaterThan(Integer value) {
            addCriterion("usage_num_unit >", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitGreaterThanOrEqualTo(Integer value) {
            addCriterion("usage_num_unit >=", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitLessThan(Integer value) {
            addCriterion("usage_num_unit <", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitLessThanOrEqualTo(Integer value) {
            addCriterion("usage_num_unit <=", value, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitIn(List<Integer> values) {
            addCriterion("usage_num_unit in", values, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitNotIn(List<Integer> values) {
            addCriterion("usage_num_unit not in", values, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitBetween(Integer value1, Integer value2) {
            addCriterion("usage_num_unit between", value1, value2, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andUsageNumUnitNotBetween(Integer value1, Integer value2) {
            addCriterion("usage_num_unit not between", value1, value2, "usageNumUnit");
            return (Criteria) this;
        }

        public Criteria andTotalNumIsNull() {
            addCriterion("total_num is null");
            return (Criteria) this;
        }

        public Criteria andTotalNumIsNotNull() {
            addCriterion("total_num is not null");
            return (Criteria) this;
        }

        public Criteria andTotalNumEqualTo(Long value) {
            addCriterion("total_num =", value, "totalNum");
            return (Criteria) this;
        }

        public Criteria andTotalNumNotEqualTo(Long value) {
            addCriterion("total_num <>", value, "totalNum");
            return (Criteria) this;
        }

        public Criteria andTotalNumGreaterThan(Long value) {
            addCriterion("total_num >", value, "totalNum");
            return (Criteria) this;
        }

        public Criteria andTotalNumGreaterThanOrEqualTo(Long value) {
            addCriterion("total_num >=", value, "totalNum");
            return (Criteria) this;
        }

        public Criteria andTotalNumLessThan(Long value) {
            addCriterion("total_num <", value, "totalNum");
            return (Criteria) this;
        }

        public Criteria andTotalNumLessThanOrEqualTo(Long value) {
            addCriterion("total_num <=", value, "totalNum");
            return (Criteria) this;
        }

        public Criteria andTotalNumIn(List<Long> values) {
            addCriterion("total_num in", values, "totalNum");
            return (Criteria) this;
        }

        public Criteria andTotalNumNotIn(List<Long> values) {
            addCriterion("total_num not in", values, "totalNum");
            return (Criteria) this;
        }

        public Criteria andTotalNumBetween(Long value1, Long value2) {
            addCriterion("total_num between", value1, value2, "totalNum");
            return (Criteria) this;
        }

        public Criteria andTotalNumNotBetween(Long value1, Long value2) {
            addCriterion("total_num not between", value1, value2, "totalNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumIsNull() {
            addCriterion("current_num is null");
            return (Criteria) this;
        }

        public Criteria andCurrentNumIsNotNull() {
            addCriterion("current_num is not null");
            return (Criteria) this;
        }

        public Criteria andCurrentNumEqualTo(Long value) {
            addCriterion("current_num =", value, "currentNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumNotEqualTo(Long value) {
            addCriterion("current_num <>", value, "currentNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumGreaterThan(Long value) {
            addCriterion("current_num >", value, "currentNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumGreaterThanOrEqualTo(Long value) {
            addCriterion("current_num >=", value, "currentNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumLessThan(Long value) {
            addCriterion("current_num <", value, "currentNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumLessThanOrEqualTo(Long value) {
            addCriterion("current_num <=", value, "currentNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumIn(List<Long> values) {
            addCriterion("current_num in", values, "currentNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumNotIn(List<Long> values) {
            addCriterion("current_num not in", values, "currentNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumBetween(Long value1, Long value2) {
            addCriterion("current_num between", value1, value2, "currentNum");
            return (Criteria) this;
        }

        public Criteria andCurrentNumNotBetween(Long value1, Long value2) {
            addCriterion("current_num not between", value1, value2, "currentNum");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/model/EsDrug.java<|end_filename|>
package com.neu.his.dms.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 搜索中的商品信息
 * Created by wang on 2019/6/19.
 */
@Setter
@Getter
@ToString
@Document(indexName = "drug", type = "allDrug",shards = 1,replicas = 0)
public class EsDrug implements Serializable {
    private static final long serialVersionUID = -1L;
    @Id
    private Long id;
    @Field(type = FieldType.Keyword)
    private String code;//药品编码
    @Field(type = FieldType.Keyword)
    private String name;//药品名
    private String format;//药品规格
    private BigDecimal price;//药品单价
    private String unit;//包装单位
    @Field(analyzer = "ik_max_word",type = FieldType.Text)
    private String manufacturer;//生产厂家
    private Long dosageId;//药品剂型
    private Long typeId;//药品类型
    private String mnemonicCode;//拼音助记码
    private Date createDate;//创建时间
    private Long stock;//库存
    @Field(type = FieldType.Keyword)
    private String genericName;//通用名
    private Integer status;//状态
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/model/SmsDescriptionExample.java<|end_filename|>
package com.neu.his.cloud.service.sms.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class SmsDescriptionExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SmsDescriptionExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andDescriptionIsNull() {
            addCriterion("description is null");
            return (Criteria) this;
        }

        public Criteria andDescriptionIsNotNull() {
            addCriterion("description is not null");
            return (Criteria) this;
        }

        public Criteria andDescriptionEqualTo(String value) {
            addCriterion("description =", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotEqualTo(String value) {
            addCriterion("description <>", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionGreaterThan(String value) {
            addCriterion("description >", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
            addCriterion("description >=", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionLessThan(String value) {
            addCriterion("description <", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionLessThanOrEqualTo(String value) {
            addCriterion("description <=", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionLike(String value) {
            addCriterion("description like", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotLike(String value) {
            addCriterion("description not like", value, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionIn(List<String> values) {
            addCriterion("description in", values, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotIn(List<String> values) {
            addCriterion("description not in", values, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionBetween(String value1, String value2) {
            addCriterion("description between", value1, value2, "description");
            return (Criteria) this;
        }

        public Criteria andDescriptionNotBetween(String value1, String value2) {
            addCriterion("description not between", value1, value2, "description");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(Integer value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(Integer value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(Integer value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(Integer value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(Integer value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<Integer> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<Integer> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(Integer value1, Integer value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andUrlIsNull() {
            addCriterion("url is null");
            return (Criteria) this;
        }

        public Criteria andUrlIsNotNull() {
            addCriterion("url is not null");
            return (Criteria) this;
        }

        public Criteria andUrlEqualTo(String value) {
            addCriterion("url =", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotEqualTo(String value) {
            addCriterion("url <>", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlGreaterThan(String value) {
            addCriterion("url >", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlGreaterThanOrEqualTo(String value) {
            addCriterion("url >=", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlLessThan(String value) {
            addCriterion("url <", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlLessThanOrEqualTo(String value) {
            addCriterion("url <=", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlLike(String value) {
            addCriterion("url like", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotLike(String value) {
            addCriterion("url not like", value, "url");
            return (Criteria) this;
        }

        public Criteria andUrlIn(List<String> values) {
            addCriterion("url in", values, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotIn(List<String> values) {
            addCriterion("url not in", values, "url");
            return (Criteria) this;
        }

        public Criteria andUrlBetween(String value1, String value2) {
            addCriterion("url between", value1, value2, "url");
            return (Criteria) this;
        }

        public Criteria andUrlNotBetween(String value1, String value2) {
            addCriterion("url not between", value1, value2, "url");
            return (Criteria) this;
        }

        public Criteria andTheIdIsNull() {
            addCriterion("the_id is null");
            return (Criteria) this;
        }

        public Criteria andTheIdIsNotNull() {
            addCriterion("the_id is not null");
            return (Criteria) this;
        }

        public Criteria andTheIdEqualTo(Long value) {
            addCriterion("the_id =", value, "theId");
            return (Criteria) this;
        }

        public Criteria andTheIdNotEqualTo(Long value) {
            addCriterion("the_id <>", value, "theId");
            return (Criteria) this;
        }

        public Criteria andTheIdGreaterThan(Long value) {
            addCriterion("the_id >", value, "theId");
            return (Criteria) this;
        }

        public Criteria andTheIdGreaterThanOrEqualTo(Long value) {
            addCriterion("the_id >=", value, "theId");
            return (Criteria) this;
        }

        public Criteria andTheIdLessThan(Long value) {
            addCriterion("the_id <", value, "theId");
            return (Criteria) this;
        }

        public Criteria andTheIdLessThanOrEqualTo(Long value) {
            addCriterion("the_id <=", value, "theId");
            return (Criteria) this;
        }

        public Criteria andTheIdIn(List<Long> values) {
            addCriterion("the_id in", values, "theId");
            return (Criteria) this;
        }

        public Criteria andTheIdNotIn(List<Long> values) {
            addCriterion("the_id not in", values, "theId");
            return (Criteria) this;
        }

        public Criteria andTheIdBetween(Long value1, Long value2) {
            addCriterion("the_id between", value1, value2, "theId");
            return (Criteria) this;
        }

        public Criteria andTheIdNotBetween(Long value1, Long value2) {
            addCriterion("the_id not between", value1, value2, "theId");
            return (Criteria) this;
        }

        public Criteria andStarIsNull() {
            addCriterion("star is null");
            return (Criteria) this;
        }

        public Criteria andStarIsNotNull() {
            addCriterion("star is not null");
            return (Criteria) this;
        }

        public Criteria andStarEqualTo(BigDecimal value) {
            addCriterion("star =", value, "star");
            return (Criteria) this;
        }

        public Criteria andStarNotEqualTo(BigDecimal value) {
            addCriterion("star <>", value, "star");
            return (Criteria) this;
        }

        public Criteria andStarGreaterThan(BigDecimal value) {
            addCriterion("star >", value, "star");
            return (Criteria) this;
        }

        public Criteria andStarGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("star >=", value, "star");
            return (Criteria) this;
        }

        public Criteria andStarLessThan(BigDecimal value) {
            addCriterion("star <", value, "star");
            return (Criteria) this;
        }

        public Criteria andStarLessThanOrEqualTo(BigDecimal value) {
            addCriterion("star <=", value, "star");
            return (Criteria) this;
        }

        public Criteria andStarIn(List<BigDecimal> values) {
            addCriterion("star in", values, "star");
            return (Criteria) this;
        }

        public Criteria andStarNotIn(List<BigDecimal> values) {
            addCriterion("star not in", values, "star");
            return (Criteria) this;
        }

        public Criteria andStarBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("star between", value1, value2, "star");
            return (Criteria) this;
        }

        public Criteria andStarNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("star not between", value1, value2, "star");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/bms/BmsInvoiceController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.bms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsInvoiceResult;
import com.neu.his.cloud.api.pc.service.bms.BmsInvoiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "BmsInvoiceController", description = "发票管理")
@RequestMapping("/invoice")
@CrossOrigin(allowCredentials = "true")
public class BmsInvoiceController {
    @Autowired
    BmsInvoiceService bmsInvoiceService;

    @ApiOperation(value = "补打发票")
    @RequestMapping(value = "/supplementPrintInvoice", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult supplementPrintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("registrationId") Long registrationId){
        return bmsInvoiceService.supplementPrintInvoice(newInvoiceNo, registrationId);
    }

    @ApiOperation(value = "重打发票")
    @RequestMapping(value = "/reprintInvoice", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult  reprintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("oldInvoiceNo") Long oldInvoiceNo){
        return bmsInvoiceService.reprintInvoice(newInvoiceNo, oldInvoiceNo);
    }

    @ApiOperation(value = "根据时间和收费员Id查询发票信息")
    @RequestMapping(value = "/queryInvoiceInfo", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfo(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime")String startDatetime, @RequestParam("endDatetime")String endDatetime){
        return bmsInvoiceService.queryInvoiceInfo(cashierId, startDatetime, endDatetime);
    }

    @ApiOperation(value = "根据日结记录Id查询发票信息")
    @RequestMapping(value = "/queryInvoiceInfoBySettleId", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfoBySettleId(@RequestParam("settleRecordId") Long settleRecordId){
        return bmsInvoiceService.queryInvoiceInfoBySettleId(settleRecordId);
    }
}


<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/model/PmsPatient.java<|end_filename|>
package com.neu.his.mbg.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

public class PmsPatient implements Serializable {
    private Long id;

    private String name;

    private Date dateOfBirth;

    private String identificationNo;

    private String homeAddress;

    private String phoneNo;

    private Integer gender;

    private String medicalRecordNo;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getDateOfBirth() {
        return dateOfBirth;
    }

    public void setDateOfBirth(Date dateOfBirth) {
        this.dateOfBirth = dateOfBirth;
    }

    public String getIdentificationNo() {
        return identificationNo;
    }

    public void setIdentificationNo(String identificationNo) {
        this.identificationNo = identificationNo;
    }

    public String getHomeAddress() {
        return homeAddress;
    }

    public void setHomeAddress(String homeAddress) {
        this.homeAddress = homeAddress;
    }

    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getMedicalRecordNo() {
        return medicalRecordNo;
    }

    public void setMedicalRecordNo(String medicalRecordNo) {
        this.medicalRecordNo = medicalRecordNo;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", dateOfBirth=").append(dateOfBirth);
        sb.append(", identificationNo=").append(identificationNo);
        sb.append(", homeAddress=").append(homeAddress);
        sb.append(", phoneNo=").append(phoneNo);
        sb.append(", gender=").append(gender);
        sb.append(", medicalRecordNo=").append(medicalRecordNo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/EsDrugServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;

import com.neu.his.dms.model.EsDrug;
import com.neu.his.dms.model.EsDrugRepository;
import com.neu.his.dms.service.EsDrugService;
import com.neu.his.mbg.mapper.DmsDrugMapper;
import com.neu.his.mbg.model.DmsDrug;
import com.neu.his.mbg.model.DmsDrugExample;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

@Service
public class EsDrugServiceImpl implements EsDrugService {
    private static final Logger LOGGER = LoggerFactory.getLogger(EsDrugServiceImpl.class);
    @Autowired
    private DmsDrugMapper dmsDrugMapper;
    @Autowired
    private EsDrugRepository drugRepository;
    @Autowired
    private ElasticsearchTemplate elasticsearchTemplate;
    @Override
    public int importAll() {
        DmsDrugExample dmsDrugExample = new DmsDrugExample();
        dmsDrugExample.createCriteria().andStatusNotEqualTo(0);
        List<DmsDrug> dmsDrugList = dmsDrugMapper.selectByExample(dmsDrugExample);
        List<EsDrug> esDrugList = new ArrayList<>();
        for (DmsDrug dmsDrug : dmsDrugList){
            EsDrug esDrug = new EsDrug();
            BeanUtils.copyProperties(dmsDrug,esDrug);
            esDrugList.add(esDrug);
        }
        Iterable<EsDrug> esDrugIterable = drugRepository.saveAll(esDrugList);
        Iterator<EsDrug> iterator = esDrugIterable.iterator();
        int result = 0;
        while (iterator.hasNext()) {
            result++;
            iterator.next();
        }
        return result;
    }

    @Override
    public void delete(Long id) {
        drugRepository.deleteById(id);
    }

    @Override
    public EsDrug create(Long id) {
        EsDrug result = null;
        DmsDrug dmsDrug = dmsDrugMapper.selectByPrimaryKey(id);
        if (dmsDrug != null){
            EsDrug esDrug = new EsDrug();
            BeanUtils.copyProperties(dmsDrug,esDrug);
            result = drugRepository.save(esDrug);
        }
        return result;
    }

    @Override
    public void delete(List<Long> ids) {
        if (!CollectionUtils.isEmpty(ids)) {
            List<EsDrug> esDrugList = new ArrayList<>();
            for (Long id : ids){
                EsDrug esDrug = new EsDrug();
                esDrug.setId(id);
                esDrugList.add(esDrug);
            }
            drugRepository.deleteAll(esDrugList);
        }
    }

    @Override
    public Page<EsDrug> search(String keyword, Integer pageNum, Integer pageSize) {
        Pageable pageable = PageRequest.of(pageNum, pageSize);
        //return drugRepository.findByNameOrCodeOrManufacturerOrGenericName(keyword, keyword, keyword, keyword, pageable);
        return drugRepository.findByNameOrCodeOrGenericName(keyword,keyword,keyword,pageable);
    }

    @Override
    public Page<EsDrug> searchFuzzy(String keyword, Integer pageNum, Integer pageSize) {
        Pageable pageable = PageRequest.of(pageNum,pageSize);

        return drugRepository.findByNameContainsOrMnemonicCodeContainsOrGenericNameContains(keyword,keyword,keyword,pageable);
    }
}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/dms/DmsCaseHistoryResult.java<|end_filename|>
package com.neu.his.common.dto.dms;

import com.neu.his.mbg.model.DmsCaseHistory;
import io.swagger.annotations.ApiModelProperty;
import javafx.scene.chart.ValueAxis;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
public class DmsCaseHistoryResult  implements Serializable {
    @ApiModelProperty(value = "历史病历列表")
    List<DmsCaseHistory> dmsCaseHistoryList;
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/DemoService.java<|end_filename|>
package com.neu.his.cloud.service.bms.service;


public interface DemoService {

    public void test();
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/model/DmsDrugRefundItemRecordExample.java<|end_filename|>
package com.neu.his.cloud.service.dms.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DmsDrugRefundItemRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsDrugRefundItemRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(Integer value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(Integer value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(Integer value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(Integer value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(Integer value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<Integer> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<Integer> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(Integer value1, Integer value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNull() {
            addCriterion("registration_id is null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNotNull() {
            addCriterion("registration_id is not null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdEqualTo(Long value) {
            addCriterion("registration_id =", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotEqualTo(Long value) {
            addCriterion("registration_id <>", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThan(Long value) {
            addCriterion("registration_id >", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThanOrEqualTo(Long value) {
            addCriterion("registration_id >=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThan(Long value) {
            addCriterion("registration_id <", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThanOrEqualTo(Long value) {
            addCriterion("registration_id <=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIn(List<Long> values) {
            addCriterion("registration_id in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotIn(List<Long> values) {
            addCriterion("registration_id not in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdBetween(Long value1, Long value2) {
            addCriterion("registration_id between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotBetween(Long value1, Long value2) {
            addCriterion("registration_id not between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andDrugIdIsNull() {
            addCriterion("drug_id is null");
            return (Criteria) this;
        }

        public Criteria andDrugIdIsNotNull() {
            addCriterion("drug_id is not null");
            return (Criteria) this;
        }

        public Criteria andDrugIdEqualTo(Long value) {
            addCriterion("drug_id =", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotEqualTo(Long value) {
            addCriterion("drug_id <>", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdGreaterThan(Long value) {
            addCriterion("drug_id >", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdGreaterThanOrEqualTo(Long value) {
            addCriterion("drug_id >=", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdLessThan(Long value) {
            addCriterion("drug_id <", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdLessThanOrEqualTo(Long value) {
            addCriterion("drug_id <=", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdIn(List<Long> values) {
            addCriterion("drug_id in", values, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotIn(List<Long> values) {
            addCriterion("drug_id not in", values, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdBetween(Long value1, Long value2) {
            addCriterion("drug_id between", value1, value2, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotBetween(Long value1, Long value2) {
            addCriterion("drug_id not between", value1, value2, "drugId");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitIsNull() {
            addCriterion("refund_num_unit is null");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitIsNotNull() {
            addCriterion("refund_num_unit is not null");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitEqualTo(Integer value) {
            addCriterion("refund_num_unit =", value, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitNotEqualTo(Integer value) {
            addCriterion("refund_num_unit <>", value, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitGreaterThan(Integer value) {
            addCriterion("refund_num_unit >", value, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitGreaterThanOrEqualTo(Integer value) {
            addCriterion("refund_num_unit >=", value, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitLessThan(Integer value) {
            addCriterion("refund_num_unit <", value, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitLessThanOrEqualTo(Integer value) {
            addCriterion("refund_num_unit <=", value, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitIn(List<Integer> values) {
            addCriterion("refund_num_unit in", values, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitNotIn(List<Integer> values) {
            addCriterion("refund_num_unit not in", values, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitBetween(Integer value1, Integer value2) {
            addCriterion("refund_num_unit between", value1, value2, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumUnitNotBetween(Integer value1, Integer value2) {
            addCriterion("refund_num_unit not between", value1, value2, "refundNumUnit");
            return (Criteria) this;
        }

        public Criteria andRefundNumIsNull() {
            addCriterion("refund_num is null");
            return (Criteria) this;
        }

        public Criteria andRefundNumIsNotNull() {
            addCriterion("refund_num is not null");
            return (Criteria) this;
        }

        public Criteria andRefundNumEqualTo(Long value) {
            addCriterion("refund_num =", value, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundNumNotEqualTo(Long value) {
            addCriterion("refund_num <>", value, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundNumGreaterThan(Long value) {
            addCriterion("refund_num >", value, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundNumGreaterThanOrEqualTo(Long value) {
            addCriterion("refund_num >=", value, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundNumLessThan(Long value) {
            addCriterion("refund_num <", value, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundNumLessThanOrEqualTo(Long value) {
            addCriterion("refund_num <=", value, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundNumIn(List<Long> values) {
            addCriterion("refund_num in", values, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundNumNotIn(List<Long> values) {
            addCriterion("refund_num not in", values, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundNumBetween(Long value1, Long value2) {
            addCriterion("refund_num between", value1, value2, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundNumNotBetween(Long value1, Long value2) {
            addCriterion("refund_num not between", value1, value2, "refundNum");
            return (Criteria) this;
        }

        public Criteria andRefundTimeIsNull() {
            addCriterion("refund_time is null");
            return (Criteria) this;
        }

        public Criteria andRefundTimeIsNotNull() {
            addCriterion("refund_time is not null");
            return (Criteria) this;
        }

        public Criteria andRefundTimeEqualTo(Date value) {
            addCriterion("refund_time =", value, "refundTime");
            return (Criteria) this;
        }

        public Criteria andRefundTimeNotEqualTo(Date value) {
            addCriterion("refund_time <>", value, "refundTime");
            return (Criteria) this;
        }

        public Criteria andRefundTimeGreaterThan(Date value) {
            addCriterion("refund_time >", value, "refundTime");
            return (Criteria) this;
        }

        public Criteria andRefundTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("refund_time >=", value, "refundTime");
            return (Criteria) this;
        }

        public Criteria andRefundTimeLessThan(Date value) {
            addCriterion("refund_time <", value, "refundTime");
            return (Criteria) this;
        }

        public Criteria andRefundTimeLessThanOrEqualTo(Date value) {
            addCriterion("refund_time <=", value, "refundTime");
            return (Criteria) this;
        }

        public Criteria andRefundTimeIn(List<Date> values) {
            addCriterion("refund_time in", values, "refundTime");
            return (Criteria) this;
        }

        public Criteria andRefundTimeNotIn(List<Date> values) {
            addCriterion("refund_time not in", values, "refundTime");
            return (Criteria) this;
        }

        public Criteria andRefundTimeBetween(Date value1, Date value2) {
            addCriterion("refund_time between", value1, value2, "refundTime");
            return (Criteria) this;
        }

        public Criteria andRefundTimeNotBetween(Date value1, Date value2) {
            addCriterion("refund_time not between", value1, value2, "refundTime");
            return (Criteria) this;
        }

        public Criteria andExcutorIdIsNull() {
            addCriterion("excutor_id is null");
            return (Criteria) this;
        }

        public Criteria andExcutorIdIsNotNull() {
            addCriterion("excutor_id is not null");
            return (Criteria) this;
        }

        public Criteria andExcutorIdEqualTo(Long value) {
            addCriterion("excutor_id =", value, "excutorId");
            return (Criteria) this;
        }

        public Criteria andExcutorIdNotEqualTo(Long value) {
            addCriterion("excutor_id <>", value, "excutorId");
            return (Criteria) this;
        }

        public Criteria andExcutorIdGreaterThan(Long value) {
            addCriterion("excutor_id >", value, "excutorId");
            return (Criteria) this;
        }

        public Criteria andExcutorIdGreaterThanOrEqualTo(Long value) {
            addCriterion("excutor_id >=", value, "excutorId");
            return (Criteria) this;
        }

        public Criteria andExcutorIdLessThan(Long value) {
            addCriterion("excutor_id <", value, "excutorId");
            return (Criteria) this;
        }

        public Criteria andExcutorIdLessThanOrEqualTo(Long value) {
            addCriterion("excutor_id <=", value, "excutorId");
            return (Criteria) this;
        }

        public Criteria andExcutorIdIn(List<Long> values) {
            addCriterion("excutor_id in", values, "excutorId");
            return (Criteria) this;
        }

        public Criteria andExcutorIdNotIn(List<Long> values) {
            addCriterion("excutor_id not in", values, "excutorId");
            return (Criteria) this;
        }

        public Criteria andExcutorIdBetween(Long value1, Long value2) {
            addCriterion("excutor_id between", value1, value2, "excutorId");
            return (Criteria) this;
        }

        public Criteria andExcutorIdNotBetween(Long value1, Long value2) {
            addCriterion("excutor_id not between", value1, value2, "excutorId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdIsNull() {
            addCriterion("refund_item_record_id is null");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdIsNotNull() {
            addCriterion("refund_item_record_id is not null");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdEqualTo(Long value) {
            addCriterion("refund_item_record_id =", value, "refundItemRecordId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdNotEqualTo(Long value) {
            addCriterion("refund_item_record_id <>", value, "refundItemRecordId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdGreaterThan(Long value) {
            addCriterion("refund_item_record_id >", value, "refundItemRecordId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdGreaterThanOrEqualTo(Long value) {
            addCriterion("refund_item_record_id >=", value, "refundItemRecordId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdLessThan(Long value) {
            addCriterion("refund_item_record_id <", value, "refundItemRecordId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdLessThanOrEqualTo(Long value) {
            addCriterion("refund_item_record_id <=", value, "refundItemRecordId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdIn(List<Long> values) {
            addCriterion("refund_item_record_id in", values, "refundItemRecordId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdNotIn(List<Long> values) {
            addCriterion("refund_item_record_id not in", values, "refundItemRecordId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdBetween(Long value1, Long value2) {
            addCriterion("refund_item_record_id between", value1, value2, "refundItemRecordId");
            return (Criteria) this;
        }

        public Criteria andRefundItemRecordIdNotBetween(Long value1, Long value2) {
            addCriterion("refund_item_record_id not between", value1, value2, "refundItemRecordId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/sms/SmsWorkloadResult.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.sms;


import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
@ToString
public class SmsWorkloadResult  implements Serializable {
    @ApiModelProperty(value = "工作量记录id")
    Long workloadId;
    @ApiModelProperty(value = "创建时间")
    Date createTime;
    @ApiModelProperty(value = "统计哪天的工作量")
    Date date;
    @ApiModelProperty(value = "员工id")
    Long   staffId;
    @ApiModelProperty(value = "科室id")
    Long   deptId;
    @ApiModelProperty(value = "员工name")
   String   staffName;
    @ApiModelProperty(value = "科室name")
    String   deptName;

    @ApiModelProperty(value = "开立成药总钱数")
    BigDecimal medicineAmount;
    @ApiModelProperty(value = "开立草药总钱数")
    BigDecimal herbalAmount;
    @ApiModelProperty(value = "开立检查总钱数")
    BigDecimal checkAmount;
    @ApiModelProperty(value = "开立处置总钱数")
    BigDecimal  dispositionAmount;
    @ApiModelProperty(value = "挂号总钱数")
    BigDecimal  registrationAmount;
    @ApiModelProperty(value = "开立检验总钱数")
    BigDecimal  testAmount;
    @ApiModelProperty(value = "总钱数")
    BigDecimal  amount;

    @ApiModelProperty(value = "状态")
    Integer status;
    @ApiModelProperty(value = "挂号总数")
    Long registrationNum;
    @ApiModelProperty(value = "执行检查总钱数")
    BigDecimal excuteCheckAmount;
    @ApiModelProperty(value = "执行测验总钱数")
    BigDecimal excuteTestAmount;
    @ApiModelProperty(value = "执行处置总钱数")
    BigDecimal excuteDispositionAmount;
    @ApiModelProperty(value = "type : 0 个人 1 科室")
    Integer type;  //  dept_id
    @ApiModelProperty(value = "执行总人数")
    Long excuteNum;


}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/mapper/DmsMedicineItemRecordMapper.java<|end_filename|>
package com.neu.his.cloud.service.bms.mapper;

import com.neu.his.cloud.service.bms.model.DmsMedicineItemRecord;
import com.neu.his.cloud.service.bms.model.DmsMedicineItemRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsMedicineItemRecordMapper {
    int countByExample(DmsMedicineItemRecordExample example);

    int deleteByExample(DmsMedicineItemRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsMedicineItemRecord record);

    int insertSelective(DmsMedicineItemRecord record);

    List<DmsMedicineItemRecord> selectByExample(DmsMedicineItemRecordExample example);

    DmsMedicineItemRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsMedicineItemRecord record, @Param("example") DmsMedicineItemRecordExample example);

    int updateByExample(@Param("record") DmsMedicineItemRecord record, @Param("example") DmsMedicineItemRecordExample example);

    int updateByPrimaryKeySelective(DmsMedicineItemRecord record);

    int updateByPrimaryKey(DmsMedicineItemRecord record);
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/OssController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;



import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.oss.OssCallbackResult;
import com.neu.his.cloud.api.pc.dto.oss.OssPolicyResult;
import com.neu.his.cloud.api.pc.service.dms.OssService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Oss相关操作接口
 */
@RestController
@Api(tags = "OssController", description = "Oss管理")
@RequestMapping("/aliyun/oss")
public class OssController {
    @Autowired
    private OssService ossService;

    @ApiOperation(value = "oss上传签名生成")
    @RequestMapping(value = "/policy", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<OssPolicyResult> policy() {

        return ossService.policy();
    }

    @ApiOperation(value = "oss上传成功回调")
    @RequestMapping(value = "/callback", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<OssCallbackResult> callback(HttpServletRequest request) {
        return ossService.callback(request);
    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsCaseModelService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseModelCatalogNode;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseModelListResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseModelOrCatalogParam;
import com.neu.his.cloud.api.pc.model.DmsCaseModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsCaseModelService {

    @RequestMapping(value = "/DmsCaseModel/create", method = RequestMethod.POST)
    CommonResult createCatOrModel(@RequestBody DmsCaseModelOrCatalogParam dmsCaseModelOrCatalogParam);

    @RequestMapping(value = "/DmsCaseModel/listModelCatTree", method = RequestMethod.POST)
    CommonResult<List<DmsCaseModelCatalogNode>> listModelCatTree(@RequestParam Long ownId, @RequestParam Integer scope) ;

    @RequestMapping(value = "/DmsCaseModel/deleteModelOrCat", method = RequestMethod.POST)
    CommonResult deleteModelOrCat(@RequestParam("id") Long id);

    @RequestMapping(value = "/DmsCaseModel/updateModel", method = RequestMethod.POST)
    CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsCaseModel dmsCaseModel);

    @RequestMapping(value = "/DmsCaseModel/updateModel/{id}", method = RequestMethod.GET)
    CommonResult updateName(@PathVariable("id") Long id, @RequestParam("name")String name);

    @RequestMapping(value = "/DmsCaseModel/getModelDetail/{id}", method = RequestMethod.GET)
    CommonResult<DmsCaseModel> getModelDetail(@PathVariable("id") Long id);

    @RequestMapping(value = "/DmsCaseModel/getAllStaffModel", method = RequestMethod.GET)
    CommonResult<DmsCaseModelListResult> getAllStaffModel(@RequestParam("staffId") Long staffId);
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/mapper/DmsRegistrationMapper.java<|end_filename|>
package com.neu.his.cloud.service.bms.mapper;

import com.neu.his.cloud.service.bms.model.DmsRegistration;
import com.neu.his.cloud.service.bms.model.DmsRegistrationExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsRegistrationMapper {
    int countByExample(DmsRegistrationExample example);

    int deleteByExample(DmsRegistrationExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsRegistration record);

    int insertSelective(DmsRegistration record);

    List<DmsRegistration> selectByExample(DmsRegistrationExample example);

    DmsRegistration selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsRegistration record, @Param("example") DmsRegistrationExample example);

    int updateByExample(@Param("record") DmsRegistration record, @Param("example") DmsRegistrationExample example);

    int updateByPrimaryKeySelective(DmsRegistration record);

    int updateByPrimaryKey(DmsRegistration record);
}

<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/mapper/DmsDrugModelMapper.java<|end_filename|>
package com.neu.his.cloud.service.pms.mapper;

import com.neu.his.cloud.service.pms.model.DmsDrugModel;
import com.neu.his.cloud.service.pms.model.DmsDrugModelExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsDrugModelMapper {
    int countByExample(DmsDrugModelExample example);

    int deleteByExample(DmsDrugModelExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsDrugModel record);

    int insertSelective(DmsDrugModel record);

    List<DmsDrugModel> selectByExample(DmsDrugModelExample example);

    DmsDrugModel selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsDrugModel record, @Param("example") DmsDrugModelExample example);

    int updateByExample(@Param("record") DmsDrugModel record, @Param("example") DmsDrugModelExample example);

    int updateByPrimaryKeySelective(DmsDrugModel record);

    int updateByPrimaryKey(DmsDrugModel record);
}

<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/model/DmsDrug.java<|end_filename|>
package com.neu.his.mbg.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class DmsDrug implements Serializable {
    private Long id;

    private String code;

    private String name;

    private String format;

    private BigDecimal price;

    private String unit;

    private String manufacturer;

    private Long dosageId;

    private Long typeId;

    private String mnemonicCode;

    private Date createDate;

    private Long stock;

    private String genericName;

    private Integer status;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public Long getDosageId() {
        return dosageId;
    }

    public void setDosageId(Long dosageId) {
        this.dosageId = dosageId;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public String getMnemonicCode() {
        return mnemonicCode;
    }

    public void setMnemonicCode(String mnemonicCode) {
        this.mnemonicCode = mnemonicCode;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getStock() {
        return stock;
    }

    public void setStock(Long stock) {
        this.stock = stock;
    }

    public String getGenericName() {
        return genericName;
    }

    public void setGenericName(String genericName) {
        this.genericName = genericName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", code=").append(code);
        sb.append(", name=").append(name);
        sb.append(", format=").append(format);
        sb.append(", price=").append(price);
        sb.append(", unit=").append(unit);
        sb.append(", manufacturer=").append(manufacturer);
        sb.append(", dosageId=").append(dosageId);
        sb.append(", typeId=").append(typeId);
        sb.append(", mnemonicCode=").append(mnemonicCode);
        sb.append(", createDate=").append(createDate);
        sb.append(", stock=").append(stock);
        sb.append(", genericName=").append(genericName);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/SmsPermissionService.java<|end_filename|>
package com.neu.his.sms;

import com.neu.his.common.dto.sms.SmsPermissionNode;
import com.neu.his.common.dto.sms.SmsPermissionParam;
import com.neu.his.common.dto.sms.SmsRoleParam;
import com.neu.his.mbg.model.SmsPermission;
import com.neu.his.mbg.model.SmsRole;

import java.util.List;

/**
 * 权限
 */
public interface SmsPermissionService {

    /**
     * 描述：新增权限
     */
    int create(SmsPermissionParam smsPermissionParam);

    /**
     * 描述：更新权限信息（可能传进控制替换原数据）
     */
    int update(Long id,SmsPermissionParam smsPermissionParam);

    /**
     * 描述：删除权限
     */
     int delete(List<Long> ids);

    /**
     * 描述：查询所有权限
     */
    List<SmsPermission> selectAll();




    /**
     * 描述:权限树
     * <p>author: 赵煜
     */
    List<SmsPermissionNode> treeList();
//
//    /**
//     * 将权限转换为带有子级的权限对象
//     * 当找不到子级权限的时候map操作不会再递归调用covert
//     */
//    private UmsPermissionNode covert(UmsPermission permission,List<UmsPermission> permissionList);
//


}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/controller/BmsFeeQueryController.java<|end_filename|>
package com.neu.his.cloud.service.bms.controller;


import com.neu.his.cloud.service.bms.common.CommonResult;
import com.neu.his.cloud.service.bms.dto.app.AppDrugItemResult;
import com.neu.his.cloud.service.bms.dto.app.AppHistoryRegResult;
import com.neu.his.cloud.service.bms.dto.bms.BmsDoctorPatientFeeResult;
import com.neu.his.cloud.service.bms.service.BmsFeeQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "BmsFeeQueryController", description = "费用查询")
@RequestMapping("/feeQuery")
@CrossOrigin(allowCredentials = "true")
public class BmsFeeQueryController {

    @Autowired
    private BmsFeeQueryService bmsFeeQueryService;

    /**
     * 描述:根据挂号id查询患者费用
     * <p>author: ma
     */
    @ApiOperation("根据挂号id查询患者费用")
    @RequestMapping(value = "/listByRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<BmsDoctorPatientFeeResult>>  listFeeByRegistrationId(@RequestParam("registrationId") Long registrationId){
        List<BmsDoctorPatientFeeResult> list = bmsFeeQueryService.listFeeByRegistrationId(registrationId);
        return CommonResult.success(list);
    }

    /**
     * 描述:查看某次挂号费用大项
     * <p>author: ma
     */
    @ApiOperation("查询某次挂号费用（大项）")
    @RequestMapping(value = "/listFee", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppHistoryRegResult>> listFee(@RequestParam("registrationId") Long registrationId){
        List<AppHistoryRegResult> feeResultList = bmsFeeQueryService.listFeePrescription(registrationId);
        return CommonResult.success(feeResultList);
    }

    /**
     * 描述:查看某次挂号费用小项
     * <p>author: ma
     */
    @ApiOperation("查询某次挂号费用（小项）")
    @RequestMapping(value = "/listDetail", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppDrugItemResult>> listFeeDetail(@RequestParam("prescriptionId") Long prescriptionId ,
                                                               @RequestParam("type") int type){
        List<AppDrugItemResult> itemResultList = bmsFeeQueryService.listFeeItem(prescriptionId,type);
        return CommonResult.success(itemResultList);
    }


}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/SmsDeptService.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;

import com.neu.his.cloud.service.sms.dto.sms.SmsDeptParam;
import com.neu.his.cloud.service.sms.dto.sms.SmsDeptResult;

import java.util.List;

/**
 *  科室
 */
public interface SmsDeptService {

    /**
     * 描述：新增科室
     */
    int create(SmsDeptParam smsDeptParam);

    /**
     * 描述：删除科室
     */
    int delete(List<Long> ids);

    /**
     * 描述：更新科室
     */
    int update(Long id, SmsDeptParam smsDeptParam);

    /**
     * 描述：查询科室
     */
    List<SmsDeptResult> select(SmsDeptParam smsDeptQueryParam);

    /**
     * 描述：列出所有科室
     */
    List<SmsDeptResult> selectAll();


}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsFeeRabbitMQService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

public interface DmsFeeRabbitMQService {

    /**
     * 描述:草药处方超时未缴费处理（设置状态为4已过期）
     * <p>author: ma
     */
    int herbalOutOfTime(Long prescriptionId);

    /**
     * 描述:成药处方超时未缴费处理（设置状态为4已过期）
     * <p>author: ma
     */
    int medicineOutOfTime(Long prescriptionId);

    /**
     * 描述:非药品超时未缴费处理（设置状态为6已过期）
     * <p>author: ma
     */
    int nonDrugOutOfTime(Long prescriptionId);

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/pms/PmsDrugStorePatientResult.java<|end_filename|>
package com.neu.his.cloud.service.dms.dto.pms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class PmsDrugStorePatientResult implements Serializable {
    @ApiModelProperty(value = "处方Ids")
    List<Long> prescriptionIdList;
    @ApiModelProperty(value = "患者名")
    String patientName;
    @ApiModelProperty(value = "患者Id")
    Long patientId;
    @ApiModelProperty(value = "患者病历号")
    String medicalRecordNo;

}


<|start_filename|>HIS-web/src/api/diagnosis.js<|end_filename|>
import request from '@/utils/request'
export function getDmscatlist() {
  return request({
    url: '/DmsDiseCatalog/listAll',
    method: 'post'
  })
}

export function getDmsDislist(data) {
  return request({
    url: '/DmsDise/list',
    method: 'get',
    params:data
  })
}

export function createDmsDiscat(data) {
  return request({
    url: '/DmsDiseCatalog/create',
    method: 'post',
    data
  })
}

export function delDmsDiscat(data){
  return request({
    url: '/DmsDiseCatalog/delete',
    method: 'post',
    params:{
      ids: data
    }
  })
}

export function editDmsDiscat(data){
  return request({
    url: '/DmsDiseCatalog/update/'+data.id,
    method: 'post',
    data
  })
}

export function createDmsDis(data) {
  return request({
    url: '/DmsDise/create',
    method: 'post',
    data
  })
}

export function editDmsDis(data){
  return request({
    url: '/DmsDise/update/'+data.id,
    method: 'post',
    data
  })
}

export function delDmsDis(data){
  return request({
    url: '/DmsDise/delete',
    method: 'post',
    params:{
      ids: data
    }
  })
}

export function parseList(data) {
  return request({
    url: '/DmsDise/parseList',
    method: 'post',
    params:{
      idsStr:data
    }
  })
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/dms/DmsCaseHistoryParam.java<|end_filename|>
package com.neu.his.cloud.service.dms.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
@ToString
public class DmsCaseHistoryParam  implements Serializable {


    @ApiModelProperty(value = "主诉" )
    private String chiefComplaint;
    @ApiModelProperty(value = "现病史" )
    private String historyOfPresentIllness;
    @ApiModelProperty(value = "现治疗情况" )
    private String historyOfTreatment;
    @ApiModelProperty(value = "既往史" )
    private String pastHistory;
    @ApiModelProperty(value = "过敏史" )
    private String allergies;
    @ApiModelProperty(value = "体格检查" )
    private String healthCheckup;
    @ApiModelProperty(value = "门诊号(挂号号)" )
    private Long registrationId;
    @ApiModelProperty(value = "初诊结果str串" )
    private String priliminaryDiseStrList;
    @ApiModelProperty(value = "初诊结果Id串" )
    private String priliminaryDiseIdList;
    @ApiModelProperty(value = "发病时间" )
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;
    @ApiModelProperty(value = "病人姓名" )
    private String name;
    @ApiModelProperty(value = "病人性别" )
    private Integer gender;
    @ApiModelProperty(value = "病人年龄" )
    private String ageStr;


    @ApiModelProperty(value = "检查:  name<>部位<>result<>url ><" )
    private String checkIdList;
    @ApiModelProperty(value = "检验:  name<>部位<>result<>url ><" )
    private String testIdList;

    @ApiModelProperty(value = "检查结果（门诊医生填写）")
    private String  checkResult;

    @ApiModelProperty(value = "检验结果（门诊医生填写）")
    private String  testResult;

    @ApiModelProperty(value = "确诊诊断串" )
    private String definiteDiseStrList;




    @ApiModelProperty(value = "处置：name><" )
    private String dispositionIdList;
    @ApiModelProperty(value = "草药处方: 处方名[处方项名 <<>> 数量 >< 处方项名 | 数量] <> " )
    private String herbalPrescriptionIdList;
    @ApiModelProperty(value = "西药处方: 处方名[处方项名 <<>> 数量 >< 处方项名 | 数量] <>" )
    private String medicinePrescriptionIdList;


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/model/DmsRegistration.java<|end_filename|>
package com.neu.his.cloud.api.pc.model;

import java.io.Serializable;
import java.util.Date;

public class DmsRegistration implements Serializable {
    private Long id;

    private Long patientId;

    private Date createTime;

    private Integer endAttendance;

    private Integer status;

    private Long skdId;

    private Integer needBook;

    private Integer bindStatus;

    private Long deptId;

    private Date attendanceDate;

    private String patientAgeStr;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPatientId() {
        return patientId;
    }

    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getEndAttendance() {
        return endAttendance;
    }

    public void setEndAttendance(Integer endAttendance) {
        this.endAttendance = endAttendance;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getSkdId() {
        return skdId;
    }

    public void setSkdId(Long skdId) {
        this.skdId = skdId;
    }

    public Integer getNeedBook() {
        return needBook;
    }

    public void setNeedBook(Integer needBook) {
        this.needBook = needBook;
    }

    public Integer getBindStatus() {
        return bindStatus;
    }

    public void setBindStatus(Integer bindStatus) {
        this.bindStatus = bindStatus;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Date getAttendanceDate() {
        return attendanceDate;
    }

    public void setAttendanceDate(Date attendanceDate) {
        this.attendanceDate = attendanceDate;
    }

    public String getPatientAgeStr() {
        return patientAgeStr;
    }

    public void setPatientAgeStr(String patientAgeStr) {
        this.patientAgeStr = patientAgeStr;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", patientId=").append(patientId);
        sb.append(", createTime=").append(createTime);
        sb.append(", endAttendance=").append(endAttendance);
        sb.append(", status=").append(status);
        sb.append(", skdId=").append(skdId);
        sb.append(", needBook=").append(needBook);
        sb.append(", bindStatus=").append(bindStatus);
        sb.append(", deptId=").append(deptId);
        sb.append(", attendanceDate=").append(attendanceDate);
        sb.append(", patientAgeStr=").append(patientAgeStr);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/model/EsDise.java<|end_filename|>
package com.neu.his.dms.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
@Setter
@Getter
@ToString
@Document(indexName = "dise", type = "allDise",shards = 1,replicas = 0)
public class EsDise implements Serializable {
    private static final long serialVersionUID = -1L;
    @Id
    private Long id;
    private Long catId;
    private String code;
    @Field(type = FieldType.Keyword)
    private String name;
    private String icd;
    private Integer status;
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/controller/DmsRegistrationController.java<|end_filename|>
package com.neu.his.cloud.service.dms.controller;

import com.neu.his.cloud.service.dms.common.CommonResult;
import com.neu.his.cloud.service.dms.dto.app.AppRegistrationParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsRegHistoryResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsRegistrationParam;
import com.neu.his.cloud.service.dms.service.DmsRegistrationService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsRegistrationController", description = "挂号信息管理")
@RequestMapping("/registration")
@CrossOrigin(allowCredentials = "true")
public class DmsRegistrationController {

    @Autowired
    DmsRegistrationService dmsRegistrationService;


    @ApiOperation("查询历史挂号信息")
    @RequestMapping(value = "/listAllRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsRegHistoryResult>> listAllRegistration(@RequestParam("identificationNo") String identificationNo){
        List<DmsRegHistoryResult> list = dmsRegistrationService.listRegHistory(identificationNo);
        return CommonResult.success(list);
    }



    //挂号
    //1.调用DmsRegistrationService的createRegistration
    @ApiOperation(value = "挂号")
    @RequestMapping(value = "/createRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createRegistration(@RequestBody DmsRegistrationParam dmsRegistrationParam , BindingResult result){
        int returnResult = dmsRegistrationService.createRegistration(dmsRegistrationParam);
        if (returnResult == 1){
            return CommonResult.success(returnResult);
        }
        else{
            return CommonResult.failed();
        }
    }


    @ApiOperation("挂号")
    @RequestMapping(value = "/appReg", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult registration(@RequestBody AppRegistrationParam appRegistrationParam, BindingResult result){
        System.err.println(appRegistrationParam.toString());
        int count = dmsRegistrationService.appRegistration(appRegistrationParam);
        if(count > 0){
            return CommonResult.success(count, "挂号成功");
        }
        return CommonResult.failed("挂号失败");
    }


}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/sms/SmsEchartsController.java<|end_filename|>
package com.neu.his.api.controller.sms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.sms.SmsDeptAmountStatisticsResult;
import com.neu.his.common.dto.sms.SmsPatientsStatisticsResult;
import com.neu.his.common.dto.sms.SmsStaffAmountStatisticsResult;
import com.neu.his.sms.SmsEchartsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@Api(tags = "SmsEchartsController", description = "图表统计")
@RequestMapping("/charts")
@CrossOrigin(allowCredentials = "true")
public class SmsEchartsController {
    @Autowired
    private SmsEchartsService smsEchartsService;

    @ApiOperation(value = "统计个人每日接待患者人数（近7日）")
    @RequestMapping(value = "/staffPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> staffPatients(Long staffId) {
        SmsPatientsStatisticsResult smsPatientsStatisticsResult = smsEchartsService.staffPatients(staffId);
        return CommonResult.success(smsPatientsStatisticsResult);
    }

    @ApiOperation(value = "统计个人每日分类收费信息（近7日）")
    @RequestMapping(value = "/staffClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsStaffAmountStatisticsResult> staffClassifyStatistics(Long staffId) {
        SmsStaffAmountStatisticsResult smsStaffAmountStatisticsResult = smsEchartsService.staffClassifyStatistics(staffId);
        return CommonResult.success(smsStaffAmountStatisticsResult);
    }

    @ApiOperation(value = "统计各科室每日接待患者人数（近7日）")
    @RequestMapping(value = "/deptPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> deptPatients(Long deptId) {
        SmsPatientsStatisticsResult smsPatientsStatisticsResult = smsEchartsService.deptPatients(deptId);
        return CommonResult.success(smsPatientsStatisticsResult);
    }

    @ApiOperation(value = "统计各科室每日分类收费信息（近7日）")
    @RequestMapping(value = "/deptClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsDeptAmountStatisticsResult> deptClassifyStatistics(Long deptId) {
        SmsDeptAmountStatisticsResult smsDeptAmountStatisticsResult = smsEchartsService.deptClassifyStatistics(deptId);
        return CommonResult.success(smsDeptAmountStatisticsResult);
    }

    @ApiOperation(value = "统计全院每日接待患者人数（近7日）")
    @RequestMapping(value = "/totalClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsDeptAmountStatisticsResult> totalClassifyStatistics() {
        SmsDeptAmountStatisticsResult smsDeptAmountStatisticsResult = smsEchartsService.totalClassifyStatistics();
        return CommonResult.success(smsDeptAmountStatisticsResult);
    }

    @ApiOperation(value = "统计全院每日分类收费信息（近7日）")
    @RequestMapping(value = "/totalPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> totalPatients() {
        SmsPatientsStatisticsResult smsPatientsStatisticsResult = smsEchartsService.totalPatients();
        return CommonResult.success(smsPatientsStatisticsResult);
    }
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/mapper/BmsInvoiceExpMapper.java<|end_filename|>
package com.neu.his.cloud.service.dms.mapper;

import com.neu.his.cloud.service.dms.model.BmsInvoiceExp;
import com.neu.his.cloud.service.dms.model.BmsInvoiceExpExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface BmsInvoiceExpMapper {
    int countByExample(BmsInvoiceExpExample example);

    int deleteByExample(BmsInvoiceExpExample example);

    int deleteByPrimaryKey(Long id);

    int insert(BmsInvoiceExp record);

    int insertSelective(BmsInvoiceExp record);

    List<BmsInvoiceExp> selectByExample(BmsInvoiceExpExample example);

    BmsInvoiceExp selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") BmsInvoiceExp record, @Param("example") BmsInvoiceExpExample example);

    int updateByExample(@Param("record") BmsInvoiceExp record, @Param("example") BmsInvoiceExpExample example);

    int updateByPrimaryKeySelective(BmsInvoiceExp record);

    int updateByPrimaryKey(BmsInvoiceExp record);
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/sms/SmsDeptController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.sms;

import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsDeptParam;
import com.neu.his.cloud.api.pc.dto.sms.SmsDeptResult;
import com.neu.his.cloud.api.pc.service.sms.SmsDeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "SmsDeptController", description = "科室管理")
@RequestMapping("/dept")
@CrossOrigin(allowCredentials = "true")
public class SmsDeptController {

    @Autowired
    private SmsDeptService smsDeptService;


    @ApiOperation("新增科室")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody SmsDeptParam smsDeptParam, BindingResult result){
            return smsDeptService.create(smsDeptParam);
    }


    @ApiOperation("根据ids删除科室")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        return   smsDeptService.delete(ids);
    }

    /**
     * 描述:更新一个科室的全部信息
     * <p>author: ma
     */
    @ApiOperation("更新科室信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable("id") Long id,@RequestBody SmsDeptParam smsDeptParam, BindingResult result){
        return  smsDeptService.update(id,smsDeptParam);
    }


    @ApiOperation("模糊查询科室、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsDeptResult>> list(@RequestBody SmsDeptParam queryParam,
                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

        return smsDeptService.list(queryParam,pageSize,pageNum);
    }

    @ApiOperation("查询所有科室")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsDeptResult>> listAll(){
        return  smsDeptService.listAll();
    }
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/model/DmsMedicineItemRecord.java<|end_filename|>
package com.neu.his.cloud.service.bms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;

public class DmsMedicineItemRecord implements Serializable {
    private Long id;

    private Long drugId;

    private Integer status;

    private Long prescriptionId;

    private Integer medicineUsage;

    private Integer frequency;

    private Long days;

    private Long num;

    private String medicalAdvice;

    private Long refundNum;

    private Long usageNum;

    private Integer usageMeans;

    private Integer usageNumUnit;

    private Long currentNum;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDrugId() {
        return drugId;
    }

    public void setDrugId(Long drugId) {
        this.drugId = drugId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getPrescriptionId() {
        return prescriptionId;
    }

    public void setPrescriptionId(Long prescriptionId) {
        this.prescriptionId = prescriptionId;
    }

    public Integer getMedicineUsage() {
        return medicineUsage;
    }

    public void setMedicineUsage(Integer medicineUsage) {
        this.medicineUsage = medicineUsage;
    }

    public Integer getFrequency() {
        return frequency;
    }

    public void setFrequency(Integer frequency) {
        this.frequency = frequency;
    }

    public Long getDays() {
        return days;
    }

    public void setDays(Long days) {
        this.days = days;
    }

    public Long getNum() {
        return num;
    }

    public void setNum(Long num) {
        this.num = num;
    }

    public String getMedicalAdvice() {
        return medicalAdvice;
    }

    public void setMedicalAdvice(String medicalAdvice) {
        this.medicalAdvice = medicalAdvice;
    }

    public Long getRefundNum() {
        return refundNum;
    }

    public void setRefundNum(Long refundNum) {
        this.refundNum = refundNum;
    }

    public Long getUsageNum() {
        return usageNum;
    }

    public void setUsageNum(Long usageNum) {
        this.usageNum = usageNum;
    }

    public Integer getUsageMeans() {
        return usageMeans;
    }

    public void setUsageMeans(Integer usageMeans) {
        this.usageMeans = usageMeans;
    }

    public Integer getUsageNumUnit() {
        return usageNumUnit;
    }

    public void setUsageNumUnit(Integer usageNumUnit) {
        this.usageNumUnit = usageNumUnit;
    }

    public Long getCurrentNum() {
        return currentNum;
    }

    public void setCurrentNum(Long currentNum) {
        this.currentNum = currentNum;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", drugId=").append(drugId);
        sb.append(", status=").append(status);
        sb.append(", prescriptionId=").append(prescriptionId);
        sb.append(", medicineUsage=").append(medicineUsage);
        sb.append(", frequency=").append(frequency);
        sb.append(", days=").append(days);
        sb.append(", num=").append(num);
        sb.append(", medicalAdvice=").append(medicalAdvice);
        sb.append(", refundNum=").append(refundNum);
        sb.append(", usageNum=").append(usageNum);
        sb.append(", usageMeans=").append(usageMeans);
        sb.append(", usageNumUnit=").append(usageNumUnit);
        sb.append(", currentNum=").append(currentNum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/dms/DmsCaseModelCatalogNode.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.dms;

import com.neu.his.cloud.api.pc.model.DmsCaseModelCatalog;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;


public class DmsCaseModelCatalogNode extends DmsCaseModelCatalog implements Serializable {

    @Setter
    @Getter
    List<DmsCaseModelCatalogNode> children;

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/DmsNonDrugMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.DmsNonDrug;
import com.neu.his.cloud.zuul.model.DmsNonDrugExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsNonDrugMapper {
    int countByExample(DmsNonDrugExample example);

    int deleteByExample(DmsNonDrugExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsNonDrug record);

    int insertSelective(DmsNonDrug record);

    List<DmsNonDrug> selectByExample(DmsNonDrugExample example);

    DmsNonDrug selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsNonDrug record, @Param("example") DmsNonDrugExample example);

    int updateByExample(@Param("record") DmsNonDrug record, @Param("example") DmsNonDrugExample example);

    int updateByPrimaryKeySelective(DmsNonDrug record);

    int updateByPrimaryKey(DmsNonDrug record);
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/provider/FeignFallbackProvider.java<|end_filename|>
package com.neu.his.cloud.zuul.provider;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.cloud.netflix.zuul.filters.route.FallbackProvider;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.stereotype.Component;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

@Component
public class FeignFallbackProvider implements FallbackProvider {
    @Override
    public String getRoute() {
        // ServiceId，如果需要所有调用都支持回退，则 return "*" 或 return null
        return "his-cloud-api-app";
    }

    /**
     * 如果请求服务失败，则返回指定的信息给调用者
     * @param route
     * @param cause
     * @return
     */
    @Override
    public ClientHttpResponse fallbackResponse(String route, Throwable cause) {
        return new ClientHttpResponse() {
            /**
             * 网关向 api 服务请求失败了，但是消费者客户端向网关发起的请求是成功的，
             * 不应该把 api 的 404,500 等问题抛给客户端
             * 网关和 api 服务集群对于客户端来说是黑盒
             * @return
             * @throws IOException
             */
            @Override
            public HttpStatus getStatusCode() throws IOException {
                return HttpStatus.OK;
            }

            @Override
            public int getRawStatusCode() throws IOException {
                return HttpStatus.OK.value();
            }

            @Override
            public String getStatusText() throws IOException {
                return HttpStatus.OK.getReasonPhrase();
            }

            @Override
            public void close() {

            }

            @Override
            public InputStream getBody() throws IOException {
                ObjectMapper objectMapper = new ObjectMapper();
                Map<String, Object> map = new HashMap<>();
                map.put("status", 200);
                map.put("message", "无法连接，请检查您的网络");
                return new ByteArrayInputStream(objectMapper.writeValueAsString(map).getBytes("UTF-8"));
            }

            @Override
            public HttpHeaders getHeaders() {
                HttpHeaders headers = new HttpHeaders();
                // 和 getBody 中的内容编码一致
                headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
                return headers;
            }
        };
    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/pms/PmsPatientService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.pms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseHistoryResult;
import com.neu.his.cloud.api.pc.dto.pms.PmsDiagnosisPatientListResult;
import com.neu.his.cloud.api.pc.dto.pms.PmsPatientResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "his-cloud-service-pms")
public interface PmsPatientService {

    @RequestMapping(value = "/diagnosisPatient/selectPatientByIdNo", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsPatientResult> selectPatientByIdNo(@RequestParam("identificationNo") String identificationNo);


    @RequestMapping(value = "/diagnosisPatient/refreshPatient", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsDiagnosisPatientListResult> refreshPatient(@RequestParam("staffId") Long staffId);


    @RequestMapping(value = "/diagnosisPatient/bindPatient", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult bindPatient(@RequestParam("registrationId") Long registrationId, @RequestParam("staffId") Long staffId);

    @RequestMapping(value = "/diagnosisPatient/startDiagnosis", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseHistoryResult> startDiagnosis(@RequestParam("registrationId") Long registrationId);

}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/mapper/DmsHerbalItemRecordMapper.java<|end_filename|>
package com.neu.his.cloud.service.bms.mapper;

import com.neu.his.cloud.service.bms.model.DmsHerbalItemRecord;
import com.neu.his.cloud.service.bms.model.DmsHerbalItemRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsHerbalItemRecordMapper {
    int countByExample(DmsHerbalItemRecordExample example);

    int deleteByExample(DmsHerbalItemRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsHerbalItemRecord record);

    int insertSelective(DmsHerbalItemRecord record);

    List<DmsHerbalItemRecord> selectByExample(DmsHerbalItemRecordExample example);

    DmsHerbalItemRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsHerbalItemRecord record, @Param("example") DmsHerbalItemRecordExample example);

    int updateByExample(@Param("record") DmsHerbalItemRecord record, @Param("example") DmsHerbalItemRecordExample example);

    int updateByPrimaryKeySelective(DmsHerbalItemRecord record);

    int updateByPrimaryKey(DmsHerbalItemRecord record);
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/bms/BmsDailySettlementDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.bms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.bms.ApiPcBmsDailySettlementDistributionService;
import com.neu.his.cloud.zuul.dto.bms.BmsDailySettleRecordResult;
import com.neu.his.cloud.zuul.dto.bms.BmsSettleListItemResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "BmsDailySettlementDistributionController", description = "日结管理")
@RequestMapping("/dailySettlement")
@CrossOrigin(allowCredentials = "true")
public class BmsDailySettlementDistributionController {


   @Autowired
   ApiPcBmsDailySettlementDistributionService apiPcBmsDailySettlementDistributionService;

    @HystrixCommand(fallbackMethod = "queryRecentEndDatetimeFallbackInfo")
    @ApiOperation(value = "根据收费员Id在日结记录表中查询最近的end_datetime")
    @RequestMapping(value = "/queryRecentEndDatetime", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult queryRecentEndDatetime(@RequestParam("cashierId") Long cashierId){
         System.err.println(cashierId);

        return apiPcBmsDailySettlementDistributionService.queryRecentEndDatetime(cashierId);

    }
    private CommonResult queryRecentEndDatetimeFallbackInfo( Long cashierId){
     return CommonResult.success(null,"请检查您的网络") ;
   }

    @HystrixCommand(fallbackMethod = "statisticDailySettlementFallbackInfo")
    @ApiOperation(value = "根据起始、结束时间和收费员Id日结信息")
    @RequestMapping(value = "/statisticDailySettlement", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<BmsDailySettleRecordResult>  statisticDailySettlement(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime")String startDatetime, @RequestParam("endDatetime") String endDatetime){
       return apiPcBmsDailySettlementDistributionService.statisticDailySettlement(cashierId, startDatetime, endDatetime);
    }
    private CommonResult<BmsDailySettleRecordResult>  statisticDailySettlementFallbackInfo( Long cashierId, String startDatetime,  String endDatetime){
      return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "listDailySettleListRecordFallbackInfo")
    @ApiOperation(value = "根据起始、结束时间和收费员Id列出日结历史")
    @RequestMapping(value = "/listDailySettleListRecord", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsSettleListItemResult>>  listDailySettleListRecord(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime){
      return apiPcBmsDailySettlementDistributionService.listDailySettleListRecord(cashierId, startDatetime, endDatetime);
    }
   private CommonResult<List<BmsSettleListItemResult>>  listDailySettleListRecordFallbackInfo( Long cashierId, String startDatetime, String endDatetime){
    return CommonResult.success(null,"请检查您的网络") ;
   }


    @HystrixCommand(fallbackMethod = "querySettleDetailByIdFallbackInfo")
    @ApiOperation(value = "根据日结记录id查询日结详细信息")
    @RequestMapping(value = "/querySettleDetailById", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<BmsDailySettleRecordResult>  querySettleDetailById(@RequestParam("id") Long id){
         return apiPcBmsDailySettlementDistributionService.querySettleDetailById(id);
    }
    private CommonResult<BmsDailySettleRecordResult>  querySettleDetailByIdFallbackInfo(Long id){
     return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "dailySettleFallbackInfo")
    @ApiOperation(value = "根据起始、结束时间和收费员id统计日结信息并日结")
    @RequestMapping(value = "/dailySettle", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult dailySettle(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime){
        System.err.println("cashierId:"+cashierId);
        System.err.println("startDatetime:"+startDatetime);
        System.err.println("endDatetime:"+endDatetime);

        return apiPcBmsDailySettlementDistributionService.dailySettle(cashierId, startDatetime, endDatetime);
    }
    private CommonResult dailySettleFallbackInfo(Long cashierId,  String startDatetime, String endDatetime){
     return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "verifySettleFallbackInfo")
    @ApiOperation(value = "对账")
    @RequestMapping(value = "/verifySettle", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult  verifySettle(@RequestParam("verifyOperatorId") Long verifyOperatorId, @RequestParam("settleRecordId") Long settleRecordId){
       return apiPcBmsDailySettlementDistributionService.verifySettle(verifyOperatorId, settleRecordId);
    }
 private CommonResult  verifySettleFallbackInfo(Long verifyOperatorId, Long settleRecordId){
  return CommonResult.success(null,"请检查您的网络") ;
 }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/test/java/com/neu/his/cloud/zuul/service/sms/impl/SmsStaffServiceImplTest.java<|end_filename|>
//package com.neu.his.cloud.zuul.service.sms.impl;
//
//import com.neu.his.cloud.zuul.ZuulApplication;
//import com.neu.his.cloud.zuul.dto.sms.SmsStaffParam;
//import com.neu.his.cloud.zuul.service.sms.SmsStaffService;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.util.Date;
//
///**
// * @author Zain
// * @title: SmsStaffServiceImplTest
// * @projectName his-cloud
// * @description: TODO
// * @date 2019/6/1714:57
// */
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = ZuulApplication.class)
//public class SmsStaffServiceImplTest {
//
//    @Autowired
//    SmsStaffService smsStaffService;
//
//    @Test
//    public void login() {
//        System.out.println(smsStaffService.login("test","test"));
//    }
//
//    @Test
//    public void register() {
//        SmsStaffParam smsStaffParam=new SmsStaffParam();
//        smsStaffParam.setName("zhaoyu");
//        smsStaffParam.setPassword("<PASSWORD>");
//        smsStaffParam.setCreateTime(new Date());
//        smsStaffService.register(smsStaffParam);
//    }
//}

<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/SmsEchartsService.java<|end_filename|>
package com.neu.his.sms;


import com.neu.his.common.dto.sms.SmsDeptAmountStatisticsResult;
import com.neu.his.common.dto.sms.SmsStaffAmountStatisticsResult;
import com.neu.his.common.dto.sms.SmsPatientsStatisticsResult;


/**
 * echarts数据统计
 */
public interface SmsEchartsService {
    /**
     * 描述：统计个人每日接待患者人数（近7日）
     */
    SmsPatientsStatisticsResult staffPatients(Long staffId);
    /**
     * 描述：统计各人每日分类收费信息（近7日）
     */
    SmsStaffAmountStatisticsResult staffClassifyStatistics(Long staffId);
    /**
     * 描述：统计各科室每日接待患者人数（近7日）
     */
    SmsPatientsStatisticsResult deptPatients(Long deptId);
    /**
     * 描述：统计各科室每日分类收费信息（近7日）
     */
    SmsDeptAmountStatisticsResult deptClassifyStatistics(Long deptId);
    /**
     * 描述：统计全院每日接待患者人数（近7日）
     */
    SmsDeptAmountStatisticsResult totalClassifyStatistics();
    /**
     * 描述：统计全院每日分类收费信息（近7日）
     */
    SmsPatientsStatisticsResult totalPatients();
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/impl/DmsHerbalPrescriptionRecordServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.dms.service.impl;

import com.neu.his.cloud.service.dms.dto.dms.DmsHerbalItemRecordResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsHerbalPrescriptionRecordParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsHerbalPrescriptionRecordResult;
import com.neu.his.cloud.service.dms.mapper.DmsDrugMapper;
import com.neu.his.cloud.service.dms.mapper.DmsHerbalItemRecordMapper;
import com.neu.his.cloud.service.dms.mapper.DmsHerbalPrescriptionRecordMapper;
import com.neu.his.cloud.service.dms.mapper.SmsStaffMapper;
import com.neu.his.cloud.service.dms.model.*;
import com.neu.his.cloud.service.dms.service.DmsHerbalPrescriptionRecordService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class DmsHerbalPrescriptionRecordServiceImpl implements DmsHerbalPrescriptionRecordService {

    @Autowired
    private DmsHerbalPrescriptionRecordMapper dmsHerbalPrescriptionRecordMapper;

    @Autowired
    private DmsHerbalItemRecordMapper dmsHerbalItemRecordMapper;

    @Autowired
    private SmsStaffMapper smsStaffMapper;
    @Autowired
    private DmsDrugMapper dmsDrugMapper;


    @Override
    public Long apply(DmsHerbalPrescriptionRecordParam dmsHerbalPrescriptionRecordParam){
        DmsHerbalPrescriptionRecord record = new DmsHerbalPrescriptionRecord();
        BeanUtils.copyProperties(dmsHerbalPrescriptionRecordParam,record);
        record.setStatus(1);
        record.setCreateTime(new Date());
        int insertCount = dmsHerbalPrescriptionRecordMapper.insertSelective(record);
        if(insertCount <=0){
            new Long(0);
        }

        DmsHerbalPrescriptionRecordExample recordExample = new DmsHerbalPrescriptionRecordExample();
        recordExample.createCriteria().andRegistrationIdEqualTo(dmsHerbalPrescriptionRecordParam.getRegistrationId());
        recordExample.setOrderByClause("create_time desc");
        Long currentId = dmsHerbalPrescriptionRecordMapper.selectByExample(recordExample).get(0).getId();

        List<DmsHerbalItemRecord> dmsHerbalItemRecordList = dmsHerbalPrescriptionRecordParam.getDmsHerbalItemRecordList();
        for(DmsHerbalItemRecord dmsHerbalItemRecord : dmsHerbalItemRecordList){
            if(dmsHerbalItemRecord.getUsageNum() != null){
                dmsHerbalItemRecord.setTotalNum(record.getPairNum() * dmsHerbalItemRecord.getUsageNum());
            }
            dmsHerbalItemRecord.setId(null);
            dmsHerbalItemRecord.setStatus(1);
            dmsHerbalItemRecord.setPrescriptionId(currentId);
            dmsHerbalItemRecord.setCurrentNum(dmsHerbalItemRecord.getTotalNum());
            insertCount += dmsHerbalItemRecordMapper.insert(dmsHerbalItemRecord);
        }
        return currentId;
    }

    @Override
    public int invalid(List<Long> ids){
        DmsHerbalPrescriptionRecordExample example = new DmsHerbalPrescriptionRecordExample();
        example.createCriteria().andIdIn(ids).andStatusEqualTo(1);
        DmsHerbalPrescriptionRecord record = new DmsHerbalPrescriptionRecord();
        record.setStatus(0);
        int updateCount = dmsHerbalPrescriptionRecordMapper.updateByExampleSelective(record,example);

        DmsHerbalItemRecordExample itemRecordExample = new DmsHerbalItemRecordExample();
        itemRecordExample.createCriteria().andPrescriptionIdIn(ids);
        DmsHerbalItemRecord itemRecord = new DmsHerbalItemRecord();
        itemRecord.setStatus(0);
        updateCount += dmsHerbalItemRecordMapper.updateByExampleSelective(itemRecord,itemRecordExample);

        return updateCount;
    }


    /**
     * 描述:1.调用DmsDrugDao根据ids修改status为0（无效）
     * <p>author: ma
     * <p>20190614 赵煜 modify:DmsHerbalItemRecord->DmsHerbalItemRecordResult
     */
    @Override
    public List<DmsHerbalPrescriptionRecordResult>  listByReg(Long registrationId){
        DmsHerbalPrescriptionRecordExample example = new DmsHerbalPrescriptionRecordExample();
        example.createCriteria().andRegistrationIdEqualTo(registrationId).andStatusNotEqualTo(0);
        List<DmsHerbalPrescriptionRecord> recordList= dmsHerbalPrescriptionRecordMapper.selectByExample(example);
        List<DmsHerbalPrescriptionRecordResult> recordResultList = new ArrayList<>();
        for(DmsHerbalPrescriptionRecord record : recordList){
            DmsHerbalPrescriptionRecordResult recordResult = new DmsHerbalPrescriptionRecordResult();
            BeanUtils.copyProperties(record,recordResult);

            DmsHerbalItemRecordExample itemRecordExample = new DmsHerbalItemRecordExample();
            itemRecordExample.createCriteria().andPrescriptionIdEqualTo(record.getId()).andStatusNotEqualTo(0);
            List<DmsHerbalItemRecord> itemRecordList = dmsHerbalItemRecordMapper.selectByExample(itemRecordExample);

            //将DmsHerbalItemRecord封装为DmsHerbalItemRecordResult
            List<DmsHerbalItemRecordResult> dmsHerbalItemRecordResultList=new ArrayList<>();

            for(DmsHerbalItemRecord dmsHerbalItemRecord:itemRecordList){
                DmsHerbalItemRecordResult dmsHerbalItemRecordResult=new DmsHerbalItemRecordResult();
                BeanUtils.copyProperties(dmsHerbalItemRecord,dmsHerbalItemRecordResult);
                BigDecimal price = dmsDrugMapper.selectByPrimaryKey(dmsHerbalItemRecordResult.getDrugId()).getPrice();
                String drugName=dmsDrugMapper.selectByPrimaryKey(dmsHerbalItemRecordResult.getDrugId()).getName();

                dmsHerbalItemRecordResultList.add(dmsHerbalItemRecordResult);

            }
            recordResult.setDmsHerbalItemRecordResultList(dmsHerbalItemRecordResultList);

            SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(record.getCreateStaffId());
            if(smsStaff == null){
                return null;
            }
            recordResult.setCreateStaffName(smsStaff.getName());
            recordResultList.add(recordResult);
        }
        return recordResultList;
    }

    @Override
    public List<DmsHerbalPrescriptionRecordResult> listByIds(List<Long> ids) {
        List<DmsHerbalPrescriptionRecord> dmsHerbalPrescriptionRecordList=new ArrayList<>();
        List<DmsHerbalPrescriptionRecordResult> dmsHerbalPrescriptionRecordResultList=new ArrayList<>();

        DmsHerbalPrescriptionRecordExample dmsHerbalPrescriptionRecordExample = new DmsHerbalPrescriptionRecordExample();
        dmsHerbalPrescriptionRecordExample.createCriteria().andIdIn(ids);
        dmsHerbalPrescriptionRecordList = dmsHerbalPrescriptionRecordMapper.selectByExample(dmsHerbalPrescriptionRecordExample);

        //封装处方单
        for(DmsHerbalPrescriptionRecord dmsHerbalPrescriptionRecord:dmsHerbalPrescriptionRecordList){
            DmsHerbalPrescriptionRecordResult dmsHerbalPrescriptionRecordResult=new DmsHerbalPrescriptionRecordResult();
            BeanUtils.copyProperties(dmsHerbalPrescriptionRecord,dmsHerbalPrescriptionRecordResult);
            //需要单独封装createStaffName
            SmsStaff smsStaff =smsStaffMapper.selectByPrimaryKey(dmsHerbalPrescriptionRecord.getCreateStaffId());
            if(null!=smsStaff){
                dmsHerbalPrescriptionRecordResult.setCreateStaffName(smsStaff.getName());
            }
            //封装处方项
            //将DmsHerbalItemRecord封装为DmsHerbalItemRecordResult
            List<DmsHerbalItemRecordResult> dmsMedicineItemRecordResultList=new ArrayList<>();

            DmsHerbalItemRecordExample itemRecordExample = new DmsHerbalItemRecordExample();
            itemRecordExample.createCriteria().andPrescriptionIdEqualTo(dmsHerbalPrescriptionRecord.getId());
            List<DmsHerbalItemRecord> itemRecordList = dmsHerbalItemRecordMapper.selectByExample(itemRecordExample);

            for(DmsHerbalItemRecord dmsHerbalItemRecord:itemRecordList){
                DmsHerbalItemRecordResult dmsHerbalItemRecordResult=new DmsHerbalItemRecordResult();
                BeanUtils.copyProperties(dmsHerbalItemRecord,dmsHerbalItemRecordResult);
                BigDecimal price = dmsDrugMapper.selectByPrimaryKey(dmsHerbalItemRecord.getDrugId()).getPrice();
                String drugName=dmsDrugMapper.selectByPrimaryKey(dmsHerbalItemRecord.getDrugId()).getName();
                dmsHerbalItemRecordResult.setDrugName(drugName);
                dmsHerbalItemRecordResult.setPrice(price);
                dmsMedicineItemRecordResultList.add(dmsHerbalItemRecordResult);
            }

            dmsHerbalPrescriptionRecordResult.setDmsHerbalItemRecordResultList(dmsMedicineItemRecordResultList);//向处方中加入处方项列表
            dmsHerbalPrescriptionRecordResultList.add(dmsHerbalPrescriptionRecordResult); // 向处方列表中加入处方
        }
        return dmsHerbalPrescriptionRecordResultList;
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/bms/ApiPcBmsFeeQueryDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.bms;



import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.bms.BmsDoctorPatientFeeResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcBmsFeeQueryDistributionService {

    @RequestMapping(value = "/feeQuery/listByRegistration", method = RequestMethod.POST)
    CommonResult<List<BmsDoctorPatientFeeResult>> listFeeByRegistrationId(@RequestParam("registrationId") Long registrationId);

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/bms/ApiPcBmsDailySettlementDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.bms;


import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.bms.BmsDailySettleRecordResult;
import com.neu.his.cloud.zuul.dto.bms.BmsSettleListItemResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@FeignClient(value = "his-cloud-api-pc" )
public interface ApiPcBmsDailySettlementDistributionService {


    @RequestMapping(value = "/dailySettlement/queryRecentEndDatetime", method = RequestMethod.POST)
    CommonResult queryRecentEndDatetime(@RequestBody Long cashierId);


    @RequestMapping(value = "/dailySettlement/statisticDailySettlement", method = RequestMethod.GET)
    CommonResult<BmsDailySettleRecordResult>  statisticDailySettlement(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime);


    @RequestMapping(value = "/dailySettlement/listDailySettleListRecord", method = RequestMethod.GET)
    CommonResult<List<BmsSettleListItemResult>>  listDailySettleListRecord(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime);


    @RequestMapping(value = "/dailySettlement/querySettleDetailById", method = RequestMethod.GET)
    CommonResult<BmsDailySettleRecordResult>  querySettleDetailById(@RequestParam("id") Long id);

    @RequestMapping(value = "/dailySettlement/dailySettle", method = RequestMethod.GET)
    CommonResult dailySettle(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime);

    @RequestMapping(value = "/dailySettlement/verifySettle", method = RequestMethod.GET)
    public CommonResult  verifySettle(@RequestParam("verifyOperatorId") Long verifyOperatorId, @RequestParam("settleRecordId") Long settleRecordId);
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/dms/DmsDrugStoreController.java<|end_filename|>
package com.neu.his.api.controller.dms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.dms.DmsRefundDrugListParam;
import com.neu.his.common.dto.pms.PmsDrugStorePatientListResult;
import com.neu.his.dms.service.DmsDrugStoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@Controller
@Api(tags = "DmsDrugStoreController", description = "药房工作台")
@RequestMapping("/drugStore")
@CrossOrigin(allowCredentials = "true")
public class DmsDrugStoreController {

    @Autowired
    private DmsDrugStoreService dmsDrugStoreService;

    /**
     * 描述:刷新发药患者
     * <p>author: ma
     */
    @ApiOperation("刷新发药患者")
    @RequestMapping(value = "/listPatient", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsDrugStorePatientListResult> listPatient(@RequestParam(value = "medicalRecordNo",required = false) String medicalRecordNo,
                                                                   @RequestParam("queryDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date queryDate,
                                                                   @RequestParam("type") Integer type){
        PmsDrugStorePatientListResult result = dmsDrugStoreService.listPatient(queryDate,medicalRecordNo,type);
        return CommonResult.success(result);
    }

    /**
     * 描述:发药
     * <p>author: ma
     */
    @ApiOperation("发药")
    @RequestMapping(value = "/releaseDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult releaseDrug(@RequestParam("prescriptionId") Long prescriptionId,
                                    @RequestParam("type") Integer type){
        int count = dmsDrugStoreService.releaseDrug(prescriptionId,type);
        if(count > 0){
            return CommonResult.success(count, "发药成功");
        }
        return CommonResult.failed("发药失败");
    }

    /**
     * 描述:退药
     * <p>author: ma
     */
    @ApiOperation("退药")
    @RequestMapping(value = "/refundDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult refundDrug(@RequestBody DmsRefundDrugListParam dmsRefundDrugListParam){
        int count = dmsDrugStoreService.refundDrug(dmsRefundDrugListParam);
        if(count > 0){
            return CommonResult.success(count, "退药成功");
        }
        return CommonResult.failed("退药失败");
    }

}


<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/SmsDescriptionService.java<|end_filename|>
package com.neu.his.sms;

import com.neu.his.common.dto.app.AppDeptDescriptionResult;
import com.neu.his.common.dto.app.AppDocSkdResult;
import com.neu.his.common.dto.app.AppStaffDescriptionResult;
import com.neu.his.mbg.model.SmsDescription;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 *  科室、医生描述信息
 */

public interface SmsDescriptionService {


    /**
     * 描述：查询员工描述信息
     */
    AppDocSkdResult getDetailById(Long theId);


    /**
     *  描述：根据id查询描述信息
     */
    List<AppStaffDescriptionResult> getDetailListByDept(Long id );


    /**
     * 描述：查询科室描述信息
     */
    List<AppDeptDescriptionResult> getDeptDescription();

}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/service/TestFeignService.java<|end_filename|>
package com.neu.his.cloud.api.app.service;

import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.sms.SmsDeptResult;
import com.neu.his.cloud.api.app.service.hystrix.TestFeignServiceHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 赵煜
 * @title: TestFeignService
 * @projectName his-cloud
 * @description: TODO
 * @date 2019/6/15 14:46
 */

@FeignClient(value = "his-cloud-service-sms",fallback = TestFeignServiceHystrix.class)
public interface TestFeignService {

    @RequestMapping(value = "hi", method = RequestMethod.GET)
    String sayHi(@RequestParam(value = "message") String message);

    @RequestMapping(value = "/dept/selectAll", method = RequestMethod.GET)
    public CommonResult<List<SmsDeptResult>> listAll();
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/SmsFrequentUsedService.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;

import com.neu.his.cloud.service.sms.dto.sms.SmsFrequentUsedResult;


/**
 * 常用项
 */
public interface SmsFrequentUsedService {

    /**
     * 描述：新增常用项
     */
    int addFrequent(Long staffId, int addType, Long addId);

    /**
     * 描述：删除常用项
     */
    int deleteFrequent(Long staffId, int deleteType, Long deleteId);

    /**
     * 描述：根据staffId和type查询常用项
     */
    SmsFrequentUsedResult selectFrequent(Long staffId, int selectType);




}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/model/SmsWorkloadRecord.java<|end_filename|>
package com.neu.his.cloud.api.pc.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class SmsWorkloadRecord implements Serializable {
    private Long id;

    private Date createTime;

    private Long staffId;

    private BigDecimal medicineAmount;

    private BigDecimal herbalAmount;

    private BigDecimal checkAmount;

    private BigDecimal dispositionAmount;

    private BigDecimal registrationAmount;

    private BigDecimal testAmount;

    private BigDecimal amount;

    private Date date;

    private Integer status;

    private Long registrationNum;

    private BigDecimal excuteCheckAmount;

    private BigDecimal excuteTestAmount;

    private BigDecimal excuteDispositionAmount;

    private Integer type;

    private Long deptId;

    private Long excuteNum;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getStaffId() {
        return staffId;
    }

    public void setStaffId(Long staffId) {
        this.staffId = staffId;
    }

    public BigDecimal getMedicineAmount() {
        return medicineAmount;
    }

    public void setMedicineAmount(BigDecimal medicineAmount) {
        this.medicineAmount = medicineAmount;
    }

    public BigDecimal getHerbalAmount() {
        return herbalAmount;
    }

    public void setHerbalAmount(BigDecimal herbalAmount) {
        this.herbalAmount = herbalAmount;
    }

    public BigDecimal getCheckAmount() {
        return checkAmount;
    }

    public void setCheckAmount(BigDecimal checkAmount) {
        this.checkAmount = checkAmount;
    }

    public BigDecimal getDispositionAmount() {
        return dispositionAmount;
    }

    public void setDispositionAmount(BigDecimal dispositionAmount) {
        this.dispositionAmount = dispositionAmount;
    }

    public BigDecimal getRegistrationAmount() {
        return registrationAmount;
    }

    public void setRegistrationAmount(BigDecimal registrationAmount) {
        this.registrationAmount = registrationAmount;
    }

    public BigDecimal getTestAmount() {
        return testAmount;
    }

    public void setTestAmount(BigDecimal testAmount) {
        this.testAmount = testAmount;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getRegistrationNum() {
        return registrationNum;
    }

    public void setRegistrationNum(Long registrationNum) {
        this.registrationNum = registrationNum;
    }

    public BigDecimal getExcuteCheckAmount() {
        return excuteCheckAmount;
    }

    public void setExcuteCheckAmount(BigDecimal excuteCheckAmount) {
        this.excuteCheckAmount = excuteCheckAmount;
    }

    public BigDecimal getExcuteTestAmount() {
        return excuteTestAmount;
    }

    public void setExcuteTestAmount(BigDecimal excuteTestAmount) {
        this.excuteTestAmount = excuteTestAmount;
    }

    public BigDecimal getExcuteDispositionAmount() {
        return excuteDispositionAmount;
    }

    public void setExcuteDispositionAmount(BigDecimal excuteDispositionAmount) {
        this.excuteDispositionAmount = excuteDispositionAmount;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getExcuteNum() {
        return excuteNum;
    }

    public void setExcuteNum(Long excuteNum) {
        this.excuteNum = excuteNum;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", createTime=").append(createTime);
        sb.append(", staffId=").append(staffId);
        sb.append(", medicineAmount=").append(medicineAmount);
        sb.append(", herbalAmount=").append(herbalAmount);
        sb.append(", checkAmount=").append(checkAmount);
        sb.append(", dispositionAmount=").append(dispositionAmount);
        sb.append(", registrationAmount=").append(registrationAmount);
        sb.append(", testAmount=").append(testAmount);
        sb.append(", amount=").append(amount);
        sb.append(", date=").append(date);
        sb.append(", status=").append(status);
        sb.append(", registrationNum=").append(registrationNum);
        sb.append(", excuteCheckAmount=").append(excuteCheckAmount);
        sb.append(", excuteTestAmount=").append(excuteTestAmount);
        sb.append(", excuteDispositionAmount=").append(excuteDispositionAmount);
        sb.append(", type=").append(type);
        sb.append(", deptId=").append(deptId);
        sb.append(", excuteNum=").append(excuteNum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/model/EsDrugRepository.java<|end_filename|>
package com.neu.his.dms.model;

import com.neu.his.dms.model.EsDrug;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * 商品ES操作类
 * Created by wang on 2019/6/19.
 */
public interface EsDrugRepository extends ElasticsearchRepository<EsDrug, Long> {
    /**
     * 搜索查询
     *
     * @param name              药品名称
     * @param code              药品编码
     * @param genericName       通用名
     * @param page              分页信息
     * @return
     */
    Page<EsDrug> findByNameOrCodeOrGenericName(String name, String code, String genericName, Pageable page);

    Page<EsDrug> findByNameContainsOrMnemonicCodeContainsOrGenericNameContains(String name, String mnemonicCode, String genericName, Pageable page);
}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/DmsNonDrugModelServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;



import com.neu.his.common.dto.dms.DmsNonDrugModelParam;

import com.neu.his.common.dto.dms.DmsNonDrugModelResult;
import com.neu.his.common.util.DateUtil;
import com.neu.his.dms.service.DmsNonDrugModelService;
import com.neu.his.mbg.mapper.DmsNonDrugModelMapper;
import com.neu.his.mbg.model.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

import java.util.*;

/**
 * @author Zain
 * @ClassName: NonDrugModelServiceImpl
 * @description: TODO
 * @date 2019/6/9 9:40
 */

@Service
public class DmsNonDrugModelServiceImpl implements DmsNonDrugModelService {


    @Autowired
    DmsNonDrugModelMapper dmsNonDrugModelMapper;



    /**
     * 描述：创建模版
     * <p>author:赵煜
     * <p>author:赵煜  code可以重名
     */
    @Override
    public int createModel(DmsNonDrugModelParam dmsNonDrugModelParam) {
        System.err.println("createModel");

        //给模版实体赋值
        DmsNonDrugModel dmsNonDrugModel = new DmsNonDrugModel();
        BeanUtils.copyProperties(dmsNonDrugModelParam, dmsNonDrugModel);
        dmsNonDrugModel.setCreateTime(new Date());
        dmsNonDrugModel.setStatus(1);
        dmsNonDrugModel.setCode(codeGenerator(new Date()));

        //设置模版项串
        if (null != dmsNonDrugModelParam.getNonDrugIdList() && dmsNonDrugModelParam.getNonDrugIdList().size() > 0) {
            dmsNonDrugModel.setNonDrugIdList(toItemIdListStr(dmsNonDrugModelParam.getNonDrugIdList()));
        }

        dmsNonDrugModelMapper.insertSelective(dmsNonDrugModel);
        return 1;
    }

    @Override
    public int deleteModel(List<Long> ids) {
        int count = ids == null ? 0 : ids.size(); //得到要删除的数量
        if (!CollectionUtils.isEmpty(ids)) {
            for (Long id : ids) {
                //直接删除
                dmsNonDrugModelMapper.deleteByPrimaryKey(id);
            }
        }
        return count;
    }

    @Override
    public int deleteModelItem(Long modelId, List<Long> itemIds) {
        int count = itemIds == null ? 0 : itemIds.size(); //得到要删除的数量
        //取出nonDrugIdList 解析并删除所需
        DmsNonDrugModel dmsNonDrugModel = dmsNonDrugModelMapper.selectByPrimaryKey(modelId);
        HashSet<Long> itemIdSet=toItemIdSet(dmsNonDrugModel.getNonDrugIdList());
        if (null != dmsNonDrugModel && !CollectionUtils.isEmpty(itemIdSet) && !CollectionUtils.isEmpty(itemIds)) {
            for (Long id : itemIds) {
                if( itemIdSet.contains(id)) {
                    itemIdSet.remove(id);
                }
                }
        }
        dmsNonDrugModel=new DmsNonDrugModel();
        dmsNonDrugModel.setId(modelId);
        dmsNonDrugModel.setNonDrugIdList(toItemIdListStr(new ArrayList<Long>(itemIdSet)));

        dmsNonDrugModelMapper.updateByPrimaryKeySelective(dmsNonDrugModel);
        return count;
    }


    /**
     * 描述：根据modelId更新model信息
     *       删了重新创建
     * <p>author:赵煜
     * <p>author:赵煜  修改不能更新的bug  直接更新，不考虑code重复
     */
    @Override
    public int updateModel(Long modelId, DmsNonDrugModelParam dmsNonDrugModelParam) {
        //先找出原model信息
        DmsNonDrugModel oldDmsNonDrugModel=dmsNonDrugModelMapper.selectByPrimaryKey(modelId);

        //给实体赋值
        DmsNonDrugModel newDmsNonDrugModel = new DmsNonDrugModel();
        newDmsNonDrugModel.setId(modelId);
        //实际能更新的属性
        newDmsNonDrugModel.setNonDrugIdList(toItemIdListStr(dmsNonDrugModelParam.getNonDrugIdList()));;
        newDmsNonDrugModel.setCode(dmsNonDrugModelParam.getCode());//code可以重复
        newDmsNonDrugModel.setAim(dmsNonDrugModelParam.getAim());
        newDmsNonDrugModel.setName(dmsNonDrugModelParam.getName());//name可以重复

        //封装不更新的几个属性
        newDmsNonDrugModel.setId(oldDmsNonDrugModel.getId());
        newDmsNonDrugModel.setOwnId(oldDmsNonDrugModel.getOwnId());
        newDmsNonDrugModel.setScope(oldDmsNonDrugModel.getScope());
        newDmsNonDrugModel.setStatus(oldDmsNonDrugModel.getStatus());
        newDmsNonDrugModel.setCreateTime(oldDmsNonDrugModel.getCreateTime());
        newDmsNonDrugModel.setType(oldDmsNonDrugModel.getType());

        dmsNonDrugModelMapper.updateByPrimaryKey(newDmsNonDrugModel);
        return 1;
    }



    @Override
    public List<DmsNonDrugModelResult> selectModel(Integer isAdmin,DmsNonDrugModelParam queryParam, Integer pageSize, Integer pageNum) {

        DmsNonDrugModelExample example = null;
        List<DmsNonDrugModel> dmsNonDrugModelList = null;

        if(isAdmin == 0){  //非管理员   前台 查询个人、科室、全院
            example=  new DmsNonDrugModelExample();
            DmsNonDrugModelExample.Criteria criteria = example.createCriteria();
            criteria.andStatusNotEqualTo(0);
            criteria.andScopeEqualTo(queryParam.getScope()); //必须mvc保证不为空
            criteria.andOwnIdEqualTo(queryParam.getOwnId()); //必须宝成OwnId不为空
            if(!StringUtils.isEmpty(queryParam.getName())){
                criteria.andNameLike("%" + queryParam.getName() + "%");
            }
            if(null!=queryParam.getType()){
                criteria.andTypeEqualTo(queryParam.getType());
            }
            dmsNonDrugModelList=dmsNonDrugModelMapper.selectByExample(example);
        }else{//后台 查询所有--后端模糊查询
            //如果没有指明status，返回不为0的
            example=  new DmsNonDrugModelExample();
            DmsNonDrugModelExample.Criteria criteria = example.createCriteria();
            if(null!=queryParam.getType()){
                criteria.andTypeEqualTo(queryParam.getType());
            }
            if(queryParam.getStatus() == null){
                criteria.andStatusNotEqualTo(0);
            }
            if(!StringUtils.isEmpty(queryParam.getCode())){
                criteria.andCodeLike("%" + queryParam.getCode() + "%");
            }
            if(!StringUtils.isEmpty(queryParam.getName())){
                criteria.andNameLike("%" + queryParam.getName() + "%");
            }
            dmsNonDrugModelList=dmsNonDrugModelMapper.selectByExample(example);
        }


        //返回数据包装成Result
        //List<DmsNonDrugModel> dmsNonDrugModelList = dmsNonDrugModelMapper.selectByExample(example);
        List<DmsNonDrugModelResult> dmsNonDrugModelResultList = new ArrayList<>();

        for (DmsNonDrugModel dmsNonDrugModel : dmsNonDrugModelList) {
            DmsNonDrugModelResult dmsNonDrugModelResult = new DmsNonDrugModelResult();
            BeanUtils.copyProperties(dmsNonDrugModel, dmsNonDrugModelResult,"nonDrugIdList");
            if(!StringUtils.isEmpty(dmsNonDrugModel.getNonDrugIdList())) {//若model中list不为空串则取出封装
                dmsNonDrugModelResult.setNonDrugIdList(new ArrayList<Long>(toItemIdSet(dmsNonDrugModel.getNonDrugIdList())));
            }
            dmsNonDrugModelResultList.add(dmsNonDrugModelResult);
        }
        return dmsNonDrugModelResultList;
    }



    private String toItemIdListStr(List<Long> nonDrugIdList) {
        String nonDrugIdListStr = "";
        for (Long itemId : nonDrugIdList) {
            nonDrugIdListStr += (itemId+"");
            nonDrugIdListStr += ",";
        }
        return nonDrugIdListStr.substring(0, nonDrugIdListStr.length() - 1);
    }


    private HashSet<Long>  toItemIdSet(String  nonDrugIdListStr) {
        String[] idArray=nonDrugIdListStr.split(",");
        HashSet<Long> idSet=new HashSet<Long>();

        for(int i =0 ;i<idArray.length;i++){
            idSet.add(new Long(idArray[i]));
        }
        return idSet;

    }

    private String codeGenerator(Date date) {
        return DateUtil.getDateStr(date) + DateUtil.getTimeStr(date, 6);
    }

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/mapper/DmsHerbalPrescriptionRecordMapper.java<|end_filename|>
package com.neu.his.cloud.service.sms.mapper;

import com.neu.his.cloud.service.sms.model.DmsHerbalPrescriptionRecord;
import com.neu.his.cloud.service.sms.model.DmsHerbalPrescriptionRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsHerbalPrescriptionRecordMapper {
    int countByExample(DmsHerbalPrescriptionRecordExample example);

    int deleteByExample(DmsHerbalPrescriptionRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsHerbalPrescriptionRecord record);

    int insertSelective(DmsHerbalPrescriptionRecord record);

    List<DmsHerbalPrescriptionRecord> selectByExample(DmsHerbalPrescriptionRecordExample example);

    DmsHerbalPrescriptionRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsHerbalPrescriptionRecord record, @Param("example") DmsHerbalPrescriptionRecordExample example);

    int updateByExample(@Param("record") DmsHerbalPrescriptionRecord record, @Param("example") DmsHerbalPrescriptionRecordExample example);

    int updateByPrimaryKeySelective(DmsHerbalPrescriptionRecord record);

    int updateByPrimaryKey(DmsHerbalPrescriptionRecord record);
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/sms/SmsStaffController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.sms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsSkdDocParam;
import com.neu.his.cloud.api.pc.dto.sms.SmsSkdDocResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsStaffParam;
import com.neu.his.cloud.api.pc.dto.sms.SmsStaffResult;
import com.neu.his.cloud.api.pc.service.sms.SmsSkdService;
import com.neu.his.cloud.api.pc.service.sms.SmsStaffService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.security.Principal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "SmsStaffController", description = "用户管理")
@RequestMapping("/staff")
@CrossOrigin(allowCredentials = "true")
public class SmsStaffController {

    @Autowired
    private SmsStaffService smsStaffService;
    @Autowired
    private SmsSkdService smsSkdService;


    @ApiOperation(value = "查询上班医生")
    @RequestMapping(value = "/listDocBySkd", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<SmsSkdDocResult>> listDocBySkd(@RequestBody SmsSkdDocParam smsSkdDocParam, BindingResult result){
       return smsSkdService.listDocBySkd(smsSkdDocParam);
    }



    @ApiOperation("根据ids删除用户")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids) {
        return smsStaffService.delete(ids);
    }

    /**
     * 描述:更新一个用户的全部信息
     * <p>author: ma
     */
    @ApiOperation("更新用户信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody SmsStaffParam smsStaffParam, BindingResult result){
        return smsStaffService.update(id,smsStaffParam);
    }


    @ApiOperation("模糊查询用户、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsStaffResult>> list(@RequestBody SmsStaffParam queryParam,
                                                         @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
       return smsStaffService.list(queryParam,pageSize,pageNum);
    }


    @ApiOperation("查询所有用户")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsStaffResult>> listAll(){
        return  smsStaffService.listAll();
    }




}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/SmsFrequentUsedMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.SmsFrequentUsed;
import com.neu.his.cloud.zuul.model.SmsFrequentUsedExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsFrequentUsedMapper {
    int countByExample(SmsFrequentUsedExample example);

    int deleteByExample(SmsFrequentUsedExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsFrequentUsed record);

    int insertSelective(SmsFrequentUsed record);

    List<SmsFrequentUsed> selectByExample(SmsFrequentUsedExample example);

    SmsFrequentUsed selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsFrequentUsed record, @Param("example") SmsFrequentUsedExample example);

    int updateByExample(@Param("record") SmsFrequentUsed record, @Param("example") SmsFrequentUsedExample example);

    int updateByPrimaryKeySelective(SmsFrequentUsed record);

    int updateByPrimaryKey(SmsFrequentUsed record);
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/DmsDiseCatalogServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;


import com.github.pagehelper.PageHelper;
import com.neu.his.common.dto.dms.DmsDiseCatalogParam;
import com.neu.his.common.dto.dms.DmsDiseCatalogResult;
import com.neu.his.dms.service.DmsDiseCatalogService;
import com.neu.his.mbg.mapper.DmsDiseCatalogMapper;
import com.neu.his.mbg.mapper.DmsDiseMapper;
import com.neu.his.mbg.model.DmsDise;
import com.neu.his.mbg.model.DmsDiseCatalog;
import com.neu.his.mbg.model.DmsDiseCatalogExample;
import com.neu.his.mbg.model.DmsDiseExample;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.List;
@Service
public class DmsDiseCatalogServiceImpl implements DmsDiseCatalogService {
    @Autowired
    DmsDiseCatalogMapper dmsDiseCatalogMapper;

    @Autowired
    DmsDiseMapper dmsDiseMapper;

    @Override
    public int create(DmsDiseCatalogParam dmsDiseCatalogParam) {
        DmsDiseCatalogExample example = new DmsDiseCatalogExample();
        example.createCriteria().andNameEqualTo(dmsDiseCatalogParam.getName());//根据name查询插入的是否已存在
        List<DmsDiseCatalog> dmsDiseCatalogList = dmsDiseCatalogMapper.selectByExample(example);
        if(dmsDiseCatalogList.size()>0){//如果存在相同的name，则插入失败
            return 0;
        }
        DmsDiseCatalog dmsDiseCatalog = new DmsDiseCatalog();
        BeanUtils.copyProperties(dmsDiseCatalogParam,dmsDiseCatalog);
        dmsDiseCatalogMapper.insertSelective(dmsDiseCatalog);
        return 1;
    }

    /**
     * 描述：根据ids删除诊断目录
     * <p>author:王思阳
     * <p>author:赵煜 删除目录并删除目录中地诊断
     */
    @Override
    public int delete(List<Long> ids) {
        int count = ids == null ? 0 : ids.size();//得到要删除的数量
        if(!CollectionUtils.isEmpty(ids)) {
            for (Long id : ids) {
                DmsDiseCatalog dmsDiseCatalog = new DmsDiseCatalog();
                dmsDiseCatalog.setStatus(0);
                DmsDiseCatalogExample example = new DmsDiseCatalogExample();
                example.createCriteria().andIdEqualTo(id);
                dmsDiseCatalogMapper.updateByExampleSelective(dmsDiseCatalog, example);
                //删除诊断
                for(Long catalogId:ids){
                    DmsDiseExample dmsDiseExample=new DmsDiseExample();
                    dmsDiseExample.createCriteria().andCatIdEqualTo(catalogId);
                    DmsDise dmsDise=new DmsDise();
                    dmsDise.setStatus(0);
                    dmsDiseMapper.updateByExampleSelective(dmsDise,dmsDiseExample);
                }
            }
        }
        return count;
    }

    @Override
    public int update(Long id, DmsDiseCatalogParam dmsDiseCatalogParam) {
        DmsDiseCatalog dmsDiseCatalog = new DmsDiseCatalog();
        BeanUtils.copyProperties(dmsDiseCatalogParam,dmsDiseCatalog);
        DmsDiseCatalogExample example = new DmsDiseCatalogExample();
        example.createCriteria().andIdEqualTo(id);
        return dmsDiseCatalogMapper.updateByExampleSelective(dmsDiseCatalog,example);
    }

    @Override
    public List<DmsDiseCatalogResult> select(DmsDiseCatalogParam dmsDiseCatalogParam, Integer pageSize, Integer pageNum) {
        PageHelper.startPage(pageNum,pageSize);
        DmsDiseCatalogExample example = new DmsDiseCatalogExample();
        DmsDiseCatalogExample.Criteria criteria = example.createCriteria();
        if(!StringUtils.isEmpty(dmsDiseCatalogParam.getName())){
            criteria.andNameEqualTo(dmsDiseCatalogParam.getName());
        }
        if(!StringUtils.isEmpty(dmsDiseCatalogParam.getStatus())){
            criteria.andStatusEqualTo(dmsDiseCatalogParam.getStatus());
        }
        criteria.andStatusNotEqualTo(0);
        example.setOrderByClause("id desc");//按id升序
        List<DmsDiseCatalogResult> list = new ArrayList<>();
        for (DmsDiseCatalog dmsDiseCatalog:dmsDiseCatalogMapper.selectByExample(example)) {
            DmsDiseCatalogResult dmsDiseCatalogResult = new DmsDiseCatalogResult();
            BeanUtils.copyProperties(dmsDiseCatalog,dmsDiseCatalogResult);
            list.add(dmsDiseCatalogResult);
        }
        return list;
    }


    /**
     * 描述：查询所有诊断目录
     * <p>author:王思阳
     * <p>author:赵煜 列出目录也需要倒序
     */
    @Override
    public List<DmsDiseCatalogResult> selectAll() {
        List<DmsDiseCatalogResult> list = new ArrayList<>();
        DmsDiseCatalogExample example = new DmsDiseCatalogExample();
        example.createCriteria().andStatusNotEqualTo(0);
        example.setOrderByClause("id desc");//按id倒序
        for (DmsDiseCatalog dmsDiseCatalog:dmsDiseCatalogMapper.selectByExample(example)) {
            DmsDiseCatalogResult dmsDiseCatalogResult = new DmsDiseCatalogResult();
            BeanUtils.copyProperties(dmsDiseCatalog,dmsDiseCatalogResult);
            list.add(dmsDiseCatalogResult);
        }
        return list;
    }
}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/ApiAppApplication.java<|end_filename|>
package com.neu.his.cloud.api.app;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication(scanBasePackages = "com.neu.his.cloud.api.app")
@EnableFeignClients
@EnableDiscoveryClient
@EnableHystrixDashboard
@EnableHystrix
public class ApiAppApplication {
    public static void main(String[] args) {
        SpringApplication.run(ApiAppApplication.class,args);
    }
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/impl/SmsDescriptionServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.sms.service.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.neu.his.cloud.service.sms.dto.app.AppDeptDescriptionResult;
import com.neu.his.cloud.service.sms.dto.app.AppDocSkdResult;
import com.neu.his.cloud.service.sms.dto.app.AppStaffDescriptionResult;
import com.neu.his.cloud.service.sms.mapper.SmsDeptMapper;
import com.neu.his.cloud.service.sms.mapper.SmsDescriptionMapper;
import com.neu.his.cloud.service.sms.mapper.SmsStaffMapper;
import com.neu.his.cloud.service.sms.model.*;
import com.neu.his.cloud.service.sms.service.SmsDescriptionService;;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 科室、医生描述信息
 */
@Service
public class SmsDescriptionServiceImpl implements SmsDescriptionService {

    @Autowired
    SmsDescriptionMapper smsDescriptionMapper;

    @Autowired
    SmsStaffMapper smsStaffMapper;

    @Autowired
    SmsDeptMapper smsDeptMapper;

    @Override
    public AppDocSkdResult getDetailById(Long id){
        SmsDescriptionExample smsDescriptionExample=new SmsDescriptionExample();
        smsDescriptionExample.createCriteria().andTheIdEqualTo(id).andTypeEqualTo(2);

        List<SmsDescription> smsDescriptionList= smsDescriptionMapper.selectByExample(smsDescriptionExample);
        //数据正常的情况下 只会查找除一条记录
        if(CollectionUtil.isEmpty(smsDescriptionList)||smsDescriptionList.size()>1){
            return null;
        }

        AppDocSkdResult result = new AppDocSkdResult();
        result.setUrl(smsDescriptionList.get(0).getUrl());
        result.setStar(smsDescriptionList.get(0).getStar());
        result.setDescription(smsDescriptionList.get(0).getDescription());

        SmsStaff staff = smsStaffMapper.selectByPrimaryKey(id);
        if(staff == null){
            return null;
        }
        SmsDept dept = smsDeptMapper.selectByPrimaryKey(staff.getDeptId());
        if(dept == null){
            return null;
        }

        result.setDeptId(dept.getId());
        result.setDeptName(dept.getName());

        return result;
    }

    @Override
    public List<AppStaffDescriptionResult> getDetailListByDept(Long id) {
        List<AppStaffDescriptionResult> resultList = new ArrayList<>();
        //先查科室下所有专家
        SmsStaffExample staffExample = new SmsStaffExample();
        staffExample.createCriteria().andDeptIdEqualTo(id)
                .andRegistrationRankIdEqualTo(new Long(1))
                .andStatusEqualTo(1);
        List<SmsStaff> staffList = smsStaffMapper.selectByExample(staffExample);
        if(staffList.isEmpty()){
            return resultList;
        }
        List<Long> idList = new ArrayList<>();
        for(SmsStaff staff : staffList){
            idList.add(staff.getId());
        }

        SmsDescriptionExample smsDescriptionExample = new SmsDescriptionExample();
        smsDescriptionExample.createCriteria().andTheIdIn(idList).andTypeEqualTo(2).andStatusEqualTo(1);//type 2 人
        List<SmsDescription> smsDescriptionList= smsDescriptionMapper.selectByExample(smsDescriptionExample);

        for(SmsStaff staff : staffList){
            for(SmsDescription description : smsDescriptionList){
                if(staff.getId() == description.getTheId()){
                    AppStaffDescriptionResult result = new AppStaffDescriptionResult();
                    result.setId(staff.getId());
                    result.setName(staff.getName());
                    result.setUrl(description.getUrl());
                    resultList.add(result);
                }
            }
        }

        return resultList;
    }

    @Override
    public List<AppDeptDescriptionResult> getDeptDescription(){
        List<AppDeptDescriptionResult> resultList = new ArrayList<>();
        SmsDescriptionExample smsDescriptionExample=new SmsDescriptionExample();
        smsDescriptionExample.createCriteria().andStatusEqualTo(1).andTypeEqualTo(1);

        List<SmsDescription> smsDescriptionList= smsDescriptionMapper.selectByExample(smsDescriptionExample);
        if(smsDescriptionList.size() <= 0){
            return resultList;
        }

        for(SmsDescription description : smsDescriptionList){
            AppDeptDescriptionResult result = new AppDeptDescriptionResult();
            result.setDeptId(description.getTheId());
            SmsDept dept = smsDeptMapper.selectByPrimaryKey(description.getTheId());
            if(dept == null){
                continue;
            }
            result.setDeptName(dept.getName());
            result.setDescription(description.getDescription());
            result.setUrl(description.getUrl());
            resultList.add(result);
        }
        return resultList;
    }
}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/DmsDrugServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;


import cn.hutool.core.collection.CollectionUtil;
import com.neu.his.common.dto.dms.DmsDosageResult;
import com.neu.his.common.dto.dms.DmsDrugParam;
import com.neu.his.common.dto.dms.DmsDrugResult;
import com.neu.his.dms.service.DmsDrugService;
import com.neu.his.mbg.mapper.DmsDosageMapper;
import com.neu.his.mbg.mapper.DmsDrugMapper;
import com.neu.his.mbg.model.DmsDosage;
import com.neu.his.mbg.model.DmsDosageExample;
import com.neu.his.mbg.model.DmsDrug;
import com.neu.his.mbg.model.DmsDrugExample;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.List;

@Service
public class DmsDrugServiceImpl implements DmsDrugService {

    @Autowired
    private DmsDrugMapper dmsDrugMapper;

    @Autowired
    private DmsDosageMapper dmsDosageMapper;




    @Override
    public int createDrug(DmsDrugParam dmsDiseParam){
        DmsDrug dmsDrug = new DmsDrug();
        BeanUtils.copyProperties(dmsDiseParam, dmsDrug);
        dmsDrug.setStatus(1);
        //查询是否有同code药品，且status为1的药品
        DmsDrugExample example = new DmsDrugExample();
        example.createCriteria().andCodeEqualTo(dmsDrug.getCode());
        List<DmsDrug> dmsDrugList = dmsDrugMapper.selectByExample(example);
        if (dmsDrugList.size() <= 0) {
            //没有则插入数据
            return dmsDrugMapper.insert(dmsDrug);
        }
        //有则判断status是否为0
        DmsDrug oldDrug = dmsDrugList.get(0);
        if(oldDrug.getStatus() == 1){
            return 0;
        }else{
            //status不为0,先删除，再插入
            dmsDrugMapper.deleteByExample(example);
            return dmsDrugMapper.insert(dmsDrug);
        }
    }

    @Override
    public int deleteDrug(List<Long> ids){
        DmsDrug dmsDrug = new DmsDrug();
        dmsDrug.setStatus(0);
        DmsDrugExample example = new DmsDrugExample();
        example.createCriteria().andIdIn(ids);
        return dmsDrugMapper.updateByExampleSelective(dmsDrug, example);
    }


    /**
     * 描述:更新
     * <p>author: ma
     * <p>author: 赵煜 修改更新逻辑，更新操作与code无关，code可以重复
     */
    @Override
    public int updateDrug(Long id, DmsDrugParam dmsDrugParam ){
        DmsDrug dmsDrug = new DmsDrug();
        BeanUtils.copyProperties(dmsDrugParam, dmsDrug);
        dmsDrug.setId(id);
        return dmsDrugMapper.updateByPrimaryKeySelective(dmsDrug);
    }

    @Override
    public List<DmsDrugResult> selectDrug(DmsDrugParam dmsDrugParam,Integer pageSize,Integer pageNum){
        DmsDrugExample example = new DmsDrugExample();
        DmsDrugExample.Criteria criteria = example.createCriteria();
        //如果没有指明state，返回不为0的
        if(dmsDrugParam.getStatus() == null){
            criteria.andStatusNotEqualTo(0);
        }
        //是否按编码、名称、规格、单价查询
        if(!StringUtils.isEmpty(dmsDrugParam.getCode())){
            criteria.andCodeLike("%" + dmsDrugParam.getCode() + "%");
        }
        if(!StringUtils.isEmpty(dmsDrugParam.getName())){
            criteria.andNameLike("%" + dmsDrugParam.getName() + "%");
        }
        if(!StringUtils.isEmpty(dmsDrugParam.getFormat())){
            criteria.andFormatLike("%" + dmsDrugParam.getFormat() + "%");
        }
        if(dmsDrugParam.getPrice() != null){
            criteria.andPriceEqualTo(dmsDrugParam.getPrice());
        }

        //是否按包装单位、生产厂家、药品剂型、药品类型查询
        if(!StringUtils.isEmpty(dmsDrugParam.getUnit())){
            criteria.andUnitLike("%" + dmsDrugParam.getUnit() + "%");
        }
        if(!StringUtils.isEmpty(dmsDrugParam.getManufacturer())){
            criteria.andManufacturerLike("%" + dmsDrugParam.getManufacturer() + "%");
        }
        if(dmsDrugParam.getDosageId() != null){
            criteria.andDosageIdEqualTo(dmsDrugParam.getDosageId());
        }
        if(dmsDrugParam.getTypeId() != null){
            criteria.andTypeIdEqualTo(dmsDrugParam.getTypeId());
        }

        //是否按拼音助记码、库存、通用名查询
        if(!StringUtils.isEmpty(dmsDrugParam.getMnemonicCode())){
            criteria.andMnemonicCodeLike("%" + dmsDrugParam.getMnemonicCode() + "%");
        }
        if(dmsDrugParam.getStock() != null){
            criteria.andStockEqualTo(dmsDrugParam.getStock());
        }
        if(!StringUtils.isEmpty(dmsDrugParam.getGenericName())){
            criteria.andGenericNameLike("%" + dmsDrugParam.getGenericName() + "%");
        }
        //返回数据包装成Result
        example.setOrderByClause("id desc");
        List<DmsDrug> dmsDrugList = dmsDrugMapper.selectByExample(example);
        List<DmsDrugResult> smsDrugResultList = new ArrayList<>();
        for (DmsDrug dmsDrug : dmsDrugList) {
            DmsDrugResult r = new DmsDrugResult();
            BeanUtils.copyProperties(dmsDrug, r);

            DmsDosageExample dmsDosageExample = new DmsDosageExample();
            dmsDosageExample.createCriteria().andIdEqualTo(dmsDrug.getDosageId());
            List<DmsDosage> dmsDosageList = dmsDosageMapper.selectByExample(dmsDosageExample);
            if(dmsDosageList.size() <= 0){
                return null;
            }
            r.setDosage(dmsDosageList.get(0));

            smsDrugResultList.add(r);
        }
        return smsDrugResultList;
    }


    /**
     * 描述:1.调用DmsDrugDao查询所有记录（不包括status=0）
     * <p>author: ma
     * <p>author: 赵煜 修改越界错误
     */
    @Override
    public List<DmsDrugResult> selectAllDrug(){
        DmsDrugExample example = new DmsDrugExample();
        example.createCriteria().andStatusNotEqualTo(0);
        //返回数据包装成Result
        List<DmsDrug> dmsDrugs = dmsDrugMapper.selectByExample(example);
        List<DmsDrugResult> dmsDrugResultList = new ArrayList<>();
        for (DmsDrug dmsDrug   : dmsDrugs) {
            DmsDrugResult dmsDrugResult = new DmsDrugResult();
            BeanUtils.copyProperties(dmsDrug, dmsDrugResult);

            DmsDosageExample dmsDosageExample = new DmsDosageExample();
            //封装剂型
            dmsDosageExample.createCriteria().andIdEqualTo(dmsDrug.getDosageId());
            List<DmsDosage> dmsDosageList = dmsDosageMapper.selectByExample(dmsDosageExample);
            if(!CollectionUtil.isEmpty(dmsDosageList)){
                dmsDrugResult.setDosage(dmsDosageList.get(0));
            }
            dmsDrugResultList.add(dmsDrugResult);
        }
        return dmsDrugResultList;
    }

    @Override
    public List<DmsDosageResult> selectAllDosage(){
        DmsDosageExample example = new DmsDosageExample();
        example.createCriteria().andStatusNotEqualTo(0);
        //返回数据包装成Result
        List<DmsDosage> dmsDosages = dmsDosageMapper.selectByExample(example);
        List<DmsDosageResult> dosageResults = new ArrayList<>();
        for (DmsDosage s : dmsDosages) {
            DmsDosageResult r = new DmsDosageResult();
            BeanUtils.copyProperties(s, r);
            dosageResults.add(r);
        }
        return dosageResults;
    }

    @Override
    public DmsDrugResult selectById(Long id) {
        DmsDrug dmsDrug = dmsDrugMapper.selectByPrimaryKey(id);
        DmsDrugResult dmsDrugResult = new DmsDrugResult();
        BeanUtils.copyProperties(dmsDrug,dmsDrugResult);
        //封装剂型
        DmsDosage dmsDosage = dmsDosageMapper.selectByPrimaryKey(dmsDrug.getDosageId());
        dmsDrugResult.setDosage(dmsDosage);
        return dmsDrugResult;
    }

}


<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/model/DmsNonDrugExample.java<|end_filename|>
package com.neu.his.mbg.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DmsNonDrugExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsNonDrugExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andCodeIsNull() {
            addCriterion("code is null");
            return (Criteria) this;
        }

        public Criteria andCodeIsNotNull() {
            addCriterion("code is not null");
            return (Criteria) this;
        }

        public Criteria andCodeEqualTo(String value) {
            addCriterion("code =", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotEqualTo(String value) {
            addCriterion("code <>", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeGreaterThan(String value) {
            addCriterion("code >", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeGreaterThanOrEqualTo(String value) {
            addCriterion("code >=", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLessThan(String value) {
            addCriterion("code <", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLessThanOrEqualTo(String value) {
            addCriterion("code <=", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLike(String value) {
            addCriterion("code like", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotLike(String value) {
            addCriterion("code not like", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeIn(List<String> values) {
            addCriterion("code in", values, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotIn(List<String> values) {
            addCriterion("code not in", values, "code");
            return (Criteria) this;
        }

        public Criteria andCodeBetween(String value1, String value2) {
            addCriterion("code between", value1, value2, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotBetween(String value1, String value2) {
            addCriterion("code not between", value1, value2, "code");
            return (Criteria) this;
        }

        public Criteria andNameIsNull() {
            addCriterion("name is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("name is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("name =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("name <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("name >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("name >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("name <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("name <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("name like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("name not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("name in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("name not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("name between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("name not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andFormatIsNull() {
            addCriterion("format is null");
            return (Criteria) this;
        }

        public Criteria andFormatIsNotNull() {
            addCriterion("format is not null");
            return (Criteria) this;
        }

        public Criteria andFormatEqualTo(String value) {
            addCriterion("format =", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatNotEqualTo(String value) {
            addCriterion("format <>", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatGreaterThan(String value) {
            addCriterion("format >", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatGreaterThanOrEqualTo(String value) {
            addCriterion("format >=", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatLessThan(String value) {
            addCriterion("format <", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatLessThanOrEqualTo(String value) {
            addCriterion("format <=", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatLike(String value) {
            addCriterion("format like", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatNotLike(String value) {
            addCriterion("format not like", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatIn(List<String> values) {
            addCriterion("format in", values, "format");
            return (Criteria) this;
        }

        public Criteria andFormatNotIn(List<String> values) {
            addCriterion("format not in", values, "format");
            return (Criteria) this;
        }

        public Criteria andFormatBetween(String value1, String value2) {
            addCriterion("format between", value1, value2, "format");
            return (Criteria) this;
        }

        public Criteria andFormatNotBetween(String value1, String value2) {
            addCriterion("format not between", value1, value2, "format");
            return (Criteria) this;
        }

        public Criteria andPriceIsNull() {
            addCriterion("price is null");
            return (Criteria) this;
        }

        public Criteria andPriceIsNotNull() {
            addCriterion("price is not null");
            return (Criteria) this;
        }

        public Criteria andPriceEqualTo(BigDecimal value) {
            addCriterion("price =", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotEqualTo(BigDecimal value) {
            addCriterion("price <>", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThan(BigDecimal value) {
            addCriterion("price >", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("price >=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThan(BigDecimal value) {
            addCriterion("price <", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("price <=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceIn(List<BigDecimal> values) {
            addCriterion("price in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotIn(List<BigDecimal> values) {
            addCriterion("price not in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("price between", value1, value2, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("price not between", value1, value2, "price");
            return (Criteria) this;
        }

        public Criteria andExpClassIdIsNull() {
            addCriterion("exp_class_id is null");
            return (Criteria) this;
        }

        public Criteria andExpClassIdIsNotNull() {
            addCriterion("exp_class_id is not null");
            return (Criteria) this;
        }

        public Criteria andExpClassIdEqualTo(Long value) {
            addCriterion("exp_class_id =", value, "expClassId");
            return (Criteria) this;
        }

        public Criteria andExpClassIdNotEqualTo(Long value) {
            addCriterion("exp_class_id <>", value, "expClassId");
            return (Criteria) this;
        }

        public Criteria andExpClassIdGreaterThan(Long value) {
            addCriterion("exp_class_id >", value, "expClassId");
            return (Criteria) this;
        }

        public Criteria andExpClassIdGreaterThanOrEqualTo(Long value) {
            addCriterion("exp_class_id >=", value, "expClassId");
            return (Criteria) this;
        }

        public Criteria andExpClassIdLessThan(Long value) {
            addCriterion("exp_class_id <", value, "expClassId");
            return (Criteria) this;
        }

        public Criteria andExpClassIdLessThanOrEqualTo(Long value) {
            addCriterion("exp_class_id <=", value, "expClassId");
            return (Criteria) this;
        }

        public Criteria andExpClassIdIn(List<Long> values) {
            addCriterion("exp_class_id in", values, "expClassId");
            return (Criteria) this;
        }

        public Criteria andExpClassIdNotIn(List<Long> values) {
            addCriterion("exp_class_id not in", values, "expClassId");
            return (Criteria) this;
        }

        public Criteria andExpClassIdBetween(Long value1, Long value2) {
            addCriterion("exp_class_id between", value1, value2, "expClassId");
            return (Criteria) this;
        }

        public Criteria andExpClassIdNotBetween(Long value1, Long value2) {
            addCriterion("exp_class_id not between", value1, value2, "expClassId");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeIsNull() {
            addCriterion("mnemonic_code is null");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeIsNotNull() {
            addCriterion("mnemonic_code is not null");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeEqualTo(String value) {
            addCriterion("mnemonic_code =", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeNotEqualTo(String value) {
            addCriterion("mnemonic_code <>", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeGreaterThan(String value) {
            addCriterion("mnemonic_code >", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeGreaterThanOrEqualTo(String value) {
            addCriterion("mnemonic_code >=", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeLessThan(String value) {
            addCriterion("mnemonic_code <", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeLessThanOrEqualTo(String value) {
            addCriterion("mnemonic_code <=", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeLike(String value) {
            addCriterion("mnemonic_code like", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeNotLike(String value) {
            addCriterion("mnemonic_code not like", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeIn(List<String> values) {
            addCriterion("mnemonic_code in", values, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeNotIn(List<String> values) {
            addCriterion("mnemonic_code not in", values, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeBetween(String value1, String value2) {
            addCriterion("mnemonic_code between", value1, value2, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeNotBetween(String value1, String value2) {
            addCriterion("mnemonic_code not between", value1, value2, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andRecordTypeIsNull() {
            addCriterion("record_type is null");
            return (Criteria) this;
        }

        public Criteria andRecordTypeIsNotNull() {
            addCriterion("record_type is not null");
            return (Criteria) this;
        }

        public Criteria andRecordTypeEqualTo(Integer value) {
            addCriterion("record_type =", value, "recordType");
            return (Criteria) this;
        }

        public Criteria andRecordTypeNotEqualTo(Integer value) {
            addCriterion("record_type <>", value, "recordType");
            return (Criteria) this;
        }

        public Criteria andRecordTypeGreaterThan(Integer value) {
            addCriterion("record_type >", value, "recordType");
            return (Criteria) this;
        }

        public Criteria andRecordTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("record_type >=", value, "recordType");
            return (Criteria) this;
        }

        public Criteria andRecordTypeLessThan(Integer value) {
            addCriterion("record_type <", value, "recordType");
            return (Criteria) this;
        }

        public Criteria andRecordTypeLessThanOrEqualTo(Integer value) {
            addCriterion("record_type <=", value, "recordType");
            return (Criteria) this;
        }

        public Criteria andRecordTypeIn(List<Integer> values) {
            addCriterion("record_type in", values, "recordType");
            return (Criteria) this;
        }

        public Criteria andRecordTypeNotIn(List<Integer> values) {
            addCriterion("record_type not in", values, "recordType");
            return (Criteria) this;
        }

        public Criteria andRecordTypeBetween(Integer value1, Integer value2) {
            addCriterion("record_type between", value1, value2, "recordType");
            return (Criteria) this;
        }

        public Criteria andRecordTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("record_type not between", value1, value2, "recordType");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNull() {
            addCriterion("create_date is null");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNotNull() {
            addCriterion("create_date is not null");
            return (Criteria) this;
        }

        public Criteria andCreateDateEqualTo(Date value) {
            addCriterion("create_date =", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotEqualTo(Date value) {
            addCriterion("create_date <>", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThan(Date value) {
            addCriterion("create_date >", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
            addCriterion("create_date >=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThan(Date value) {
            addCriterion("create_date <", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThanOrEqualTo(Date value) {
            addCriterion("create_date <=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateIn(List<Date> values) {
            addCriterion("create_date in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotIn(List<Date> values) {
            addCriterion("create_date not in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateBetween(Date value1, Date value2) {
            addCriterion("create_date between", value1, value2, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotBetween(Date value1, Date value2) {
            addCriterion("create_date not between", value1, value2, "createDate");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNull() {
            addCriterion("dept_id is null");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNotNull() {
            addCriterion("dept_id is not null");
            return (Criteria) this;
        }

        public Criteria andDeptIdEqualTo(Long value) {
            addCriterion("dept_id =", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotEqualTo(Long value) {
            addCriterion("dept_id <>", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThan(Long value) {
            addCriterion("dept_id >", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThanOrEqualTo(Long value) {
            addCriterion("dept_id >=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThan(Long value) {
            addCriterion("dept_id <", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThanOrEqualTo(Long value) {
            addCriterion("dept_id <=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdIn(List<Long> values) {
            addCriterion("dept_id in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotIn(List<Long> values) {
            addCriterion("dept_id not in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdBetween(Long value1, Long value2) {
            addCriterion("dept_id between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotBetween(Long value1, Long value2) {
            addCriterion("dept_id not between", value1, value2, "deptId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>HIS-web/src/api/schedule.js<|end_filename|>
import request from '@/utils/request'
export function getRulelist(data) {
  return request({
    url: '/skd/listRule',
    method: 'post',
    params:data
  })
}

export function generateSkd(data) {
  return request({
    url: '/skd/generateSkd',
    method: 'post',
    params:data
  })
}

export function createRule(data) {
  return request({
    url: '/skd/createRule',
    method: 'post',
    data
  })
}

export function getRuleDetail(id) {
  return request({
    url: '/skd/getRuleDetail',
    method: 'post',
    params: {
      ruleId:id
    }
  })
}

export function updateRule(data) {
  return request({
    url: '/skd/updateRule/'+data.ruleid,
    method: 'post',
    data
  })
}

export function deleteRule(data) {
  return request({
    url: '/skd/deleteRule',
    method: 'post',
    params:{
      ids:data
    }
  })
}

export function querySkd(data) {
  return request({
    url: '/skd/listSkd',
    method: 'post',
    params:data
  })
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsMechanicItemRecordService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsMechanicItemRecordResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
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;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsMechanicItemRecordService {


    @RequestMapping(value = "/DmsMechanicItemRecord/listByDept", method = RequestMethod.POST)
    CommonResult<List<DmsMechanicItemRecordResult>> listByDept(@RequestParam("deptId") Long deptId);


    @RequestMapping(value = "/DmsMechanicItemRecord/log", method = RequestMethod.POST)
    CommonResult log(@RequestParam("itemRecordId") Long itemRecordId, @RequestParam("logStaffId") Long logStaffId);


    @RequestMapping(value = "/DmsMechanicItemRecord/uploadResult", method = RequestMethod.POST)
    CommonResult uploadResult(@RequestParam("id") Long id,
                                     @RequestParam("executeStaffId") Long excuteStaffId,
                                     @RequestParam("checkResult") String checkResult,
                                     @RequestParam("resultImgUrlList") String resultImgUrlList);

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsDrugItem.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;


import com.neu.his.cloud.zuul.model.DmsDosage;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
@ToString
public class DmsDrugItem implements Serializable {

    private Long id;

    private String code;

    private String name;

    private String format;

    private BigDecimal price;

    private String unit;

    private String manufacturer;

    private DmsDosage dosage;

    private Long typeId;

    private String mnemonicCode;

    private Date createDate;

    private Long stock;

    private String genericName;

    private Integer status;

    private Long num;

    private Long drugId;
}


<|start_filename|>HIS-web/src/api/outpatient/dmscasemodel.js<|end_filename|>
import request from '@/utils/request'
export function listModelCatTree(ownId,scope) {
  return request({
    url: '/DmsCaseModel/listModelCatTree',
    method: 'post',
    params: {
      ownId:ownId,
      scope:scope
    }
  })
}

export function createModel(data) {
  return request({
    url: '/DmsCaseModel/create',
    method: 'post',
    data
  })
}

export function deleteModel(data) {
  return request({
    url: '/DmsCaseModel/deleteModelOrCat',
    method: 'post',
    params:{
      id:data
    }
  })
}

export function updateModel(data) {
  return request({
    url: '/DmsCaseModel/updateModel',
    method: 'post',
    params:{
      modelId:data.modelId
    },
    data
  })
}

export function getModelDetail(data) {
  return request({
    url: '/DmsCaseModel/getModelDetail/'+data,
    method: 'get'
  })
}

export function getAllStaffModel(data) {
  return request({
    url: '/DmsCaseModel/getAllStaffModel',
    method: 'get',
    params:{
      staffId:data
    }
  })
}

<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/controller/BmsInvoiceController.java<|end_filename|>
package com.neu.his.cloud.service.bms.controller;


import com.neu.his.cloud.service.bms.common.CommonResult;
import com.neu.his.cloud.service.bms.dto.bms.BmsInvoiceResult;
import com.neu.his.cloud.service.bms.service.BmsInvoiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@Controller
@Api(tags = "BmsInvoiceController", description = "发票管理")
@RequestMapping("/invoice")
@CrossOrigin(allowCredentials = "true")
public class BmsInvoiceController {
    @Autowired
    BmsInvoiceService bmsInvoiceService;

    @ApiOperation(value = "发票补打")
    @RequestMapping(value = "/supplementPrintInvoice", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult supplementPrintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("registrationId") Long registrationId){
        int result = bmsInvoiceService.supplementPrintInvoice(newInvoiceNo, registrationId);
        if (result == 1){
            return CommonResult.success(result);
        }
        else {
            return CommonResult.failed();
        }
    }

    @ApiOperation(value = "发票重打")
    @RequestMapping(value = "/reprintInvoice", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult  reprintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("oldInvoiceNo") Long oldInvoiceNo){
        int result = bmsInvoiceService.reprintInvoice(newInvoiceNo, oldInvoiceNo);
        if (result == 1){
            return CommonResult.success(result);
        }
        else {
            return CommonResult.failed();
        }
    }

    @ApiOperation(value = "传入新的start_datetime和end_datetime和收费员id，查询发票信息")
    @RequestMapping(value = "/queryInvoiceInfo", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfo(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startDatetime, @RequestParam("endDatetime")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDatetime){
        List<BmsInvoiceResult> bmsInvoiceResultList = bmsInvoiceService.queryInvoiceInfo(cashierId, startDatetime, endDatetime);
        return CommonResult.success(bmsInvoiceResultList);
    }

    @ApiOperation(value = "根据日结记录id查询发票详细信息")
    @RequestMapping(value = "/queryInvoiceInfoBySettleId", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfoBySettleId(@RequestParam("settleRecordId") Long settleRecordId){
        List<BmsInvoiceResult> bmsInvoiceResultList = bmsInvoiceService.queryInvoiceInfoBySettleId(settleRecordId);
        return CommonResult.success(bmsInvoiceResultList);
    }
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/pms/PmsDrugStorePatientListResult.java<|end_filename|>
package com.neu.his.cloud.service.dms.dto.pms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class PmsDrugStorePatientListResult implements Serializable {
    @ApiModelProperty(value = "未发药患者")
    List<PmsDrugStorePatientResult> undoPatientList ;
    @ApiModelProperty(value = "已发药患者")
    List<PmsDrugStorePatientResult> donePatientList ;



}


<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/mapper/DmsDrugMapper.java<|end_filename|>
package com.neu.his.mbg.mapper;

import com.neu.his.mbg.model.DmsDrug;
import com.neu.his.mbg.model.DmsDrugExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsDrugMapper {
    int countByExample(DmsDrugExample example);

    int deleteByExample(DmsDrugExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsDrug record);

    int insertSelective(DmsDrug record);

    List<DmsDrug> selectByExample(DmsDrugExample example);

    DmsDrug selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsDrug record, @Param("example") DmsDrugExample example);

    int updateByExample(@Param("record") DmsDrug record, @Param("example") DmsDrugExample example);

    int updateByPrimaryKeySelective(DmsDrug record);

    int updateByPrimaryKey(DmsDrug record);
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsDrugStoreDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;


import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsRefundDrugListParam;
import com.neu.his.cloud.zuul.dto.pms.PmsDrugStorePatientListResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;


@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsDrugStoreDistributionService {

    @RequestMapping(value = "/drugStore/listPatient", method = RequestMethod.POST)
    CommonResult<PmsDrugStorePatientListResult> listPatient(@RequestParam(value = "medicalRecordNo",required = false) String medicalRecordNo,
                                                                   @RequestParam("queryDate") String queryDate,
                                                                   @RequestParam("type") Integer type);


    @RequestMapping(value = "/drugStore/releaseDrug", method = RequestMethod.POST)
    CommonResult releaseDrug(@RequestParam("prescriptionId") Long prescriptionId,
                                    @RequestParam("type") Integer type);

    @RequestMapping(value = "/drugStore/refundDrug", method = RequestMethod.POST)
    public CommonResult refundDrug(@RequestBody DmsRefundDrugListParam dmsRefundDrugListParam);

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/sms/ApiPcSmsEchartsDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.sms;



import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.sms.SmsDeptAmountStatisticsResult;
import com.neu.his.cloud.zuul.dto.sms.SmsPatientsStatisticsResult;
import com.neu.his.cloud.zuul.dto.sms.SmsStaffAmountStatisticsResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcSmsEchartsDistributionService {
    @RequestMapping(value = "/charts/staffPatients", method = RequestMethod.GET)
    CommonResult<SmsPatientsStatisticsResult> staffPatients(@RequestParam Long staffId);


    @RequestMapping(value = "/charts/staffClassifyStatistics", method = RequestMethod.GET)
    CommonResult<SmsStaffAmountStatisticsResult> staffClassifyStatistics(@RequestParam Long staffId) ;


    @RequestMapping(value = "/charts/deptPatients", method = RequestMethod.GET)
    CommonResult<SmsPatientsStatisticsResult> deptPatients(@RequestParam Long deptId);

    @RequestMapping(value = "/charts/deptClassifyStatistics", method = RequestMethod.GET)
    CommonResult<SmsDeptAmountStatisticsResult> deptClassifyStatistics(@RequestParam Long deptId);


    @RequestMapping(value = "/charts/totalClassifyStatistics", method = RequestMethod.GET)
    CommonResult<SmsDeptAmountStatisticsResult> totalClassifyStatistics();


    @RequestMapping(value = "/charts/totalPatients", method = RequestMethod.GET)
    CommonResult<SmsPatientsStatisticsResult> totalPatients() ;
}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsRegistrationService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.app.AppRegistrationParam;
import com.neu.his.common.dto.dms.DmsRegHistoryResult;
import com.neu.his.common.dto.dms.DmsRegistrationParam;

import java.util.List;

/**
 * 挂号
 */
public interface DmsRegistrationService {
    /**
     * 描述：挂号
     */
    int createRegistration(DmsRegistrationParam dmsRegistrationParam);
    /**
     * 描述：根据身份证号查询历史挂号记录
     */
    List<DmsRegHistoryResult> listRegHistory(String identificationNo);

    /**
     * 描述:app挂号
     * 1.先根据skd_id判断remain是否>0
     * 2.如果大于0，绑定医生（skd_id、bind_status=1）,并修改sms_skd中的排班限额（-1）
     * 3.向dms_registration插入信息
     * 4.向bms_bills_record中插入账单记录
     */
    int appRegistration(AppRegistrationParam appRegistrationParam);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/bms/ApiPcBmsFeeDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.bms;


import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.bms.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcBmsFeeDistributionService {


    @RequestMapping(value = "/fee/listRegisteredPatient", method = RequestMethod.GET)
    CommonResult<CommonPage<BmsRegistrationPatientResult>> listRegisteredPatient(@RequestParam(required=false,name = "medicalRecordNo") String  medicalRecordNo,
                                                                                        @RequestParam(required=false,name="queryDate")@DateTimeFormat(pattern = "yyyy-MM-dd") Date queryDate,
                                                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);
    @RequestMapping(value = "/fee/charge", method = RequestMethod.POST)
    CommonResult charge(@RequestBody List<BmsChargeParam> bmsChargeParamList);

    @RequestMapping(value = "/fee/listRefundByRegistrationId", method = RequestMethod.GET)
    CommonResult<List<BmsRefundChargeResult>>  listRefundByRegistrationId(@RequestParam("registrationId") Long registrationId);


    @RequestMapping(value = "/fee/refundCharge", method = RequestMethod.POST)
    CommonResult refundCharge(@RequestBody List<BmsRefundChargeParam> bmsRefundChargeParamList);


    @RequestMapping(value = "/fee/refundRegistrationCharge", method = RequestMethod.POST)
    CommonResult refundRegistrationCharge(@RequestBody BmsRefundRegChargeParam bmsRefundRegChargeParam);


    @RequestMapping(value = "/fee/listChargeByRegistrationId", method = RequestMethod.GET)
    CommonResult<List<BmsChargeResult>>  listChargeByRegistrationId(@RequestParam("registrationId") Long registrationId);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/ZuulApplication.java<|end_filename|>
package com.neu.his.cloud.zuul;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication(scanBasePackages = "com.neu.his.cloud.zuul")
@EnableEurekaClient
@EnableZuulProxy
@EnableFeignClients
@EnableDiscoveryClient
//@EnableCircuitBreaker
//@EnableHystrix
@MapperScan("com.neu.his.cloud.zuul.mapper")
public class ZuulApplication {
    public static void main(String[] args) {
        SpringApplication.run(ZuulApplication.class,args);
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsRefundDrugListParam.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Getter
@Setter
@ToString
public class DmsRefundDrugListParam  implements Serializable {

    @ApiModelProperty("处方项List")
    List<DmsRefundDrugParam> refundItemList;
    @ApiModelProperty("执行人Id")
    Long excutorId;

}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/sms/SmsPatientsStatisticsResult.java<|end_filename|>
package com.neu.his.common.dto.sms;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;
@Setter
@Getter
@ToString
public class SmsPatientsStatisticsResult  implements Serializable {
    List<String> dateOfSevenDays;

    List<Long> numOfPatients;
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsCaseHistoryDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsCaseHistoryDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseHistoryParam;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseHistoryResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "DmsCaseHistoryDistributionController", description = "病历管理")
@RequestMapping("/caseHistory")
@CrossOrigin(allowCredentials = "true")
public class DmsCaseHistoryDistributionController {
    @Autowired
    ApiPcDmsCaseHistoryDistributionService apiPcDmsCaseHistoryDistributionService;

    @HystrixCommand(fallbackMethod = "submitPriliminaryDiseFallbackInfo")
    @ApiOperation(value = "提交初诊信息")
    @RequestMapping(value = "/submitPriliminaryDise", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult submitPriliminaryDise(DmsCaseHistoryParam dmsCaseHistoryParam){
       return apiPcDmsCaseHistoryDistributionService.submitPriliminaryDise(dmsCaseHistoryParam);
    }

    private CommonResult submitPriliminaryDiseFallbackInfo(DmsCaseHistoryParam dmsCaseHistoryParam){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "selectNotEndCaseHistoryByRegFallbackInfo")
    @ApiOperation(value = "根据挂号Id查询未结束就诊的历史病历（只含有初诊信息）")
    @RequestMapping(value = "/selectNotEndCaseHistoryByReg/{registrationId}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseHistoryResult> selectNotEndCaseHistoryByReg(@PathVariable("registrationId") Long registrationId){
        return apiPcDmsCaseHistoryDistributionService.selectNotEndCaseHistoryByReg(registrationId);
    }
    private CommonResult<DmsCaseHistoryResult> selectNotEndCaseHistoryByRegFallbackInfo(Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "selectEndCaseHistoryByRegFallbackInfo")
    @ApiOperation(value = "根据挂号id查询已结束就诊的历史病历（病历首页显示各种串）")
    @RequestMapping(value = "/selectEndCaseHistoryByReg/{registrationId}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseHistoryResult> selectEndCaseHistoryByReg(@PathVariable("registrationId") Long registrationId){

        return apiPcDmsCaseHistoryDistributionService.selectEndCaseHistoryByReg(registrationId);
    }
    private CommonResult<DmsCaseHistoryResult> selectEndCaseHistoryByRegFallbackInfo(Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "submitDefiniteDiseFallbackInfo")
    @ApiOperation(value = "确诊")
    @RequestMapping(value = "/submitDefiniteDise", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult submitDefiniteDise( DmsCaseHistoryParam dmsCaseHistoryParam){

       return  apiPcDmsCaseHistoryDistributionService.submitDefiniteDise(dmsCaseHistoryParam);
    }
    private CommonResult submitDefiniteDiseFallbackInfo(DmsCaseHistoryParam dmsCaseHistoryParam){
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "endDiagnosisFallbackInfo")
    @ApiOperation(value = "诊毕")
    @RequestMapping(value = "/endDiagnosis", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult endDiagnosis(DmsCaseHistoryParam dmsCaseHistoryParam){
        return apiPcDmsCaseHistoryDistributionService.endDiagnosis(dmsCaseHistoryParam);
    }
    private CommonResult endDiagnosisFallbackInfo(DmsCaseHistoryParam dmsCaseHistoryParam){
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/mapper/DmsMedicinePrescriptionRecordMapper.java<|end_filename|>
package com.neu.his.cloud.service.bms.mapper;

import com.neu.his.cloud.service.bms.model.DmsMedicinePrescriptionRecord;
import com.neu.his.cloud.service.bms.model.DmsMedicinePrescriptionRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsMedicinePrescriptionRecordMapper {
    int countByExample(DmsMedicinePrescriptionRecordExample example);

    int deleteByExample(DmsMedicinePrescriptionRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsMedicinePrescriptionRecord record);

    int insertSelective(DmsMedicinePrescriptionRecord record);

    List<DmsMedicinePrescriptionRecord> selectByExample(DmsMedicinePrescriptionRecordExample example);

    DmsMedicinePrescriptionRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsMedicinePrescriptionRecord record, @Param("example") DmsMedicinePrescriptionRecordExample example);

    int updateByExample(@Param("record") DmsMedicinePrescriptionRecord record, @Param("example") DmsMedicinePrescriptionRecordExample example);

    int updateByPrimaryKeySelective(DmsMedicinePrescriptionRecord record);

    int updateByPrimaryKey(DmsMedicinePrescriptionRecord record);
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/model/DmsDrugRefundItemRecord.java<|end_filename|>
package com.neu.his.cloud.api.pc.model;

import java.io.Serializable;
import java.util.Date;

public class DmsDrugRefundItemRecord implements Serializable {
    private Long id;

    private Integer status;

    private Integer type;

    private Long registrationId;

    private Long drugId;

    private Integer refundNumUnit;

    private Long refundNum;

    private Date refundTime;

    private Long excutorId;

    private Long refundItemRecordId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getRegistrationId() {
        return registrationId;
    }

    public void setRegistrationId(Long registrationId) {
        this.registrationId = registrationId;
    }

    public Long getDrugId() {
        return drugId;
    }

    public void setDrugId(Long drugId) {
        this.drugId = drugId;
    }

    public Integer getRefundNumUnit() {
        return refundNumUnit;
    }

    public void setRefundNumUnit(Integer refundNumUnit) {
        this.refundNumUnit = refundNumUnit;
    }

    public Long getRefundNum() {
        return refundNum;
    }

    public void setRefundNum(Long refundNum) {
        this.refundNum = refundNum;
    }

    public Date getRefundTime() {
        return refundTime;
    }

    public void setRefundTime(Date refundTime) {
        this.refundTime = refundTime;
    }

    public Long getExcutorId() {
        return excutorId;
    }

    public void setExcutorId(Long excutorId) {
        this.excutorId = excutorId;
    }

    public Long getRefundItemRecordId() {
        return refundItemRecordId;
    }

    public void setRefundItemRecordId(Long refundItemRecordId) {
        this.refundItemRecordId = refundItemRecordId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", status=").append(status);
        sb.append(", type=").append(type);
        sb.append(", registrationId=").append(registrationId);
        sb.append(", drugId=").append(drugId);
        sb.append(", refundNumUnit=").append(refundNumUnit);
        sb.append(", refundNum=").append(refundNum);
        sb.append(", refundTime=").append(refundTime);
        sb.append(", excutorId=").append(excutorId);
        sb.append(", refundItemRecordId=").append(refundItemRecordId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsHerbalPrescriptionRecordDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsHerbalPrescriptionRecordDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsHerbalPrescriptionRecordParam;
import com.neu.his.cloud.zuul.dto.dms.DmsHerbalPrescriptionRecordResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsHerbalPrescriptionRecordDistributionController", description = "草药处方管理")
@RequestMapping("/DmsHerbalPrescriptionRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsHerbalPrescriptionRecordDistributionController {

    @Autowired
    private ApiPcDmsHerbalPrescriptionRecordDistributionService apiPcDmsHerbalPrescriptionRecordDistributionService;

    @HystrixCommand(fallbackMethod = "applyFallbackInfo")
    @ApiOperation(value = "开立处方")
    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult apply(@RequestBody DmsHerbalPrescriptionRecordParam dmsHerbalPrescriptionRecordParam, BindingResult result){
      return apiPcDmsHerbalPrescriptionRecordDistributionService.apply(dmsHerbalPrescriptionRecordParam);
    }
    private CommonResult applyFallbackInfo( DmsHerbalPrescriptionRecordParam dmsHerbalPrescriptionRecordParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "invalidFallbackInfo")
    @ApiOperation(value = "作废处方")
    @RequestMapping(value = "/invalid", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult invalid(@RequestParam("ids") List<Long> ids){
       return apiPcDmsHerbalPrescriptionRecordDistributionService.invalid(ids);
    }
    private CommonResult invalidFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listByRegFallbackInfo")
    @ApiOperation(value = "根据挂号Id查询处方")
    @RequestMapping(value = "/listByReg", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByReg(@RequestParam("registrationId") Long registrationId){
        return apiPcDmsHerbalPrescriptionRecordDistributionService.listByReg(registrationId);
    }
    private CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByRegFallbackInfo( Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listByIdsFallbackInfo")
    @ApiOperation(value = "根据ids查询草药处方")
    @RequestMapping(value = "/listByIds", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByIds(@RequestParam("ids") List<Long> ids){
        return apiPcDmsHerbalPrescriptionRecordDistributionService.listByIds(ids);
    }
    private CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByIdsFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}


<|start_filename|>HIS-web/src/api/user.js<|end_filename|>
import request from '@/utils/request'
export function login(data) {
  return request({
    url: '/staff/login',
    method: 'post',
    data
  })
}

export function create(data) {
  return request({
    url: '/staff/create',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/staff/update/'+data.id,
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/staff/info',
    method: 'get'
  })
}

export function logout() {
  return Promise.resolve()
}

export function select(data){
  return request({
    url: 'staff/select',
    data,
    params:{
      pageSize:data.pageSize,
      pageNum:data.pageNum
    },
    method: 'post',
  })
}

export function getUserList(data){
  return request({
    url: 'staff/select',
    data,
    params:{
      pageSize:100000,
      pageNum:1
    },
    method: 'post',
  })
}




<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/impl/SmsRegistrationRankServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.sms.service.impl;

import cn.hutool.core.collection.CollectionUtil;

import com.neu.his.cloud.service.sms.dto.sms.SmsRegistrationRankParam;
import com.neu.his.cloud.service.sms.dto.sms.SmsRegistrationRankResult;
import com.neu.his.cloud.service.sms.mapper.SmsRegistrationRankMapper;
import com.neu.his.cloud.service.sms.model.SmsRegistrationRank;
import com.neu.his.cloud.service.sms.model.SmsRegistrationRankExample;
import com.neu.his.cloud.service.sms.service.SmsRegistrationRankService;
import com.neu.his.cloud.service.sms.util.RedisUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.List;


/**
 * 挂号级别
 */
@Service
public class SmsRegistrationRankServiceImpl implements SmsRegistrationRankService {

    @Autowired
    private SmsRegistrationRankMapper smsRegistrationRankMapper;
    @Autowired
    private RedisUtil redisUtil;


    @Override
    public int create(SmsRegistrationRankParam smsRegistrationRankParam){
        SmsRegistrationRank smsRegistrationRank = new SmsRegistrationRank();
        BeanUtils.copyProperties(smsRegistrationRankParam, smsRegistrationRank);
        smsRegistrationRank.setStatus(1);
        //查询是否有状态非0且名字相同的挂号级别
        SmsRegistrationRankExample example = new SmsRegistrationRankExample();
        example.createCriteria().andNameEqualTo(smsRegistrationRank.getName()).andStatusNotEqualTo(0);
        List<SmsRegistrationRank> lists = smsRegistrationRankMapper.selectByExample(example);
        if (lists.size() > 0) {
            return 0;
        }

        //插入成功，在redis修改flag
        redisUtil.setObj("registrationRankChangeStatus","1");

        //没有则插入数据
        return smsRegistrationRankMapper.insert(smsRegistrationRank);
    }

    @Override
    public int delete(List<Long> ids){
        SmsRegistrationRank smsRegistrationRank = new SmsRegistrationRank();
        smsRegistrationRank.setStatus(0);
        SmsRegistrationRankExample example = new SmsRegistrationRankExample();
        example.createCriteria().andIdIn(ids);

        //删除成功，在redis修改flag
        redisUtil.setObj("registrationRankChangeStatus","1");

        return smsRegistrationRankMapper.updateByExampleSelective(smsRegistrationRank, example);
    }

    @Override
    public int update(Long id,SmsRegistrationRankParam smsRegistrationRankParam){
        SmsRegistrationRank smsRegistrationRank = new SmsRegistrationRank();
        BeanUtils.copyProperties(smsRegistrationRankParam, smsRegistrationRank);
        smsRegistrationRank.setId(id);

        //更新成功，在redis修改flag
        redisUtil.setObj("registrationRankChangeStatus","1");

        return smsRegistrationRankMapper.updateByPrimaryKeySelective(smsRegistrationRank);
    }

    @Override
    public List<SmsRegistrationRankResult> select(SmsRegistrationRankParam smsRegistrationRankParam){
        SmsRegistrationRankExample example = new SmsRegistrationRankExample();
        SmsRegistrationRankExample.Criteria criteria = example.createCriteria();
        //如果没有指明state，返回不为0的
        if(smsRegistrationRankParam.getStatus() == null){
            criteria.andStatusNotEqualTo(0);
        }
        //是否按编码、名称、价格、显示顺序号查询

        if(!StringUtils.isEmpty(smsRegistrationRankParam.getCode())){
            criteria.andCodeLike("%" + smsRegistrationRankParam.getCode() + "%");
        }
        if(!StringUtils.isEmpty(smsRegistrationRankParam.getName())){
            criteria.andNameLike("%" + smsRegistrationRankParam.getName() + "%");
        }
        if(smsRegistrationRankParam.getPrice() != null){
            criteria.andPriceEqualTo(smsRegistrationRankParam.getPrice());
        }
        if(smsRegistrationRankParam.getSeqNo() != null){
            criteria.andSeqNoEqualTo(smsRegistrationRankParam.getSeqNo());
        }
        //返回数据包装成Result
        example.setOrderByClause("id desc");
        List<SmsRegistrationRank> smsRegistrationRankResults=smsRegistrationRankMapper.selectByExample(example);
        List<SmsRegistrationRankResult> returnList = new ArrayList<>();
        for (SmsRegistrationRank s : smsRegistrationRankResults) {
            SmsRegistrationRankResult r = new SmsRegistrationRankResult();
            BeanUtils.copyProperties(s, r);
            returnList.add(r);
        }
        return returnList;
    }

    @Override
    public List<SmsRegistrationRankResult> selectAll(){
        //先在redis中查询是否存在
        String status = (String)redisUtil.getObj("registrationRankChangeStatus");
        if(status != null && status.equals("0")){
            List<SmsRegistrationRankResult> resultList = (List<SmsRegistrationRankResult>)redisUtil.getObj("allRegistrationRank");
            if(CollectionUtil.isEmpty(resultList)){
                return resultList;
            }
        }

        // 在数据库中查找
        SmsRegistrationRankExample example = new SmsRegistrationRankExample();
        example.createCriteria().andStatusNotEqualTo(0);
        //返回数据包装成Result
        List<SmsRegistrationRank> smsRegistrationRank = smsRegistrationRankMapper.selectByExample(example);
        List<SmsRegistrationRankResult> returnList = new ArrayList<>();
        for (SmsRegistrationRank s : smsRegistrationRank) {
            SmsRegistrationRankResult r = new SmsRegistrationRankResult();
            BeanUtils.copyProperties(s, r);
            returnList.add(r);
        }

        //向redis添加
        redisUtil.setObj("allRegistrationRank",returnList);
        redisUtil.setObj("registrationRankChangeStatus","0");

        return returnList;
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/sms/SmsSkdRuleParam.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.sms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class SmsSkdRuleParam  implements Serializable {
    @ApiModelProperty(value = "操作人id")
    private Long operatorId;
    @ApiModelProperty(value = "规则名")
    private String ruleName;
    @ApiModelProperty(value = "描述")
    private String description;
    @ApiModelProperty(value = "科室id")
    private Long deptId;
    @ApiModelProperty(value = "排班项")
    private List<SmsSkdRuleItemParam> smsSkdRuleItemParamList;


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/sms/SmsWorkloadService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.sms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsWorkloadResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;
import java.util.List;

/**
 * 工作量
 */
@FeignClient(value = "his-cloud-service-sms")
public interface SmsWorkloadService {

    @RequestMapping(value = "/workload/queryPersonal", method = RequestMethod.POST)
    CommonResult<SmsWorkloadResult> queryPersonalWorkload(@RequestParam("staffId") Long staffId,
                                                                 @RequestParam("startDatetime") String startDatetime,
                                                                 @RequestParam("endDatetime")String endDatetime);


    @RequestMapping(value = "/workload/queryDept", method = RequestMethod.POST)
    CommonResult<SmsWorkloadResult>  queryDeptWorkload(@RequestParam("deptId") Long deptId,
                                                              @RequestParam("startDatetime")String startDatetime,
                                                              @RequestParam("endDatetime") String endDatetime);



    @RequestMapping(value = "/workload/queryDeptWorkloadList", method = RequestMethod.POST)
    CommonResult<List<SmsWorkloadResult>> queryDeptWorkloadList(@RequestParam("startDatetime") String startDatetime,
                                                                       @RequestParam("endDatetime")String endDatetime);



    @RequestMapping(value = "/workload/queryDeptPersonalWorkloadList", method = RequestMethod.POST)
    CommonResult<List<SmsWorkloadResult>>  queryDeptPersonalWorkloadList(@RequestParam("deptId") Long deptId,
                                                                                @RequestParam("startDatetime") String startDatetime,
                                                                                @RequestParam("endDatetime")String endDatetime);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsRegistrationDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;

import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsRegistrationParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;


@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsRegistrationDistributionService {
    @RequestMapping(value = "/registration/createRegistration", method = RequestMethod.POST)
    CommonResult createRegistration(@RequestBody DmsRegistrationParam dmsRegistrationParam);

}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/dms/DmsDrugRedisParam.java<|end_filename|>
package com.neu.his.common.dto.dms;

import com.neu.his.common.dto.entity.DmsDrugItem;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class DmsDrugRedisParam implements Serializable {

    @ApiModelProperty(value = "名称" )
    private String name;
    @ApiModelProperty(value = "药品列表" )
    private List<DmsDrugItem> druglist;

}


<|start_filename|>HIS-web/src/api/upload.js<|end_filename|>
import request from '@/utils/request'

export function policy(data) {
  return request({
    url: '/aliyun/oss/policy',
    method: 'get',
    data
  })
}

export function callback(data) {
  return request({
    url: '/aliyun/oss/callback',
    method: 'post',
    data
  })
} 

export function uploadResult(data) {
  return request({
    url: '/DmsMechanicItemRecord/uploadResult',
    method: 'post',
    params:data
  })
} 



<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsDiseDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsDiseDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsDiseParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDiseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsDiseDistributionController", description = "诊断管理")
@RequestMapping("/DmsDise")
@CrossOrigin(allowCredentials = "true")
public class DmsDiseDistributionController {
    @Autowired
    private ApiPcDmsDiseDistributionService apiPcDmsDiseDistributionService;

    @HystrixCommand(fallbackMethod = "createFallbackInfo")
    @ApiOperation(value = "新增诊断")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsDiseParam dmsDiseParam , BindingResult result){
       return  apiPcDmsDiseDistributionService.create(dmsDiseParam);
    }
    private CommonResult createFallbackInfo(DmsDiseParam dmsDiseParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteFallbackInfo")
    @ApiOperation(value = "根据ids删除诊断")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        return apiPcDmsDiseDistributionService.delete(ids);
    }
    private CommonResult deleteFallbackInfo( List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateFallbackInfo")
    @ApiOperation(value = "更新诊断信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody DmsDiseParam dmsDiseParam , BindingResult result){
       return apiPcDmsDiseDistributionService.update(id,dmsDiseParam);
    }
    private CommonResult updateFallbackInfo(Long id, DmsDiseParam dmsDiseParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listFallbackInfo")
    @ApiOperation(value = "模糊查询诊断、且分页")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<DmsDiseResult>> list( DmsDiseParam queryParam,
                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

       return  apiPcDmsDiseDistributionService.list(queryParam, pageSize, pageNum);
    }
    private CommonResult<CommonPage<DmsDiseResult>> listFallbackInfo(DmsDiseParam queryParam, Integer pageSize,Integer pageNum){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listAllFallbackInfo")
    @ApiOperation(value = "查询所有诊断")
    @RequestMapping(value = "/listAll", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDiseResult>> listAll(){
        return apiPcDmsDiseDistributionService.listAll();
    }
    private CommonResult<List<DmsDiseResult>> listAllFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "parseListFallbackInfo")
    @ApiOperation(value = "根据id串获取诊断简单对象list")
    @RequestMapping(value = "/parseList", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDiseResult>> parseList( @RequestParam(value = "idsStr") String idsStr){
        return apiPcDmsDiseDistributionService.parseList(idsStr);
    }
    private CommonResult<List<DmsDiseResult>> parseListFallbackInfo(String idsStr){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/bms/ApiPcBmsInvoiceDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.bms;


import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.bms.BmsInvoiceResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcBmsInvoiceDistributionService {


    @RequestMapping(value = "/invoice/supplementPrintInvoice", method = RequestMethod.GET)
    CommonResult supplementPrintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("registrationId") Long registrationId);

    @RequestMapping(value = "/invoice/reprintInvoice", method = RequestMethod.GET)
    CommonResult  reprintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("oldInvoiceNo") Long oldInvoiceNo);

    @RequestMapping(value = "/invoice/queryInvoiceInfo", method = RequestMethod.GET)
    CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfo(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime")String startDatetime, @RequestParam("endDatetime")String endDatetime);

    @RequestMapping(value = "/invoice/queryInvoiceInfoBySettleId", method = RequestMethod.GET)
    CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfoBySettleId(@RequestParam("settleRecordId") Long settleRecordId);
}


<|start_filename|>HIS-web/src/api/outpatient/frequentuse.js<|end_filename|>
import request from '@/utils/request'
export function selectByType(data) {
  return request({
    url: '/frequentUsed/selectByType',
    method: 'post',
    params: {
      staffId:data.staffId,
      selectType:data.selectType
    },
  })
}

export function addfre(data) {
  return request({
    url: '/frequentUsed/add',
    method: 'post',
    params: {
      staffId:data.staffId,
      addType:data.addType,
      addId:data.addId
    },
  })
}


export function delfre(data) {
  return request({
    url: '/frequentUsed/delete',
    method: 'post',
    params: {
      staffId:data.staffId,
      deleteType:data.deleteType,
      deleteId:data.deleteId
    },
  })
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsDrugModelService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsDrugModelParam;
import com.neu.his.common.dto.dms.DmsDrugModelResult;
import com.neu.his.common.dto.dms.DmsNonDrugModelParam;
import com.neu.his.common.dto.dms.DmsNonDrugModelResult;

import java.util.List;

/**
 * 药品模版服务
 */
public interface DmsDrugModelService {
    /**
     * 描述：创建模版
     */
    int createModel(DmsDrugModelParam dmsDrugModelParam);

    /**
     * 描述：删除模版
     */
    int deleteModel(List<Long> ids);


    /**
     * 描述：删除模版项
     */
    int deleteModelItem(Long modelId, List<Long> itemIds);


    /**
     * 描述：根据modelId更新model信息（删了重新创建）
     */
    int updateModel(Long modelId, DmsDrugModelParam dmsDrugModelParam);


    /**
     * 描述：查询模版
     */
    List<DmsDrugModelResult> selectModel(Integer isAdmin, DmsDrugModelParam queryParam, Integer pageSize, Integer pageNum);


}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/bms/BmsRegistrationPatientResult.java<|end_filename|>
package com.neu.his.common.dto.bms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;
@Setter
@Getter
@ToString
public class BmsRegistrationPatientResult  implements Serializable {
    @ApiModelProperty(value = "门诊（挂号）状态 0删除 1待诊  2诊中  3诊毕  4退号 5过期")
    Integer registrationStatus;
    @ApiModelProperty(value = "病人姓名")
    String patientName;
    @ApiModelProperty(value = "病人性别")
    Integer patientGender;
    @ApiModelProperty(value = "病人生日")
    Date patientDateOfBirth;
    @ApiModelProperty(value = "就诊日期")
    Date attendanceDate;
    @ApiModelProperty(value = "挂号日期")
    Date registrationCreateDate;
    @ApiModelProperty(value = "挂号级别name")
    String registrationRankName;
    @ApiModelProperty(value = "是否收取病历本")
    Integer needBook;
    @ApiModelProperty(value = "看诊科室")
    String deptName;
    @ApiModelProperty(value = "看诊医生")
    String bindDoctorName;
    @ApiModelProperty(value = "病历号")
    String medicalRecordNo;
    @ApiModelProperty(value = "门诊号，挂号号")
    Long registrationId;


}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsMedicinePrescriptionRecordService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsMedicinePrescriptionRecordParam;
import com.neu.his.common.dto.dms.DmsMedicinePrescriptionRecordResult;

import java.util.List;

/**
 * 成药处方
 */
public interface DmsMedicinePrescriptionRecordService {

    /**
     * 描述：开立处方
     */
    Long apply(DmsMedicinePrescriptionRecordParam dmsMedicinePrescriptionRecordParam);

    /**
     * 描述：作废处方
     */
    int invalid(List<Long> ids);

    /**
     * 描述：根据门诊号查询处方
     */
    List<DmsMedicinePrescriptionRecordResult>  listByReg(Long registrationId);


    /**
     * 描述：根据处方ids查询处方详情
     */
    List<DmsMedicinePrescriptionRecordResult> listByIds(List<Long> ids);
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/SmsDescriptionService.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;

import com.neu.his.cloud.service.sms.dto.app.AppDeptDescriptionResult;
import com.neu.his.cloud.service.sms.dto.app.AppDocSkdResult;
import com.neu.his.cloud.service.sms.dto.app.AppStaffDescriptionResult;

import java.util.List;

/**
 *  科室、医生描述信息
 */

public interface SmsDescriptionService {


    /**
     * 描述：查询员工描述信息
     */
    AppDocSkdResult getDetailById(Long theId);


    /**
     *  描述：根据id查询描述信息
     */
    List<AppStaffDescriptionResult> getDetailListByDept(Long id);


    /**
     * 描述：查询科室描述信息
     */
    List<AppDeptDescriptionResult> getDeptDescription();

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/model/SmsSkdRuleItem.java<|end_filename|>
package com.neu.his.cloud.service.sms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;

public class SmsSkdRuleItem implements Serializable {
    private Long id;

    private Long staffId;

    private String daysOfWeek;

    private Integer status;

    private Long skLimit;

    private Long skRuleId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getStaffId() {
        return staffId;
    }

    public void setStaffId(Long staffId) {
        this.staffId = staffId;
    }

    public String getDaysOfWeek() {
        return daysOfWeek;
    }

    public void setDaysOfWeek(String daysOfWeek) {
        this.daysOfWeek = daysOfWeek;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getSkLimit() {
        return skLimit;
    }

    public void setSkLimit(Long skLimit) {
        this.skLimit = skLimit;
    }

    public Long getSkRuleId() {
        return skRuleId;
    }

    public void setSkRuleId(Long skRuleId) {
        this.skRuleId = skRuleId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", staffId=").append(staffId);
        sb.append(", daysOfWeek=").append(daysOfWeek);
        sb.append(", status=").append(status);
        sb.append(", skLimit=").append(skLimit);
        sb.append(", skRuleId=").append(skRuleId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsDrugModelDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;

import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugModelParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugModelResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 *药品模版
 */
@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsDrugModelDistributionService {

    @RequestMapping(value = "/drugModel/createModel", method = RequestMethod.POST)
    CommonResult createModel(@RequestBody DmsDrugModelParam dmsDrugModelParam);


    @RequestMapping(value = "/drugModel/deleteModel", method = RequestMethod.POST)
    CommonResult deleteModel(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/drugModel/updateModel", method = RequestMethod.POST)
    CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsDrugModelParam dmsDrugModelParam);


    @RequestMapping(value = "/drugModel/listModel", method = RequestMethod.GET)
    CommonResult<CommonPage<DmsDrugModelResult>> listModel(DmsDrugModelParam queryParam,
                                                                  @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                  @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin);

}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/bms/BmsChargeParam.java<|end_filename|>
package com.neu.his.common.dto.bms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

@Setter
@Getter
@ToString
public class BmsChargeParam  implements Serializable {
    @ApiModelProperty(value = "收费项目id")
    Long chargeItemId;
    @ApiModelProperty(value = "收费项目类型")
    Integer type;
    @ApiModelProperty(value = "结算类型")
    Long settlementCatId;
    @ApiModelProperty(value = "发票号")
    Long invoiceNo;
    @ApiModelProperty(value = "操作人id")
    Long operatorId;
    @ApiModelProperty(value = "总金额")
    BigDecimal amount;



}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsRedisSaveController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;



import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseHistoryParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsDrugRedisParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugRedisParam;
import com.neu.his.cloud.api.pc.service.dms.DmsRedisSaveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsRedisSaveController", description = "redis暂存管理")
@RequestMapping("/redisSave")
@CrossOrigin(allowCredentials = "true")
public class DmsRedisSaveController {

    @Autowired
    DmsRedisSaveService dmsRedisSaveService;
    @ApiOperation(value = "暂存病历首页（根据挂号号）")
    @RequestMapping(value = "/saveCasePage", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult saveCasePage(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam,
                                     @RequestParam("registrationId") Long registrationId){

        return dmsRedisSaveService.saveCasePage(dmsCaseHistoryParam,registrationId);
    }

    @ApiOperation(value = "取出病历首页（根据挂号号）")
    @RequestMapping(value = "/getCasePage", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<DmsCaseHistoryParam> getCasePage(@RequestParam("registrationId") Long registrationId){

        return dmsRedisSaveService.getCasePage(registrationId);
    }



    @ApiOperation(value = "暂存药方（根据挂号号和类型（4成药、5草药））")
    @RequestMapping(value = "/saveDrugPrescription", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult saveDrugPrescription(@RequestBody List<DmsDrugRedisParam> dmsDrugRedisParam,
                                             @RequestParam("registrationId") Long registrationId,
                                             @RequestParam("type") int type){

        return dmsRedisSaveService.saveDrugPrescription(dmsDrugRedisParam,registrationId,type);
    }

    @ApiOperation(value = "取出药方（根据挂号号和类型（4成药、5草药））")
    @RequestMapping(value = "/getDrugPrescription", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDrugRedisParam>> getDrugPrescription(@RequestParam("registrationId") Long registrationId,
                                                                     @RequestParam("type") int type){

        return dmsRedisSaveService.getDrugPrescription(registrationId,type);
    }


    @ApiOperation(value = "暂存开立非药品项目（根据挂号号和类型（0检查、1检验、2处置））")
    @RequestMapping(value = "/saveNonDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult saveNonDrug(@RequestBody DmsNonDrugRedisParam dmsNonDrugRedisParam,
                                    @RequestParam("registrationId") Long registrationId,
                                    @RequestParam("type") int type){

        return dmsRedisSaveService.saveNonDrug(dmsNonDrugRedisParam,registrationId,type);
    }

    @ApiOperation(value = "取出开立非药品项目（根据挂号号和类型（0检查、1检验、2处置））")
    @RequestMapping(value = "/getNonDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<DmsNonDrugRedisParam> getNonDrug(@RequestParam("registrationId") Long registrationId,
                                                         @RequestParam("type") int type){

        return dmsRedisSaveService.getNonDrug(registrationId,type);
    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/sms/SmsRegistrationRankController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.sms;


import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsRegistrationRankParam;
import com.neu.his.cloud.api.pc.dto.sms.SmsRegistrationRankResult;
import com.neu.his.cloud.api.pc.service.sms.SmsRegistrationRankService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "SmsRegistrationRankController", description = "挂号级别管理")
@RequestMapping("/registerRank")
@CrossOrigin(allowCredentials = "true")
public class SmsRegistrationRankController {

    @Autowired
    private SmsRegistrationRankService smsRegistrationRankService;

    @ApiOperation("新增挂号级别")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody SmsRegistrationRankParam smsRegistrationRankParam, BindingResult result){
       return smsRegistrationRankService.create(smsRegistrationRankParam);
    }

    @ApiOperation("根据ids删除挂号级别")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
      return  smsRegistrationRankService.delete(ids);
    }


    @ApiOperation("更新挂号级别信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable("id") Long id, @RequestBody SmsRegistrationRankParam smsRegistrationRankParam, BindingResult result){
      return smsRegistrationRankService.update(id,smsRegistrationRankParam);
    }

    @ApiOperation("模糊查询挂号级别、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsRegistrationRankResult>> list(@RequestBody SmsRegistrationRankParam queryParam,
                                                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
       return  smsRegistrationRankService.list(queryParam,pageSize,pageNum);
    }

    @ApiOperation("查询所有挂号级别")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsRegistrationRankResult>> listAll(){
       return smsRegistrationRankService.listAll();
    }
}


<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/model/SmsSkdRuleItemExample.java<|end_filename|>
package com.neu.his.mbg.model;

import java.util.ArrayList;
import java.util.List;

public class SmsSkdRuleItemExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SmsSkdRuleItemExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andStaffIdIsNull() {
            addCriterion("staff_id is null");
            return (Criteria) this;
        }

        public Criteria andStaffIdIsNotNull() {
            addCriterion("staff_id is not null");
            return (Criteria) this;
        }

        public Criteria andStaffIdEqualTo(Long value) {
            addCriterion("staff_id =", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotEqualTo(Long value) {
            addCriterion("staff_id <>", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdGreaterThan(Long value) {
            addCriterion("staff_id >", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdGreaterThanOrEqualTo(Long value) {
            addCriterion("staff_id >=", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdLessThan(Long value) {
            addCriterion("staff_id <", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdLessThanOrEqualTo(Long value) {
            addCriterion("staff_id <=", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdIn(List<Long> values) {
            addCriterion("staff_id in", values, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotIn(List<Long> values) {
            addCriterion("staff_id not in", values, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdBetween(Long value1, Long value2) {
            addCriterion("staff_id between", value1, value2, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotBetween(Long value1, Long value2) {
            addCriterion("staff_id not between", value1, value2, "staffId");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekIsNull() {
            addCriterion("days_of_week is null");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekIsNotNull() {
            addCriterion("days_of_week is not null");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekEqualTo(String value) {
            addCriterion("days_of_week =", value, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekNotEqualTo(String value) {
            addCriterion("days_of_week <>", value, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekGreaterThan(String value) {
            addCriterion("days_of_week >", value, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekGreaterThanOrEqualTo(String value) {
            addCriterion("days_of_week >=", value, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekLessThan(String value) {
            addCriterion("days_of_week <", value, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekLessThanOrEqualTo(String value) {
            addCriterion("days_of_week <=", value, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekLike(String value) {
            addCriterion("days_of_week like", value, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekNotLike(String value) {
            addCriterion("days_of_week not like", value, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekIn(List<String> values) {
            addCriterion("days_of_week in", values, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekNotIn(List<String> values) {
            addCriterion("days_of_week not in", values, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekBetween(String value1, String value2) {
            addCriterion("days_of_week between", value1, value2, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andDaysOfWeekNotBetween(String value1, String value2) {
            addCriterion("days_of_week not between", value1, value2, "daysOfWeek");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andSkLimitIsNull() {
            addCriterion("sk_limit is null");
            return (Criteria) this;
        }

        public Criteria andSkLimitIsNotNull() {
            addCriterion("sk_limit is not null");
            return (Criteria) this;
        }

        public Criteria andSkLimitEqualTo(Long value) {
            addCriterion("sk_limit =", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitNotEqualTo(Long value) {
            addCriterion("sk_limit <>", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitGreaterThan(Long value) {
            addCriterion("sk_limit >", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitGreaterThanOrEqualTo(Long value) {
            addCriterion("sk_limit >=", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitLessThan(Long value) {
            addCriterion("sk_limit <", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitLessThanOrEqualTo(Long value) {
            addCriterion("sk_limit <=", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitIn(List<Long> values) {
            addCriterion("sk_limit in", values, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitNotIn(List<Long> values) {
            addCriterion("sk_limit not in", values, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitBetween(Long value1, Long value2) {
            addCriterion("sk_limit between", value1, value2, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitNotBetween(Long value1, Long value2) {
            addCriterion("sk_limit not between", value1, value2, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdIsNull() {
            addCriterion("sk_rule_id is null");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdIsNotNull() {
            addCriterion("sk_rule_id is not null");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdEqualTo(Long value) {
            addCriterion("sk_rule_id =", value, "skRuleId");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdNotEqualTo(Long value) {
            addCriterion("sk_rule_id <>", value, "skRuleId");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdGreaterThan(Long value) {
            addCriterion("sk_rule_id >", value, "skRuleId");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdGreaterThanOrEqualTo(Long value) {
            addCriterion("sk_rule_id >=", value, "skRuleId");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdLessThan(Long value) {
            addCriterion("sk_rule_id <", value, "skRuleId");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdLessThanOrEqualTo(Long value) {
            addCriterion("sk_rule_id <=", value, "skRuleId");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdIn(List<Long> values) {
            addCriterion("sk_rule_id in", values, "skRuleId");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdNotIn(List<Long> values) {
            addCriterion("sk_rule_id not in", values, "skRuleId");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdBetween(Long value1, Long value2) {
            addCriterion("sk_rule_id between", value1, value2, "skRuleId");
            return (Criteria) this;
        }

        public Criteria andSkRuleIdNotBetween(Long value1, Long value2) {
            addCriterion("sk_rule_id not between", value1, value2, "skRuleId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/controller/BmsDailySettlementController.java<|end_filename|>
package com.neu.his.cloud.service.bms.controller;


import com.neu.his.cloud.service.bms.common.CommonResult;
import com.neu.his.cloud.service.bms.dto.bms.BmsDailySettleRecordResult;
import com.neu.his.cloud.service.bms.dto.bms.BmsSettleListItemResult;
import com.neu.his.cloud.service.bms.service.BmsDailySettlementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@Controller
@Api(tags = "BmsDailySettlementController", description = "日结管理")
@RequestMapping("/dailySettlement")
@CrossOrigin(allowCredentials = "true")
public class BmsDailySettlementController {
    @Autowired
    BmsDailySettlementService bmsDailySettlementService;

    @ApiOperation(value = "根据收费员Id在日结记录表中查询最近的end_datetime")
    @RequestMapping(value = "/queryRecentEndDatetime", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult queryRecentEndDatetime(@RequestParam("cashierId") Long cashierId){
        Date date = bmsDailySettlementService.queryRecentEndDatetime(cashierId);
        return CommonResult.success(date);
    }

    @ApiOperation(value = "根据起始、结束时间和收费员Id日结信息")
    @RequestMapping(value = "/statisticDailySettlement", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<BmsDailySettleRecordResult>  statisticDailySettlement(@RequestParam("cashierId") Long cashierId,
                                                                              @RequestParam("startDatetime") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startDatetime,
                                                                              @RequestParam("endDatetime") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDatetime){
        BmsDailySettleRecordResult bmsDailySettleRecordResult = bmsDailySettlementService.statisticDailySettlement(cashierId, startDatetime, endDatetime);
        return CommonResult.success(bmsDailySettleRecordResult);
    }

    @ApiOperation(value = "根据起始、结束时间和收费员Id列出日结历史")
    @RequestMapping(value = "/listDailySettleListRecord", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsSettleListItemResult>>  listDailySettleListRecord(@RequestParam("cashierId") Long cashierId,
                                                                                  @RequestParam("startDatetime") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startDatetime,
                                                                                  @RequestParam("endDatetime") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDatetime){
        List<BmsSettleListItemResult> bmsSettleListItemResultList = bmsDailySettlementService.listDailySettleListRecord(cashierId, startDatetime, endDatetime);
        return CommonResult.success(bmsSettleListItemResultList);
    }

    @ApiOperation(value = "根据日结记录id查询日结详细信息")
    @RequestMapping(value = "/querySettleDetailById", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<BmsDailySettleRecordResult>  querySettleDetailById(@RequestParam("id") Long id){
        BmsDailySettleRecordResult bmsDailySettleRecordResult = bmsDailySettlementService.querySettleDetailById(id);
        return CommonResult.success(bmsDailySettleRecordResult);
    }

    @ApiOperation(value = "根据起始、结束时间和收费员id统计日结信息并日结")
    @RequestMapping(value = "/dailySettle", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult dailySettle(@RequestParam("cashierId") Long cashierId,
                                    @RequestParam("startDatetime") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startDatetime,
                                    @RequestParam("endDatetime") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDatetime){
        Long result = bmsDailySettlementService.dailySettle(cashierId, startDatetime, endDatetime);
        if (result != null){
            return CommonResult.success(result);
        }
        else {
            return CommonResult.failed();
        }
    }

    @ApiOperation(value = "对账")
    @RequestMapping(value = "/verifySettle", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult  verifySettle(@RequestParam("verifyOperatorId") Long verifyOperatorId,@RequestParam("settleRecordId") Long settleRecordId){
        int result = bmsDailySettlementService.verifySettle(verifyOperatorId, settleRecordId);
        if (result == 1){
            return CommonResult.success(result);
        }
        else {
            return CommonResult.failed();
        }
    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsDrugDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;


import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsDosageResult;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsDrugDistributionService {

    @RequestMapping(value = "/drug/createDrug", method = RequestMethod.POST)
    CommonResult createDrug(@RequestBody DmsDrugParam dmsDrugParam );

    @RequestMapping(value = "/drug/deleteDrug", method = RequestMethod.POST)
    CommonResult deleteDrug(@RequestParam("ids") List<Long> ids);

    @RequestMapping(value = "/drug/updateDrug/{id}", method = RequestMethod.POST)
    CommonResult updateDrug(@PathVariable Long id, @RequestBody DmsDrugParam dmsDrugParam);

    @RequestMapping(value = "/drug/selectDrug", method = RequestMethod.POST)
    CommonResult<CommonPage<DmsDrugResult>> listDrug(@RequestBody DmsDrugParam queryParam,
                                                            @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

    @RequestMapping(value = "/drug/selectAllDrug", method = RequestMethod.GET)
    CommonResult<List<DmsDrugResult>> listAllDrug();

    @RequestMapping(value = "/drug/selectAllDosage", method = RequestMethod.GET)
    CommonResult<List<DmsDosageResult>> listAllDrugDosage();

    @RequestMapping(value = "/drug/selectById", method = RequestMethod.GET)
    CommonResult<DmsDrugResult> selectById(@RequestParam("id") Long id);

}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/mapper/SmsRoleMapper.java<|end_filename|>
package com.neu.his.cloud.service.pms.mapper;

import com.neu.his.cloud.service.pms.model.SmsRole;
import com.neu.his.cloud.service.pms.model.SmsRoleExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsRoleMapper {
    int countByExample(SmsRoleExample example);

    int deleteByExample(SmsRoleExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsRole record);

    int insertSelective(SmsRole record);

    List<SmsRole> selectByExample(SmsRoleExample example);

    SmsRole selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsRole record, @Param("example") SmsRoleExample example);

    int updateByExample(@Param("record") SmsRole record, @Param("example") SmsRoleExample example);

    int updateByPrimaryKeySelective(SmsRole record);

    int updateByPrimaryKey(SmsRole record);
}

<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/impl/SmsEchartsServiceImpl.java<|end_filename|>
package com.neu.his.sms.impl;

import com.neu.his.common.dto.sms.SmsDeptAmountStatisticsResult;
import com.neu.his.common.dto.sms.SmsStaffAmountStatisticsResult;
import com.neu.his.common.dto.sms.SmsPatientsStatisticsResult;
import com.neu.his.common.util.DateUtil;
import com.neu.his.sms.SmsEchartsService;
import com.neu.his.mbg.mapper.SmsDeptMapper;
import com.neu.his.mbg.mapper.SmsWorkloadRecordMapper;
import com.neu.his.mbg.model.SmsDept;
import com.neu.his.mbg.model.SmsWorkloadRecord;
import com.neu.his.mbg.model.SmsWorkloadRecordExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * echarts数据统计
 */
@Service
public class SmsEchartsServiceImpl implements SmsEchartsService {
    @Autowired
    SmsWorkloadRecordMapper smsWorkloadRecordMapper;
    @Autowired
    SmsDeptMapper smsDeptMapper;

    @Override
    public SmsPatientsStatisticsResult staffPatients(Long staffId) {
        SmsPatientsStatisticsResult smsPatientsStatisticsResult = new SmsPatientsStatisticsResult();
        List<String> dateOfSevenDays = new ArrayList<>(7);
        List<Long> numOfPatients = new ArrayList<>(7);

        Date today = DateUtil.setMilliSecond(DateUtil.getDate(new Date()),0);
        SmsWorkloadRecordExample smsWorkloadRecordExample = new SmsWorkloadRecordExample();
        smsWorkloadRecordExample.createCriteria().andStaffIdEqualTo(staffId).andDateBetween(DateUtil.getDateBefore(today,7),today);
        smsWorkloadRecordExample.setOrderByClause("date desc");
        List<SmsWorkloadRecord> smsWorkloadRecordList = smsWorkloadRecordMapper.selectByExample(smsWorkloadRecordExample);
        System.err.println(smsWorkloadRecordList);
        if (!smsWorkloadRecordList.isEmpty()){
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
            for (int i=0;i<7;i++){
                dateOfSevenDays.add(formatter.format(DateUtil.getDateBefore(today,7-i)));
                numOfPatients.add(0l);
            }
            for (SmsWorkloadRecord smsWorkloadRecord : smsWorkloadRecordList){
                int sub = DateUtil.getDateSubtraction(smsWorkloadRecord.getDate(),today);
                System.err.println(dateOfSevenDays);
                System.err.println("sub: "+sub);
                if (smsWorkloadRecord.getType() == 0){//门诊医生
                    numOfPatients.set(7-sub,smsWorkloadRecord.getRegistrationNum());
                }
                else if (smsWorkloadRecord.getType() == 1){//医技医生
                    numOfPatients.set(7-sub,smsWorkloadRecord.getExcuteNum());
                }

            }
            smsPatientsStatisticsResult.setDateOfSevenDays(dateOfSevenDays);
            smsPatientsStatisticsResult.setNumOfPatients(numOfPatients);
            return smsPatientsStatisticsResult;
        }
        return null;
    }

    @Override
    public SmsStaffAmountStatisticsResult staffClassifyStatistics(Long staffId) {
        SmsStaffAmountStatisticsResult smsStaffAmountStatisticsResult = new SmsStaffAmountStatisticsResult();
        List<String> amountCat = new ArrayList<>();
        List<BigDecimal> amount = new ArrayList<>();

        Date today = DateUtil.setMilliSecond(DateUtil.getDate(new Date()),0);
        SmsWorkloadRecordExample smsWorkloadRecordExample = new SmsWorkloadRecordExample();
        smsWorkloadRecordExample.createCriteria().andStaffIdEqualTo(staffId).andDateBetween(DateUtil.getDateBefore(today,7),today);
        smsWorkloadRecordExample.setOrderByClause("date desc");
        List<SmsWorkloadRecord> smsWorkloadRecordList = smsWorkloadRecordMapper.selectByExample(smsWorkloadRecordExample);
        if (!smsWorkloadRecordList.isEmpty()){
            BigDecimal medicine = new BigDecimal(0);
            BigDecimal herbal = new BigDecimal(0);
            BigDecimal check = new BigDecimal(0);
            BigDecimal test = new BigDecimal(0);
            BigDecimal disposition = new BigDecimal(0);
            if (smsWorkloadRecordList.get(0).getType() == 0){//门诊医生
                amountCat.add("西药费");
                amountCat.add("中药费");
                amountCat.add("检查费");
                amountCat.add("检验费");
                amountCat.add("处置费");
                for (SmsWorkloadRecord smsWorkloadRecord : smsWorkloadRecordList){
                    medicine = medicine.add(smsWorkloadRecord.getMedicineAmount());
                    herbal = herbal.add(smsWorkloadRecord.getHerbalAmount());
                    check = check.add(smsWorkloadRecord.getCheckAmount());
                    test = test.add(smsWorkloadRecord.getTestAmount());
                    disposition = disposition.add(smsWorkloadRecord.getDispositionAmount());
                }
                amount.add(medicine);
                amount.add(herbal);
                amount.add(check);
                amount.add(test);
                amount.add(disposition);
            }
            smsStaffAmountStatisticsResult.setAmountCat(amountCat);
            smsStaffAmountStatisticsResult.setAmount(amount);
            return smsStaffAmountStatisticsResult;
//            else if (smsWorkloadRecordList.get(0).getType() == 1){//医技医生
//                amountCat.add("检查费");
//                amountCat.add("检验费");
//                amountCat.add("处置费");
//                for (SmsWorkloadRecord smsWorkloadRecord : smsWorkloadRecordList){
//                    check = check.add(smsWorkloadRecord.getExcuteCheckAmount());
//                    test = test.add(smsWorkloadRecord.getExcuteTestAmount());
//                    disposition = disposition.add(smsWorkloadRecord.getDispositionAmount());
//                }
//                amount.add(check);
//                amount.add(test);
//                amount.add(disposition);
//            }

        }
        return null;
    }

    @Override
    public SmsPatientsStatisticsResult deptPatients(Long deptId) {
        SmsPatientsStatisticsResult smsPatientsStatisticsResult = new SmsPatientsStatisticsResult();
        List<String> dateOfSevenDays = new ArrayList<>(7);
        List<Long> numOfPatients = new ArrayList<>(7);
        Integer deptType = 0;
        SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(deptId);
        if (smsDept!=null){
            if (smsDept.getType() == 0){
                deptType = 0;//门诊科室
            }
            else if (smsDept.getType()>0 && smsDept.getType()<4){
                deptType = 1;//医技科室
            }
        }

        Date today = DateUtil.setMilliSecond(DateUtil.getDate(new Date()),0);
        SmsWorkloadRecordExample smsWorkloadRecordExample = new SmsWorkloadRecordExample();
        smsWorkloadRecordExample.createCriteria().andDeptIdEqualTo(deptId).andDateBetween(DateUtil.getDateBefore(today,7),today).andTypeEqualTo(2);
        smsWorkloadRecordExample.setOrderByClause("date desc");
        List<SmsWorkloadRecord> smsWorkloadRecordList = smsWorkloadRecordMapper.selectByExample(smsWorkloadRecordExample);
        if (!smsWorkloadRecordList.isEmpty()){
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
            for (int i=0;i<7;i++){
                dateOfSevenDays.add(formatter.format(DateUtil.getDateBefore(today,7-i)));
                numOfPatients.add(0l);
            }
            for (SmsWorkloadRecord smsWorkloadRecord : smsWorkloadRecordList){
                int sub = DateUtil.getDateSubtraction(smsWorkloadRecord.getDate(),today);
                if (deptType == 0){//门诊
                    numOfPatients.set(7-sub,smsWorkloadRecord.getRegistrationNum());
                }
                else if (deptType == 1){//医技
                    numOfPatients.set(7-sub,smsWorkloadRecord.getExcuteNum());
                }

            }
            smsPatientsStatisticsResult.setDateOfSevenDays(dateOfSevenDays);
            smsPatientsStatisticsResult.setNumOfPatients(numOfPatients);
            return smsPatientsStatisticsResult;
        }
        return null;
    }

    @Override
    public SmsDeptAmountStatisticsResult deptClassifyStatistics(Long deptId) {
        SmsDeptAmountStatisticsResult smsDeptAmountStatisticsResult = new SmsDeptAmountStatisticsResult();
        List<String> dateOfSevenDays = new ArrayList<>();
        List<String> amountCat = new ArrayList<>();
        List<BigDecimal> medicineAmount = new ArrayList<>();
        List<BigDecimal> herbalAmount = new ArrayList<>();
        List<BigDecimal> checkAmount = new ArrayList<>();
        List<BigDecimal> testAmount = new ArrayList<>();
        List<BigDecimal> dispositionAmount = new ArrayList<>();
        List<BigDecimal> executedAmount = new ArrayList<>();
        Integer deptType = 0;
        SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(deptId);
        amountCat.add("西药费");
        amountCat.add("中药费");
        amountCat.add("检查费");
        amountCat.add("检验费");
        amountCat.add("处置费");
        if (smsDept!=null){
            if (smsDept.getType() == 0){
                deptType = 0;//门诊科室
            }
            else if (smsDept.getType() == 1){
                deptType = 1;//检查
                amountCat.add("执行检查费");
            }
            else if (smsDept.getType() == 2){
                deptType = 2;//检验
                amountCat.add("执行检验费");
            }
            else if (smsDept.getType() == 3){
                deptType =3;//处置
                amountCat.add("执行处置费");
            }
        }
        Date today = DateUtil.setMilliSecond(DateUtil.getDate(new Date()),0);
        SmsWorkloadRecordExample smsWorkloadRecordExample = new SmsWorkloadRecordExample();
        smsWorkloadRecordExample.createCriteria().andDeptIdEqualTo(deptId).andDateBetween(DateUtil.getDateBefore(today,7),today).andTypeEqualTo(2);
        smsWorkloadRecordExample.setOrderByClause("date desc");
        List<SmsWorkloadRecord> smsWorkloadRecordList = smsWorkloadRecordMapper.selectByExample(smsWorkloadRecordExample);
        if (!smsWorkloadRecordList.isEmpty()){
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
            for (int i=0;i<7;i++){
                dateOfSevenDays.add(formatter.format(DateUtil.getDateBefore(today,7-i)));
                medicineAmount.add(new BigDecimal(0));
                herbalAmount.add(new BigDecimal(0));
                checkAmount.add(new BigDecimal(0));
                testAmount.add(new BigDecimal(0));
                dispositionAmount.add(new BigDecimal(0));
                executedAmount.add(new BigDecimal(0));
            }

            for (SmsWorkloadRecord smsWorkloadRecord : smsWorkloadRecordList){
                int sub = DateUtil.getDateSubtraction(smsWorkloadRecord.getDate(),today);
                medicineAmount.set(7-sub,smsWorkloadRecord.getMedicineAmount());
                herbalAmount.set(7-sub,smsWorkloadRecord.getHerbalAmount());
                checkAmount.set(7-sub,smsWorkloadRecord.getCheckAmount());
                testAmount.set(7-sub,smsWorkloadRecord.getTestAmount());
                dispositionAmount.set(7-sub,smsWorkloadRecord.getDispositionAmount());
                if (deptType == 1){//检查
                    executedAmount.set(7-sub,smsWorkloadRecord.getExcuteCheckAmount());
                }
                else if (deptType == 2){//检验
                    executedAmount.set(7-sub,smsWorkloadRecord.getExcuteTestAmount());
                }
                else if (deptType == 3){//处置
                    executedAmount.set(7-sub,smsWorkloadRecord.getExcuteDispositionAmount());
                }

            }
            smsDeptAmountStatisticsResult.setAmountCat(amountCat);
            smsDeptAmountStatisticsResult.setMedicineAmount(medicineAmount);
            smsDeptAmountStatisticsResult.setHerbalAmount(herbalAmount);
            smsDeptAmountStatisticsResult.setCheckAmount(checkAmount);
            smsDeptAmountStatisticsResult.setTestAmount(testAmount);
            smsDeptAmountStatisticsResult.setDispositionAmount(dispositionAmount);
            smsDeptAmountStatisticsResult.setExecutedAmount(executedAmount);
            smsDeptAmountStatisticsResult.setDateOfSevenDays(dateOfSevenDays);

            return smsDeptAmountStatisticsResult;
        }
       return null;
    }

    @Override
    public SmsDeptAmountStatisticsResult totalClassifyStatistics() {
        SmsDeptAmountStatisticsResult smsDeptAmountStatisticsResult = new SmsDeptAmountStatisticsResult();
        List<String> dateOfSevenDays = new ArrayList<>();
        List<String> amountCat = new ArrayList<>();
        List<BigDecimal> medicineAmount = new ArrayList<>();
        List<BigDecimal> herbalAmount = new ArrayList<>();
        List<BigDecimal> checkAmount = new ArrayList<>();
        List<BigDecimal> testAmount = new ArrayList<>();
        List<BigDecimal> dispositionAmount = new ArrayList<>();

        Date today = DateUtil.setMilliSecond(DateUtil.getDate(new Date()),0);
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
        for (int i=0;i<7;i++){
            dateOfSevenDays.add(formatter.format(DateUtil.getDateBefore(today,7-i)));
        }
        amountCat.add("西药费");
        amountCat.add("中药费");
        amountCat.add("检查费");
        amountCat.add("检验费");
        amountCat.add("处置费");
        SmsWorkloadRecordExample smsWorkloadRecordExample = new SmsWorkloadRecordExample();
        for (int i=7;i>0;i--){
            smsWorkloadRecordExample.clear();
            smsWorkloadRecordExample.createCriteria().andDateEqualTo(DateUtil.getDateBefore(today,i)).andTypeEqualTo(2);
            //smsWorkloadRecordExample.setOrderByClause("date desc");
            List<SmsWorkloadRecord> smsWorkloadRecordList = smsWorkloadRecordMapper.selectByExample(smsWorkloadRecordExample);
            if (!smsWorkloadRecordList.isEmpty()){
                BigDecimal medicine = new BigDecimal(0);
                BigDecimal herbal = new BigDecimal(0);
                BigDecimal check = new BigDecimal(0);
                BigDecimal test = new BigDecimal(0);
                BigDecimal disposition = new BigDecimal(0);
                for (SmsWorkloadRecord smsWorkloadRecord : smsWorkloadRecordList){
                    medicine = medicine.add(smsWorkloadRecord.getMedicineAmount());
                    herbal = herbal.add(smsWorkloadRecord.getHerbalAmount());
                    check = check.add(smsWorkloadRecord.getCheckAmount());
                    test = test.add(smsWorkloadRecord.getTestAmount());
                    disposition = disposition.add(smsWorkloadRecord.getDispositionAmount());
                }
                medicineAmount.add(medicine);
                herbalAmount.add(herbal);
                checkAmount.add(check);
                testAmount.add(test);
                dispositionAmount.add(disposition);
            }
        }
        smsDeptAmountStatisticsResult.setDateOfSevenDays(dateOfSevenDays);
        smsDeptAmountStatisticsResult.setAmountCat(amountCat);
        smsDeptAmountStatisticsResult.setMedicineAmount(medicineAmount);
        smsDeptAmountStatisticsResult.setHerbalAmount(herbalAmount);
        smsDeptAmountStatisticsResult.setCheckAmount(checkAmount);
        smsDeptAmountStatisticsResult.setTestAmount(testAmount);
        smsDeptAmountStatisticsResult.setDispositionAmount(dispositionAmount);


        return smsDeptAmountStatisticsResult;
    }

    @Override
    public SmsPatientsStatisticsResult totalPatients() {
        SmsPatientsStatisticsResult smsPatientsStatisticsResult = new SmsPatientsStatisticsResult();
        List<String> dateOfSevenDays = new ArrayList<>(7);
        List<Long> numOfPatients = new ArrayList<>(7);
        Date today = DateUtil.setMilliSecond(DateUtil.getDate(new Date()),0);
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
        for (int i=0;i<7;i++){
            dateOfSevenDays.add(formatter.format(DateUtil.getDateBefore(today,7-i)));
        }
        SmsWorkloadRecordExample smsWorkloadRecordExample = new SmsWorkloadRecordExample();
        for (int i=7;i>0;i--){
            smsWorkloadRecordExample.clear();
            smsWorkloadRecordExample.createCriteria().andDateEqualTo(DateUtil.getDateBefore(today,i)).andTypeEqualTo(2);
            //smsWorkloadRecordExample.setOrderByClause("date desc");
            List<SmsWorkloadRecord> smsWorkloadRecordList = smsWorkloadRecordMapper.selectByExample(smsWorkloadRecordExample);
            if (!smsWorkloadRecordList.isEmpty()){
                Long num = 0l;
                for (SmsWorkloadRecord smsWorkloadRecord : smsWorkloadRecordList){
                    num = num + smsWorkloadRecord.getRegistrationNum();
                }
                numOfPatients.add(num);
            }

        }
        smsPatientsStatisticsResult.setDateOfSevenDays(dateOfSevenDays);
        smsPatientsStatisticsResult.setNumOfPatients(numOfPatients);
        return smsPatientsStatisticsResult;
    }
}


<|start_filename|>HIS-master/HIS-service/HIS-bms-service/src/main/java/com/neu/his/bms/service/BmsFeeQueryService.java<|end_filename|>
package com.neu.his.bms.service;

import com.neu.his.common.dto.app.AppDrugItemResult;
import com.neu.his.common.dto.app.AppHistoryRegResult;
import com.neu.his.common.dto.bms.BmsDoctorPatientFeeResult;

import java.util.List;

/**
 * 费用查询
 */
public interface BmsFeeQueryService {

    /**
     * 描述：医生查患者费用（列出本次就诊所有小项目）：
     */
    List<BmsDoctorPatientFeeResult> listFeeByRegistrationId(Long registrationId);

    /**
     * 描述：根据患者id查大项
     */
    List<AppHistoryRegResult> listFeePrescription(Long registrationId);

    /**
     * 描述：根据处方单号和type（草药4，成药5）查小项
     */
    List<AppDrugItemResult> listFeeItem(Long prescriptionId , int type);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/sms/SmsEchartsDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.sms;



import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.sms.ApiPcSmsEchartsDistributionService;
import com.neu.his.cloud.zuul.dto.sms.SmsDeptAmountStatisticsResult;
import com.neu.his.cloud.zuul.dto.sms.SmsPatientsStatisticsResult;
import com.neu.his.cloud.zuul.dto.sms.SmsStaffAmountStatisticsResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "SmsEchartsDistributionController", description = "图表统计")
@RequestMapping("/charts")
@CrossOrigin(allowCredentials = "true")
public class SmsEchartsDistributionController {
    @Autowired
    private ApiPcSmsEchartsDistributionService apiPcSmsEchartsDistributionService;

    @HystrixCommand(fallbackMethod = "staffPatientsFallbackInfo")
    @ApiOperation(value = "统计个人每日接待患者人数（近7日）")
    @RequestMapping(value = "/staffPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> staffPatients(@RequestParam Long staffId) {
       return apiPcSmsEchartsDistributionService.staffPatients(staffId);
    }
    private CommonResult<SmsPatientsStatisticsResult> staffPatientsFallbackInfo(Long staffId) {
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "staffClassifyStatisticsFallbackInfo")
    @ApiOperation(value = "统计个人每日分类收费信息（近7日）")
    @RequestMapping(value = "/staffClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsStaffAmountStatisticsResult> staffClassifyStatistics(@RequestParam Long staffId) {
        return  apiPcSmsEchartsDistributionService.staffClassifyStatistics(staffId);
    }
    private CommonResult<SmsStaffAmountStatisticsResult> staffClassifyStatisticsFallbackInfo(Long staffId) {
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "deptPatientsFallbackInfo")
    @ApiOperation(value = "统计各科室每日接待患者人数（近7日）")
    @RequestMapping(value = "/deptPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> deptPatients(@RequestParam Long deptId) {
       return  apiPcSmsEchartsDistributionService.deptPatients(deptId);
    }
    private CommonResult<SmsPatientsStatisticsResult> deptPatientsFallbackInfo(Long deptId) {
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deptClassifyStatisticsFallbackInfo")
    @ApiOperation(value = "统计各科室每日分类收费信息（近7日）")
    @RequestMapping(value = "/deptClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsDeptAmountStatisticsResult> deptClassifyStatistics(@RequestParam Long deptId) {
        return  apiPcSmsEchartsDistributionService.deptClassifyStatistics(deptId);
    }
    private CommonResult<SmsDeptAmountStatisticsResult> deptClassifyStatisticsFallbackInfo(Long deptId) {
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deptClassifyStatisticsFallbackInfo")
    @ApiOperation(value = "统计全院每日接待患者人数（近7日）")
    @RequestMapping(value = "/totalClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsDeptAmountStatisticsResult> totalClassifyStatistics() {
       return  apiPcSmsEchartsDistributionService.totalClassifyStatistics();
    }
    private CommonResult<SmsDeptAmountStatisticsResult> deptClassifyStatisticsFallbackInfo() {
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "totalPatientsFallbackInfo")
    @ApiOperation(value = "统计全院每日分类收费信息（近7日）")
    @RequestMapping(value = "/totalPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> totalPatients() {
      return apiPcSmsEchartsDistributionService.totalPatients();
    }
    private CommonResult<SmsPatientsStatisticsResult> totalPatientsFallbackInfo() {
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>his-cloud/his-cloud-config/src/main/java/com/neu/his/cloud/config/ConfigApplication.java<|end_filename|>
package com.neu.his.cloud.config;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

/**
 * @ClassName: ConfigApplication
 * @description: TODO
 * @author Zain
 * @date 2019/6/1520:41
 */

@SpringBootApplication
@EnableConfigServer
@EnableEurekaClient  //服务的提供者

public class ConfigApplication {

    public static void main(String[] args) {
        SpringApplication.run(ConfigApplication.class,args);
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsDrugDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsDrugDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsDosageResult;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsDrugDistributionController", description = "药品管理")
@RequestMapping("/drug")
@CrossOrigin(allowCredentials = "true")
public class DmsDrugDistributionController {

    @Autowired
    private ApiPcDmsDrugDistributionService apiPcDmsDrugDistributionService;

    @HystrixCommand(fallbackMethod = "createDrugFallbackInfo")
    @ApiOperation("新增药品")
    @RequestMapping(value = "/createDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createDrug(@RequestBody DmsDrugParam dmsDrugParam  , BindingResult result){
       return  apiPcDmsDrugDistributionService.createDrug(dmsDrugParam);
    }
    private CommonResult createDrugFallbackInfo(DmsDrugParam dmsDrugParam  , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteDrugFallbackInfo")
    @ApiOperation("根据ids删除药品")
    @RequestMapping(value = "/deleteDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteDrug(@RequestParam("ids") List<Long> ids){
       return apiPcDmsDrugDistributionService.deleteDrug(ids);
    }
    private CommonResult deleteDrugFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateDrugFallbackInfo")
    @ApiOperation("更新药品信息")
    @RequestMapping(value = "/updateDrug/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateDrug(@PathVariable Long id, @RequestBody DmsDrugParam dmsDrugParam , BindingResult result){
        return  apiPcDmsDrugDistributionService.updateDrug(id,dmsDrugParam);
    }
    private CommonResult updateDrugFallbackInfo(Long id, DmsDrugParam dmsDrugParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listDrugFallbackInfo")
    @ApiOperation("模糊查询药品、且分页")
    @RequestMapping(value = "/selectDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<DmsDrugResult>> listDrug(DmsDrugParam queryParam,
                                                            @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

       return apiPcDmsDrugDistributionService.listDrug(queryParam,pageSize,pageNum);
    }
    private CommonResult<CommonPage<DmsDrugResult>> listDrugFallbackInfo(DmsDrugParam queryParam, Integer pageSize,Integer pageNum){
        return CommonResult.success(null,"请检查您的网络") ;
    }

//    @HystrixCommand(fallbackMethod = "listAllDrugFallbackInfo")
    @ApiOperation("查询所有药品")
    @RequestMapping(value = "/selectAllDrug", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<DmsDrugResult>> listAllDrug(){
        return apiPcDmsDrugDistributionService.listAllDrug();
    }
    private CommonResult<List<DmsDrugResult>> listAllDrugFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listAllDrugDosageFallbackInfo")
    @ApiOperation("查询所有药品剂型")
    @RequestMapping(value = "/selectAllDosage", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<DmsDosageResult>> listAllDrugDosage(){
       return apiPcDmsDrugDistributionService.listAllDrugDosage();
    }
    private CommonResult<List<DmsDosageResult>> listAllDrugDosageFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    /**
     * 描述:根据id查询药品
     * <p>author: wang
     */
    @ApiOperation("根据id查询药品")
    @RequestMapping(value = "/selectById", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsDrugResult> selectById(@RequestParam("id") Long id){
        return apiPcDmsDrugDistributionService.selectById(id);
    }

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/OssService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.oss.OssCallbackResult;
import com.neu.his.cloud.api.pc.dto.oss.OssPolicyResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@FeignClient(value = "his-cloud-service-dms")
public interface OssService {

    @RequestMapping(value = "/aliyun/oss/policy", method = RequestMethod.GET)
    public CommonResult<OssPolicyResult> policy();


    @RequestMapping(value = "/aliyun/oss/callback", method = RequestMethod.POST)
    public CommonResult<OssCallbackResult> callback(HttpServletRequest request);
}


<|start_filename|>HIS-web/src/api/charts.js<|end_filename|>
import request from '@/utils/request'
// 查询个人七日接诊人数
export function staffPatients(data) {
  return request({
    url: '/charts/staffPatients',
    method: 'get',
    params: {
      staffId:data
    }
  })
}
// 查询科室七日接诊人数
export function deptPatients(data) {
  return request({
    url: '/charts/deptPatients',
    method: 'get',
    params: {
      deptId:data
    }
  })
}
// 查询科室七日分类收费
export function deptClassifyStatistics(data) {
  return request({
    url: '/charts/deptClassifyStatistics',
    method: 'get',
    params: {
      deptId:data
    }
  })
}
// 查询全院七日接诊人数
export function totalPatients() {
  return request({
    url: '/charts/totalPatients',
    method: 'get'
  })
}
// 查询个人七日分类费用
export function staffClassifyStatistics(data) {
  return request({
    url: '/charts/staffClassifyStatistics',
    method: 'get',
    params:{
      staffId:data
    }
  })
}

<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/dto/pms/PmsPatientParam.java<|end_filename|>
package com.neu.his.cloud.service.pms.dto.pms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

@Setter
@Getter
@ToString
public class PmsPatientParam {
    @ApiModelProperty(value = "姓名")
    private String name;
    @ApiModelProperty(value = "出生日期")
    private Date dateOfBirth;
    @ApiModelProperty(value = "身份证号")
    private String identificationNo;
    @ApiModelProperty(value = "家庭住址")
    private String homeAddress;
    @ApiModelProperty(value = "电话号码")
    private String phoneNo;
    @ApiModelProperty(value = "性别")
    private Integer gender;
    @ApiModelProperty(value = "病历号")
    private String medicalRecordNo;
}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/app/AppDocSkdResult.java<|end_filename|>
package com.neu.his.common.dto.app;

import com.neu.his.common.dto.sms.SmsSkdResult;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;

@Setter
@Getter
@ToString
public class AppDocSkdResult {
    @ApiModelProperty(value = "医生排班信息")
    private List<SmsSkdResult> skdResultList;

    @ApiModelProperty(value = "科室Id")
    private Long deptId;
    @ApiModelProperty(value = "科室名")
    private String deptName;
    @ApiModelProperty(value = "医生描述")
    private String description;
    @ApiModelProperty(value = "医生头像url")
    private String url;
    @ApiModelProperty(value = "医生评级")
    private BigDecimal star;
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/sms/SmsWorkloadDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.sms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.sms.ApiPcSmsWorkloadDistributionService;
import com.neu.his.cloud.zuul.dto.sms.SmsWorkloadResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "SmsWorkloadDistributionController", description = "工作量统计")
@RequestMapping("/workload")
@CrossOrigin(allowCredentials = "true")
public class SmsWorkloadDistributionController {

    @Autowired
    private ApiPcSmsWorkloadDistributionService apiPcSmsWorkloadDistributionService;

    @HystrixCommand(fallbackMethod = "queryPersonalWorkloadFallbackInfo")
    @ApiOperation("根据时间段查询某个人工作量")
    @RequestMapping(value = "/queryPersonal", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsWorkloadResult> queryPersonalWorkload(@RequestParam("staffId") Long staffId,
                                                                 @RequestParam("startDatetime")String startDatetime,
                                                                 @RequestParam("endDatetime") String endDatetime){
        return apiPcSmsWorkloadDistributionService.queryPersonalWorkload(staffId,startDatetime,endDatetime);
    }
    private CommonResult<SmsWorkloadResult> queryPersonalWorkloadFallbackInfo( Long staffId,String startDatetime,String endDatetime){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "queryDeptWorkloadFallbackInfo")
    @ApiOperation("根据时间段统计某个科室工作量")
    @RequestMapping(value = "/queryDept", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsWorkloadResult>  queryDeptWorkload(@RequestParam("deptId") Long deptId,
                                                              @RequestParam("startDatetime")String  startDatetime,
                                                              @RequestParam("endDatetime")String endDatetime){
        return apiPcSmsWorkloadDistributionService.queryDeptWorkload(deptId,startDatetime,endDatetime);
    }
    private CommonResult<SmsWorkloadResult> queryDeptWorkloadFallbackInfo( Long deptId,String startDatetime,String endDatetime){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "queryDeptWorkloadListFallbackInfo")
    @ApiOperation("根据时间段统计所有科室工作量")
    @RequestMapping(value = "/queryDeptWorkloadList", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<SmsWorkloadResult>> queryDeptWorkloadList(@RequestParam("startDatetime")String startDatetime,
                                                                        @RequestParam("endDatetime")String endDatetime){
        return apiPcSmsWorkloadDistributionService.queryDeptWorkloadList(startDatetime,endDatetime);
    }
    private CommonResult<List<SmsWorkloadResult>> queryDeptWorkloadListFallbackInfo( String startDatetime,String endDatetime){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "queryDeptPersonalWorkloadListFallbackInfo")
    @ApiOperation("根据时间段统计科室所有人工作量(一个科室所有人)")
    @RequestMapping(value = "/queryDeptPersonalWorkloadList", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<SmsWorkloadResult>>  queryDeptPersonalWorkloadList(@RequestParam("deptId") Long deptId,
                                                                                @RequestParam("startDatetime")String startDatetime,
                                                                                @RequestParam("endDatetime")String endDatetime){
        return apiPcSmsWorkloadDistributionService.queryDeptPersonalWorkloadList(deptId,startDatetime,endDatetime);
    }
    private CommonResult<List<SmsWorkloadResult>>  queryDeptPersonalWorkloadListFallbackInfo(Long deptId,String startDatetime,String endDatetime){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/model/EsDiseRepository.java<|end_filename|>
package com.neu.his.dms.model;

import com.neu.his.dms.model.EsDise;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

public interface EsDiseRepository  extends ElasticsearchRepository<EsDise, Long>  {
    Page<EsDise> findByNameOrIcdOrCode(String name, String icd, String code, Pageable page);


    Page<EsDise> findByNameContainsOrIcdContainsOrCodeContains(String name, String icd, String code, Pageable page);
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/impl/DmsCaseHistoryServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.dms.service.impl;

import com.neu.his.cloud.service.dms.dto.dms.DmsCaseHistoryParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsCaseHistoryResult;
import com.neu.his.cloud.service.dms.mapper.*;
import com.neu.his.cloud.service.dms.model.*;
import com.neu.his.cloud.service.dms.service.DmsCaseHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class DmsCaseHistoryServiceImpl implements DmsCaseHistoryService {
    @Autowired
    DmsCaseHistoryMapper dmsCaseHistoryMapper;
    @Autowired
    DmsRegistrationMapper dmsRegistrationMapper;
    @Autowired
    DmsNonDrugItemRecordMapper dmsNonDrugItemRecordMapper;
    @Autowired
    DmsNonDrugMapper dmsNonDrugMapper;
    @Autowired
    DmsHerbalPrescriptionRecordMapper dmsHerbalPrescriptionRecordMapper;
    @Autowired
    DmsHerbalItemRecordMapper dmsHerbalItemRecordMapper;
    @Autowired
    DmsMedicinePrescriptionRecordMapper dmsMedicinePrescriptionRecordMapper;
    @Autowired
    DmsMedicineItemRecordMapper dmsMedicineItemRecordMapper;
    @Autowired
    DmsDrugMapper dmsDrugMapper;
    @Autowired
    PmsPatientMapper pmsPatientMapper;

    //chiefComplaint
    //historyOfPresentIllness
    //historyOfTreatment
    //pastHistory
    //allergies
    //healthCheckup
    //registrationId
    //priliminaryDiseStrList
    //priliminaryDiseIdList
    //startDate
    //name
    //gender
    //age
    //封装status(1)\createTime
    /**
     * 描述：初诊
     * <p>author:王思阳
     * <p>author: 赵煜 修改status为1 初诊结束
     * <p>author: 赵煜 必须根据提交上来的registerId来封装patientId,在调用病人病历时，才能进行查询得到
     */
    @Override
    public int insertPriliminaryDise(DmsCaseHistoryParam dmsCaseHistoryParam) {
        if (dmsCaseHistoryParam == null){
            return 0;
        }

        DmsCaseHistory dmsCaseHistory = new DmsCaseHistory();
        dmsCaseHistory.setChiefComplaint(dmsCaseHistoryParam.getChiefComplaint());
        dmsCaseHistory.setHistoryOfPresentIllness(dmsCaseHistoryParam.getHistoryOfPresentIllness());
        dmsCaseHistory.setHistoryOfTreatment(dmsCaseHistoryParam.getHistoryOfTreatment());
        dmsCaseHistory.setPastHistory(dmsCaseHistoryParam.getPastHistory());
        dmsCaseHistory.setAllergies(dmsCaseHistoryParam.getAllergies());
        dmsCaseHistory.setHealthCheckup(dmsCaseHistoryParam.getHealthCheckup());
        dmsCaseHistory.setRegistrationId(dmsCaseHistoryParam.getRegistrationId());
        dmsCaseHistory.setPriliminaryDiseStrList(dmsCaseHistoryParam.getPriliminaryDiseStrList());
        dmsCaseHistory.setPriliminaryDiseIdList(dmsCaseHistoryParam.getPriliminaryDiseIdList());
        dmsCaseHistory.setStartDate(dmsCaseHistoryParam.getStartDate());
        dmsCaseHistory.setName(dmsCaseHistoryParam.getName());
        dmsCaseHistory.setGender(dmsCaseHistoryParam.getGender());
        dmsCaseHistory.setAgeStr(dmsCaseHistoryParam.getAgeStr());
        dmsCaseHistory.setStatus(1);
        dmsCaseHistory.setRegistrationId(dmsCaseHistoryParam.getRegistrationId());
        System.err.println("getRegistrationId:"+dmsCaseHistoryParam.getRegistrationId());
        dmsCaseHistory.setPatientId(dmsRegistrationMapper.selectByPrimaryKey(dmsCaseHistoryParam.getRegistrationId()).getPatientId());//必须设置
        dmsCaseHistory.setCreateTime(new Date());
        dmsCaseHistoryMapper.insertSelective(dmsCaseHistory);
        return 1;
    }
    //根据registrationId查询1 初诊结束 2确诊结束 3 诊毕

    @Override
    public DmsCaseHistoryResult selectCaseHistoryByReg(Long registrationId, Integer status) {
        DmsRegistration dmsRegistration =  dmsRegistrationMapper.selectByPrimaryKey(registrationId);
        if(dmsRegistration ==null){
            return null;
        }


        Long patientId = dmsRegistration.getPatientId();
//        System.err.println("status:"+status);
        DmsCaseHistoryExample dmsCaseHistoryExample = new DmsCaseHistoryExample();
        dmsCaseHistoryExample.createCriteria().andPatientIdEqualTo(patientId).andStatusEqualTo(status);
        dmsCaseHistoryExample.setOrderByClause("create_time desc");//按创建时间降序
        List<DmsCaseHistory> dmsCaseHistoryList = dmsCaseHistoryMapper.selectByExample(dmsCaseHistoryExample);
//        System.err.println("dmsCaseHistoryList.size():"+dmsCaseHistoryList.size());
        DmsCaseHistoryResult dmsCaseHistoryResult = new DmsCaseHistoryResult();
        dmsCaseHistoryResult.setDmsCaseHistoryList(dmsCaseHistoryList);
        return dmsCaseHistoryResult;
    }
    //通过门诊号更新记录
    //check_result
    //test_result
    //definite_dise_str_list
    //checkIdList
    //testIdList
    /**
     * 描述：确诊
     * <p>author:王思阳
     * <p>author: 赵煜 修改status为2 确诊结束
     */
    @Override
    public int submitDefiniteDise(DmsCaseHistoryParam dmsCaseHistoryParam) {
        if (dmsCaseHistoryParam == null){
            return 0;
        }
        DmsCaseHistoryExample dmsCaseHistoryExample = new DmsCaseHistoryExample();
        dmsCaseHistoryExample.createCriteria().andRegistrationIdEqualTo(dmsCaseHistoryParam.getRegistrationId());
        DmsCaseHistory dmsCaseHistory = new DmsCaseHistory();
        dmsCaseHistory.setCheckResult(dmsCaseHistoryParam.getCheckResult());
        dmsCaseHistory.setTestResult(dmsCaseHistoryParam.getTestResult());
        dmsCaseHistory.setDefiniteDiseStrList(dmsCaseHistoryParam.getDefiniteDiseStrList());
        //解析checkIdList为checkStrList
        String checkStrList = resolveNonDrugItemRecord(dmsCaseHistoryParam.getRegistrationId() , 0);
        dmsCaseHistory.setCheckStrList(checkStrList);
        //解析testIdList为testStrList
        String testStrList = resolveNonDrugItemRecord(dmsCaseHistoryParam.getRegistrationId() , 1);
        dmsCaseHistory.setTestStrList(testStrList);
        dmsCaseHistory.setStatus(2);//确诊结束
        dmsCaseHistoryMapper.updateByExampleSelective(dmsCaseHistory,dmsCaseHistoryExample);
        return 1;
    }
    //1. 通过门诊号更新记录dispositionIdList\herbalPrescriptionIdList\medicinePrescriptionIdList
    //2.更新挂号表中的end_attendance为3诊毕
    /**
     * 描述：诊毕
     * <p>author:王思阳
     * <p>author: 赵煜 修改status为3 看诊结束（诊毕），则下次就诊可查出病历记录
     */
    @Override
    public int endDiagnosis(DmsCaseHistoryParam dmsCaseHistoryParam) {
        if (dmsCaseHistoryParam == null){
            return 0;
        }
        DmsCaseHistoryExample dmsCaseHistoryExample = new DmsCaseHistoryExample();
        dmsCaseHistoryExample.createCriteria().andRegistrationIdEqualTo(dmsCaseHistoryParam.getRegistrationId());

        DmsCaseHistory dmsCaseHistory = new DmsCaseHistory();
        //解析dispositionIdList到dispositionStrList
        String dispositionStrList = resolveNonDrugItemRecord(dmsCaseHistoryParam.getRegistrationId() , 2);
        dmsCaseHistory.setDispositionStrList(dispositionStrList);
        //解析herbalPrescriptionIdList到HerbalPrescriptionStrList
        String herbalPrescriptionStrList = resolveHerbalPrescription(dmsCaseHistoryParam.getRegistrationId());
        dmsCaseHistory.setHerbalPrescriptionStrList(herbalPrescriptionStrList);
        //解析medicinePrescriptionIdList到MedicinePrescriptionStrList
        String medicinePrescriptionStrList = resolveMedicinePrescription(dmsCaseHistoryParam.getRegistrationId());
        dmsCaseHistory.setMedicinePrescriptionStrList(medicinePrescriptionStrList);
        dmsCaseHistory.setStatus(3); //诊毕
        dmsCaseHistoryMapper.updateByExampleSelective(dmsCaseHistory,dmsCaseHistoryExample);

        //修改registration表中status为3
        DmsRegistration registration = new DmsRegistration();
        registration.setId(dmsCaseHistoryParam.getRegistrationId());
        registration.setStatus(3);
        dmsRegistrationMapper.updateByPrimaryKeySelective(registration);

        return 1;
    }


    public String resolveNonDrugItemRecord(Long registrationId , Integer type){
//        String[] ids = idStr.split(",");
//        DmsNonDrugItemRecordExample dmsNonDrugItemRecordExample = new DmsNonDrugItemRecordExample();
//        String nonDrugStrList;
//        for (int i = 0 ; i < ids.length ; i++){
//            Long id = Long.valueOf(ids[i]);
//            dmsNonDrugItemRecordExample.clear();
//            dmsNonDrugItemRecordExample.createCriteria().andNoDrugIdEqualTo(id).andTypeEqualTo(type);
//            dmsNonDrugItemRecordMapper.selectByExample(dmsNonDrugItemRecordExample);
//        }
        String nonDrugStrList = "";
        DmsNonDrugItemRecordExample dmsNonDrugItemRecordExample = new DmsNonDrugItemRecordExample();
        dmsNonDrugItemRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId).andTypeEqualTo(type);
        List<DmsNonDrugItemRecord> dmsNonDrugItemRecordList = dmsNonDrugItemRecordMapper.selectByExample(dmsNonDrugItemRecordExample);
        for (DmsNonDrugItemRecord dmsNonDrugItemRecord: dmsNonDrugItemRecordList) {
            Long nonDrugId = dmsNonDrugItemRecord.getNoDrugId();
            DmsNonDrug dmsNonDrug = dmsNonDrugMapper.selectByPrimaryKey(nonDrugId);
            String nonDrugName = dmsNonDrug.getName();
            String oneRecord = "";
            if (type == 0 || type ==1){//检查，检验
                String chechParts = dmsNonDrugItemRecord.getCheckParts();
                String result = dmsNonDrugItemRecord.getCheckResult();
                String resultImgUrlList = dmsNonDrugItemRecord.getResultImgUrlList();
                oneRecord = nonDrugName + "<>" + chechParts + "<>" + result + "<>" + resultImgUrlList + "><";
            }
            else if (type == 2){//处置
                oneRecord = nonDrugName + "><";
            }
            nonDrugStrList = nonDrugStrList + oneRecord;
        }
        return nonDrugStrList;
    }

    public String resolveHerbalPrescription(Long registrationId){
        String herbalPrescriptionStrList = "";//记录整个列表
        DmsHerbalPrescriptionRecordExample dmsHerbalPrescriptionRecordExample = new DmsHerbalPrescriptionRecordExample();
        dmsHerbalPrescriptionRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<DmsHerbalPrescriptionRecord> dmsHerbalPrescriptionRecordList =dmsHerbalPrescriptionRecordMapper.selectByExample(dmsHerbalPrescriptionRecordExample);
        DmsHerbalItemRecordExample dmsHerbalItemRecordExample = new DmsHerbalItemRecordExample();
        String onePrescription = "";//用于记录一个处方
        for (DmsHerbalPrescriptionRecord dmsHerbalPrescriptionRecord: dmsHerbalPrescriptionRecordList) {
            Long prescriptionId = dmsHerbalPrescriptionRecord.getId();
            dmsHerbalItemRecordExample.clear();
            dmsHerbalItemRecordExample.createCriteria().andPrescriptionIdEqualTo(prescriptionId);
            List<DmsHerbalItemRecord> dmsHerbalItemRecordList = dmsHerbalItemRecordMapper.selectByExample(dmsHerbalItemRecordExample);
            String prescriptionName = dmsHerbalPrescriptionRecord.getName();
            onePrescription = onePrescription + prescriptionName + "[";
            String oneItemRecord = "";//用于记录一个处方项（即一种药）
            for (DmsHerbalItemRecord dmsHerbalItemRecord: dmsHerbalItemRecordList) {
                Long itemId = dmsHerbalItemRecord.getDrugId();
                DmsDrug dmsDrug = dmsDrugMapper.selectByPrimaryKey(itemId);
                String itemName = dmsDrug.getName();
                Long num = dmsHerbalItemRecord.getTotalNum();
                oneItemRecord = oneItemRecord + itemName + "<<>>" + num + "><";
            }
            onePrescription = onePrescription + oneItemRecord + "]";
            herbalPrescriptionStrList = herbalPrescriptionStrList + onePrescription + "<>";
        }
        return herbalPrescriptionStrList;
    }

    public String resolveMedicinePrescription(Long registrationId){
        String medicinePrescriptionStrList = "";//用于记录整个列表
        DmsMedicinePrescriptionRecordExample dmsMedicinePrescriptionRecordExample = new DmsMedicinePrescriptionRecordExample();
        dmsMedicinePrescriptionRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<DmsMedicinePrescriptionRecord> dmsMedicinePrescriptionRecordList = dmsMedicinePrescriptionRecordMapper.selectByExample(dmsMedicinePrescriptionRecordExample);
        DmsMedicineItemRecordExample dmsMedicineItemRecordExample = new DmsMedicineItemRecordExample();
        String onePrescription = "";//用于记录一个处方
        for (DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord: dmsMedicinePrescriptionRecordList) {
            Long prescriptionId = dmsMedicinePrescriptionRecord.getId();
            dmsMedicineItemRecordExample.clear();
            dmsMedicineItemRecordExample.createCriteria().andPrescriptionIdEqualTo(prescriptionId);
            List<DmsMedicineItemRecord> dmsMedicineItemRecordList = dmsMedicineItemRecordMapper.selectByExample(dmsMedicineItemRecordExample);
            String prescriptionName = dmsMedicinePrescriptionRecord.getName();
            onePrescription = onePrescription + prescriptionName + "[";
            String oneItemRecord = "";//用于记录一个处方项（即一种药）
            for(DmsMedicineItemRecord dmsMedicineItemRecord: dmsMedicineItemRecordList){
                Long itemId = dmsMedicineItemRecord.getDrugId();
                DmsDrug dmsDrug = dmsDrugMapper.selectByPrimaryKey(itemId);
                String itemName = dmsDrug.getName();
                Long num = dmsMedicineItemRecord.getNum();
                oneItemRecord = oneItemRecord + itemName + "<<>>" + num + "><";
            }
            onePrescription = onePrescription + oneItemRecord + "]";
            medicinePrescriptionStrList = medicinePrescriptionStrList + onePrescription + "<>";
        }
        return medicinePrescriptionStrList;
    }
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/dms/DmsDiseResult.java<|end_filename|>
package com.neu.his.cloud.service.dms.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;


@Setter
@Getter
@ToString
public class DmsDiseResult  implements Serializable {
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "目录id")
    private Long catId;
    @ApiModelProperty(value = "疾病编码")
    private String code;
    @ApiModelProperty(value = "疾病名称")
    private String name;
    @ApiModelProperty(value = "ICD编码")
    private String icd;
    @ApiModelProperty(value = "状态")
    private Integer status;
}


<|start_filename|>HIS-web/src/api/drugmodel.js<|end_filename|>
import request from '@/utils/request'
export function createModel(data) {
  return request({
    url: '/drugModel/createModel',
    method: 'post',
    data
  })
}
export function deleteModel(data) {
  return request({
    url: '/drugModel/deleteModel',
    method: 'post',
    params: {
      ids:data
    },
  })
}

export function listModel(data) {
  return request({
    url: '/drugModel/listModel',
    method: 'get',
    params: data,
  })
}

export function updateModel(data) {
  return request({
    url: '/drugModel/updateModel',
    method: 'post',
    params: {
      modelId:data.id
    },
    data
  })
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsRegistrationService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsRegistrationParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsRegistrationService {



    @RequestMapping(value = "/registration/createRegistration", method = RequestMethod.POST)
    CommonResult createRegistration(@RequestBody DmsRegistrationParam dmsRegistrationParam);

}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/service/hystrix/TestFeignServiceHystrix.java<|end_filename|>
package com.neu.his.cloud.api.app.service.hystrix;

import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.sms.SmsDeptResult;
import com.neu.his.cloud.api.app.service.TestFeignService;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
public class TestFeignServiceHystrix implements TestFeignService {


    @Override
    public String sayHi(String message) {
        return "Hi，your message is :\"" + message + "\" but request error.";
    }

    @Override
    public CommonResult<List<SmsDeptResult>> listAll() {
        return CommonResult.failed("listAll失败");
    }
}


<|start_filename|>HIS-web/src/api/outpatient/patient.js<|end_filename|>
import request from '@/utils/request'
export function getPatientList(data) {
  return request({
    url: '/diagnosisPatient/refreshPatient',
    method: 'post',
    params: {
      staffId:data
    }
  })
}

export function bindPatient(registrationId,staffId) {
  return request({
    url: '/diagnosisPatient/bindPatient',
    method: 'get',
    params: {
      registrationId:registrationId,
      staffId:staffId
    }
  })
}

export function startDiagnosis(registrationId) {
  return request({
    url: '/diagnosisPatient/startDiagnosis',
    method: 'get',
    params: {
      registrationId:registrationId,
    }
  })
}
//读卡
export function selectPatientByIdNo(data) {
  return request({
    url: '/diagnosisPatient/selectPatientByIdNo',
    method: 'post',
    params: {
      identificationNo:data
    }
  })
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsNonDrugModelService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;


import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugModelParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugModelResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "his-cloud-service-dms")
public interface DmsNonDrugModelService {


    @RequestMapping(value = "/NonDrugModel/createModel", method = RequestMethod.POST)
    CommonResult create(@RequestBody DmsNonDrugModelParam dmsNonDrugModelParam);


    @RequestMapping(value = "/NonDrugModel/deleteModel", method = RequestMethod.POST)
    CommonResult deleteModel(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/NonDrugModel/deleteModelItem", method = RequestMethod.POST)
    CommonResult deleteModelItem(@RequestParam("modelId") Long modelId, @RequestParam("ids") List<Long> itemIds);


    @RequestMapping(value = "/NonDrugModel/updateModel", method = RequestMethod.POST)
    CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsNonDrugModelParam dmsNonDrugModelParam);


    @RequestMapping(value = "/NonDrugModel/listModel", method = RequestMethod.POST)
    CommonResult<CommonPage<DmsNonDrugModelResult>> list(@RequestBody DmsNonDrugModelParam queryParam,
                                                         @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin);


}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsCaseModelCatalogNode.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;


import com.neu.his.cloud.zuul.model.DmsCaseModelCatalog;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;


public class DmsCaseModelCatalogNode extends DmsCaseModelCatalog implements Serializable {

    @Setter
    @Getter
    List<DmsCaseModelCatalogNode> children;

}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsDrugService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsDosageResult;
import com.neu.his.common.dto.dms.DmsDrugParam;
import com.neu.his.common.dto.dms.DmsDrugResult;

import java.util.List;

/**
 * 药品
 */
public interface DmsDrugService {

    /**
     * 描述：创建药品
     */
    int createDrug(DmsDrugParam dmsDrugParam);

    /**
     * 描述：删除药品
     */
    int deleteDrug(List<Long> ids);

    /**
     * 描述：更新药品
     */
    int updateDrug(Long id, DmsDrugParam dmsDrugParam);

    /**
     * 描述：查询药品
     */
    List<DmsDrugResult> selectDrug(DmsDrugParam dmsDrugParam, Integer pageSize, Integer pageNum);

    /**
     * 描述：查询所有药品
     */
    List<DmsDrugResult> selectAllDrug();

    /**
     * 描述：查询所有剂型
     */
    List<DmsDosageResult> selectAllDosage();
    /**
     * 描述：根据id查询药品
     */
    DmsDrugResult selectById(Long id);
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/impl/DmsDiseServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.dms.service.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.neu.his.cloud.service.dms.dto.dms.DmsDiseParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsDiseResult;
import com.neu.his.cloud.service.dms.mapper.DmsDiseMapper;
import com.neu.his.cloud.service.dms.model.DmsDise;
import com.neu.his.cloud.service.dms.model.DmsDiseExample;
import com.neu.his.cloud.service.dms.service.DmsDiseService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.List;

@Service
public class DmsDiseServiceImpl implements DmsDiseService {
    @Autowired
    DmsDiseMapper dmsDiseMapper;

    /**
     * 描述：新增一个诊断
     * <p>author:王思阳
     * <p>author:赵煜 修复新增疾病诊断时,不能增加已删除的且name相同的记录
     */
    @Override
    public int create(DmsDiseParam dmsDiseParam) {
        DmsDiseExample example = new DmsDiseExample();
        example.createCriteria().andNameEqualTo(dmsDiseParam.getName()).andStatusNotEqualTo(0);
        List<DmsDise> dmsDiseList = dmsDiseMapper.selectByExample(example);
        if (dmsDiseList.size() > 0) {
            return 0;
        }
        DmsDise dmsDise = new DmsDise();
        BeanUtils.copyProperties(dmsDiseParam,dmsDise);
        dmsDiseMapper.insertSelective(dmsDise);
        return 1;
    }



    @Override
    public int delete(List<Long> ids) {
        int count = ids == null ? 0 : ids.size();//得到要删除的数量
        if (!CollectionUtils.isEmpty(ids)){
            for (Long id:ids) {
                DmsDise dmsDise = new DmsDise();
                dmsDise.setStatus(0);
                DmsDiseExample example = new DmsDiseExample();
                example.createCriteria().andIdEqualTo(id);
                dmsDiseMapper.updateByExampleSelective(dmsDise,example);
            }
        }
        return count;
    }

    @Override
    public int update(Long id, DmsDiseParam dmsDiseParam) {
        DmsDise dmsDise = new DmsDise();
        BeanUtils.copyProperties(dmsDiseParam,dmsDise);
        System.err.println("dmsDiseParam-->"+dmsDiseParam);
        System.err.println("dmsDise-->"+dmsDise);
        DmsDiseExample example = new DmsDiseExample();
        example.createCriteria().andIdEqualTo(id);
        return dmsDiseMapper.updateByExampleSelective(dmsDise,example);
    }

    @Override
    public List<DmsDiseResult> select(DmsDiseParam dmsDiseParam, Integer pageSize, Integer pageNum) {
        DmsDiseExample example = new DmsDiseExample();
        DmsDiseExample.Criteria criteria = example.createCriteria();
        if(!StringUtils.isEmpty(dmsDiseParam.getCatId())){
            criteria.andCatIdEqualTo(dmsDiseParam.getCatId());
        }
        if(!StringUtils.isEmpty(dmsDiseParam.getCode())){
            criteria.andCodeEqualTo(dmsDiseParam.getCode());
        }
        if(!StringUtils.isEmpty(dmsDiseParam.getName())){
            criteria.andNameLike("%"+dmsDiseParam.getName()+"%");
        }
        if(!StringUtils.isEmpty(dmsDiseParam.getIcd())){
            criteria.andIcdEqualTo(dmsDiseParam.getIcd());
        }
        if(!StringUtils.isEmpty(dmsDiseParam.getStatus())){
            criteria.andStatusEqualTo(dmsDiseParam.getStatus());
        }
        criteria.andStatusNotEqualTo(0);//状态不为0
        example.setOrderByClause("id desc");//按id倒序
        List<DmsDiseResult> list = new ArrayList<>();
        for (DmsDise dmsDise:dmsDiseMapper.selectByExample(example)) {
            DmsDiseResult dmsDiseResult = new DmsDiseResult();
            BeanUtils.copyProperties(dmsDise,dmsDiseResult);
            list.add(dmsDiseResult);
        }
        return list;
    }

    @Override
    public List<DmsDiseResult> selectAll() {
        List<DmsDiseResult> list = new ArrayList<>();
        DmsDiseExample example = new DmsDiseExample();
        example.createCriteria().andStatusNotEqualTo(0);
        for (DmsDise dmsDise:dmsDiseMapper.selectByExample(example)) {
            DmsDiseResult dmsDiseResult = new DmsDiseResult();
            BeanUtils.copyProperties(dmsDise,dmsDiseResult);
            list.add(dmsDiseResult);
        }
        return list;
    }

    @Override
    public List<DmsDiseResult> parseList( String idsStr) {
        //解析ids->list<Id>
        List<Long> idList = strToList(idsStr);
       //根据list<Id>查询并封装诊断简单对象
        DmsDiseExample dmsDiseExample=new DmsDiseExample();
        dmsDiseExample.createCriteria().andIdIn(idList);
        List<DmsDise> dmsDiseList=dmsDiseMapper.selectByExample(dmsDiseExample);
        List<DmsDiseResult> dmsDiseResultList = new ArrayList<>();

        if(CollectionUtil.isEmpty(dmsDiseList)){
           return null;
        }

        //封装dto
        for(DmsDise dmsDise: dmsDiseList){
            DmsDiseResult dmsDiseResult=new DmsDiseResult();
            BeanUtils.copyProperties(dmsDise,dmsDiseResult);
            dmsDiseResultList.add(dmsDiseResult);
        }
        return dmsDiseResultList;
    }


    private List<Long> strToList(String idsStr) {
        List<Long> idList = new ArrayList<>();
        if(idsStr == null || idsStr.length() <= 0){
            return idList;
        }
        String[] idArray = idsStr.split(",");
        for(int i=0;i < idArray.length;i++){
            idList.add(new Long(idArray[i]));
        }
        return idList;
    }

}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/dto/app/AppRegistrationParam.java<|end_filename|>
package com.neu.his.cloud.api.app.dto.app;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

@Setter
@Getter
@ToString
public class AppRegistrationParam {

    @ApiModelProperty(value = "排班id")
    private Long skdId;
    @ApiModelProperty(value = "科室id")
    private Long deptId;
    @ApiModelProperty(value = "就诊日期")
    private Date attendanceDate;

    @ApiModelProperty(value = "患者ID")
    private Long patientId;

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/model/SmsStaff.java<|end_filename|>
package com.neu.his.cloud.api.pc.model;

import java.io.Serializable;
import java.util.Date;

public class SmsStaff implements Serializable {
    private Long id;

    private String username;

    private String password;

    private Integer status;

    private Date createTime;

    private Integer gender;

    private Integer skdFlag;

    private String title;

    private String name;

    private Long deptId;

    private Long roleId;

    private Long registrationRankId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Integer getSkdFlag() {
        return skdFlag;
    }

    public void setSkdFlag(Integer skdFlag) {
        this.skdFlag = skdFlag;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Long getRegistrationRankId() {
        return registrationRankId;
    }

    public void setRegistrationRankId(Long registrationRankId) {
        this.registrationRankId = registrationRankId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", password=").append(password);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", gender=").append(gender);
        sb.append(", skdFlag=").append(skdFlag);
        sb.append(", title=").append(title);
        sb.append(", name=").append(name);
        sb.append(", deptId=").append(deptId);
        sb.append(", roleId=").append(roleId);
        sb.append(", registrationRankId=").append(registrationRankId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/sms/SmsSkdRuleItemResult.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.sms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

@Setter
@Getter
@ToString
public class SmsSkdRuleItemResult  implements Serializable {
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "医生id")
    private Long staffId;
    @ApiModelProperty(value = "医生name")
    private String staffName;
    @ApiModelProperty(value = "一周中的排班时间")
    private String daysOfWeek;
    @ApiModelProperty(value = "状态")
    private Integer status;
    @ApiModelProperty(value = "挂号限额")
    private Long skLimit;
    @ApiModelProperty(value = "排版规则id")
    private Long skRuleId;
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/bms/BmsFeeController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.bms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.*;
import com.neu.his.cloud.api.pc.service.bms.BmsFeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "BmsFeeController", description = "收退费管理")
@RequestMapping("/fee")
@CrossOrigin(allowCredentials = "true")
public class BmsFeeController {

    @Autowired
    BmsFeeService bmsFeeService;

    @ApiOperation(value = "查询挂号人")
    @RequestMapping(value = "/listRegisteredPatient", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<BmsRegistrationPatientResult>> listRegisteredPatient(@RequestParam(required=false,name = "medicalRecordNo") String  medicalRecordNo,
                                                                                        @RequestParam(required=false,name="queryDate")@DateTimeFormat(pattern = "yyyy-MM-dd") Date queryDate,
                                                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
       return bmsFeeService.listRegisteredPatient(medicalRecordNo,queryDate,pageSize,pageNum);
    }

    @ApiOperation(value = "收费")
    @RequestMapping(value = "/charge", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult charge(@RequestBody List<BmsChargeParam> bmsChargeParamList){
        return bmsFeeService.charge(bmsChargeParamList);
    }

    @ApiOperation(value = "根据挂号id查询未缴费项目")
    @RequestMapping(value = "/listRefundByRegistrationId", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsRefundChargeResult>>  listRefundByRegistrationId(@RequestParam("registrationId") Long registrationId){
       return bmsFeeService.listRefundByRegistrationId(registrationId);
    }

    @ApiOperation(value = "非药品、药品退费")
    @RequestMapping(value = "/refundCharge", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult refundCharge(@RequestBody List<BmsRefundChargeParam> bmsRefundChargeParamList){
       return bmsFeeService.refundCharge(bmsRefundChargeParamList);
    }


    @ApiOperation(value = "挂号退费")
    @RequestMapping(value = "/refundRegistrationCharge", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult refundRegistrationCharge(@RequestBody BmsRefundRegChargeParam bmsRefundRegChargeParam){
       return bmsFeeService.refundRegistrationCharge(bmsRefundRegChargeParam);
    }

    @ApiOperation(value = "根据挂号Id查询所有未交费项目")
    @RequestMapping(value = "/listChargeByRegistrationId", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsChargeResult>>  listChargeByRegistrationId(@RequestParam("registrationId") Long registrationId){
        return bmsFeeService.listChargeByRegistrationId(registrationId);

    }
}


<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/SmsRoleService.java<|end_filename|>
package com.neu.his.sms;


import com.neu.his.common.dto.sms.SmsRoleParam;
import com.neu.his.mbg.model.SmsPermission;
import com.neu.his.mbg.model.SmsRole;

import java.util.List;

/**
 * 角色
 */
public interface SmsRoleService {
    /**
     * 描述：新增角色
     */
    int create(SmsRoleParam smsRoleParam);

    /**
     * 描述：更新角色
     */
    int update(Long id, SmsRoleParam smsRoleParam);

    /**
     * 描述：删除角色
     */
    int delete(List<Long> ids);

    /**
     * 描述：列出所有角色
     */
    List<SmsRole> selectAll();


    /**
     * 描述：查询角色
     */
    List<SmsRole> select(SmsRoleParam smsRoleParam, Integer pageSize, Integer pageNum);


    /**
     * 描述：根据角色Id查询角色的权限
     */
    List<SmsPermission> getPermissionList(Long roleId);

    /**
     * 描述：根据角色ID修改指定角色的权限
     */
    int updatePermission(Long roleId, List<Long> permissionIds);




}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsDrugStoreController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsRefundDrugListParam;
import com.neu.his.cloud.api.pc.dto.pms.PmsDrugStorePatientListResult;
import com.neu.his.cloud.api.pc.service.dms.DmsDrugStoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController
@Api(tags = "DmsDrugStoreController", description = "药房工作台")
@RequestMapping("/drugStore")
@CrossOrigin(allowCredentials = "true")
public class DmsDrugStoreController {

    @Autowired
    private DmsDrugStoreService dmsDrugStoreService;


    @ApiOperation("刷新发药患者")
    @RequestMapping(value = "/listPatient", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsDrugStorePatientListResult> listPatient(@RequestParam(value = "medicalRecordNo",required = false) String medicalRecordNo,
                                                                   @RequestParam("queryDate") String queryDate,
                                                                   @RequestParam("type") Integer type){
        return  dmsDrugStoreService.listPatient(medicalRecordNo,queryDate,type);
    }


    @ApiOperation("发药")
    @RequestMapping(value = "/releaseDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult releaseDrug(@RequestParam("prescriptionId") Long prescriptionId,
                                    @RequestParam("type") Integer type){
       return dmsDrugStoreService.releaseDrug(prescriptionId,type);
    }

    @ApiOperation("退药")
    @RequestMapping(value = "/refundDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult refundDrug(@RequestBody DmsRefundDrugListParam dmsRefundDrugListParam){
        return dmsDrugStoreService.refundDrug(dmsRefundDrugListParam);
    }

}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/service/sms/SmsSkdService.java<|end_filename|>
package com.neu.his.cloud.api.app.service.sms;


import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.sms.SmsSkdParam;
import com.neu.his.cloud.api.app.dto.sms.SmsSkdResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(value = "his-cloud-service-sms")
public interface SmsSkdService {

    @RequestMapping(value = "/skd/querySkd", method = RequestMethod.POST)
    CommonResult<List<SmsSkdResult>> listSkd(SmsSkdParam queryParam);

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/mapper/DmsNonDrugItemRecordMapper.java<|end_filename|>
package com.neu.his.cloud.service.sms.mapper;

import com.neu.his.cloud.service.sms.model.DmsNonDrugItemRecord;
import com.neu.his.cloud.service.sms.model.DmsNonDrugItemRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsNonDrugItemRecordMapper {
    int countByExample(DmsNonDrugItemRecordExample example);

    int deleteByExample(DmsNonDrugItemRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsNonDrugItemRecord record);

    int insertSelective(DmsNonDrugItemRecord record);

    List<DmsNonDrugItemRecord> selectByExample(DmsNonDrugItemRecordExample example);

    DmsNonDrugItemRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsNonDrugItemRecord record, @Param("example") DmsNonDrugItemRecordExample example);

    int updateByExample(@Param("record") DmsNonDrugItemRecord record, @Param("example") DmsNonDrugItemRecordExample example);

    int updateByPrimaryKeySelective(DmsNonDrugItemRecord record);

    int updateByPrimaryKey(DmsNonDrugItemRecord record);
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsNonDrugDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;



import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugParam;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsNonDrugDistributionService {

    @RequestMapping(value = "/DmsNonDrug/create", method = RequestMethod.POST)
    CommonResult create(@RequestBody DmsNonDrugParam dmsNonDrugParam);

    @RequestMapping(value = "/DmsNonDrug/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);

    @RequestMapping(value = "/DmsNonDrug/update/{id}", method = RequestMethod.POST)
    CommonResult update(@PathVariable Long id, @RequestBody DmsNonDrugParam dmsNonDrugParam);


    @RequestMapping(value = "/DmsNonDrug/list", method = RequestMethod.POST)
    CommonResult<CommonPage<DmsNonDrugResult>> list(@RequestBody DmsNonDrugParam queryParam,
                                                           @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

    @RequestMapping(value = "/DmsNonDrug/listAll", method = RequestMethod.POST)
    CommonResult<List<DmsNonDrugResult>> listAll();
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/SmsStaffMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.SmsStaff;
import com.neu.his.cloud.zuul.model.SmsStaffExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsStaffMapper {
    int countByExample(SmsStaffExample example);

    int deleteByExample(SmsStaffExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsStaff record);

    int insertSelective(SmsStaff record);

    List<SmsStaff> selectByExample(SmsStaffExample example);

    SmsStaff selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsStaff record, @Param("example") SmsStaffExample example);

    int updateByExample(@Param("record") SmsStaff record, @Param("example") SmsStaffExample example);

    int updateByPrimaryKeySelective(SmsStaff record);

    int updateByPrimaryKey(SmsStaff record);
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/sms/SmsFrequentUsedDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.sms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.sms.ApiPcSmsFrequentUsedDistributionService;
import com.neu.his.cloud.zuul.dto.sms.SmsFrequentUsedResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "SmsFrequentUsedDistributionController", description = "常用项管理")
@RequestMapping("/frequentUsed")
@CrossOrigin(allowCredentials = "true")
public class SmsFrequentUsedDistributionController {

    @Autowired
    private ApiPcSmsFrequentUsedDistributionService apiPcSmsFrequentUsedDistributionService;

    @HystrixCommand(fallbackMethod = "addFrequentFallbackInfo")
    @ApiOperation("新增常用项")
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult addFrequent(@RequestParam("staffId") Long staffId,
                                    @RequestParam("addType") int addType,
                                    @RequestParam("addId") Long addId){
       return  apiPcSmsFrequentUsedDistributionService.addFrequent(staffId,addType,addId);
    }
    private CommonResult addFrequentFallbackInfo(Long staffId, int addType, Long addId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteFrequentFallbackInfo")
    @ApiOperation("删除常用项")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteFrequent(@RequestParam("staffId") Long staffId,
                               @RequestParam("deleteType") int deleteType,
                               @RequestParam("deleteId") Long deleteId){
       return  apiPcSmsFrequentUsedDistributionService.deleteFrequent(staffId,deleteType,deleteId);
    }
    private CommonResult deleteFrequentFallbackInfo(Long staffId, int deleteType, Long deleteId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "selectFrequentFallbackInfo")
    @ApiOperation("查询指定常用项")
    @RequestMapping(value = "/selectByType", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsFrequentUsedResult> selectFrequent(@RequestParam("staffId") Long staffId,
                                                              @RequestParam("selectType") int selectType){
       return  apiPcSmsFrequentUsedDistributionService.selectFrequent(staffId,selectType);
    }
    private CommonResult<SmsFrequentUsedResult> selectFrequentFallbackInfo( Long staffId, int selectType){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/controller/SmsDescriptionController.java<|end_filename|>
package com.neu.his.cloud.service.sms.controller;

import com.neu.his.cloud.service.sms.common.CommonResult;
import com.neu.his.cloud.service.sms.dto.app.AppDeptDescriptionResult;
import com.neu.his.cloud.service.sms.dto.app.AppDocSkdResult;
import com.neu.his.cloud.service.sms.dto.app.AppStaffDescriptionResult;
import com.neu.his.cloud.service.sms.service.SmsDescriptionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "SmsDescriptionController", description = "科室、员工描述")
@RequestMapping("/description")
@CrossOrigin(allowCredentials = "true")
public class SmsDescriptionController {

    @Autowired
    private SmsDescriptionService smsDescriptionService;

    @ApiOperation("查询所有科室描述")
    @RequestMapping(value = "/getDeptDescription", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppDeptDescriptionResult>> getDeptDescription(){
        return CommonResult.success(smsDescriptionService.getDeptDescription());
    }

    /**
     * 描述:查询对应科室所有专家
     * <p>author: ma
     */
    @ApiOperation("查询某个科室所有专家")
    @RequestMapping(value = "/listDeptDoctor", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppStaffDescriptionResult>> listDeptDoctor(@RequestParam("deptId") Long deptId){
        List<AppStaffDescriptionResult> list = smsDescriptionService.getDetailListByDept(deptId);
        return CommonResult.success(list);
    }


    /**
     * 描述:查询员工描述信息
     */
    @ApiOperation("查询员工描述信息")
    @RequestMapping(value = "/getStaffDetailById", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<AppDocSkdResult> getStaffDetailById(@RequestParam("theId")Long theId){
       return CommonResult.success(smsDescriptionService.getDetailById(theId));
    }




}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/sms/SmsRegistrationRankService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.sms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsRegistrationRankParam;
import com.neu.his.cloud.api.pc.dto.sms.SmsRegistrationRankResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@FeignClient(value = "his-cloud-service-sms")
public interface SmsRegistrationRankService {

    @RequestMapping(value = "/registerRank/create", method = RequestMethod.POST)
     CommonResult create(@RequestBody SmsRegistrationRankParam smsRegistrationRankParam);


    @RequestMapping(value = "/registerRank/delete", method = RequestMethod.POST)
     CommonResult delete(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/registerRank/update/{id}", method = RequestMethod.POST)
     CommonResult update(@PathVariable("id") Long id,@RequestBody SmsRegistrationRankParam smsRegistrationRankParam);


    @RequestMapping(value = "/registerRank/select", method = RequestMethod.POST)
    @ResponseBody
     CommonResult<CommonPage<SmsRegistrationRankResult>> list(@RequestBody SmsRegistrationRankParam queryParam,
                                                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

    @RequestMapping(value = "/registerRank/selectAll", method = RequestMethod.GET)
     CommonResult<List<SmsRegistrationRankResult>> listAll();


}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/mapper/BmsInvoiceRecordMapper.java<|end_filename|>
package com.neu.his.cloud.service.sms.mapper;

import com.neu.his.cloud.service.sms.model.BmsInvoiceRecord;
import com.neu.his.cloud.service.sms.model.BmsInvoiceRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface BmsInvoiceRecordMapper {
    int countByExample(BmsInvoiceRecordExample example);

    int deleteByExample(BmsInvoiceRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(BmsInvoiceRecord record);

    int insertSelective(BmsInvoiceRecord record);

    List<BmsInvoiceRecord> selectByExample(BmsInvoiceRecordExample example);

    BmsInvoiceRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") BmsInvoiceRecord record, @Param("example") BmsInvoiceRecordExample example);

    int updateByExample(@Param("record") BmsInvoiceRecord record, @Param("example") BmsInvoiceRecordExample example);

    int updateByPrimaryKeySelective(BmsInvoiceRecord record);

    int updateByPrimaryKey(BmsInvoiceRecord record);
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/mapper/DmsDrugRefundItemRecordMapper.java<|end_filename|>
package com.neu.his.cloud.service.dms.mapper;

import com.neu.his.cloud.service.dms.model.DmsDrugRefundItemRecord;
import com.neu.his.cloud.service.dms.model.DmsDrugRefundItemRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsDrugRefundItemRecordMapper {
    int countByExample(DmsDrugRefundItemRecordExample example);

    int deleteByExample(DmsDrugRefundItemRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsDrugRefundItemRecord record);

    int insertSelective(DmsDrugRefundItemRecord record);

    List<DmsDrugRefundItemRecord> selectByExample(DmsDrugRefundItemRecordExample example);

    DmsDrugRefundItemRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsDrugRefundItemRecord record, @Param("example") DmsDrugRefundItemRecordExample example);

    int updateByExample(@Param("record") DmsDrugRefundItemRecord record, @Param("example") DmsDrugRefundItemRecordExample example);

    int updateByPrimaryKeySelective(DmsDrugRefundItemRecord record);

    int updateByPrimaryKey(DmsDrugRefundItemRecord record);
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsCaseModelOrCatalogParam.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
@ToString
public class DmsCaseModelOrCatalogParam  implements Serializable {

    @ApiModelProperty (value = "父模板（目录）Id")
    private Long parentId;
    @ApiModelProperty (value = "层级（增加时不需传入）")
    private Integer level;
    @ApiModelProperty (value = "类型 ： 2 模板 1 目录")
    private Integer type;
    @ApiModelProperty (value = "状态： 1 正常（增加时不需传入）")
    private Integer status;
    @ApiModelProperty (value = "范围:0个人 1科室 2全院")
    private Integer scope;
    @ApiModelProperty (value = "所属人Id")
    private Long ownId;
    @ApiModelProperty (value = "创建时间（增加时不需传入）")
    private Date createTime;
    @ApiModelProperty (value = "目录或模板名")
    private String name;
    //如果是模板一下信息还需要包含
    @ApiModelProperty (value = "主诉")
    private String chiefComplaint;
    @ApiModelProperty (value = "症状")
    private String historyOfPresentIllness;
    @ApiModelProperty (value = "历史治疗")
    private String historyOfTreatment;
    @ApiModelProperty (value = "既往史")
    private String pastHistory;
    @ApiModelProperty (value = "过敏史")
    private String allergies;
    @ApiModelProperty (value = "健康检查")
    private String healthCheckup;
    @ApiModelProperty (value = "初诊Id list--->    1,2,3,4,5")
    private String priliminaryDiseIdList;
    @ApiModelProperty (value = "初诊name list---> 胃酸,胃胀气,")
    private String priliminaryDiseStrList;

}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/service/dms/DmsRegistrationService.java<|end_filename|>
package com.neu.his.cloud.api.app.service.dms;


import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.app.AppRegistrationParam;
import com.neu.his.cloud.api.app.dto.dms.DmsRegHistoryResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@FeignClient(value = "his-cloud-service-dms")
public interface DmsRegistrationService {
    @RequestMapping(value = "/registration/listAllRegistration", method = RequestMethod.POST)
     CommonResult<List<DmsRegHistoryResult>> listAllRegistration(@RequestParam("identificationNo") String identificationNo);

    @RequestMapping(value = "/registration/appReg", method = RequestMethod.POST)
     CommonResult appRegistration(@RequestBody AppRegistrationParam appRegistrationParam);
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsRegistrationController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsRegistrationParam;
import com.neu.his.cloud.api.pc.service.dms.DmsRegistrationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "DmsRegistrationController", description = "挂号管理")
@RequestMapping("/registration")
@CrossOrigin(allowCredentials = "true")
public class DmsRegistrationController {

    @Autowired
    DmsRegistrationService dmsRegistrationService;

    @ApiOperation(value = "挂号")
    @RequestMapping(value = "/createRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createRegistration(@RequestBody DmsRegistrationParam dmsRegistrationParam , BindingResult result){
       return dmsRegistrationService.createRegistration(dmsRegistrationParam);

    }

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/bms/BmsFeeQueryService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.bms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsDoctorPatientFeeResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
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;

@FeignClient(value = "his-cloud-service-bms")
public interface BmsFeeQueryService {

    @RequestMapping(value = "/feeQuery/listByRegistration", method = RequestMethod.POST)
    CommonResult<List<BmsDoctorPatientFeeResult>> listFeeByRegistrationId(@RequestParam("registrationId") Long registrationId);

}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/BmsFeeService.java<|end_filename|>
package com.neu.his.cloud.service.bms.service;

import com.neu.his.cloud.service.bms.dto.bms.*;


import java.util.Date;
import java.util.List;

/**
 * 收缴费
 */
public interface BmsFeeService {
    /**
     * 描述：查询当日挂号人
     */
    List<BmsRegistrationPatientResult> listRegisteredPatient(String medicalRecordNo, Date queryDate);
    /**
     * 描述：根据挂号id查询未缴费项目
     */
    List<BmsChargeResult>  listChargeByRegistrationId(Long registrationId);
    /**
     * 描述：收费
     */
    int charge(List<BmsChargeParam> bmsChargeParamList);
    /**
     * 描述：退费查询（根据挂号id查找出所有发票）
     */
    List<BmsRefundChargeResult> listRefundByRegistrationId(Long registrationId);
    /**
     * 描述：非药品、药品退费
     */
    int refundCharge(List<BmsRefundChargeParam> bmsRefundChargeParamList);
    /**
     * 描述：挂号退费
     */
    int refundRegistrationCharge(BmsRefundRegChargeParam bmsRefundRegChargeParam);
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/sms/SmsEchartsController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.sms;


import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsDeptAmountStatisticsResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsPatientsStatisticsResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsStaffAmountStatisticsResult;
import com.neu.his.cloud.api.pc.service.sms.SmsEchartsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "SmsEchartsController", description = "图表统计")
@RequestMapping("/charts")
@CrossOrigin(allowCredentials = "true")
public class SmsEchartsController {
    @Autowired
    private SmsEchartsService smsEchartsService;

    @ApiOperation(value = "统计个人每日接待患者人数（近7日）")
    @RequestMapping(value = "/staffPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> staffPatients(@RequestParam Long staffId) {
       return smsEchartsService.staffPatients(staffId);
    }

    @ApiOperation(value = "统计个人每日分类收费信息（近7日）")
    @RequestMapping(value = "/staffClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsStaffAmountStatisticsResult> staffClassifyStatistics(@RequestParam Long staffId) {
        return  smsEchartsService.staffClassifyStatistics(staffId);
    }

    @ApiOperation(value = "统计各科室每日接待患者人数（近7日）")
    @RequestMapping(value = "/deptPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> deptPatients(@RequestParam Long deptId) {
       return  smsEchartsService.deptPatients(deptId);
    }

    @ApiOperation(value = "统计各科室每日分类收费信息（近7日）")
    @RequestMapping(value = "/deptClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsDeptAmountStatisticsResult> deptClassifyStatistics(@RequestParam Long deptId) {
        return  smsEchartsService.deptClassifyStatistics(deptId);
    }

    @ApiOperation(value = "统计全院每日接待患者人数（近7日）")
    @RequestMapping(value = "/totalClassifyStatistics", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsDeptAmountStatisticsResult> totalClassifyStatistics() {
       return  smsEchartsService.totalClassifyStatistics();
    }

    @ApiOperation(value = "统计全院每日分类收费信息（近7日）")
    @RequestMapping(value = "/totalPatients", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<SmsPatientsStatisticsResult> totalPatients() {
      return smsEchartsService.totalPatients();
    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsDrugStoreService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsRefundDrugListParam;
import com.neu.his.cloud.api.pc.dto.pms.PmsDrugStorePatientListResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsDrugStoreService {


    @RequestMapping(value = "/drugStore/listPatient", method = RequestMethod.POST)
    CommonResult<PmsDrugStorePatientListResult> listPatient(@RequestParam(value = "medicalRecordNo",required = false) String medicalRecordNo,
                                                            @RequestParam("queryDate")  String  queryDate,
                                                                   @RequestParam("type") Integer type);


    @RequestMapping(value = "/drugStore/releaseDrug", method = RequestMethod.POST)
    public CommonResult releaseDrug(@RequestParam("prescriptionId") Long prescriptionId,
                                    @RequestParam("type") Integer type);


    @RequestMapping(value = "/drugStore/refundDrug", method = RequestMethod.POST)

    public CommonResult refundDrug(@RequestBody DmsRefundDrugListParam dmsRefundDrugListParam);

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/DmsCaseModelCatalogMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.DmsCaseModelCatalog;
import com.neu.his.cloud.zuul.model.DmsCaseModelCatalogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsCaseModelCatalogMapper {
    int countByExample(DmsCaseModelCatalogExample example);

    int deleteByExample(DmsCaseModelCatalogExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsCaseModelCatalog record);

    int insertSelective(DmsCaseModelCatalog record);

    List<DmsCaseModelCatalog> selectByExample(DmsCaseModelCatalogExample example);

    DmsCaseModelCatalog selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsCaseModelCatalog record, @Param("example") DmsCaseModelCatalogExample example);

    int updateByExample(@Param("record") DmsCaseModelCatalog record, @Param("example") DmsCaseModelCatalogExample example);

    int updateByPrimaryKeySelective(DmsCaseModelCatalog record);

    int updateByPrimaryKey(DmsCaseModelCatalog record);
}

<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/bms/BmsFeeQueryController.java<|end_filename|>
package com.neu.his.api.controller.bms;

import com.neu.his.bms.service.BmsFeeQueryService;
import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.bms.BmsDoctorPatientFeeResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "BmsFeeQueryController", description = "费用查询")
@RequestMapping("/feeQuery")
@CrossOrigin(allowCredentials = "true")
public class BmsFeeQueryController {

    @Autowired
    private BmsFeeQueryService bmsFeeQueryService;

    /**
     * 描述:根据挂号id查询患者费用
     * <p>author: ma
     */
    @ApiOperation("根据挂号Id查询患者费用")
    @RequestMapping(value = "/listByRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<BmsDoctorPatientFeeResult>>  listFeeByRegistrationId(@RequestParam("registrationId") Long registrationId){
        List<BmsDoctorPatientFeeResult> list = bmsFeeQueryService.listFeeByRegistrationId(registrationId);
        return CommonResult.success(list);
    }

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/dto/app/AppHistoryRegResult.java<|end_filename|>
package com.neu.his.cloud.service.sms.dto.app;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

@Setter
@Getter
@ToString
public class AppHistoryRegResult {

    @ApiModelProperty(value = "项目名称")
    String itemName;
    @ApiModelProperty(value = "数量")
    Long currentNum;
    @ApiModelProperty(value = "单价")
    BigDecimal price;
    @ApiModelProperty(value = "状态 0作废（删除）1未缴费 2未登记（已缴费） 3已登记 4已执行 5已退费 6已过期")
    Integer status;
    @ApiModelProperty(value = "类型 0 挂号 1检查 2检验 3处置 4草药 5成药")
    Integer type;
    @ApiModelProperty(value = "项目id")
    Long id;

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/controller/DmsMechanicItemRecordController.java<|end_filename|>
package com.neu.his.cloud.service.dms.controller;

import com.neu.his.cloud.service.dms.common.CommonResult;
import com.neu.his.cloud.service.dms.dto.dms.DmsMechanicItemRecordResult;
import com.neu.his.cloud.service.dms.service.DmsMechanicItemRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsMechanicItemRecordController", description = "医技工作台管理")
@RequestMapping("/DmsMechanicItemRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsMechanicItemRecordController {

    @Autowired
    private DmsMechanicItemRecordService dmsMechanicItemRecordService;

    /**
     * 描述:根据科室id刷新患者列表
     * <p>author: ma
     */
    @ApiOperation(value = "根据科室id刷新患者列表")
    @RequestMapping(value = "/listByDept", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsMechanicItemRecordResult>> listByDept(@RequestParam("deptId") Long deptId){
        List<DmsMechanicItemRecordResult> list = dmsMechanicItemRecordService.listByDept(deptId);
        return CommonResult.success(list);
    }

    /**
     * 描述:医技登记
     * <p>author: ma
     */
    @ApiOperation(value = "医技登记")
    @RequestMapping(value = "/log", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult log(@RequestParam("itemRecordId") Long itemRecordId, @RequestParam("logStaffId") Long logStaffId){
        int count = dmsMechanicItemRecordService.log(itemRecordId,logStaffId);
        if(count > 0){
            return CommonResult.success(count, "登记成功");
        }
        return CommonResult.failed("登记失败");
    }

    /**
     * 描述:上传结果
     * <p>author: ma
     */
    @ApiOperation(value = "上传结果")
    @RequestMapping(value = "/uploadResult", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult uploadResult(@RequestParam("id") Long id,
                                     @RequestParam("executeStaffId") Long excuteStaffId,
                                     @RequestParam("checkResult") String checkResult,
                                     @RequestParam("resultImgUrlList") String resultImgUrlList){
        int count = dmsMechanicItemRecordService.uploadResult(id,excuteStaffId,checkResult,resultImgUrlList);
        if(count > 0){
            return CommonResult.success(count, "上传成功");
        }
        return CommonResult.failed("上传失败");
    }



}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/DmsNonDrugServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;


import com.neu.his.common.dto.dms.DmsNonDrugParam;
import com.neu.his.common.dto.dms.DmsNonDrugResult;
import com.neu.his.common.util.RedisUtil;
import com.neu.his.dms.service.DmsNonDrugService;
import com.neu.his.mbg.mapper.DmsNonDrugMapper;
import com.neu.his.mbg.mapper.SmsDeptMapper;
import com.neu.his.mbg.model.DmsNonDrug;
import com.neu.his.mbg.model.DmsNonDrugExample;
import com.neu.his.mbg.model.SmsDeptExample;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class DmsNonDrugServiceImpl implements DmsNonDrugService {
    @Autowired
    private DmsNonDrugMapper dmsNonDrugMapper;

    @Autowired
    private SmsDeptMapper smsDeptMapper;

    @Autowired
    private RedisUtil redisUtil;
    /**
     * 描述：新增一个非药品
     * <p>author:王思阳
     * <p>author:赵煜     封装param中没有的数据
     * <p>author:赵煜     修复科室名字错误bug
     */
    @Override
    public int create(DmsNonDrugParam dmsNonDrugParam) {
        DmsNonDrugExample example = new DmsNonDrugExample();//根据code查询非药品是否存在
        example.createCriteria().andCodeEqualTo(dmsNonDrugParam.getCode());
        List<DmsNonDrug> dmsNonDrugList =dmsNonDrugMapper.selectByExample(example);
        if(dmsNonDrugList.size()>0){//如果存在相同的code，则插入失败
            return 0;
        }

        DmsNonDrug dmsNonDrug = new DmsNonDrug();//插入
        BeanUtils.copyProperties(dmsNonDrugParam, dmsNonDrug);
        dmsNonDrug.setStatus(1);  // 正常
        dmsNonDrug.setCreateDate(new Date());
        dmsNonDrugMapper.insertSelective(dmsNonDrug);

        //插入成功，在redis修改flag
        redisUtil.setObj("nonDrugChangeStatus","1");

        return 1;

    }

    @Override
    public int delete(List<Long> ids) {
        int count = ids == null ? 0 : ids.size();//得到要删除的数量
        if(!CollectionUtils.isEmpty(ids)){
            for(Long id : ids){
                DmsNonDrug dmsNonDrug = new DmsNonDrug();
                dmsNonDrug.setStatus(0);
                DmsNonDrugExample example = new DmsNonDrugExample();
                example.createCriteria().andIdEqualTo(id);
                dmsNonDrugMapper.updateByExampleSelective(dmsNonDrug,example);
            }
        }

        //删除成功，在redis修改flag
        redisUtil.setObj("nonDrugChangeStatus","1");

        return count;
    }

    @Override
    public int update(Long id, DmsNonDrugParam dmsNonDrugParam) {
        DmsNonDrug dmsNonDrug = new DmsNonDrug();
        BeanUtils.copyProperties(dmsNonDrugParam,dmsNonDrug);
        //dmsNonDrug.setId(id);
        DmsNonDrugExample example = new DmsNonDrugExample();
        example.createCriteria().andIdEqualTo(id);

        //更新成功，在redis修改flag
        redisUtil.setObj("nonDrugChangeStatus","1");

        return dmsNonDrugMapper.updateByExampleSelective(dmsNonDrug,example);
    }



    /**
     * 描述：模糊查询非药品、且分页
     * <p>author:王思阳
     * <p>author:赵煜   改为模糊查询,并封装科室名字
     *
     */
    @Override
    public List<DmsNonDrugResult> select(DmsNonDrugParam dmsNonDrugParam) {

        DmsNonDrugExample example = new DmsNonDrugExample();
        DmsNonDrugExample.Criteria criteria =example.createCriteria();

        if(!StringUtils.isEmpty(dmsNonDrugParam.getCode())){
            criteria.andCodeLike("%" + dmsNonDrugParam.getCode() + "%");
        }
        if(!StringUtils.isEmpty(dmsNonDrugParam.getName())){
            criteria.andNameLike("%" + dmsNonDrugParam.getName() + "%");
        }

        if(!StringUtils.isEmpty(dmsNonDrugParam.getMnemonicCode())){
            criteria.andMnemonicCodeLike("%" + dmsNonDrugParam.getMnemonicCode() + "%");
        }

        //执行科室和类型属于精确查找
        if(!StringUtils.isEmpty(dmsNonDrugParam.getRecordType())){
            criteria.andRecordTypeEqualTo(dmsNonDrugParam.getRecordType());
        }
        if(!StringUtils.isEmpty(dmsNonDrugParam.getDeptId())){
            criteria.andDeptIdEqualTo(dmsNonDrugParam.getDeptId());
        }

        criteria.andStatusNotEqualTo(0);
        example.setOrderByClause("id desc"); //按id降序
        List<DmsNonDrugResult> dmsNonDrugResultList = new ArrayList<>();
        List<DmsNonDrug> dmsNonDrugList= dmsNonDrugMapper.selectByExample(example);
        System.err.println(dmsNonDrugList);

        for (DmsNonDrug dmsNonDrug:dmsNonDrugList) {
            DmsNonDrugResult dmsNonDrugResult = new DmsNonDrugResult();
            BeanUtils.copyProperties(dmsNonDrug,dmsNonDrugResult);
            if(!StringUtils.isEmpty(dmsNonDrug.getDeptId())) {
                dmsNonDrugResult.setDeptName(smsDeptMapper.selectByPrimaryKey(dmsNonDrug.getDeptId()).getName());//封装科室名
            }
            dmsNonDrugResultList.add(dmsNonDrugResult);
        }
        return dmsNonDrugResultList;
    }

    @Override
    public List<DmsNonDrugResult> selectAll() {
        //先在redis中查询是否存在
        String status = (String)redisUtil.getObj("nonDrugChangeStatus");
        if(status != null && status.equals("0")){
            List<DmsNonDrugResult> resultList = (List<DmsNonDrugResult>)redisUtil.getObj("allNonDrug");
            if(resultList != null){
                return resultList;
            }
        }
        //在数据库中查找

        List<DmsNonDrugResult> list = new ArrayList<>();
        DmsNonDrugExample example = new DmsNonDrugExample();
        example.createCriteria().andStatusNotEqualTo(0);
        for (DmsNonDrug dmsNonDrug:dmsNonDrugMapper.selectByExample(example)) {
            DmsNonDrugResult dmsNonDrugResult = new DmsNonDrugResult();
            BeanUtils.copyProperties(dmsNonDrug,dmsNonDrugResult);
            list.add(dmsNonDrugResult);
        }

        //向redis添加
        redisUtil.setObj("allNonDrug",list);
        redisUtil.setObj("nonDrugChangeStatus","0");


        return list;
    }
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/component/DailyWorkloadStatisticTask.java<|end_filename|>
package com.neu.his.component;

import com.neu.his.sms.SmsWorkloadService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Calendar;
import java.util.Date;

/**
 * 定时统计工作量
 */
@Component
public class DailyWorkloadStatisticTask {

    private Logger LOGGER = LoggerFactory.getLogger(DailyWorkloadStatisticTask.class);

    @Autowired
    private SmsWorkloadService smsWorkloadService;

    /**
     * 描述:每天00:05:00开始执行，统计前一天所有员工、科室工作量并插入数据库
     * <p>author: ma
     */
    @Scheduled(cron = "0 5 0 ? * *")
    private void dailyWorkloadStatistic(){
        LOGGER.info("开始每日统计：");
        //获取当前时间前一天
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        calendar.add(Calendar.DAY_OF_MONTH, -1);
        LOGGER.info("插入数据：" + smsWorkloadService.statistic(calendar.getTime()));
        LOGGER.info("统计结束---------------");
    }


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsDiseService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsDiseParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsDiseResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsDiseService {


    @RequestMapping(value = "/DmsDise/create", method = RequestMethod.POST)
    public CommonResult create(@RequestBody DmsDiseParam dmsDiseParam);


    @RequestMapping(value = "/DmsDise/delete", method = RequestMethod.POST)
    public CommonResult delete(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/DmsDise/update/{id}", method = RequestMethod.POST)
    public CommonResult update(@PathVariable Long id, @RequestBody DmsDiseParam dmsDiseParam);


    @RequestMapping(value = "/DmsDise/list", method = RequestMethod.POST)
    public CommonResult<CommonPage<DmsDiseResult>> list(@RequestBody DmsDiseParam queryParam,
                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

    @RequestMapping(value = "/DmsDise/listAll", method = RequestMethod.POST)
    public CommonResult<List<DmsDiseResult>> listAll();

    @RequestMapping(value = "/DmsDise/parseList", method = RequestMethod.POST)
    public CommonResult<List<DmsDiseResult>> parseList( @RequestParam(value = "idsStr") String idsStr);
}


<|start_filename|>HIS-master/HIS-service/HIS-bms-service/src/main/java/com/neu/his/bms/service/BmsSettlementCatService.java<|end_filename|>
package com.neu.his.bms.service;

import com.neu.his.common.dto.bms.BmsSettlementCatParam;
import com.neu.his.common.dto.bms.BmsSettlementCatResult;

import java.util.List;

/**
 * 结算类型
 */
public interface BmsSettlementCatService {

    /**
     * 描述：新增结算类型
     */
    int create(BmsSettlementCatParam bmsSettlementCatParam);

    /**
     * 描述：删除结算类型
     */
    int delete(List<Long> ids);

    /**
     * 描述：更新结算类型
     */
    int update(Long id, BmsSettlementCatParam bmsSettlementCatParam);

    /**
     * 描述：查询结算类型
     */
    List<BmsSettlementCatResult> select(BmsSettlementCatParam bmsSettlementCatParam);

    /**
     * 描述：列出所有结算类型
     */
    List<BmsSettlementCatResult> selectAll();
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/sms/ApiPcSmsFrequentUsedDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.sms;


import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.sms.SmsFrequentUsedResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcSmsFrequentUsedDistributionService {

    @RequestMapping(value = "/frequentUsed/add", method = RequestMethod.POST)
    CommonResult addFrequent(@RequestParam("staffId") Long staffId,
                                    @RequestParam("addType") int addType,
                                    @RequestParam("addId") Long addId);

    @RequestMapping(value = "/frequentUsed/delete", method = RequestMethod.POST)
    CommonResult deleteFrequent(@RequestParam("staffId") Long staffId,
                               @RequestParam("deleteType") int deleteType,
                               @RequestParam("deleteId") Long deleteId);


    @RequestMapping(value = "/frequentUsed/selectByType", method = RequestMethod.POST)
    CommonResult<SmsFrequentUsedResult> selectFrequent(@RequestParam("staffId") Long staffId,
                                                              @RequestParam("selectType") int selectType);

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/mapper/DmsMedicineModelItemMapper.java<|end_filename|>
package com.neu.his.cloud.service.sms.mapper;

import com.neu.his.cloud.service.sms.model.DmsMedicineModelItem;
import com.neu.his.cloud.service.sms.model.DmsMedicineModelItemExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsMedicineModelItemMapper {
    int countByExample(DmsMedicineModelItemExample example);

    int deleteByExample(DmsMedicineModelItemExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsMedicineModelItem record);

    int insertSelective(DmsMedicineModelItem record);

    List<DmsMedicineModelItem> selectByExample(DmsMedicineModelItemExample example);

    DmsMedicineModelItem selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsMedicineModelItem record, @Param("example") DmsMedicineModelItemExample example);

    int updateByExample(@Param("record") DmsMedicineModelItem record, @Param("example") DmsMedicineModelItemExample example);

    int updateByPrimaryKeySelective(DmsMedicineModelItem record);

    int updateByPrimaryKey(DmsMedicineModelItem record);
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/model/BmsInvoiceRecordExample.java<|end_filename|>
package com.neu.his.cloud.zuul.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BmsInvoiceRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BmsInvoiceRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoIsNull() {
            addCriterion("invoice_no is null");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoIsNotNull() {
            addCriterion("invoice_no is not null");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoEqualTo(Long value) {
            addCriterion("invoice_no =", value, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoNotEqualTo(Long value) {
            addCriterion("invoice_no <>", value, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoGreaterThan(Long value) {
            addCriterion("invoice_no >", value, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoGreaterThanOrEqualTo(Long value) {
            addCriterion("invoice_no >=", value, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoLessThan(Long value) {
            addCriterion("invoice_no <", value, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoLessThanOrEqualTo(Long value) {
            addCriterion("invoice_no <=", value, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoIn(List<Long> values) {
            addCriterion("invoice_no in", values, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoNotIn(List<Long> values) {
            addCriterion("invoice_no not in", values, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoBetween(Long value1, Long value2) {
            addCriterion("invoice_no between", value1, value2, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andInvoiceNoNotBetween(Long value1, Long value2) {
            addCriterion("invoice_no not between", value1, value2, "invoiceNo");
            return (Criteria) this;
        }

        public Criteria andBillIdIsNull() {
            addCriterion("bill_id is null");
            return (Criteria) this;
        }

        public Criteria andBillIdIsNotNull() {
            addCriterion("bill_id is not null");
            return (Criteria) this;
        }

        public Criteria andBillIdEqualTo(Long value) {
            addCriterion("bill_id =", value, "billId");
            return (Criteria) this;
        }

        public Criteria andBillIdNotEqualTo(Long value) {
            addCriterion("bill_id <>", value, "billId");
            return (Criteria) this;
        }

        public Criteria andBillIdGreaterThan(Long value) {
            addCriterion("bill_id >", value, "billId");
            return (Criteria) this;
        }

        public Criteria andBillIdGreaterThanOrEqualTo(Long value) {
            addCriterion("bill_id >=", value, "billId");
            return (Criteria) this;
        }

        public Criteria andBillIdLessThan(Long value) {
            addCriterion("bill_id <", value, "billId");
            return (Criteria) this;
        }

        public Criteria andBillIdLessThanOrEqualTo(Long value) {
            addCriterion("bill_id <=", value, "billId");
            return (Criteria) this;
        }

        public Criteria andBillIdIn(List<Long> values) {
            addCriterion("bill_id in", values, "billId");
            return (Criteria) this;
        }

        public Criteria andBillIdNotIn(List<Long> values) {
            addCriterion("bill_id not in", values, "billId");
            return (Criteria) this;
        }

        public Criteria andBillIdBetween(Long value1, Long value2) {
            addCriterion("bill_id between", value1, value2, "billId");
            return (Criteria) this;
        }

        public Criteria andBillIdNotBetween(Long value1, Long value2) {
            addCriterion("bill_id not between", value1, value2, "billId");
            return (Criteria) this;
        }

        public Criteria andAmountIsNull() {
            addCriterion("amount is null");
            return (Criteria) this;
        }

        public Criteria andAmountIsNotNull() {
            addCriterion("amount is not null");
            return (Criteria) this;
        }

        public Criteria andAmountEqualTo(BigDecimal value) {
            addCriterion("amount =", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotEqualTo(BigDecimal value) {
            addCriterion("amount <>", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThan(BigDecimal value) {
            addCriterion("amount >", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("amount >=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThan(BigDecimal value) {
            addCriterion("amount <", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("amount <=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountIn(List<BigDecimal> values) {
            addCriterion("amount in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotIn(List<BigDecimal> values) {
            addCriterion("amount not in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount not between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusIsNull() {
            addCriterion("freeze_status is null");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusIsNotNull() {
            addCriterion("freeze_status is not null");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusEqualTo(Integer value) {
            addCriterion("freeze_status =", value, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusNotEqualTo(Integer value) {
            addCriterion("freeze_status <>", value, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusGreaterThan(Integer value) {
            addCriterion("freeze_status >", value, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("freeze_status >=", value, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusLessThan(Integer value) {
            addCriterion("freeze_status <", value, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusLessThanOrEqualTo(Integer value) {
            addCriterion("freeze_status <=", value, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusIn(List<Integer> values) {
            addCriterion("freeze_status in", values, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusNotIn(List<Integer> values) {
            addCriterion("freeze_status not in", values, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusBetween(Integer value1, Integer value2) {
            addCriterion("freeze_status between", value1, value2, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andFreezeStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("freeze_status not between", value1, value2, "freezeStatus");
            return (Criteria) this;
        }

        public Criteria andAssociateIdIsNull() {
            addCriterion("associate_id is null");
            return (Criteria) this;
        }

        public Criteria andAssociateIdIsNotNull() {
            addCriterion("associate_id is not null");
            return (Criteria) this;
        }

        public Criteria andAssociateIdEqualTo(Long value) {
            addCriterion("associate_id =", value, "associateId");
            return (Criteria) this;
        }

        public Criteria andAssociateIdNotEqualTo(Long value) {
            addCriterion("associate_id <>", value, "associateId");
            return (Criteria) this;
        }

        public Criteria andAssociateIdGreaterThan(Long value) {
            addCriterion("associate_id >", value, "associateId");
            return (Criteria) this;
        }

        public Criteria andAssociateIdGreaterThanOrEqualTo(Long value) {
            addCriterion("associate_id >=", value, "associateId");
            return (Criteria) this;
        }

        public Criteria andAssociateIdLessThan(Long value) {
            addCriterion("associate_id <", value, "associateId");
            return (Criteria) this;
        }

        public Criteria andAssociateIdLessThanOrEqualTo(Long value) {
            addCriterion("associate_id <=", value, "associateId");
            return (Criteria) this;
        }

        public Criteria andAssociateIdIn(List<Long> values) {
            addCriterion("associate_id in", values, "associateId");
            return (Criteria) this;
        }

        public Criteria andAssociateIdNotIn(List<Long> values) {
            addCriterion("associate_id not in", values, "associateId");
            return (Criteria) this;
        }

        public Criteria andAssociateIdBetween(Long value1, Long value2) {
            addCriterion("associate_id between", value1, value2, "associateId");
            return (Criteria) this;
        }

        public Criteria andAssociateIdNotBetween(Long value1, Long value2) {
            addCriterion("associate_id not between", value1, value2, "associateId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdIsNull() {
            addCriterion("operator_id is null");
            return (Criteria) this;
        }

        public Criteria andOperatorIdIsNotNull() {
            addCriterion("operator_id is not null");
            return (Criteria) this;
        }

        public Criteria andOperatorIdEqualTo(Long value) {
            addCriterion("operator_id =", value, "operatorId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdNotEqualTo(Long value) {
            addCriterion("operator_id <>", value, "operatorId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdGreaterThan(Long value) {
            addCriterion("operator_id >", value, "operatorId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdGreaterThanOrEqualTo(Long value) {
            addCriterion("operator_id >=", value, "operatorId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdLessThan(Long value) {
            addCriterion("operator_id <", value, "operatorId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdLessThanOrEqualTo(Long value) {
            addCriterion("operator_id <=", value, "operatorId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdIn(List<Long> values) {
            addCriterion("operator_id in", values, "operatorId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdNotIn(List<Long> values) {
            addCriterion("operator_id not in", values, "operatorId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdBetween(Long value1, Long value2) {
            addCriterion("operator_id between", value1, value2, "operatorId");
            return (Criteria) this;
        }

        public Criteria andOperatorIdNotBetween(Long value1, Long value2) {
            addCriterion("operator_id not between", value1, value2, "operatorId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdIsNull() {
            addCriterion("settlement_cat_id is null");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdIsNotNull() {
            addCriterion("settlement_cat_id is not null");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdEqualTo(Long value) {
            addCriterion("settlement_cat_id =", value, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdNotEqualTo(Long value) {
            addCriterion("settlement_cat_id <>", value, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdGreaterThan(Long value) {
            addCriterion("settlement_cat_id >", value, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdGreaterThanOrEqualTo(Long value) {
            addCriterion("settlement_cat_id >=", value, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdLessThan(Long value) {
            addCriterion("settlement_cat_id <", value, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdLessThanOrEqualTo(Long value) {
            addCriterion("settlement_cat_id <=", value, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdIn(List<Long> values) {
            addCriterion("settlement_cat_id in", values, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdNotIn(List<Long> values) {
            addCriterion("settlement_cat_id not in", values, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdBetween(Long value1, Long value2) {
            addCriterion("settlement_cat_id between", value1, value2, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettlementCatIdNotBetween(Long value1, Long value2) {
            addCriterion("settlement_cat_id not between", value1, value2, "settlementCatId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdIsNull() {
            addCriterion("settle_record_id is null");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdIsNotNull() {
            addCriterion("settle_record_id is not null");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdEqualTo(Long value) {
            addCriterion("settle_record_id =", value, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdNotEqualTo(Long value) {
            addCriterion("settle_record_id <>", value, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdGreaterThan(Long value) {
            addCriterion("settle_record_id >", value, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdGreaterThanOrEqualTo(Long value) {
            addCriterion("settle_record_id >=", value, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdLessThan(Long value) {
            addCriterion("settle_record_id <", value, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdLessThanOrEqualTo(Long value) {
            addCriterion("settle_record_id <=", value, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdIn(List<Long> values) {
            addCriterion("settle_record_id in", values, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdNotIn(List<Long> values) {
            addCriterion("settle_record_id not in", values, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdBetween(Long value1, Long value2) {
            addCriterion("settle_record_id between", value1, value2, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andSettleRecordIdNotBetween(Long value1, Long value2) {
            addCriterion("settle_record_id not between", value1, value2, "settleRecordId");
            return (Criteria) this;
        }

        public Criteria andItemListIsNull() {
            addCriterion("item_list is null");
            return (Criteria) this;
        }

        public Criteria andItemListIsNotNull() {
            addCriterion("item_list is not null");
            return (Criteria) this;
        }

        public Criteria andItemListEqualTo(String value) {
            addCriterion("item_list =", value, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListNotEqualTo(String value) {
            addCriterion("item_list <>", value, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListGreaterThan(String value) {
            addCriterion("item_list >", value, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListGreaterThanOrEqualTo(String value) {
            addCriterion("item_list >=", value, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListLessThan(String value) {
            addCriterion("item_list <", value, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListLessThanOrEqualTo(String value) {
            addCriterion("item_list <=", value, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListLike(String value) {
            addCriterion("item_list like", value, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListNotLike(String value) {
            addCriterion("item_list not like", value, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListIn(List<String> values) {
            addCriterion("item_list in", values, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListNotIn(List<String> values) {
            addCriterion("item_list not in", values, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListBetween(String value1, String value2) {
            addCriterion("item_list between", value1, value2, "itemList");
            return (Criteria) this;
        }

        public Criteria andItemListNotBetween(String value1, String value2) {
            addCriterion("item_list not between", value1, value2, "itemList");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(Integer value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(Integer value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(Integer value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(Integer value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(Integer value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<Integer> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<Integer> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(Integer value1, Integer value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsCaseHistoryService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;


import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseHistoryParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseHistoryResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsCaseHistoryService {

    @RequestMapping(value = "/caseHistory/submitPriliminaryDise", method = RequestMethod.POST)
    CommonResult submitPriliminaryDise(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam);

    @RequestMapping(value = "/caseHistory/selectNotEndCaseHistoryByReg/{registrationId}", method = RequestMethod.GET)
    CommonResult<DmsCaseHistoryResult> selectNotEndCaseHistoryByReg(@PathVariable("registrationId") Long registrationId);


    @RequestMapping(value = "/caseHistory/selectEndCaseHistoryByReg/{registrationId}", method = RequestMethod.GET)
    CommonResult<DmsCaseHistoryResult> selectEndCaseHistoryByReg(@PathVariable("registrationId") Long registrationId);


    @RequestMapping(value = "/caseHistory/submitDefiniteDise", method = RequestMethod.POST)
    CommonResult submitDefiniteDise(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam);

    @RequestMapping(value = "/caseHistory/endDiagnosis", method = RequestMethod.POST)
    CommonResult endDiagnosis(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam);
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/SmsStaffService.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;


import com.neu.his.cloud.service.sms.dto.sms.SmsStaffParam;
import com.neu.his.cloud.service.sms.dto.sms.SmsStaffResult;
import com.neu.his.cloud.service.sms.model.SmsStaff;

import java.util.List;

/**
 * 员工
 */
public interface SmsStaffService {

//    /**
//     * 描述：新增员工（弃用）
//     */
//    int create(SmsStaffParam smsStaffParam);

    /**
     * 描述：删除员工
     */
    int delete(List<Long> ids);

    /**
     * 描述：更新员工
     */
    int update(Long id, SmsStaffParam smsStaffParam);

    /**
     * 描述：查询员工
     */
    List<SmsStaffResult> select(SmsStaffParam smsStaffQueryParam, Integer pageSize, Integer pageNum);

    /**
     * 描述：列出所有员工
     */
    List<SmsStaffResult> selectAll();

    /**
     * 描述: 根据username查询员工(名字精确查询)
     */
    SmsStaff selectByUserName(String username);


//    /**
//     * 描述：登录
//     */
//    String login(String username, String password);


//    /**
//     * 描述：根据用户名和密码返回员工基础信息
//
//     */
//    SmsStaff getStaffByPwd(String username, String password);


    /**
     * 描述：根据部门选择员工
     */
    List<SmsStaffResult> getStaffByDept(Long deptId);


//    /**
//     * 描述：注册（替换create）
//     *
//     */
//    SmsStaff register(SmsStaffParam smsStaffParam);


    /**
     * 描述：根据科室id和挂号级别id查询员工
     */
    public List<SmsStaff> selectSkdStaff(Long deptId, Long registrationRankId);


}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/sms/ApiPcSmsWorkloadDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.sms;


import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.sms.SmsWorkloadResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcSmsWorkloadDistributionService {

    @RequestMapping(value = "/workload/queryPersonal", method = RequestMethod.POST)
    CommonResult<SmsWorkloadResult> queryPersonalWorkload(@RequestParam("staffId") Long staffId,
                                                                 @RequestParam("startDatetime")String startDatetime,
                                                                 @RequestParam("endDatetime")String  endDatetime);

    @RequestMapping(value = "/workload/queryDept", method = RequestMethod.POST)
    CommonResult<SmsWorkloadResult>  queryDeptWorkload(@RequestParam("deptId") Long deptId,
                                                              @RequestParam("startDatetime")String startDatetime,
                                                              @RequestParam("endDatetime")String endDatetime);

    @RequestMapping(value = "/workload/queryDeptWorkloadList", method = RequestMethod.POST)
    CommonResult<List<SmsWorkloadResult>> queryDeptWorkloadList(@RequestParam("startDatetime")String startDatetime,
                                                                        @RequestParam("endDatetime")String endDatetime);

    @RequestMapping(value = "/workload/queryDeptPersonalWorkloadList", method = RequestMethod.POST)
    CommonResult<List<SmsWorkloadResult>>  queryDeptPersonalWorkloadList(@RequestParam("deptId") Long deptId,
                                                                                @RequestParam("startDatetime")String startDatetime,
                                                                                @RequestParam("endDatetime") String endDatetime);
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/controller/DmsMedicinePrescriptionRecordController.java<|end_filename|>
package com.neu.his.cloud.service.dms.controller;

import com.neu.his.cloud.service.dms.common.CommonResult;
import com.neu.his.cloud.service.dms.component.RabbitMQOrderSender;
import com.neu.his.cloud.service.dms.dto.dms.DmsMedicinePrescriptionRecordParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsMedicinePrescriptionRecordResult;
import com.neu.his.cloud.service.dms.service.DmsMedicinePrescriptionRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@Controller
@Api(tags = "DmsMedicinePrescriptionRecordController", description = "成药处方管理")
@RequestMapping("/DmsMedicinePrescriptionRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsMedicinePrescriptionRecordController {

    @Autowired
    private DmsMedicinePrescriptionRecordService dmsMedicinePrescriptionRecordService;

    @Autowired
    private RabbitMQOrderSender rabbitMQOrderSender;
    /**
     * 描述:开立处方（发送）
     * <p>author: ma
     */
    @ApiOperation(value = "开立处方（发送）")
    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult apply(@RequestBody DmsMedicinePrescriptionRecordParam dmsMedicinePrescriptionRecordParam, BindingResult result){
        Long currentId = dmsMedicinePrescriptionRecordService.apply(dmsMedicinePrescriptionRecordParam);
        if(currentId > 0){
            //获取订单超时时间，假设为30s
            long delayTimes = 60 * 1000 * 60 * 12;
            //发送延迟消息
            rabbitMQOrderSender.sendMessage(currentId, 5, delayTimes);

            return CommonResult.success(currentId, "开立成功");
        }
        return CommonResult.failed("开立失败");
    }

    /**
     * 描述:作废处方
     * <p>author: ma
     */
    @ApiOperation(value = "作废处方")
    @RequestMapping(value = "/invalid", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult invalid(@RequestParam("ids") List<Long> ids){
        int count = dmsMedicinePrescriptionRecordService.invalid(ids);
        if(count > 0){
            return CommonResult.success(count, "作废成功");
        }
        return CommonResult.failed("作废失败");
    }

    /**
     * 描述:根据registrationId查询处方
     * <p>author: ma
     */
    @ApiOperation(value = "根据registrationId查询处方")
    @RequestMapping(value = "/listByReg", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByReg(@RequestParam("registrationId") Long registrationId){
        List<DmsMedicinePrescriptionRecordResult> list = dmsMedicinePrescriptionRecordService.listByReg(registrationId);
        return CommonResult.success(list);
    }

    /**
     * 描述:根据处方id查询成药处方项
     * <p>author: 赵煜
     */
    @ApiOperation(value = "ids")
    @RequestMapping(value = "/listByIds", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByIds(@RequestParam("ids") List<Long> ids){
        List<DmsMedicinePrescriptionRecordResult> list = dmsMedicinePrescriptionRecordService.listByIds(ids);
        return CommonResult.success(list);
    }



}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/dms/EsDiseController.java<|end_filename|>
package com.neu.his.api.controller.dms;

import com.neu.his.common.api.CommonPage;
import com.neu.his.common.api.CommonResult;

import com.neu.his.dms.model.EsDise;
import com.neu.his.dms.service.EsDiseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 搜索疾病管理Controller
 * Created by wang on 2019/6/19.
 */
@Controller
@Api(tags = "EsDiseController", description = "搜索诊断")
@RequestMapping("/esDise")
public class EsDiseController {
    @Autowired
    private EsDiseService esDiseService;

    @ApiOperation(value = "从数据库中导出诊断到ES")
    @RequestMapping(value = "/importAll", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<Integer> importAllList() {
        int count = esDiseService.importAll();
        return CommonResult.success(count);
    }

    @ApiOperation(value = "根据id删除诊断")
    @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<Object> delete(@PathVariable Long id) {
        esDiseService.delete(id);
        return CommonResult.success(null);
    }

    @ApiOperation(value = "根据ids删除诊断")
    @RequestMapping(value = "/delete/batch", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<Object> delete(@RequestParam("ids") List<Long> ids) {
        esDiseService.delete(ids);
        return CommonResult.success(null);
    }

    @ApiOperation(value = "根据id新增诊断")
    @RequestMapping(value = "/create/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<EsDise> create(@PathVariable Long id) {
        EsDise esDise = esDiseService.create(id);
        if (esDise != null) {
            return CommonResult.success(esDise);
        } else {
            return CommonResult.failed();
        }
    }

    @ApiOperation(value = "简单搜索")
    @RequestMapping(value = "/search/simple", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<EsDise>> search(@RequestParam(required = false) String keyword,
                                                   @RequestParam(required = false, defaultValue = "0") Integer pageNum,
                                                   @RequestParam(required = false, defaultValue = "5") Integer pageSize) {
        Page<EsDise> esDisePage = esDiseService.search(keyword, pageNum, pageSize);
        return CommonResult.success(CommonPage.restPage(esDisePage));
    }


    @ApiOperation(value = "模糊搜索")
    @RequestMapping(value = "/search/fuzzy", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<EsDise>> searchFuzzy(@RequestParam(required = false) String keyword,
                                                        @RequestParam(required = false, defaultValue = "0") Integer pageNum,
                                                        @RequestParam(required = false, defaultValue = "5") Integer pageSize) {
        Page<EsDise> esDisePage = esDiseService.searchFuzzy(keyword, pageNum, pageSize);
        return CommonResult.success(CommonPage.restPage(esDisePage));
    }
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/mapper/SmsRolePermissionRelationMapper.java<|end_filename|>
package com.neu.his.cloud.service.sms.mapper;

import com.neu.his.cloud.service.sms.model.SmsRolePermissionRelation;
import com.neu.his.cloud.service.sms.model.SmsRolePermissionRelationExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsRolePermissionRelationMapper {
    int countByExample(SmsRolePermissionRelationExample example);

    int deleteByExample(SmsRolePermissionRelationExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsRolePermissionRelation record);

    int insertSelective(SmsRolePermissionRelation record);

    List<SmsRolePermissionRelation> selectByExample(SmsRolePermissionRelationExample example);

    SmsRolePermissionRelation selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsRolePermissionRelation record, @Param("example") SmsRolePermissionRelationExample example);

    int updateByExample(@Param("record") SmsRolePermissionRelation record, @Param("example") SmsRolePermissionRelationExample example);

    int updateByPrimaryKeySelective(SmsRolePermissionRelation record);

    int updateByPrimaryKey(SmsRolePermissionRelation record);
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/model/DmsMedicinePrescriptionRecordExample.java<|end_filename|>
package com.neu.his.cloud.service.dms.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DmsMedicinePrescriptionRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsMedicinePrescriptionRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andAmountIsNull() {
            addCriterion("amount is null");
            return (Criteria) this;
        }

        public Criteria andAmountIsNotNull() {
            addCriterion("amount is not null");
            return (Criteria) this;
        }

        public Criteria andAmountEqualTo(BigDecimal value) {
            addCriterion("amount =", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotEqualTo(BigDecimal value) {
            addCriterion("amount <>", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThan(BigDecimal value) {
            addCriterion("amount >", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("amount >=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThan(BigDecimal value) {
            addCriterion("amount <", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("amount <=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountIn(List<BigDecimal> values) {
            addCriterion("amount in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotIn(List<BigDecimal> values) {
            addCriterion("amount not in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount not between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andNameIsNull() {
            addCriterion("name is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("name is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("name =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("name <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("name >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("name >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("name <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("name <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("name like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("name not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("name in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("name not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("name between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("name not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNull() {
            addCriterion("registration_id is null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNotNull() {
            addCriterion("registration_id is not null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdEqualTo(Long value) {
            addCriterion("registration_id =", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotEqualTo(Long value) {
            addCriterion("registration_id <>", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThan(Long value) {
            addCriterion("registration_id >", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThanOrEqualTo(Long value) {
            addCriterion("registration_id >=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThan(Long value) {
            addCriterion("registration_id <", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThanOrEqualTo(Long value) {
            addCriterion("registration_id <=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIn(List<Long> values) {
            addCriterion("registration_id in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotIn(List<Long> values) {
            addCriterion("registration_id not in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdBetween(Long value1, Long value2) {
            addCriterion("registration_id between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotBetween(Long value1, Long value2) {
            addCriterion("registration_id not between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRefundStatusIsNull() {
            addCriterion("refund_status is null");
            return (Criteria) this;
        }

        public Criteria andRefundStatusIsNotNull() {
            addCriterion("refund_status is not null");
            return (Criteria) this;
        }

        public Criteria andRefundStatusEqualTo(Long value) {
            addCriterion("refund_status =", value, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andRefundStatusNotEqualTo(Long value) {
            addCriterion("refund_status <>", value, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andRefundStatusGreaterThan(Long value) {
            addCriterion("refund_status >", value, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andRefundStatusGreaterThanOrEqualTo(Long value) {
            addCriterion("refund_status >=", value, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andRefundStatusLessThan(Long value) {
            addCriterion("refund_status <", value, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andRefundStatusLessThanOrEqualTo(Long value) {
            addCriterion("refund_status <=", value, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andRefundStatusIn(List<Long> values) {
            addCriterion("refund_status in", values, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andRefundStatusNotIn(List<Long> values) {
            addCriterion("refund_status not in", values, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andRefundStatusBetween(Long value1, Long value2) {
            addCriterion("refund_status between", value1, value2, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andRefundStatusNotBetween(Long value1, Long value2) {
            addCriterion("refund_status not between", value1, value2, "refundStatus");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(Integer value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(Integer value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(Integer value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(Integer value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(Integer value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<Integer> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<Integer> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(Integer value1, Integer value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdIsNull() {
            addCriterion("create_staff_id is null");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdIsNotNull() {
            addCriterion("create_staff_id is not null");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdEqualTo(Long value) {
            addCriterion("create_staff_id =", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdNotEqualTo(Long value) {
            addCriterion("create_staff_id <>", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdGreaterThan(Long value) {
            addCriterion("create_staff_id >", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdGreaterThanOrEqualTo(Long value) {
            addCriterion("create_staff_id >=", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdLessThan(Long value) {
            addCriterion("create_staff_id <", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdLessThanOrEqualTo(Long value) {
            addCriterion("create_staff_id <=", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdIn(List<Long> values) {
            addCriterion("create_staff_id in", values, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdNotIn(List<Long> values) {
            addCriterion("create_staff_id not in", values, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdBetween(Long value1, Long value2) {
            addCriterion("create_staff_id between", value1, value2, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdNotBetween(Long value1, Long value2) {
            addCriterion("create_staff_id not between", value1, value2, "createStaffId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsDiseCatalogService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsDiseCatalogParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsDiseCatalogResult;


import java.util.List;

/**
 * 诊断类型目录
 */
public interface DmsDiseCatalogService {
    /**
     * 描述：新增一个诊断目录
     */
    int create(DmsDiseCatalogParam DmsDiseCatalogParam);
    /**
     * 描述：根据ids删除诊断目录
     */
    int delete(List<Long> ids);
    /**
     * 描述：根据id更新诊断目录
     */
    int update(Long id, DmsDiseCatalogParam dmsDiseCatalogParam);
    /**
     * 描述：查询诊断目录
     */
    List<DmsDiseCatalogResult> select(DmsDiseCatalogParam dmsDiseCatalogParam, Integer pageSize, Integer pageNum);
    /**
     * 描述：查询所有诊断目录
     */
    List<DmsDiseCatalogResult> selectAll();
}


<|start_filename|>HIS-web/src/router/index.js<|end_filename|>
import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'
/* 管理员有关的路由 */
import adminRouter from './admin/admin'
/**
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: ['admin','editor']    control the page roles (you can set multiple roles)
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar
    noCache: true                if set true, the page will no be cached(default is false)
    affix: true                  if set true, the tag will affix in the tags-view
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
  }
 */

/**
 * constantRoutes
 * a base page that does not have permission requirements
 * all roles can be accessed
 */
export const constantRoutes = [
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path*',
        component: () => import('@/views/redirect/index')
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },
  {
    path: '/auth-redirect',
    component: () => import('@/views/login/auth-redirect'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@/views/error-page/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import('@/views/error-page/401'),
    hidden: true
  },
  
  {
    path: '/',
    component: Layout,
    redirect: '/index',
    children: [
      {
        path: 'index',
        component: () => import('@/views/dashboard/index'),
        name: 'index',
        meta: { title: '首页', icon: 'dashboard', affix: true }
      }
    ]
  },
  
  
  
  
 
  
  /** when your routing map is too long, you can split it into small modules **/
  

  
  
  // 404 page must be placed at the end !!!

]
/* 异步挂载的路由 */
export const asyncRoutes = [
  {
    path: '/schedule',
    component: Layout,
    redirect: '/schedule/index',
    name: 'schedule',
    meta: {
      title: '医生排班管理',
      icon: 'people',
      roles:[1,7]
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/admin/schedule'),
        name: 'index',
        meta: { title: '医生排班管理', icon: 'dashboard', noCache: true }
      }
    ]
  },
  {
    path: '/pharmacy',
    component: Layout,
    redirect: '/pharmacy/index',
    meta: {
      title: '药房工作台',
      icon: 'tree-table',
      roles:[4,7]
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/pharmacy/index'),
        name: 'pharmacy',
        meta: {
          title: '成药药房工作台',
          noCache: true,
          roles:[4,7]
        },
      },
      {
        path: 'herbal',
        component: () => import('@/views/pharmacy/herbal'),
        name: 'herbal',
        meta: {
          title: '草药药房工作台',
          noCache: true,
          roles:[4,7]
        },
      },
    ]
  },
  {
    path: '/technology',
    component: Layout,
    redirect: '/technology/index',
    children: [
      {
        path: 'index',
        component: () => import('@/views/technology/index'),
        name: 'technology',
        meta: {
          title: '门诊医技工作台',
          icon: 'skill',
          noCache: true,
          roles:[3,7]
        }
      }
    ]
  },
  {
    path: '/outpatient',
    component: Layout,
    redirect: '/outpatient/index',
    roles:[2],
    children: [
      {
        path: 'index',
        component: () => import('@/views/outpatient/index'),
        name: 'outpatient',
        meta: {
          title: '门诊医生工作台',
          icon: 'peoples',
          noCache: true,
          hidden: true,
          roles:[2,7]
        },
      }
    ]
  },
  {
    path: '/outpatient',
    component: Layout,
    redirect: '/outpatient/maintain/mould',
    name: 'mould',
    meta: {
      title: '模板&常用项',
      icon: 'nested',
      roles:[2,7]
    },
    children: [
      {
        path: '/maintain/mould',
        component: () => import('@/views/outpatient/maintain/mould'),
        name: 'mould',
        meta: { title: '病历模板管理',noCache: true }
      },
      {
        path: '/maintain/inspection',
        component: () => import('@/views/outpatient/maintain/inspection'),
        name: 'inspection',
        meta: { title: '非药品模板管理',noCache: true }
      },
      {
        path: '/maintain/drugModel',
        component: () => import('@/views/outpatient/maintain/drugModel'),
        name: 'drugModel',
        meta: { title: '成药药品模板管理', noCache: true },
      },
      {
        path: '/maintain/herDrugModel',
        component: () => import('@/views/outpatient/maintain/herDrugModel'),
        name: 'herDrugModel',
        meta: { title: '草药药品模板管理', noCache: true }
      },
      {
        path: '/maintain/frequse',
        component: () => import('@/views/outpatient/maintain/frequse'),
        name: 'frequse',
        meta: { title: '常用项管理', noCache: true }
      },
    ]
  },
  {
    path: '/registWork',
    component: Layout,
    redirect: '/registWork/index',
    name: 'pay',
    meta: {
      title: '门诊收费挂号',
      icon: 'money',
      roles: [5,7]
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/registWork/index'),
        name: 'registWork',
        meta: {
          title: '门诊挂号收费',
          noCache: true,
          roles: [5,7]
        },
      },
    ]
  },
  {
    path: '/schedule',
    component: Layout,
    redirect: '/schedule',
    children: [
      {
        path: 'schedule',
        component: () => import('@/views/common/schedule'),
        name: 'schedule',
        meta: {
          title: '排班表',
          icon: 'table',
          noCache: true
        },
      },
    ]
  },
  {
    path: '/dayReport',
    component: Layout,
    redirect: '/registWork/dayReport',
    name: 'dayReport',
    meta: {
      title: '门诊日结',
      icon: 'documentation',
      roles: [5,7]
    },
    children: [
      {
        path: 'dayReport',
        component: () => import('@/views/registWork/dayReport'),
        name: 'dayReport',
        meta: {
          title: '门诊日结',
          noCache: true,
          roles: [5,7]
        },
      },
      {
        path: 'dayReportHis',
        component: () => import('@/views/registWork/dayReportHis'),
        name: 'dayReportHis',
        meta: {
          title: '历史日结',
          noCache: true,
          roles: [5,7]
        },
      },
    ]
  },
  {
    path: '/permission',
    component: Layout,
    redirect: '/permission/role',
    alwaysShow: true, // will always show the root menu
    name: 'Permission',
    meta: {
      title: '用户管理',
      icon: 'lock',
      roles: [1,7] // you can set roles in root nav
    },
    children: [
      {
        path: 'role',
        component: () => import('@/views/permission/role'),
        name: 'RolePermission',
        meta: {
          title: '角色权限管理',
        }
      }
    ]
  },
  adminRouter,
  
  {
    path: '/finance',
    component: Layout,
    redirect: '/finance/check',
    name: 'finance',
    meta: {
      title: '门诊财务',
      icon: 'money'
    },
    children: [
      {
        path: 'check',
        component: () => import('@/views/finance/check'),
        name: 'check',
        meta: {
          title: '门诊日结核对',
          noCache: true,
          roles:[1,6,7]
        },
      },
      {
        path: 'deptWorkload',
        component: () => import('@/views/finance/deptWorkload'),
        name: 'deptWorkload',
        meta: {
          title: '科室工作量统计',
          noCache: true,
        },
      },
      {
        path: 'perWorkload',
        component: () => import('@/views/finance/perWorkload'),
        name: 'perWorkload',
        meta: {
          title: '个人工作量统计',
          noCache: true,
        },
      },
    ]
  },
  {
    path: '/cloud',
    component: Layout,
    redirect: '/cloud/monitor',
    name: 'cloud',
    meta: {
      title: '服务监控',
      icon: 'eye-open'
    },
    children: [
      {
        path: 'monitor',
        component: () => import('@/views/cloud/monitor'),
        name: 'monitor',
        meta: {
          title: 'monitor',
          noCache: true,
          roles:[1,7]
        },
      },
      {
        path: 'zipkin',
        component: () => import('@/views/cloud/zipkin'),
        name: 'zipkin',
        meta: {
          title: 'zipkin',
          noCache: true,
          roles:[1,7]
        },
      },
      {
        path: 'swagger',
        component: () => import('@/views/cloud/swagger'),
        name: 'swagger',
        meta: {
          title: 'swagger',
          noCache: true,
          roles:[1,7]
        },
      },
      {
        path: 'hystrix',
        component: () => import('@/views/cloud/hystrix'),
        name: 'hystrix',
        meta: {
          title: 'hystrix',
          noCache: true,
          roles:[1,7]
        },
      },
      {
        path: 'kibana',
        component: () => import('@/views/cloud/kibana'),
        name: 'kibana',
        meta: {
          title: 'kibana',
          noCache: true,
          roles:[1,7]
        },
      },
    ]
  },
  { path: '*', redirect: '/404', hidden: true }
]
const createRouter = () => new Router({
  // mode: 'history', // require service support
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})

const router = createRouter()

// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}

export default router


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsNonDrugItemRecordController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugItemRecordListParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugItemRecordResult;
import com.neu.his.cloud.api.pc.service.dms.DmsNonDrugItemRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsNonDrugItemRecordController", description = "非药品收费项目管理")
@RequestMapping("/nonDrugItemRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsNonDrugItemRecordController {
    @Autowired
    DmsNonDrugItemRecordService dmsNonDrugItemRecordService;


    @ApiOperation(value = "开立项目")
    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult apply(@RequestBody DmsNonDrugItemRecordListParam dmsNonDrugItemRecordListParam, BindingResult result){
        return dmsNonDrugItemRecordService.apply(dmsNonDrugItemRecordListParam);
    }

    @ApiOperation(value = "作废项目")
    @RequestMapping(value = "/invalid", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult invalid(@RequestParam("ids") List<Long> ids){
        return dmsNonDrugItemRecordService.invalid(ids);
    }


    @ApiOperation(value = "刷新项目")
    @RequestMapping(value = "/listByRegAndType", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsNonDrugItemRecordResult>> listByRegAndType(@RequestParam("registrationId") Long registrationId, @RequestParam("type") Integer type){
       return dmsNonDrugItemRecordService.listByRegAndType(registrationId,type);
    }
}


<|start_filename|>HIS-web/src/api/outpatient/nondrugapply.js<|end_filename|>
import request from '@/utils/request'

export function apply(data) {
  return request({
    url: '/nonDrugItemRecord/apply',
    method: 'post',
    data
  })
}

export function list(registrationId,type) {
  return request({
    url: '/nonDrugItemRecord/listByRegAndType',
    method: 'post',
    params:{
      registrationId:registrationId,
      type:type
    }, 
  })
}

export function invalid(data) {
  return request({
    url: '/nonDrugItemRecord/invalid',
    method: 'post',
    params:{
      ids:data
    }, 
  })
}




<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/SmsPermissionService.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;

import com.neu.his.cloud.service.sms.dto.sms.SmsPermissionNode;
import com.neu.his.cloud.service.sms.dto.sms.SmsPermissionParam;
import com.neu.his.cloud.service.sms.model.SmsPermission;

import java.util.List;

/**
 * 权限
 */
public interface SmsPermissionService {

    /**
     * 描述：新增权限
     */
    int create(SmsPermissionParam smsPermissionParam);

    /**
     * 描述：更新权限信息（可能传进控制替换原数据）
     */
    int update(Long id, SmsPermissionParam smsPermissionParam);

    /**
     * 描述：删除权限
     */
     int delete(List<Long> ids);

    /**
     * 描述：查询所有权限
     */
    List<SmsPermission> selectAll();




    /**
     * 描述:权限树
     * <p>author: 赵煜
     */
    List<SmsPermissionNode> treeList();
//
//    /**
//     * 将权限转换为带有子级的权限对象
//     * 当找不到子级权限的时候map操作不会再递归调用covert
//     */
//    private UmsPermissionNode covert(UmsPermission permission,List<UmsPermission> permissionList);
//


}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/dms/DmsCaseModelCatalogNode.java<|end_filename|>
package com.neu.his.common.dto.dms;

import com.neu.his.mbg.model.DmsCaseModelCatalog;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;
import java.util.List;


public class DmsCaseModelCatalogNode extends DmsCaseModelCatalog  implements Serializable {

    @Setter
    @Getter
    List<DmsCaseModelCatalogNode> children;

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/sms/SmsSkdController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.sms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.*;
import com.neu.his.cloud.api.pc.service.sms.SmsSkdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "SmsSkdController", description = "排班管理")
@RequestMapping("/skd")
@CrossOrigin(allowCredentials = "true")
public class SmsSkdController {

    @Autowired
    private SmsSkdService smsSkdService;


    @ApiOperation("新增排班规则")
    @RequestMapping(value = "/createRule", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createRule(@RequestBody SmsSkdRuleParam smsSkdRuleParam, BindingResult result){
       return smsSkdService.createRule(smsSkdRuleParam);
    }


    @ApiOperation("删除排班规则")
    @RequestMapping(value = "/deleteRule", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteRule(@RequestParam("ids") List<Long> ids){
        return smsSkdService.deleteRule(ids);
    }



    @ApiOperation("更新排班规则")
    @RequestMapping(value = "/updateRule/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateRule(@PathVariable Long id, @RequestBody SmsSkdRuleParam smsSkdRuleParam , BindingResult result){
     return  smsSkdService.updateRule(id,smsSkdRuleParam);
    }


    @ApiOperation("根据部门id筛选排版规则基本信息、分页")
    @RequestMapping(value = "/listRule", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsSkdRuleResult>> listRule(@RequestParam("deptId")  Long deptId,
                                                               @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                               @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){



     return smsSkdService.listRule(deptId,pageSize,pageNum);

    }


    @ApiOperation("根据规则id查询一条规则详情")
    @RequestMapping(value = "/getRuleDetail", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsSkdRuleResult> getRuleDetail(@RequestParam("ruleId") Long ruleId){
       return smsSkdService.getRuleDetail(ruleId);
    }


    @ApiOperation("根据多条排班规则生成skd")
    @RequestMapping(value = "/generateSkd", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult generateSkd(@RequestParam("ruleIds") List<Long> ruleIds, @RequestParam("startDate")String startDate, @RequestParam("endDate") String endDate){
        System.err.println("startDate:"+startDate);
        System.err.println("endDate:"+endDate);

        return smsSkdService.generateSkd(ruleIds,startDate,endDate);
    }


    @ApiOperation("查找排班记录、分页")
    @RequestMapping(value = "/listSkd", method = RequestMethod.POST)
    @ResponseBody
    public  CommonResult<CommonPage<SmsSkdResult>> listSkd(@RequestBody SmsSkdParam queryParam,
                                                           @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

        return smsSkdService.listSkd(queryParam,pageSize,pageNum);
    }


    @ApiOperation("新增时候列出的科室下员工信息")
    @RequestMapping(value = "/listCanSkdStaff/{deptId}", method = RequestMethod.POST)
    @ResponseBody
    public  CommonResult<List<SmsSkdRuleItemResult>> listCanSkdStaff(@PathVariable Long deptId){
       return smsSkdService.listCanSkdStaff(deptId);

    }

}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsHerbalPrescriptionRecordService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsHerbalPrescriptionRecordParam;
import com.neu.his.common.dto.dms.DmsHerbalPrescriptionRecordResult;

import java.util.List;

/**
 * 草药处方
 */
public interface DmsHerbalPrescriptionRecordService {

    /**
     * 描述：开立处方
     */
    Long apply(DmsHerbalPrescriptionRecordParam dmsHerbalPrescriptionRecordParam);

    /**
     * 描述：作废处方
     */
    int invalid(List<Long> ids);

    /**
     * 描述：根据门诊号查询处方
     */
    List<DmsHerbalPrescriptionRecordResult>  listByReg(Long registrationId);


    /**
     * 描述：根据处方ids查询处方详情
     */
    List<DmsHerbalPrescriptionRecordResult> listByIds(List<Long> ids);
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/HisApiApplication.java<|end_filename|>
package com.neu.his;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;


//@NacosPropertySource(dataId = "HIS-api", autoRefreshed = true)

@SpringBootApplication
@EnableTransactionManagement    //启用事务
@EnableScheduling               //启用定时器
public class HisApiApplication {

    public static void main(String[] args) {
        SpringApplication.run(HisApiApplication.class, args);
    }

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsMedicinePrescriptionRecordController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;


import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsMedicinePrescriptionRecordParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsMedicinePrescriptionRecordResult;
import com.neu.his.cloud.api.pc.service.dms.DmsMedicinePrescriptionRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsMedicinePrescriptionRecordController", description = "成药处方管理")
@RequestMapping("/DmsMedicinePrescriptionRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsMedicinePrescriptionRecordController {

    @Autowired
    private DmsMedicinePrescriptionRecordService dmsMedicinePrescriptionRecordService;


    @ApiOperation(value = "开立处方")
    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult apply(@RequestBody DmsMedicinePrescriptionRecordParam dmsMedicinePrescriptionRecordParam, BindingResult result){
       return dmsMedicinePrescriptionRecordService.apply(dmsMedicinePrescriptionRecordParam);

    }


    @ApiOperation(value = "作废处方")
    @RequestMapping(value = "/invalid", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult invalid(@RequestParam("ids") List<Long> ids){
       return dmsMedicinePrescriptionRecordService.invalid(ids);
    }


    @ApiOperation(value = "根据挂号Id查询处方")
    @RequestMapping(value = "/listByReg", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByReg(@RequestParam("registrationId") Long registrationId){
       return dmsMedicinePrescriptionRecordService.listByReg(registrationId);
    }


    @ApiOperation(value = "根据ids查询成药处方")
    @RequestMapping(value = "/listByIds", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByIds(@RequestParam("ids") List<Long> ids){
       return dmsMedicinePrescriptionRecordService.listByIds(ids);
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsMechanicItemRecordDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsMechanicItemRecordDistributionService;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsMedicinePrescriptionRecordDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsMechanicItemRecordResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsMechanicItemRecordDistributionController", description = "医技工作台")
@RequestMapping("/DmsMechanicItemRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsMechanicItemRecordDistributionController {

    @Autowired
    private ApiPcDmsMechanicItemRecordDistributionService apiPcDmsMechanicItemRecordDistributionService;

    @HystrixCommand(fallbackMethod = "listByDeptFallbackInfo")
    @ApiOperation(value = "根据科室id刷新患者列表")
    @RequestMapping(value = "/listByDept", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsMechanicItemRecordResult>> listByDept(@RequestParam("deptId") Long deptId){
        return  apiPcDmsMechanicItemRecordDistributionService.listByDept(deptId);
    }
    private CommonResult<List<DmsMechanicItemRecordResult>> listByDeptFallbackInfo(Long deptId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "logFallbackInfo")
    @ApiOperation(value = "登记")
    @RequestMapping(value = "/log", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult log(@RequestParam("itemRecordId") Long itemRecordId, @RequestParam("logStaffId") Long logStaffId){
        System.err.println("itemRecordId:"+itemRecordId);
        System.err.println("logStaffId:"+logStaffId);

        return apiPcDmsMechanicItemRecordDistributionService.log(itemRecordId,logStaffId);
    }
    private CommonResult<List<DmsMechanicItemRecordResult>> logFallbackInfo( Long itemRecordId, Long logStaffId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "uploadResultFallbackInfo")
    @ApiOperation(value = "上传结果")
    @RequestMapping(value = "/uploadResult", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult uploadResult(@RequestParam("id") Long id,
                                     @RequestParam("executeStaffId") Long excuteStaffId,
                                     @RequestParam("checkResult") String checkResult,
                                     @RequestParam("resultImgUrlList") String resultImgUrlList){
        return apiPcDmsMechanicItemRecordDistributionService.uploadResult(id,excuteStaffId,checkResult,resultImgUrlList);
    }
    private CommonResult uploadResultFallbackInfo( Long id, Long excuteStaffId,String checkResult, String resultImgUrlList){
        return CommonResult.success(null,"请检查您的网络") ;
    }


}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/mapper/SmsPermissionMapper.java<|end_filename|>
package com.neu.his.cloud.service.bms.mapper;

import com.neu.his.cloud.service.bms.model.SmsPermission;
import com.neu.his.cloud.service.bms.model.SmsPermissionExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsPermissionMapper {
    int countByExample(SmsPermissionExample example);

    int deleteByExample(SmsPermissionExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsPermission record);

    int insertSelective(SmsPermission record);

    List<SmsPermission> selectByExample(SmsPermissionExample example);

    SmsPermission selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsPermission record, @Param("example") SmsPermissionExample example);

    int updateByExample(@Param("record") SmsPermission record, @Param("example") SmsPermissionExample example);

    int updateByPrimaryKeySelective(SmsPermission record);

    int updateByPrimaryKey(SmsPermission record);
}

<|start_filename|>his-cloud/his-cloud-config/src/main/java/com/neu/his/cloud/config/controller/Refresh.java<|end_filename|>
package com.neu.his.cloud.config.controller;

import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class Refresh {

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/DmsDiseCatalogMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.DmsDiseCatalog;
import com.neu.his.cloud.zuul.model.DmsDiseCatalogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsDiseCatalogMapper {
    int countByExample(DmsDiseCatalogExample example);

    int deleteByExample(DmsDiseCatalogExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsDiseCatalog record);

    int insertSelective(DmsDiseCatalog record);

    List<DmsDiseCatalog> selectByExample(DmsDiseCatalogExample example);

    DmsDiseCatalog selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsDiseCatalog record, @Param("example") DmsDiseCatalogExample example);

    int updateByExample(@Param("record") DmsDiseCatalog record, @Param("example") DmsDiseCatalogExample example);

    int updateByPrimaryKeySelective(DmsDiseCatalog record);

    int updateByPrimaryKey(DmsDiseCatalog record);
}

<|start_filename|>HIS-web/src/api/department.js<|end_filename|>
import request from '@/utils/request'

export function getDeplist(data) {
  return request({
    url: '/dept/select',
    method: 'post',
    params: {
      pageSize:data.limit,
      pageNum:data.page
    },
    data
  })
}
export function getAllDep(){
  return request({
    url: '/dept/selectAll',
    method: 'get'
  })
}

export function createDep(data){
  return request({
    url: '/dept/create',
    method: 'post',
    data
  })
}

export function deleteDep(ids){
  return request({
    url: '/dept/delete',
    method: 'post',
    params: {ids}
  })
}

export function updateDep(data){
  return request({
    url: '/dept/update/'+data.id,
    method: 'post',
    data
  })
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/sms/SmsEchartsService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.sms;


;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsDeptAmountStatisticsResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsPatientsStatisticsResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsStaffAmountStatisticsResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * echarts数据统计
 */
@FeignClient(value = "his-cloud-service-sms")
public interface SmsEchartsService {
    /**
     * 描述：统计个人每日接待患者人数（近7日）
     */
    @RequestMapping(value = "/charts/staffPatients", method = RequestMethod.GET)
     CommonResult<SmsPatientsStatisticsResult> staffPatients(@RequestParam Long staffId) ;
    /**
     * 描述：统计各人每日分类收费信息（近7日）
     */
    @RequestMapping(value = "/charts/staffClassifyStatistics", method = RequestMethod.GET)
     CommonResult<SmsStaffAmountStatisticsResult> staffClassifyStatistics(@RequestParam Long staffId) ;
    /**
     * 描述：统计各科室每日接待患者人数（近7日）
     */
    @RequestMapping(value = "/charts/deptPatients", method = RequestMethod.GET)
     CommonResult<SmsPatientsStatisticsResult> deptPatients(@RequestParam Long deptId);
    /**
     * 描述：统计各科室每日分类收费信息（近7日）
     */
    @RequestMapping(value = "/charts/deptClassifyStatistics", method = RequestMethod.GET)
     CommonResult<SmsDeptAmountStatisticsResult> deptClassifyStatistics(@RequestParam Long deptId);
    /**
     * 描述：统计全院每日接待患者人数（近7日）
     */
    @RequestMapping(value = "/charts/totalClassifyStatistics", method = RequestMethod.GET)
     CommonResult<SmsDeptAmountStatisticsResult> totalClassifyStatistics() ;
    /**
     * 描述：统计全院每日分类收费信息（近7日）
     */
    @RequestMapping(value = "/charts/totalPatients", method = RequestMethod.GET)
     CommonResult<SmsPatientsStatisticsResult> totalPatients();
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/model/DmsCaseModelExample.java<|end_filename|>
package com.neu.his.cloud.zuul.model;

import java.util.ArrayList;
import java.util.List;

public class DmsCaseModelExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsCaseModelExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintIsNull() {
            addCriterion("chief_complaint is null");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintIsNotNull() {
            addCriterion("chief_complaint is not null");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintEqualTo(String value) {
            addCriterion("chief_complaint =", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintNotEqualTo(String value) {
            addCriterion("chief_complaint <>", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintGreaterThan(String value) {
            addCriterion("chief_complaint >", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintGreaterThanOrEqualTo(String value) {
            addCriterion("chief_complaint >=", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintLessThan(String value) {
            addCriterion("chief_complaint <", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintLessThanOrEqualTo(String value) {
            addCriterion("chief_complaint <=", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintLike(String value) {
            addCriterion("chief_complaint like", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintNotLike(String value) {
            addCriterion("chief_complaint not like", value, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintIn(List<String> values) {
            addCriterion("chief_complaint in", values, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintNotIn(List<String> values) {
            addCriterion("chief_complaint not in", values, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintBetween(String value1, String value2) {
            addCriterion("chief_complaint between", value1, value2, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andChiefComplaintNotBetween(String value1, String value2) {
            addCriterion("chief_complaint not between", value1, value2, "chiefComplaint");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessIsNull() {
            addCriterion("history_of_present_illness is null");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessIsNotNull() {
            addCriterion("history_of_present_illness is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessEqualTo(String value) {
            addCriterion("history_of_present_illness =", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessNotEqualTo(String value) {
            addCriterion("history_of_present_illness <>", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessGreaterThan(String value) {
            addCriterion("history_of_present_illness >", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessGreaterThanOrEqualTo(String value) {
            addCriterion("history_of_present_illness >=", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessLessThan(String value) {
            addCriterion("history_of_present_illness <", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessLessThanOrEqualTo(String value) {
            addCriterion("history_of_present_illness <=", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessLike(String value) {
            addCriterion("history_of_present_illness like", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessNotLike(String value) {
            addCriterion("history_of_present_illness not like", value, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessIn(List<String> values) {
            addCriterion("history_of_present_illness in", values, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessNotIn(List<String> values) {
            addCriterion("history_of_present_illness not in", values, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessBetween(String value1, String value2) {
            addCriterion("history_of_present_illness between", value1, value2, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfPresentIllnessNotBetween(String value1, String value2) {
            addCriterion("history_of_present_illness not between", value1, value2, "historyOfPresentIllness");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentIsNull() {
            addCriterion("history_of_treatment is null");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentIsNotNull() {
            addCriterion("history_of_treatment is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentEqualTo(String value) {
            addCriterion("history_of_treatment =", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentNotEqualTo(String value) {
            addCriterion("history_of_treatment <>", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentGreaterThan(String value) {
            addCriterion("history_of_treatment >", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentGreaterThanOrEqualTo(String value) {
            addCriterion("history_of_treatment >=", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentLessThan(String value) {
            addCriterion("history_of_treatment <", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentLessThanOrEqualTo(String value) {
            addCriterion("history_of_treatment <=", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentLike(String value) {
            addCriterion("history_of_treatment like", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentNotLike(String value) {
            addCriterion("history_of_treatment not like", value, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentIn(List<String> values) {
            addCriterion("history_of_treatment in", values, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentNotIn(List<String> values) {
            addCriterion("history_of_treatment not in", values, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentBetween(String value1, String value2) {
            addCriterion("history_of_treatment between", value1, value2, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andHistoryOfTreatmentNotBetween(String value1, String value2) {
            addCriterion("history_of_treatment not between", value1, value2, "historyOfTreatment");
            return (Criteria) this;
        }

        public Criteria andPastHistoryIsNull() {
            addCriterion("past_history is null");
            return (Criteria) this;
        }

        public Criteria andPastHistoryIsNotNull() {
            addCriterion("past_history is not null");
            return (Criteria) this;
        }

        public Criteria andPastHistoryEqualTo(String value) {
            addCriterion("past_history =", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryNotEqualTo(String value) {
            addCriterion("past_history <>", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryGreaterThan(String value) {
            addCriterion("past_history >", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryGreaterThanOrEqualTo(String value) {
            addCriterion("past_history >=", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryLessThan(String value) {
            addCriterion("past_history <", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryLessThanOrEqualTo(String value) {
            addCriterion("past_history <=", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryLike(String value) {
            addCriterion("past_history like", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryNotLike(String value) {
            addCriterion("past_history not like", value, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryIn(List<String> values) {
            addCriterion("past_history in", values, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryNotIn(List<String> values) {
            addCriterion("past_history not in", values, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryBetween(String value1, String value2) {
            addCriterion("past_history between", value1, value2, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andPastHistoryNotBetween(String value1, String value2) {
            addCriterion("past_history not between", value1, value2, "pastHistory");
            return (Criteria) this;
        }

        public Criteria andAllergiesIsNull() {
            addCriterion("allergies is null");
            return (Criteria) this;
        }

        public Criteria andAllergiesIsNotNull() {
            addCriterion("allergies is not null");
            return (Criteria) this;
        }

        public Criteria andAllergiesEqualTo(String value) {
            addCriterion("allergies =", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesNotEqualTo(String value) {
            addCriterion("allergies <>", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesGreaterThan(String value) {
            addCriterion("allergies >", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesGreaterThanOrEqualTo(String value) {
            addCriterion("allergies >=", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesLessThan(String value) {
            addCriterion("allergies <", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesLessThanOrEqualTo(String value) {
            addCriterion("allergies <=", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesLike(String value) {
            addCriterion("allergies like", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesNotLike(String value) {
            addCriterion("allergies not like", value, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesIn(List<String> values) {
            addCriterion("allergies in", values, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesNotIn(List<String> values) {
            addCriterion("allergies not in", values, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesBetween(String value1, String value2) {
            addCriterion("allergies between", value1, value2, "allergies");
            return (Criteria) this;
        }

        public Criteria andAllergiesNotBetween(String value1, String value2) {
            addCriterion("allergies not between", value1, value2, "allergies");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupIsNull() {
            addCriterion("health_checkup is null");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupIsNotNull() {
            addCriterion("health_checkup is not null");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupEqualTo(String value) {
            addCriterion("health_checkup =", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupNotEqualTo(String value) {
            addCriterion("health_checkup <>", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupGreaterThan(String value) {
            addCriterion("health_checkup >", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupGreaterThanOrEqualTo(String value) {
            addCriterion("health_checkup >=", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupLessThan(String value) {
            addCriterion("health_checkup <", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupLessThanOrEqualTo(String value) {
            addCriterion("health_checkup <=", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupLike(String value) {
            addCriterion("health_checkup like", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupNotLike(String value) {
            addCriterion("health_checkup not like", value, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupIn(List<String> values) {
            addCriterion("health_checkup in", values, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupNotIn(List<String> values) {
            addCriterion("health_checkup not in", values, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupBetween(String value1, String value2) {
            addCriterion("health_checkup between", value1, value2, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andHealthCheckupNotBetween(String value1, String value2) {
            addCriterion("health_checkup not between", value1, value2, "healthCheckup");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListIsNull() {
            addCriterion("priliminary_dise_id_list is null");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListIsNotNull() {
            addCriterion("priliminary_dise_id_list is not null");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListEqualTo(String value) {
            addCriterion("priliminary_dise_id_list =", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListNotEqualTo(String value) {
            addCriterion("priliminary_dise_id_list <>", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListGreaterThan(String value) {
            addCriterion("priliminary_dise_id_list >", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListGreaterThanOrEqualTo(String value) {
            addCriterion("priliminary_dise_id_list >=", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListLessThan(String value) {
            addCriterion("priliminary_dise_id_list <", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListLessThanOrEqualTo(String value) {
            addCriterion("priliminary_dise_id_list <=", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListLike(String value) {
            addCriterion("priliminary_dise_id_list like", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListNotLike(String value) {
            addCriterion("priliminary_dise_id_list not like", value, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListIn(List<String> values) {
            addCriterion("priliminary_dise_id_list in", values, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListNotIn(List<String> values) {
            addCriterion("priliminary_dise_id_list not in", values, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListBetween(String value1, String value2) {
            addCriterion("priliminary_dise_id_list between", value1, value2, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseIdListNotBetween(String value1, String value2) {
            addCriterion("priliminary_dise_id_list not between", value1, value2, "priliminaryDiseIdList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListIsNull() {
            addCriterion("priliminary_dise_str_list is null");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListIsNotNull() {
            addCriterion("priliminary_dise_str_list is not null");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListEqualTo(String value) {
            addCriterion("priliminary_dise_str_list =", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListNotEqualTo(String value) {
            addCriterion("priliminary_dise_str_list <>", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListGreaterThan(String value) {
            addCriterion("priliminary_dise_str_list >", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListGreaterThanOrEqualTo(String value) {
            addCriterion("priliminary_dise_str_list >=", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListLessThan(String value) {
            addCriterion("priliminary_dise_str_list <", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListLessThanOrEqualTo(String value) {
            addCriterion("priliminary_dise_str_list <=", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListLike(String value) {
            addCriterion("priliminary_dise_str_list like", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListNotLike(String value) {
            addCriterion("priliminary_dise_str_list not like", value, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListIn(List<String> values) {
            addCriterion("priliminary_dise_str_list in", values, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListNotIn(List<String> values) {
            addCriterion("priliminary_dise_str_list not in", values, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListBetween(String value1, String value2) {
            addCriterion("priliminary_dise_str_list between", value1, value2, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andPriliminaryDiseStrListNotBetween(String value1, String value2) {
            addCriterion("priliminary_dise_str_list not between", value1, value2, "priliminaryDiseStrList");
            return (Criteria) this;
        }

        public Criteria andNameIsNull() {
            addCriterion("name is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("name is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("name =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("name <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("name >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("name >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("name <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("name <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("name like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("name not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("name in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("name not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("name between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("name not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsDiseCatalogController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsDiseCatalogParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsDiseCatalogResult;
import com.neu.his.cloud.api.pc.service.dms.DmsDiseCatalogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.util.List;


@RestController
@Api(tags = "DmsDiseCatalogController", description = "诊断目录管理")
@RequestMapping("/DmsDiseCatalog")
@CrossOrigin(allowCredentials = "true")
public class DmsDiseCatalogController {
    @Autowired
    DmsDiseCatalogService dmsDiseCatalogService;

    @ApiOperation(value = "新增一个诊断目录")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsDiseCatalogParam dmsDiseCatalogParam , BindingResult result){
        return dmsDiseCatalogService.create(dmsDiseCatalogParam);
    }

    @ApiOperation(value = "根据ids删除诊断目录")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
       return dmsDiseCatalogService.delete(ids);
    }
    @ApiOperation(value = "更新诊断目录信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody DmsDiseCatalogParam dmsDiseCatalogParam , BindingResult result){
        return dmsDiseCatalogService.update(id,dmsDiseCatalogParam);
    }


    @ApiOperation(value = "查询所有诊断目录")
    @RequestMapping(value = "/listAll", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDiseCatalogResult>> listAll(){
        return dmsDiseCatalogService.listAll();
    }
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/app/controller/AppHistoryController.java<|end_filename|>
package com.neu.his.api.app.controller;

import com.neu.his.bms.service.BmsFeeQueryService;
import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.app.AppCheckTestResult;
import com.neu.his.common.dto.app.AppDeptDescriptionResult;
import com.neu.his.common.dto.app.AppDrugItemResult;
import com.neu.his.common.dto.app.AppHistoryRegResult;
import com.neu.his.common.dto.dms.DmsRegHistoryResult;
import com.neu.his.dms.service.DmsNonDrugItemRecordService;
import com.neu.his.dms.service.DmsRegistrationService;
import com.neu.his.sms.SmsDescriptionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "AppHistoryController", description = "APP 挂号历史信息管理")
@RequestMapping("/appRegHistory")
@CrossOrigin(allowCredentials = "true")
public class AppHistoryController {

    @Autowired
    private DmsRegistrationService dmsRegistrationService;

    @Autowired
    private BmsFeeQueryService bmsFeeQueryService;

    @Autowired
    private DmsNonDrugItemRecordService dmsNonDrugItemRecordService;

    @Autowired
    private SmsDescriptionService smsDescriptionService;

    /**
     * 描述:查询历史挂号信息列表
     * <p>author: ma
     */
    @ApiOperation("查询历史挂号信息")
    @RequestMapping(value = "/listAllRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsRegHistoryResult>> listAllRegistration(@RequestParam("identificationNo") String identificationNo){
        List<DmsRegHistoryResult> list = dmsRegistrationService.listRegHistory(identificationNo);
        return CommonResult.success(list);
    }

    /**
     * 描述:查看某次挂号费用大项
     * <p>author: ma
     */
    @ApiOperation("查询某次挂号费用（大项）")
    @RequestMapping(value = "/listFee", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppHistoryRegResult>> listFee(@RequestParam("registrationId") Long registrationId){
        List<AppHistoryRegResult> feeResultList = bmsFeeQueryService.listFeePrescription(registrationId);
        return CommonResult.success(feeResultList);
    }

    /**
     * 描述:查看某次挂号费用小项
     * <p>author: ma
     */
    @ApiOperation("查询某次挂号费用（小项）")
    @RequestMapping(value = "/listDetail", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppDrugItemResult>> listFeeDetail(@RequestParam("prescriptionId") Long prescriptionId ,
                                                               @RequestParam("type") int type){
        List<AppDrugItemResult> itemResultList = bmsFeeQueryService.listFeeItem(prescriptionId,type);
        return CommonResult.success(itemResultList);
    }

    /**
     * 描述:查看检查检验结果
     * <p>author: ma
     */
    @ApiOperation("查询检查检验结果")
    @RequestMapping(value = "/getResult", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<AppCheckTestResult> getResult(@RequestParam("id") Long id){
        AppCheckTestResult result = dmsNonDrugItemRecordService.appGetResult(id);
        return CommonResult.success(result);
    }

    /**
     * 描述:查询所有科室描述
     * <p>author: ma
     */
    @ApiOperation("查询所有科室描述")
    @RequestMapping(value = "/getDeptDescription", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<AppDeptDescriptionResult>> getDeptDescription(){
        return CommonResult.success(smsDescriptionService.getDeptDescription());
    }

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/mapper/SmsWorkloadRecordMapper.java<|end_filename|>
package com.neu.his.cloud.service.dms.mapper;

import com.neu.his.cloud.service.dms.model.SmsWorkloadRecord;
import com.neu.his.cloud.service.dms.model.SmsWorkloadRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsWorkloadRecordMapper {
    int countByExample(SmsWorkloadRecordExample example);

    int deleteByExample(SmsWorkloadRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsWorkloadRecord record);

    int insertSelective(SmsWorkloadRecord record);

    List<SmsWorkloadRecord> selectByExample(SmsWorkloadRecordExample example);

    SmsWorkloadRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsWorkloadRecord record, @Param("example") SmsWorkloadRecordExample example);

    int updateByExample(@Param("record") SmsWorkloadRecord record, @Param("example") SmsWorkloadRecordExample example);

    int updateByPrimaryKeySelective(SmsWorkloadRecord record);

    int updateByPrimaryKey(SmsWorkloadRecord record);
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/sms/SmsStaffAmountStatisticsResult.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.sms;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Setter
@Getter
@ToString
public class SmsStaffAmountStatisticsResult  implements Serializable {
    List<String> amountCat;

    List<BigDecimal> amount;
}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsCaseModelService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsCaseModelCatalogNode;
import com.neu.his.common.dto.dms.DmsCaseModelListResult;
import com.neu.his.common.dto.dms.DmsCaseModelOrCatalogParam;
import com.neu.his.mbg.model.DmsCaseModel;
import com.neu.his.mbg.model.DmsCaseModelCatalog;

import java.util.List;

/**
 * 病例模版
 */
public interface DmsCaseModelService {

    /**
     * 描述：列出病历模板目录树
     */
    List<DmsCaseModelCatalogNode> listModelCatTree(Long ownId, Integer scope);
    /**
     * 描述：新增目录或模板
     */
    int createCatOrModel(DmsCaseModelOrCatalogParam dmsCaseModelOrCatalogParam);
    /**
     * 描述：删除目录或模板（id即可）
     */
    int deleteModelOrCat(Long id);

    /**
     * 描述：根据模板id更新模板（只更新模板表（除name））
     */
    int updateModel(Long modelId, DmsCaseModel newDmsCaseModel);

    /**
     * 描述：根据模板id更新模板和目录的名字
     */
    int updateName(Long id, String name);

    /**
     * 描述：根据模板id获取模板详细信息
     */
    DmsCaseModel getModelDetail(Long id);

    /**
     * 描述:根据staffId获取所有病历模板
     * <p>author: ma
     */
    DmsCaseModelListResult getAllStaffModel(Long staffId);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/SmsRolePermissionDao.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;


import com.neu.his.cloud.zuul.model.SmsPermission;
import com.neu.his.cloud.zuul.model.SmsRolePermissionRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName: SmsRolePermissionDao
 * @description: TODO
 * @author Zain
 * @date 2019/5/30 14:22
 */

@Mapper
public interface SmsRolePermissionDao {
    /**
     * 根据角色获取权限
     * <p>author:赵煜
     */
    List<SmsPermission> getPermissionList(@Param("roleId") Long roleId);

    /**
     * 批量插入角色和权限关系
     * <p>author:赵煜
     */
    int insertList(@Param("list") List<SmsRolePermissionRelation> list);



}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsMedicinePrescriptionRecordService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsMedicinePrescriptionRecordParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsMedicinePrescriptionRecordResult;

import java.util.List;

/**
 * 成药处方
 */
public interface DmsMedicinePrescriptionRecordService {

    /**
     * 描述：开立处方
     */
    Long apply(DmsMedicinePrescriptionRecordParam dmsMedicinePrescriptionRecordParam);

    /**
     * 描述：作废处方
     */
    int invalid(List<Long> ids);

    /**
     * 描述：根据门诊号查询处方
     */
    List<DmsMedicinePrescriptionRecordResult>  listByReg(Long registrationId);


    /**
     * 描述：根据处方ids查询处方详情
     */
    List<DmsMedicinePrescriptionRecordResult> listByIds(List<Long> ids);
}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/dms/DmsDrugParam.java<|end_filename|>
package com.neu.his.common.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;
@Setter
@Getter
public class DmsDrugParam {
    @ApiModelProperty(value = "药品编码")
    private String code;
    @ApiModelProperty(value = "药品名称")
    private String name;
    @ApiModelProperty(value = "药品规格")
    private String format;
    @ApiModelProperty(value = "药品单价")
    private BigDecimal price;
    @ApiModelProperty(value = "包装单位")
    private String unit;
    @ApiModelProperty(value = "生产厂家")
    private String manufacturer;
    @ApiModelProperty(value = "药品剂型")
    private Long dosageId;
    @ApiModelProperty(value = "药品类型")
    private Long typeId;
    @ApiModelProperty(value = "拼音助记码")
    private String mnemonicCode;
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    @ApiModelProperty(value = "库存")
    private Long stock;
    @ApiModelProperty(value = "通用名")
    private String genericName;
    @ApiModelProperty(value = "状态")
    private Integer status;
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/model/DmsNonDrug.java<|end_filename|>
package com.neu.his.cloud.zuul.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class DmsNonDrug implements Serializable {
    private Long id;

    private String code;

    private String name;

    private String format;

    private BigDecimal price;

    private Long expClassId;

    private String mnemonicCode;

    private Integer recordType;

    private Date createDate;

    private Integer status;

    private Long deptId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Long getExpClassId() {
        return expClassId;
    }

    public void setExpClassId(Long expClassId) {
        this.expClassId = expClassId;
    }

    public String getMnemonicCode() {
        return mnemonicCode;
    }

    public void setMnemonicCode(String mnemonicCode) {
        this.mnemonicCode = mnemonicCode;
    }

    public Integer getRecordType() {
        return recordType;
    }

    public void setRecordType(Integer recordType) {
        this.recordType = recordType;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", code=").append(code);
        sb.append(", name=").append(name);
        sb.append(", format=").append(format);
        sb.append(", price=").append(price);
        sb.append(", expClassId=").append(expClassId);
        sb.append(", mnemonicCode=").append(mnemonicCode);
        sb.append(", recordType=").append(recordType);
        sb.append(", createDate=").append(createDate);
        sb.append(", status=").append(status);
        sb.append(", deptId=").append(deptId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsNonDrugItemRecordService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.app.AppCheckTestResult;
import com.neu.his.common.dto.dms.DmsNonDrugItemRecordListParam;
import com.neu.his.common.dto.dms.DmsNonDrugItemRecordResult;

import java.util.List;

/**
 * 非药品项
 */
public interface DmsNonDrugItemRecordService {
    /**
     * 描述：开立项目
     */
    List<Long> apply(DmsNonDrugItemRecordListParam dmsNonDrugItemRecordListParam);
    /**
     * 描述：作废项目
     */
    int invalid(List<Long> ids);
    /**
     * 描述：刷新项目
     */
    List<DmsNonDrugItemRecordResult>  listByRegAndType(Long registrationId, Integer type);

    /**
     * 描述：app端根据检查检验id查询结果
     */
    AppCheckTestResult appGetResult(Long id);
}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/dms/DmsCaseModelResult.java<|end_filename|>
package com.neu.his.common.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class DmsCaseModelResult  implements Serializable {

    @ApiModelProperty (value = "模板Id")
    private Long id;

    @ApiModelProperty (value = "主诉")
    private String chiefComplaint;

    @ApiModelProperty (value = "症状")
    private String historyOfPresentIllness;

    @ApiModelProperty (value = "历史治疗")
    private String historyOfTreatment;

    @ApiModelProperty (value = "既往史")
    private String pastHistory;

    @ApiModelProperty (value = "过敏史")
    private String allergies;

    @ApiModelProperty (value = "健康检查")
    private String healthCheckup;

    @ApiModelProperty (value = "初步诊断Id串")
    private List<Long> priliminaryDiseIdList;

    @ApiModelProperty (value = "初诊诊断id串对应诊断名字串")
    private List<String> priliminaryDiseStrList;

    @ApiModelProperty (value = "病历模板名")
    private String name;

    @ApiModelProperty (value = "状态")
    private Integer status;
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/SmsStaffController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller;


import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.sms.SmsStaffLoginParam;
import com.neu.his.cloud.zuul.dto.sms.SmsStaffParam;
import com.neu.his.cloud.zuul.model.SmsStaff;
import com.neu.his.cloud.zuul.service.sms.SmsStaffService;

import com.neu.his.cloud.zuul.service.tms.TestFeignService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.security.Principal;
import java.util.HashMap;
import java.util.Map;

@Controller
@Api(tags = "SmsStaffController", description = "用户管理")
@RequestMapping("/staff")
@CrossOrigin(allowCredentials = "true")
public class SmsStaffController {

    @Autowired
    private SmsStaffService smsStaffService;

    @Autowired
    private TestFeignService testFeignService;

    @Value("${jwt.tokenHeader}")  //自动装载jwt
    private String tokenHeader;
    @Value("${jwt.tokenHead}")
    private String tokenHead;


    /**
     * 描述:登录
     * <p>author: 赵煜
     */
    @ApiOperation(value = "登录以后返回token")
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult login(@RequestBody SmsStaffLoginParam smsStaffLoginParam, BindingResult result) {
        String token = smsStaffService.login(smsStaffLoginParam.getUsername(), smsStaffLoginParam.getPassword());
        if (token == null) {
            return CommonResult.validateFailed("用户名或密码错误");
        }
        //如果 token不等于 null
        Map<String, String> tokenMap = new HashMap<>();
        tokenMap.put("token", token);
        tokenMap.put("tokenHead", tokenHead);
        return CommonResult.success(tokenMap); //为什么要用HashMap进行返回，难道是为了减少实体类？
    }

    @ApiOperation(value = "获取当前登录用户信息")
    @RequestMapping(value = "/info", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult getAdminInfo(Principal principal) {
        String username = principal.getName();
        SmsStaff smsStaff = smsStaffService.selectByUserName(username);
        Map<String, Object> data = new HashMap<>();
        data.put("username", smsStaff.getUsername());
        data.put("id", smsStaff.getId());
        data.put("name", smsStaff.getName());
        data.put("deptId", smsStaff.getDeptId());
        data.put("roleId",smsStaff.getRoleId());
        return CommonResult.success(data);
    }

    /**
     * 描述:新增一个用户
     * <p>author:赵煜
     */
    @ApiOperation("新增用户（调用注册接口）")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody SmsStaffParam smsStaffParam, BindingResult result){
        SmsStaff smsStaff= smsStaffService.register(smsStaffParam);

        return CommonResult.success(smsStaff);
    }


//
//    /**
//     * 描述:登录
//     * <p>author: 赵煜
//     */
//    @ApiOperation(value = "test")
//    @RequestMapping(value = "/test", method = RequestMethod.GET)
//    @ResponseBody
//    @PreAuthorize("hasAuthority('dept:zzz')")
//    public CommonResult test() {
//        return CommonResult.success("success");
//    }


//    /**
//     * 描述:登录
//     * <p>author: 赵煜
//     */
//    @ApiOperation(value = "testHi")
//    @RequestMapping(value = "/testHi", method = RequestMethod.GET)
//    @ResponseBody
////    @PreAuthorize("hasAuthority('dept:create')")
//    public CommonResult testHi(@RequestParam("message") String message) {
//        return CommonResult.success(testFeignService.hiTest(message));
//    }


}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsDiseDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;


import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsDiseParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDiseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsDiseDistributionService {

    @RequestMapping(value = "/DmsDise/create", method = RequestMethod.POST)
    CommonResult create(@RequestBody DmsDiseParam dmsDiseParam);


    @RequestMapping(value = "/DmsDise/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/DmsDise/update/{id}", method = RequestMethod.POST)
    CommonResult update(@PathVariable Long id, @RequestBody DmsDiseParam dmsDiseParam);



    @RequestMapping(value = "/DmsDise/list", method = RequestMethod.POST)
    CommonResult<CommonPage<DmsDiseResult>> list(@RequestBody DmsDiseParam queryParam,
                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);


    @RequestMapping(value = "/DmsDise/listAll", method = RequestMethod.POST)
    CommonResult<List<DmsDiseResult>> listAll();


    @RequestMapping(value = "/DmsDise/parseList", method = RequestMethod.POST)
    CommonResult<List<DmsDiseResult>> parseList( @RequestParam(value = "idsStr") String idsStr);

}


<|start_filename|>HIS-web/src/api/regist.js<|end_filename|>
import request from '@/utils/request'
const baseurl = "http://localhost:8080/"
const url2 ="http://10.25.52.153:8080/"
// 挂号信息列表
export function listRegisteredPatient(data) {
  return request({
    url: '/fee/listRegisteredPatient',
    method: 'get',
    params: data
  })
}
//挂号
export function createRegistration(data) {
  return request({
    url: '/registration/createRegistration',
    method: 'post',
    data
  })
}

//查询上班医生
export function listDocBySkd(data) {
  return request({
    url: '/staff/listDocBySkd',
    method: 'post',
    data
  })
}
//退号
export function refundRegistrationCharge(data) {
  return request({
    url: '/fee/refundRegistrationCharge',
    method: 'post',
    data
  })
}
//根据挂号id返回未缴费列表
export function listChargeByRegistrationId(data) {
  return request({
    url: '/fee/listChargeByRegistrationId',
    method: 'get',
    params:{
      registrationId:data
    }
  })
}

//根据挂号id返回可退费列表
export function listRefundByRegistrationId(data) {
  return request({
    url: '/fee/listRefundByRegistrationId',
    method: 'get',
    params:{
      registrationId:data
    }
  })
}

//收费
export function charge(data) {
  return request({
    url: '/fee/charge',
    method: 'post',
    data
  })
}
//项目退费
export function refundCharge(data) {
  return request({
    url: '/fee/refundCharge',
    method: 'post',
    data
  })
}
//重打
export function reprintInvoice(data) {
  return request({
    url: '/invoice/reprintInvoice',
    method: 'post',
    params:{
      newInvoiceNo:data.newInvoiceNo,
      oldInvoiceNo:data.oldInvoiceNo
    }
  })
}
//补打
export function supplementPrintInvoice(data) {
  return request({
    url: '/invoice/supplementPrintInvoice',
    method: 'post',
    params:{
      newInvoiceNo:data.newInvoiceNo,
      oldInvoiceNo:data.oldInvoiceNo
    }
  })
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsNonDrugItemRecordListParam.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;


import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class DmsNonDrugItemRecordListParam  implements Serializable {
    List<DmsNonDrugItemRecordParam> dmsNonDrugItemRecordParamList;

    Long registrationId;
    Long createStaffId;
    Integer type;


}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/impl/DmsMechanicItemRecordServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.dms.service.impl;

import com.neu.his.cloud.service.dms.dto.dms.DmsMechanicItemRecordResult;
import com.neu.his.cloud.service.dms.mapper.*;
import com.neu.his.cloud.service.dms.model.*;
import com.neu.his.cloud.service.dms.service.DmsMechanicItemRecordService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class DmsMechanicItemRecordServiceImpl implements DmsMechanicItemRecordService {

    @Autowired
    private DmsNonDrugItemRecordMapper dmsNonDrugItemRecordMapper;

    @Autowired
    private DmsNonDrugMapper dmsNonDrugMapper;

    @Autowired
    private DmsRegistrationMapper dmsRegistrationMapper;

    @Autowired
    private PmsPatientMapper pmsPatientMapper;
    @Autowired
    private SmsStaffMapper smsStaffMapper;


    /**
     * 描述:1.根据科室id和status为2未登记（已缴费） 3已登记 查询dms_non_drug_item_record
     *      2.封装信息
     * <p>author: ma
     * <p>author: 赵煜  修改type判断空指针异常 封装登记医生姓名 登记时间
     */
    @Override
    public List<DmsMechanicItemRecordResult> listByDept(Long deptId){
        DmsNonDrugItemRecordExample example = new DmsNonDrugItemRecordExample();
        example.createCriteria().andExcuteDeptIdEqualTo(deptId).andStatusBetween(2,3);//2未登记（已缴费） 3已登记
        List<DmsNonDrugItemRecord> recordList = dmsNonDrugItemRecordMapper.selectByExample(example);

        List<DmsMechanicItemRecordResult> resultList = new ArrayList<>();
        for(DmsNonDrugItemRecord record : recordList){
            DmsMechanicItemRecordResult result = new DmsMechanicItemRecordResult();
            BeanUtils.copyProperties(record,result);
            result.setItemRecordId(record.getId());

            //封装项目信息
            DmsNonDrug dmsNonDrug = dmsNonDrugMapper.selectByPrimaryKey(record.getNoDrugId());
            if(dmsNonDrug != null){
                result.setItemName(dmsNonDrug.getName());
            }

            if(record.getType()==null){
                continue;
            }else if(record.getType() == 0){
                result.setItemType("检查");
            }else if(record.getType() == 1){
                result.setItemType("检验");
            }else if(record.getType() == 2){
                result.setItemType("处置");
            }else{
                continue;
            }

            //封装患者信息
            DmsRegistration dmsRegistration = dmsRegistrationMapper.selectByPrimaryKey(record.getRegistrationId());
            if(dmsRegistration != null){
                result.setPatientAgeStr(dmsRegistration.getPatientAgeStr());
                PmsPatient pmsPatient = pmsPatientMapper.selectByPrimaryKey(dmsRegistration.getPatientId());
                if(pmsPatient != null){
                    result.setPatientName(pmsPatient.getName());
                    result.setPatientGender(pmsPatient.getGender());
                }
            }

            //封装医生信息
           SmsStaff smsStaff= smsStaffMapper.selectByPrimaryKey( record.getLogStaffId());
            if(null!=smsStaff)
               result.setLogStaffName(smsStaff.getName());

            //封装开立信息
            result.setCreateTime(record.getCreateTime());

            resultList.add(result);
        }
        return resultList;
    }

    @Override
    public int log(Long itemRecordId, Long logStaffId){
        DmsNonDrugItemRecordExample recordExample = new DmsNonDrugItemRecordExample();
        recordExample.createCriteria().andStatusEqualTo(2).andIdEqualTo(itemRecordId);

        DmsNonDrugItemRecord record = new DmsNonDrugItemRecord();
        record.setStatus(3);
        record.setLogStaffId(logStaffId);
        record.setLogDatetime(new Date());

        return dmsNonDrugItemRecordMapper.updateByExampleSelective(record,recordExample);
    }

    @Override
    public int uploadResult(Long id, Long executeStaffId, String checkResult,String resultImgUrlList){
        DmsNonDrugItemRecordExample recordExample = new DmsNonDrugItemRecordExample();
        recordExample.createCriteria().andStatusEqualTo(3).andIdEqualTo(id);

        DmsNonDrugItemRecord record = new DmsNonDrugItemRecord();
        record.setStatus(4);
        record.setExcuteStaffId(executeStaffId);
        record.setCheckResult(checkResult);
        record.setExcuteTime(new Date());
        record.setResultImgUrlList(resultImgUrlList);

        return dmsNonDrugItemRecordMapper.updateByExampleSelective(record,recordExample);
    }

}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/bms/BmsDailySettleRecordResult.java<|end_filename|>
package com.neu.his.common.dto.bms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
@ToString
public class BmsDailySettleRecordResult  implements Serializable {

    @ApiModelProperty(value = "开始时间")
    Date startDatetime;
    @ApiModelProperty(value = "截止时间")
    Date endDatetime;
    @ApiModelProperty(value = "日结时间")
    Date createDatetime;
    @ApiModelProperty(value = "收银员（日结员）id")
    Long cashierId;
    @ApiModelProperty(value = "发票总数量")
    Long  invoiceNum;
    @ApiModelProperty(value = "冲红发票数量")
    Long rushInvoiceNum;
    @ApiModelProperty(value = "重打发票数量")
    Long reprintInvoiceNum;
    @ApiModelProperty(value = "起始结束发票id串")
    String startEndInvoiceIdStr;
    @ApiModelProperty(value = "冲红发票id list")
    String rushInvoiceIdListStr;
    @ApiModelProperty(value = "重打发票id list")
    String reprintInvoiceIdListStr;

    @ApiModelProperty(value = "成药总金额")
    BigDecimal medicineAmount;
    @ApiModelProperty(value = "草药总金额")
    BigDecimal herbalAmount;
    @ApiModelProperty(value = "检查总金额")
    BigDecimal checkAmount;
    @ApiModelProperty(value = "挂号总金额")
    BigDecimal registrationAmount;
    @ApiModelProperty(value = "处置总金额")
    BigDecimal dispositionAmount;
    @ApiModelProperty(value = "检验总金额")
    BigDecimal testAmount;
    @ApiModelProperty(value = "现金总金额")
    BigDecimal cashAmount;
    @ApiModelProperty(value = "总金额")
    BigDecimal amount;

    @ApiModelProperty(value = "医保总金额")
    BigDecimal insuranceAmount;
    @ApiModelProperty(value = "银行卡总金额")
    BigDecimal bankCardAmount;
    @ApiModelProperty(value = "支付宝总金额")
    BigDecimal  alipayAmount;
    @ApiModelProperty(value = "微信总金额")
    BigDecimal  wechatAmount;
    @ApiModelProperty(value = "银行卡总金额")
    BigDecimal  creditCardAmount;
    @ApiModelProperty(value = "其他总金额")
    BigDecimal otherAmount;

    @ApiModelProperty(value = "对账人id")
    Long  verifyOperatorId;
    @ApiModelProperty(value = "对账时间")
    Date verifyDatetime;
    @ApiModelProperty(value = "对账状态")
    Integer  verifyStatus;

}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/dto/app/AppStaffDescriptionResult.java<|end_filename|>
package com.neu.his.cloud.api.app.dto.app;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class AppStaffDescriptionResult {

    @ApiModelProperty(value = "staffId")
    private Long id;
    @ApiModelProperty(value = "staff头像")
    private String url;
    @ApiModelProperty(value = "姓名")
    private String name;

}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/sms/SmsFrequentUsedController.java<|end_filename|>
package com.neu.his.api.controller.sms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.sms.SmsFrequentUsedResult;
import com.neu.his.sms.SmsFrequentUsedService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@Api(tags = "SmsFrequentUsedController", description = "常用项管理")
@RequestMapping("/frequentUsed")
@CrossOrigin(allowCredentials = "true")
public class SmsFrequentUsedController {

    @Autowired
    private SmsFrequentUsedService smsFrequentUsedService;

    /**
     * 描述:添加一个常用项
     * <p>author: ma
     */
    @ApiOperation("新增常用项")
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult addFrequent(@RequestParam("staffId") Long staffId,
                               @RequestParam("addType") int addType,
                               @RequestParam("addId") Long addId){
        int count = smsFrequentUsedService.addFrequent(staffId,addType,addId);
        if(count > 0){
            return CommonResult.success(count, "添加常用项成功");
        }
        return CommonResult.failed("添加常用项失败");
    }

    /**
     * 描述:删除一个常用项
     * <p>author: ma
     */
    @ApiOperation("删除常用项")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteFrequent(@RequestParam("staffId") Long staffId,
                               @RequestParam("deleteType") int deleteType,
                               @RequestParam("deleteId") Long deleteId){
        int count = smsFrequentUsedService.deleteFrequent(staffId,deleteType,deleteId);
        if(count > 0){
            return CommonResult.success(count,"删除成功");
        }
        return CommonResult.failed("删除失败");
    }


    /**
     * 描述:查询指定常用项
     * <p>author: ma
     */
    @ApiOperation("查询指定常用项")
    @RequestMapping(value = "/selectByType", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsFrequentUsedResult> selectFrequent(@RequestParam("staffId") Long staffId,
                                                              @RequestParam("selectType") int selectType){
        SmsFrequentUsedResult smsFrequentUsedResult = smsFrequentUsedService.selectFrequent(staffId,selectType);
        return CommonResult.success(smsFrequentUsedResult);
    }

}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/config/MyBatisConfig.java<|end_filename|>
package com.neu.his.config;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * MyBatis配置类
 */
@Configuration
@EnableTransactionManagement
@MapperScan({"com.neu.his.mbg"})//"com.neu.his.sms.dao",
public class MyBatisConfig {
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/service/sms/impl/SmsRoleServiceImpl.java<|end_filename|>
package com.neu.his.cloud.zuul.service.sms.impl;


import com.neu.his.cloud.zuul.mapper.SmsRolePermissionDao;
import com.neu.his.cloud.zuul.model.SmsPermission;
import com.neu.his.cloud.zuul.service.sms.SmsRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SmsRoleServiceImpl implements SmsRoleService {


    @Autowired
    private SmsRolePermissionDao rolePermissionDao;


    @Override
    public List<SmsPermission> getPermissionList(Long roleId) {

      return rolePermissionDao.getPermissionList(roleId);
    }


}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsMedicinePrescriptionRecordDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsMedicinePrescriptionRecordDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsMedicinePrescriptionRecordParam;
import com.neu.his.cloud.zuul.dto.dms.DmsMedicinePrescriptionRecordResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsMedicinePrescriptionRecordDistributionController", description = "成药处方管理")
@RequestMapping("/DmsMedicinePrescriptionRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsMedicinePrescriptionRecordDistributionController {

    @Autowired
    private ApiPcDmsMedicinePrescriptionRecordDistributionService apiPcDmsMedicinePrescriptionRecordDistributionService;

    @HystrixCommand(fallbackMethod = "applyFallbackInfo")
    @ApiOperation(value = "开立处方")
    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult apply(@RequestBody DmsMedicinePrescriptionRecordParam dmsMedicinePrescriptionRecordParam, BindingResult result){
       return apiPcDmsMedicinePrescriptionRecordDistributionService.apply(dmsMedicinePrescriptionRecordParam);
    }
    private CommonResult applyFallbackInfo( DmsMedicinePrescriptionRecordParam dmsMedicinePrescriptionRecordParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "invalidFallbackInfo")
    @ApiOperation(value = "作废处方")
    @RequestMapping(value = "/invalid", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult invalid(@RequestParam("ids") List<Long> ids){
       return apiPcDmsMedicinePrescriptionRecordDistributionService.invalid(ids);
    }
    private CommonResult invalidFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listByRegFallbackInfo")
    @ApiOperation(value = "根据挂号Id查询处方")
    @RequestMapping(value = "/listByReg", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByReg(@RequestParam("registrationId") Long registrationId){
       return apiPcDmsMedicinePrescriptionRecordDistributionService.listByReg(registrationId);
    }
    private CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByRegFallbackInfo( Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listByIdsFallbackInfo")
    @ApiOperation(value = "根据ids查询成药处方")
    @RequestMapping(value = "/listByIds", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByIds(@RequestParam("ids") List<Long> ids){
       return apiPcDmsMedicinePrescriptionRecordDistributionService.listByIds(ids);
    }
    private CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByIdsFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/impl/SmsPermissionServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.sms.service.impl;

import com.neu.his.cloud.service.sms.dto.sms.SmsPermissionNode;
import com.neu.his.cloud.service.sms.dto.sms.SmsPermissionParam;
import com.neu.his.cloud.service.sms.mapper.SmsPermissionMapper;
import com.neu.his.cloud.service.sms.model.SmsPermission;
import com.neu.his.cloud.service.sms.model.SmsPermissionExample;
import com.neu.his.cloud.service.sms.service.SmsPermissionService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 权限
 */
@Service
public class SmsPermissionServiceImpl implements SmsPermissionService {

    @Autowired
    private SmsPermissionMapper smsPermissionMapper;

    @Override
    public int create(SmsPermissionParam smsPermissionParam) {
        SmsPermission smsPermission=new SmsPermission();
        BeanUtils.copyProperties(smsPermissionParam,smsPermission);
        smsPermission.setStatus(1);
        smsPermission.setCreateTime(new Date());
        smsPermission.setSort(0);
        return smsPermissionMapper.insert(smsPermission);
    }

    @Override
    public int update(Long id,SmsPermissionParam smsPermissionParam) {
        SmsPermission smsPermission=new SmsPermission();
        BeanUtils.copyProperties(smsPermissionParam,smsPermission);
        smsPermission.setId(id);
        return smsPermissionMapper.updateByPrimaryKey(smsPermission);
    }

    @Override
    public int delete(List<Long> ids) {
        SmsPermissionExample example = new SmsPermissionExample();
        example.createCriteria().andIdIn(ids);
        return smsPermissionMapper.deleteByExample(example);
    }

    @Override
    public List<SmsPermission> selectAll() {
        return smsPermissionMapper.selectByExample(new SmsPermissionExample());
    }

    @Override
    public List<SmsPermissionNode> treeList() {
        //查询出所有的权限
        List<SmsPermission> permissionList = smsPermissionMapper.selectByExample(new SmsPermissionExample());

        List<SmsPermissionNode> result = permissionList.stream()
                .filter(permission -> permission.getPid().equals(0L))//筛选出pid为0的权限
                .map(permission -> covert(permission,permissionList)).collect(Collectors.toList());
        return result;
    }


    /**
     * 将权限转换为带有子级的权限对象
     * 当找不到子级权限的时候map操作不会再递归调用covert
     */
    private SmsPermissionNode covert(SmsPermission smsPermission,List<SmsPermission> permissionList){
        SmsPermissionNode node = new SmsPermissionNode();
        BeanUtils.copyProperties(smsPermission,node);
        List<SmsPermissionNode> children = permissionList.stream()
                .filter(subPermission -> subPermission.getPid().equals(smsPermission.getId()))
                .map(subPermission -> covert(subPermission,permissionList)).collect(Collectors.toList());
        node.setChildren(children);
        return node;
    }


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/dms/DmsMedicinePrescriptionRecordParam.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.dms;

import com.neu.his.cloud.api.pc.model.DmsMedicineItemRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;


@Setter
@Getter
@ToString
public class DmsMedicinePrescriptionRecordParam  implements Serializable {
    @ApiModelProperty(value = "处方项")
    List<DmsMedicineItemRecord> dmsMedicineItemRecordList;

    @ApiModelProperty(value = "成药处方状态：status  0作废 1未缴费 2已缴费 3已过期")
    private Integer status;

    @ApiModelProperty(value = "总金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "处方名")
    private String name;

    @ApiModelProperty(value = "门诊Id(挂号号id)")
    private Long registrationId;

    @ApiModelProperty(value = "退款状态！！")
    private Long refundStatus;

    @ApiModelProperty(value = "类型（普诊）")
    private Integer type;

    @ApiModelProperty(value = "开立人")
    private Long createStaffId;

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/bms/BmsRefundRegChargeParam.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.bms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

@Setter
@Getter
@ToString
public class BmsRefundRegChargeParam  implements Serializable {
    @ApiModelProperty(value = "挂号id")
    Long registrationId;
    @ApiModelProperty(value = "原发票号")
    Long oldInvoiceNo;
    @ApiModelProperty(value = "冲红发票号")
    Long redInvoiceNo;
    @ApiModelProperty(value = "操作人id")
    Long operatorId;
}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/dms/DmsNonDrugItemRecordResult.java<|end_filename|>
package com.neu.his.common.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
@ToString
public class DmsNonDrugItemRecordResult  implements Serializable {

    @ApiModelProperty(value = "非药品项id")
    Long id;
    @ApiModelProperty(value = "目的")
    String aim;
    @ApiModelProperty(value = "要求")
    String demand;
    @ApiModelProperty(value = "临床印象")
    String clinicalImpression;
    @ApiModelProperty(value = "临床诊断")
    String clinicalDiagnosis;
    @ApiModelProperty(value = "非药品Id")
    Long  noDrugId;
    @ApiModelProperty(value = "检查部位")
    String  checkParts;
    @ApiModelProperty(value = "执行科室id")
    Long  excuteDeptId;
    @ApiModelProperty(value = "执行科室name")
    String  excuteDeptName;
    @ApiModelProperty(value = "状态：0 作废（删除）1未缴费 2未登记（已缴费） 3已登记 4已执行 5已退费 6已过期")
    Integer  status;
    @ApiModelProperty(value = "类型： 0检查 1检验  2处置")
    Integer type;
    @ApiModelProperty(value = "结果")
    String checkResult;
    @ApiModelProperty(value = "结果图片链接")
    String resultImgUrlList;
    @ApiModelProperty(value = "创建（开立）时间")
    Date createTime;
    @ApiModelProperty(value = "执行医生name")
    String excuteStaffName;
    @ApiModelProperty(value = "开立医生name")
    String createStaffName;
    @ApiModelProperty(value = "登记医生name")
    String logStaffName;












}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/bms/BmsSettlementCatDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.bms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.bms.ApiPcBmsSettlementCatDistributionService;
import com.neu.his.cloud.zuul.dto.bms.BmsSettlementCatParam;
import com.neu.his.cloud.zuul.dto.bms.BmsSettlementCatResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "BmsSettlementCatDistributionController", description = "结算类别管理")
@RequestMapping("/settleCat")
@CrossOrigin(allowCredentials = "true")
public class BmsSettlementCatDistributionController {

    @Autowired
    private ApiPcBmsSettlementCatDistributionService apiPcBmsSettlementCatDistributionService;


    @HystrixCommand(fallbackMethod = "createFallbackInfo")
    @ApiOperation("新增一个结算类别")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody BmsSettlementCatParam bmsSettlementCatParam , BindingResult result){
        return apiPcBmsSettlementCatDistributionService.create(bmsSettlementCatParam);
    }
    private CommonResult createFallbackInfo(BmsSettlementCatParam bmsSettlementCatParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteFallbackInfo")
    @ApiOperation("根据ids删除结算类别")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        return apiPcBmsSettlementCatDistributionService.delete(ids);
    }
    private CommonResult deleteFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateFallbackInfo")
    @ApiOperation("更新一个结算类别信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody BmsSettlementCatParam bmsSettlementCatParam , BindingResult result){
      return apiPcBmsSettlementCatDistributionService.update(id,bmsSettlementCatParam);
    }
    private CommonResult updateFallbackInfo(Long id,BmsSettlementCatParam bmsSettlementCatParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listFallbackInfo")
    @ApiOperation("模糊查询结算类别、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<BmsSettlementCatResult>> list(BmsSettlementCatParam queryParam,
                                                                 @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                 @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        return apiPcBmsSettlementCatDistributionService.list(queryParam,pageSize,pageNum);
    }
    private CommonResult<CommonPage<BmsSettlementCatResult>> listFallbackInfo(BmsSettlementCatParam queryParam, Integer pageSize,Integer pageNum){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listAllFallbackInfo")
    @ApiOperation("查询所有结算类别")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsSettlementCatResult >> listAll(){
        return apiPcBmsSettlementCatDistributionService.listAll();
    }
    private CommonResult<List<BmsSettlementCatResult>> listAllFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }


}


<|start_filename|>HIS-master/HIS-service/HIS-bms-service/src/main/java/com/neu/his/bms/service/BmsInvoiceService.java<|end_filename|>
package com.neu.his.bms.service;

import com.neu.his.common.dto.bms.BmsInvoiceResult;

import java.util.Date;
import java.util.List;

/**
 * 发票
 */
public interface BmsInvoiceService {
    /**
     * 描述：发票补打
     */
    int supplementPrintInvoice(Long newInvoiceNo, Long registrationId);
    /**
     * 描述：发票重打
     */
    int reprintInvoice(Long newInvoiceNo, Long oldInvoiceNo);
    /**
     * 描述：根据新的start_datetime和end_datetime和收费员id，查询发票信息
     */
    List<BmsInvoiceResult> queryInvoiceInfo(Long cashierId, Date startDatetime, Date endDatetime);
    /**
     * 描述：根据日结记录id查询发票
     */
    List<BmsInvoiceResult> queryInvoiceInfoBySettleId(Long settleRecordId);

}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/EsDiseServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;

import com.neu.his.dms.model.EsDise;
import com.neu.his.dms.model.EsDiseRepository;
import com.neu.his.dms.service.EsDiseService;
import com.neu.his.mbg.mapper.DmsDiseMapper;
import com.neu.his.mbg.model.DmsDise;
import com.neu.his.mbg.model.DmsDiseExample;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

@Service
public class EsDiseServiceImpl implements EsDiseService {
    private static final Logger LOGGER = LoggerFactory.getLogger(EsDrugServiceImpl.class);
    @Autowired
    private DmsDiseMapper dmsDiseMapper;
    @Autowired
    private EsDiseRepository esDiseRepository;
    @Autowired
    private ElasticsearchTemplate elasticsearchTemplate;

    @Override
    public int importAll() {
        DmsDiseExample dmsDiseExample = new DmsDiseExample();
        dmsDiseExample.createCriteria().andStatusNotEqualTo(0);
        List<DmsDise> dmsDiseList = dmsDiseMapper.selectByExample(dmsDiseExample);
        List<EsDise> esDiseList = new ArrayList<>();
        for (DmsDise dmsDise : dmsDiseList){
            EsDise esDise = new EsDise();
            BeanUtils.copyProperties(dmsDise,esDise);
            esDiseList.add(esDise);
        }
        Iterable<EsDise> esDiseIterable = esDiseRepository.saveAll(esDiseList);
        Iterator<EsDise> iterator = esDiseIterable.iterator();
        int result = 0;
        while (iterator.hasNext()){
            result++;
            iterator.next();
        }
        return result;
    }

    @Override
    public void delete(Long id) {
        esDiseRepository.deleteById(id);
    }

    @Override
    public EsDise create(Long id) {
        EsDise result = null;
        DmsDise dmsDise = dmsDiseMapper.selectByPrimaryKey(id);
        if (dmsDise !=null){
            EsDise esDise = new EsDise();
            BeanUtils.copyProperties(dmsDise,esDise);
            result = esDiseRepository.save(esDise);
        }
        return result;
    }

    @Override
    public void delete(List<Long> ids) {
        if (!CollectionUtils.isEmpty(ids)) {
            List<EsDise> esDiseList = new ArrayList<>();
            for (Long id : ids){
                EsDise esDise = new EsDise();
                esDise.setId(id);
                esDiseList.add(esDise);
            }
            esDiseRepository.deleteAll(esDiseList);
        }
    }

    @Override
    public Page<EsDise> search(String keyword, Integer pageNum, Integer pageSize) {
        Pageable pageable = PageRequest.of(pageNum, pageSize);
        return esDiseRepository.findByNameOrIcdOrCode(keyword,keyword,keyword,pageable);
    }

    @Override
    public Page<EsDise> searchFuzzy(String keyword, Integer pageNum, Integer pageSize) {
        Pageable pageable = PageRequest.of(pageNum, pageSize);
        return esDiseRepository.findByNameContainsOrIcdContainsOrCodeContains(keyword,keyword,keyword,pageable);
    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsNonDrugDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;



import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsNonDrugDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugParam;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsNonDrugDistributionController", description = "非药品项目管理")
@RequestMapping("/DmsNonDrug")
@CrossOrigin(allowCredentials = "true")
public class DmsNonDrugDistributionController {
    @Autowired
    ApiPcDmsNonDrugDistributionService apiPcDmsNonDrugDistributionService;

    @HystrixCommand(fallbackMethod = "createFallbackInfo")
    @ApiOperation(value = "新增非药品")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsNonDrugParam dmsNonDrugParam , BindingResult result){
        return apiPcDmsNonDrugDistributionService.create(dmsNonDrugParam);
    }
    private CommonResult createFallbackInfo( DmsNonDrugParam dmsNonDrugParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteFallbackInfo")
    @ApiOperation(value = "根据ids删除非药品")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
      return apiPcDmsNonDrugDistributionService.delete(ids);
    }
    private CommonResult deleteFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateFallbackInfo")
    @ApiOperation(value = "更新非药品信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody DmsNonDrugParam dmsNonDrugParam , BindingResult result){
       return apiPcDmsNonDrugDistributionService.update(id,dmsNonDrugParam);
    }
    private CommonResult updateFallbackInfo(Long id,  DmsNonDrugParam dmsNonDrugParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listFallbackInfo")
    @ApiOperation(value = "模糊查询非药品、且分页")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<DmsNonDrugResult>> list(DmsNonDrugParam queryParam,
                                                           @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        return  apiPcDmsNonDrugDistributionService.list(queryParam,pageSize,pageNum);
    }
    private CommonResult<CommonPage<DmsNonDrugResult>> listFallbackInfo(DmsNonDrugParam queryParam, Integer pageSize, Integer pageNum){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listAllFallbackInfo")
    @ApiOperation(value = "查询所有非药品")
    @RequestMapping(value = "/listAll", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsNonDrugResult>> listAll(){
        return apiPcDmsNonDrugDistributionService.listAll();
    }
    private CommonResult<List<DmsNonDrugResult>> listAllFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/pms/PmsDiagnosisPatientDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.pms;



import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.pms.ApiPcPmsDiagnosisPatientDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseHistoryResult;
import com.neu.his.cloud.zuul.dto.pms.PmsDiagnosisPatientListResult;
import com.neu.his.cloud.zuul.dto.pms.PmsPatientResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "PmsDiagnosisPatientDistributionController", description = "诊断病人管理")
@RequestMapping("/diagnosisPatient")
@CrossOrigin(allowCredentials = "true")
public class PmsDiagnosisPatientDistributionController {
    @Autowired
    ApiPcPmsDiagnosisPatientDistributionService apiPcPmsDiagnosisPatientDistributionService;

    @HystrixCommand(fallbackMethod = "selectPatientByIdNoFallbackInfo")
    @ApiOperation(value = "根据身份证号查询患者基本信息")
    @RequestMapping(value = "/selectPatientByIdNo", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsPatientResult> selectPatientByIdNo(@RequestParam("identificationNo") String identificationNo){
        return  apiPcPmsDiagnosisPatientDistributionService.selectPatientByIdNo(identificationNo);
    }
    private CommonResult<PmsPatientResult> selectPatientByIdNoFallbackInfo(String identificationNo){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "refreshPatientFallbackInfo")
    @ApiOperation(value = "根据医生id查询所有患者")
    @RequestMapping(value = "/refreshPatient", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsDiagnosisPatientListResult> refreshPatient(@RequestParam("staffId") Long staffId){
       return apiPcPmsDiagnosisPatientDistributionService.refreshPatient(staffId);
    }
    private CommonResult<PmsDiagnosisPatientListResult> refreshPatientFallbackInfo(Long staffId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "bindPatientFallbackInfo")
    @ApiOperation(value = "医生添加患者")
    @RequestMapping(value = "/bindPatient", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult bindPatient(@RequestParam("registrationId") Long registrationId, @RequestParam("staffId") Long staffId){
         return apiPcPmsDiagnosisPatientDistributionService.bindPatient(registrationId,staffId);
    }
    private CommonResult bindPatientFallbackInfo(Long registrationId, Long staffId){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "startDiagnosisFallbackInfo")
    @ApiOperation(value = "医生开始诊断患者")
    @RequestMapping(value = "/startDiagnosis", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseHistoryResult> startDiagnosis(@RequestParam("registrationId") Long registrationId){
       return apiPcPmsDiagnosisPatientDistributionService.startDiagnosis(registrationId);
    }
    private CommonResult<DmsCaseHistoryResult> startDiagnosisFallbackInfo(Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }




}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/util/RedisUtil.java<|end_filename|>
package com.neu.his.cloud.service.dms.util;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

/**
 * redis操作Service的实现类
 */
@Service
public class RedisUtil {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;
    @Autowired
    private RedisTemplate redisTemplate;

    public void setStr(String key, String value) {
        stringRedisTemplate.opsForValue().set(key, value);
    }


    public String getStr(String key) {
        return stringRedisTemplate.opsForValue().get(key);
    }

    /**
     * 设置超期时间
     */
    public boolean expireStr(String key, long expire) {
        return redisTemplate.expire(key, expire, TimeUnit.SECONDS);
    }


    public void removeStr(String key) {
        stringRedisTemplate.delete(key);
    }


    public void removeObj(String key) {
        redisTemplate.delete(key);
    }


    public void setObj(String key, Object value) {
        redisTemplate.opsForValue().set(key, value);
    }


    public Object getObj(String key) {
        return redisTemplate.opsForValue().get(key);
    }




}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/sms/SmsPermissionNode.java<|end_filename|>
package com.neu.his.common.dto.sms;

import com.neu.his.mbg.model.SmsPermission;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;


import java.io.Serializable;
import java.util.List;

public class SmsPermissionNode extends SmsPermission  implements Serializable {

    @Getter
    @Setter
    private List<SmsPermissionNode> children;
}


<|start_filename|>HIS-master/HIS-service/HIS-pms-service/src/main/java/com/neu/his/pms/service/PmsPatientService.java<|end_filename|>
package com.neu.his.pms.service;

import com.neu.his.common.dto.dms.DmsCaseHistoryResult;
import com.neu.his.common.dto.pms.PmsDiagnosisPatientListResult;
import com.neu.his.common.dto.pms.PmsPatientResult;

/**
 * 病人
 */
public interface PmsPatientService {
    /**
     * 描述：根据身份证号查询患者基本信息
     */
    PmsPatientResult selectPatientByIdNo(String identificationNo);
    /**
     * 描述：刷新患者信息
     */
    PmsDiagnosisPatientListResult refreshPatient(Long staffId);
    /**
     * 描述：绑定医生
     */
    int bindPatient(Long registrationId, Long staffId);
    /**
     * 描述：开始诊断
     */
    DmsCaseHistoryResult startDiagnosis(Long registrationId);
    /**
     * 描述：更新诊断状态
     */
    int updateDiagnosisStatus(Long registrationId, Integer status);
    /**
     * 描述：根据门诊号查询历史病历
     */
    DmsCaseHistoryResult selectCaseHistoryByPatient(Long registrationId);

    /**
     * 描述：病人app登录
     */
    PmsPatientResult patientLogin(String identificationNo, String medicalRecordNo);
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/model/SmsSkdExample.java<|end_filename|>
package com.neu.his.cloud.service.dms.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class SmsSkdExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SmsSkdExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andDateIsNull() {
            addCriterion("date is null");
            return (Criteria) this;
        }

        public Criteria andDateIsNotNull() {
            addCriterion("date is not null");
            return (Criteria) this;
        }

        public Criteria andDateEqualTo(Date value) {
            addCriterion("date =", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateNotEqualTo(Date value) {
            addCriterion("date <>", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateGreaterThan(Date value) {
            addCriterion("date >", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateGreaterThanOrEqualTo(Date value) {
            addCriterion("date >=", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateLessThan(Date value) {
            addCriterion("date <", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateLessThanOrEqualTo(Date value) {
            addCriterion("date <=", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateIn(List<Date> values) {
            addCriterion("date in", values, "date");
            return (Criteria) this;
        }

        public Criteria andDateNotIn(List<Date> values) {
            addCriterion("date not in", values, "date");
            return (Criteria) this;
        }

        public Criteria andDateBetween(Date value1, Date value2) {
            addCriterion("date between", value1, value2, "date");
            return (Criteria) this;
        }

        public Criteria andDateNotBetween(Date value1, Date value2) {
            addCriterion("date not between", value1, value2, "date");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andRemainIsNull() {
            addCriterion("remain is null");
            return (Criteria) this;
        }

        public Criteria andRemainIsNotNull() {
            addCriterion("remain is not null");
            return (Criteria) this;
        }

        public Criteria andRemainEqualTo(Long value) {
            addCriterion("remain =", value, "remain");
            return (Criteria) this;
        }

        public Criteria andRemainNotEqualTo(Long value) {
            addCriterion("remain <>", value, "remain");
            return (Criteria) this;
        }

        public Criteria andRemainGreaterThan(Long value) {
            addCriterion("remain >", value, "remain");
            return (Criteria) this;
        }

        public Criteria andRemainGreaterThanOrEqualTo(Long value) {
            addCriterion("remain >=", value, "remain");
            return (Criteria) this;
        }

        public Criteria andRemainLessThan(Long value) {
            addCriterion("remain <", value, "remain");
            return (Criteria) this;
        }

        public Criteria andRemainLessThanOrEqualTo(Long value) {
            addCriterion("remain <=", value, "remain");
            return (Criteria) this;
        }

        public Criteria andRemainIn(List<Long> values) {
            addCriterion("remain in", values, "remain");
            return (Criteria) this;
        }

        public Criteria andRemainNotIn(List<Long> values) {
            addCriterion("remain not in", values, "remain");
            return (Criteria) this;
        }

        public Criteria andRemainBetween(Long value1, Long value2) {
            addCriterion("remain between", value1, value2, "remain");
            return (Criteria) this;
        }

        public Criteria andRemainNotBetween(Long value1, Long value2) {
            addCriterion("remain not between", value1, value2, "remain");
            return (Criteria) this;
        }

        public Criteria andNoonIsNull() {
            addCriterion("noon is null");
            return (Criteria) this;
        }

        public Criteria andNoonIsNotNull() {
            addCriterion("noon is not null");
            return (Criteria) this;
        }

        public Criteria andNoonEqualTo(Integer value) {
            addCriterion("noon =", value, "noon");
            return (Criteria) this;
        }

        public Criteria andNoonNotEqualTo(Integer value) {
            addCriterion("noon <>", value, "noon");
            return (Criteria) this;
        }

        public Criteria andNoonGreaterThan(Integer value) {
            addCriterion("noon >", value, "noon");
            return (Criteria) this;
        }

        public Criteria andNoonGreaterThanOrEqualTo(Integer value) {
            addCriterion("noon >=", value, "noon");
            return (Criteria) this;
        }

        public Criteria andNoonLessThan(Integer value) {
            addCriterion("noon <", value, "noon");
            return (Criteria) this;
        }

        public Criteria andNoonLessThanOrEqualTo(Integer value) {
            addCriterion("noon <=", value, "noon");
            return (Criteria) this;
        }

        public Criteria andNoonIn(List<Integer> values) {
            addCriterion("noon in", values, "noon");
            return (Criteria) this;
        }

        public Criteria andNoonNotIn(List<Integer> values) {
            addCriterion("noon not in", values, "noon");
            return (Criteria) this;
        }

        public Criteria andNoonBetween(Integer value1, Integer value2) {
            addCriterion("noon between", value1, value2, "noon");
            return (Criteria) this;
        }

        public Criteria andNoonNotBetween(Integer value1, Integer value2) {
            addCriterion("noon not between", value1, value2, "noon");
            return (Criteria) this;
        }

        public Criteria andStaffIdIsNull() {
            addCriterion("staff_id is null");
            return (Criteria) this;
        }

        public Criteria andStaffIdIsNotNull() {
            addCriterion("staff_id is not null");
            return (Criteria) this;
        }

        public Criteria andStaffIdEqualTo(Long value) {
            addCriterion("staff_id =", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotEqualTo(Long value) {
            addCriterion("staff_id <>", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdGreaterThan(Long value) {
            addCriterion("staff_id >", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdGreaterThanOrEqualTo(Long value) {
            addCriterion("staff_id >=", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdLessThan(Long value) {
            addCriterion("staff_id <", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdLessThanOrEqualTo(Long value) {
            addCriterion("staff_id <=", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdIn(List<Long> values) {
            addCriterion("staff_id in", values, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotIn(List<Long> values) {
            addCriterion("staff_id not in", values, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdBetween(Long value1, Long value2) {
            addCriterion("staff_id between", value1, value2, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotBetween(Long value1, Long value2) {
            addCriterion("staff_id not between", value1, value2, "staffId");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNull() {
            addCriterion("dept_id is null");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNotNull() {
            addCriterion("dept_id is not null");
            return (Criteria) this;
        }

        public Criteria andDeptIdEqualTo(Long value) {
            addCriterion("dept_id =", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotEqualTo(Long value) {
            addCriterion("dept_id <>", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThan(Long value) {
            addCriterion("dept_id >", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThanOrEqualTo(Long value) {
            addCriterion("dept_id >=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThan(Long value) {
            addCriterion("dept_id <", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThanOrEqualTo(Long value) {
            addCriterion("dept_id <=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdIn(List<Long> values) {
            addCriterion("dept_id in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotIn(List<Long> values) {
            addCriterion("dept_id not in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdBetween(Long value1, Long value2) {
            addCriterion("dept_id between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotBetween(Long value1, Long value2) {
            addCriterion("dept_id not between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andSkLimitIsNull() {
            addCriterion("sk_limit is null");
            return (Criteria) this;
        }

        public Criteria andSkLimitIsNotNull() {
            addCriterion("sk_limit is not null");
            return (Criteria) this;
        }

        public Criteria andSkLimitEqualTo(Long value) {
            addCriterion("sk_limit =", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitNotEqualTo(Long value) {
            addCriterion("sk_limit <>", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitGreaterThan(Long value) {
            addCriterion("sk_limit >", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitGreaterThanOrEqualTo(Long value) {
            addCriterion("sk_limit >=", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitLessThan(Long value) {
            addCriterion("sk_limit <", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitLessThanOrEqualTo(Long value) {
            addCriterion("sk_limit <=", value, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitIn(List<Long> values) {
            addCriterion("sk_limit in", values, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitNotIn(List<Long> values) {
            addCriterion("sk_limit not in", values, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitBetween(Long value1, Long value2) {
            addCriterion("sk_limit between", value1, value2, "skLimit");
            return (Criteria) this;
        }

        public Criteria andSkLimitNotBetween(Long value1, Long value2) {
            addCriterion("sk_limit not between", value1, value2, "skLimit");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/dms/DmsRedisSaveController.java<|end_filename|>
package com.neu.his.api.controller.dms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.dms.DmsCaseHistoryParam;
import com.neu.his.common.dto.dms.DmsDrugRedisParam;
import com.neu.his.common.dto.dms.DmsNonDrugRedisParam;
import com.neu.his.common.util.RedisUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsRedisSaveController", description = "redis暂存管理")
@RequestMapping("/redisSave")
@CrossOrigin(allowCredentials = "true")
public class DmsRedisSaveController {
    private static Logger LOGGER = LoggerFactory.getLogger(DmsRedisSaveController.class);

    private static Long outOfTime = new Long(60 * 30);//单位为秒

    @Autowired
    private RedisUtil redisUtil;

    @ApiOperation(value = "暂存病历首页（根据挂号号）")
    @RequestMapping(value = "/saveCasePage", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult saveCasePage(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam,
                                     @RequestParam("registrationId") Long registrationId){
        redisUtil.setObj("1" + registrationId.toString(),dmsCaseHistoryParam);
        redisUtil.expireStr("1" + registrationId.toString(),outOfTime);
        LOGGER.info("redis暂存成功：" + dmsCaseHistoryParam.toString());
        return CommonResult.success("暂存成功");
    }

    @ApiOperation(value = "取出病历首页（根据挂号号）")
    @RequestMapping(value = "/getCasePage", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<DmsCaseHistoryParam> getCasePage(@RequestParam("registrationId") Long registrationId){
        DmsCaseHistoryParam param = (DmsCaseHistoryParam)redisUtil.getObj("1" + registrationId.toString());
        if(param == null){
            LOGGER.info("redis取出失败");
            return CommonResult.success(null);
        }
        LOGGER.info("redis取出成功：" + param.toString());
        return CommonResult.success(param);
    }




    @ApiOperation(value = "暂存药方（根据挂号号和类型（4成药、5草药））")
    @RequestMapping(value = "/saveDrugPrescription", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult saveDrugPrescription(@RequestBody List<DmsDrugRedisParam> dmsDrugRedisParam,
                                             @RequestParam("registrationId") Long registrationId,
                                             @RequestParam("type") int type){
        redisUtil.setObj(type + registrationId.toString(),dmsDrugRedisParam);
        redisUtil.expireStr(type + registrationId.toString(),outOfTime);
        LOGGER.info("redis暂存成功：" + dmsDrugRedisParam.toString());
        return CommonResult.success("暂存成功");
    }

    @ApiOperation(value = "取出药方（根据挂号号和类型（4成药、5草药））")
    @RequestMapping(value = "/getDrugPrescription", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDrugRedisParam>> getDrugPrescription(@RequestParam("registrationId") Long registrationId,
                                                               @RequestParam("type") int type){
        List<DmsDrugRedisParam> paramList = (List<DmsDrugRedisParam>)redisUtil.getObj(type + registrationId.toString());
        if(paramList == null){
            LOGGER.info("redis取出失败");
            return CommonResult.success(null);
        }
        LOGGER.info("redis取出成功：" + paramList.toString());
        return CommonResult.success(paramList);
    }




    @ApiOperation(value = "暂存开立非药品项目（根据挂号号和类型（0检查、1检验、2处置））")
    @RequestMapping(value = "/saveNonDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult saveNonDrug(@RequestBody DmsNonDrugRedisParam dmsNonDrugRedisParam,
                                    @RequestParam("registrationId") Long registrationId,
                                    @RequestParam("type") int type){
        redisUtil.setObj(type + registrationId.toString(),dmsNonDrugRedisParam);
        redisUtil.expireStr(type + registrationId.toString(),outOfTime);
        LOGGER.info("redis暂存成功：" + dmsNonDrugRedisParam.toString());
        return CommonResult.success("暂存成功");
    }

    @ApiOperation(value = "取出开立非药品项目（根据挂号号和类型（0检查、1检验、2处置））")
    @RequestMapping(value = "/getNonDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<DmsNonDrugRedisParam> getNonDrug(@RequestParam("registrationId") Long registrationId,
                                                         @RequestParam("type") int type){
        DmsNonDrugRedisParam paramList = (DmsNonDrugRedisParam)redisUtil.getObj(type + registrationId.toString());
        if(paramList == null){
            LOGGER.info("redis取出失败");
            return CommonResult.success(null);
        }
        LOGGER.info("redis取出成功：" + paramList.toString());
        return CommonResult.success(paramList);
    }
}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/service/dms/DmsNonDrugItemRecordService.java<|end_filename|>
package com.neu.his.cloud.api.app.service.dms;


import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.app.AppCheckTestResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(value = "his-cloud-service-dms")
public interface DmsNonDrugItemRecordService {
    @RequestMapping(value = "/nonDrugItemRecord/getResult", method = RequestMethod.POST)
    CommonResult<AppCheckTestResult> getResult(@RequestParam("id") Long id);

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/test/com/neu/his/cloud/service/sms/service/SmsDeptServiceTest.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;

import com.neu.his.cloud.service.sms.ServiceSmsApplication;
import com.neu.his.cloud.service.sms.dto.sms.SmsDeptParam;
import lombok.ToString;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import static org.junit.Assert.*;

/**
 * @author Zain
 * @title: SmsDeptServiceTest
 * @projectName his-cloud
 * @description: TODO
 * @date 2019/6/1623:15
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = ServiceSmsApplication.class)
public class SmsDeptServiceTest {
    @Autowired
    SmsDeptService smsDeptService;

    @Test
    public void create(){
        SmsDeptParam smsDeptParam = new SmsDeptParam();
        smsDeptParam.setCatId(2);
        smsDeptParam.setName("新的");
        smsDeptParam.setStatus(1);
        smsDeptParam.setType(2);
        smsDeptParam.setCode("zzzzzz");
        System.out.println(smsDeptService.create(smsDeptParam));
    }


}

<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/impl/BmsInvoiceServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.bms.service.impl;


import com.neu.his.cloud.service.bms.dto.bms.BmsInvoiceResult;
import com.neu.his.cloud.service.bms.mapper.BmsBillsRecordMapper;
import com.neu.his.cloud.service.bms.mapper.BmsInvoiceRecordMapper;
import com.neu.his.cloud.service.bms.mapper.BmsOperatorSettleRecordMapper;
import com.neu.his.cloud.service.bms.mapper.BmsSettlementCatMapper;
import com.neu.his.cloud.service.bms.model.*;
import com.neu.his.cloud.service.bms.service.BmsInvoiceService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class BmsInvoiceServiceImpl implements BmsInvoiceService {
    @Autowired
    BmsBillsRecordMapper bmsBillsRecordMapper;
    @Autowired
    BmsInvoiceRecordMapper bmsInvoiceRecordMapper;
    @Autowired
    BmsSettlementCatMapper bmsSettlementCatMapper;
    @Autowired
    BmsOperatorSettleRecordMapper bmsOperatorSettleRecordMapper;
    //发票补打：
    //1.传入更新后的发票号，挂号id
    //2.根据挂号id在账单表中查找出账单，根据账单id在发票表中查找出最近的一条发票，更新发票号
    @Override
    public int supplementPrintInvoice(Long newInvoiceNo, Long registrationId) {
        BmsBillsRecordExample bmsBillsRecordExample = new BmsBillsRecordExample();
        bmsBillsRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId);
        List<BmsBillsRecord> bmsBillsRecordList = bmsBillsRecordMapper.selectByExample(bmsBillsRecordExample);
        if (!bmsBillsRecordList.isEmpty()){
            BmsBillsRecord bmsBillsRecord = bmsBillsRecordList.get(0);
            Long billId = bmsBillsRecord.getId();
            BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();
            bmsInvoiceRecordExample.createCriteria().andBillIdEqualTo(billId);
            //根据按照创建时间倒排，查找出最近的一条发票
            bmsInvoiceRecordExample.setOrderByClause("create_time desc");
            List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
            if (!bmsBillsRecordList.isEmpty()){
                BmsInvoiceRecord bmsInvoiceRecord = bmsInvoiceRecordList.get(0);//可能有问题
                bmsInvoiceRecord.setInvoiceNo(newInvoiceNo);
                bmsInvoiceRecordMapper.updateByPrimaryKeySelective(bmsInvoiceRecord);
                return 1;
            }
        }
        return 0;
    }
    //发票重打：
    //1.传入原发票号和新发票号
    //2.找出原发票，修改状态为4，并封装相同信息
    //3.插入新发票记录，金额等值
    @Override
    public int reprintInvoice(Long newInvoiceNo, Long oldInvoiceNo) {
        BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();
        bmsInvoiceRecordExample.createCriteria().andInvoiceNoEqualTo(oldInvoiceNo);
        List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
        if (!bmsInvoiceRecordList.isEmpty()){
            BmsInvoiceRecord bmsInvoiceRecord = bmsInvoiceRecordList.get(0);
            BmsInvoiceRecord newBmsInvoiceRecord = new BmsInvoiceRecord();
            BeanUtils.copyProperties(bmsInvoiceRecord,newBmsInvoiceRecord);
            bmsInvoiceRecord.setType(4);
            newBmsInvoiceRecord.setInvoiceNo(newInvoiceNo);
            newBmsInvoiceRecord.setType(1);
            newBmsInvoiceRecord.setCreateTime(new Date());
            bmsInvoiceRecordMapper.updateByPrimaryKeySelective(bmsInvoiceRecord);
            bmsInvoiceRecordMapper.insertSelective(newBmsInvoiceRecord);
            return 1;
        }
        return 0;
    }
    //传入新的start_datetime和end_datetime和收费员id，查询发票信息
    @Override
    public List<BmsInvoiceResult> queryInvoiceInfo(Long cashierId, Date startDatetime, Date endDatetime) {
        List<BmsInvoiceResult> bmsInvoiceResultList = new ArrayList<>();
        BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();
        bmsInvoiceRecordExample.createCriteria().andOperatorIdEqualTo(cashierId).andCreateTimeBetween(startDatetime,endDatetime);
        bmsInvoiceRecordExample.setOrderByClause("create_time asc");
        List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
        for (BmsInvoiceRecord bmsInvoiceRecord : bmsInvoiceRecordList){
            BmsInvoiceResult bmsInvoiceResult = new BmsInvoiceResult();
            BeanUtils.copyProperties(bmsInvoiceRecord,bmsInvoiceResult);
            //结算类型name
            if (bmsInvoiceRecord.getSettlementCatId() != null){
                String settlementCatName = bmsSettlementCatMapper.selectByPrimaryKey(bmsInvoiceRecord.getSettlementCatId()).getName();
                bmsInvoiceResult.setSettlementCatName(settlementCatName);
            }
            //对账人id,所属日结记录id
            BmsOperatorSettleRecord bmsOperatorSettleRecord = bmsOperatorSettleRecordMapper.selectByPrimaryKey(bmsInvoiceRecord.getSettleRecordId());
            if (bmsOperatorSettleRecord != null){
                bmsInvoiceResult.setOperatorSettleId(bmsOperatorSettleRecord.getVerifyOperatorId());
                bmsInvoiceResult.setSettleRecordId(bmsOperatorSettleRecord.getId());
            }
            bmsInvoiceResultList.add(bmsInvoiceResult);
        }
        return bmsInvoiceResultList;
    }
    //根据日结记录id查询发票详细信息
    @Override
    public List<BmsInvoiceResult> queryInvoiceInfoBySettleId(Long settleRecordId) {
        List<BmsInvoiceResult> bmsInvoiceResultList = new ArrayList<>();
        BmsOperatorSettleRecord bmsOperatorSettleRecord = bmsOperatorSettleRecordMapper.selectByPrimaryKey(settleRecordId);

        BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();
        bmsInvoiceRecordExample.createCriteria().andSettleRecordIdEqualTo(settleRecordId);
        List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
        if (!bmsInvoiceRecordList.isEmpty()){
            for (BmsInvoiceRecord bmsInvoiceRecord : bmsInvoiceRecordList){
                BmsInvoiceResult bmsInvoiceResult = new BmsInvoiceResult();
                BeanUtils.copyProperties(bmsInvoiceRecord,bmsInvoiceResult);
                //结算类型name
                String settlementCatName = bmsSettlementCatMapper.selectByPrimaryKey(bmsInvoiceRecord.getSettlementCatId()).getName();
                bmsInvoiceResult.setSettlementCatName(settlementCatName);
                //对账人id,所属日结记录id
                bmsInvoiceResult.setOperatorSettleId(bmsOperatorSettleRecord.getVerifyOperatorId());
                bmsInvoiceResult.setSettleRecordId(bmsOperatorSettleRecord.getId());
                bmsInvoiceResultList.add(bmsInvoiceResult);
            }
        }
        return bmsInvoiceResultList;
    }
}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/controller/PmsPatientController.java<|end_filename|>
package com.neu.his.cloud.service.pms.controller;

import com.neu.his.cloud.service.pms.common.CommonResult;
import com.neu.his.cloud.service.pms.dto.pms.PmsPatientResult;
import com.neu.his.cloud.service.pms.service.PmsPatientService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@Api(tags = "PmsPatientController", description = "病人管理")
@RequestMapping("/pmsPatient")
@CrossOrigin(allowCredentials = "true")
public class PmsPatientController {

    @Autowired
    private PmsPatientService pmsPatientService;
    /**
     * 描述:患者手机端登录
     * <p>author: ma
     */
    @ApiOperation("患者 手机端登录")
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsPatientResult> login(@RequestParam("identificationNo") String identificationNo,
                                                @RequestParam("medicalRecordNo") String medicalRecordNo){
        PmsPatientResult result = pmsPatientService.patientLogin(identificationNo ,medicalRecordNo);
        System.err.println("result:"+result);
        if(result == null){
            return  CommonResult.failed("登录失败");
        }else {
            return CommonResult.success(result,"登录成功");
        }
    }

}


<|start_filename|>HIS-web/mock/department.js<|end_filename|>
import Mock from 'mockjs'

const List = []
const count = 100

for (let i = 0; i < count; i++) {
  List.push(Mock.mock({
    id: '@increment',
    code: '@increment',
    catId: '@integer(11,29)',
    'name|1': ['心血管内科','神经内科','消化内科','药剂科'],
    type: '@integer(1,4)'
  }))
}

export default [
  {
    url: '/deplist',
    type: 'get',
    response: _ => {
      return {
        code: 20000,
        data: List
      }
    }
  },
  {
    url: '/dep/list',
    type: 'get',
    response: config => {
      const { code,catId,name,type,page = 1, limit = 20 } = config.query
      let mockList = List.filter(item => {
        if (code && item.code !== +code) return false
        if (catId && item.catId !== +catId) return false
        if (type && item.type !== +type) return false
        if (name && item.name !== name) return false
        return true
      })
      const pageList = mockList.filter((item, index) => index < limit * page && index >= limit * (page - 1))
      return {
        code: 20000,
        data: {
          total: mockList.length,
          items: pageList
        }
      }
    }
  }
]

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/bms/BmsRefundChargeParam.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.bms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

@Setter
@Getter
@ToString
public class BmsRefundChargeParam  implements Serializable {
    @ApiModelProperty(value = "退费项目id")
    Long chargeItemId;
    @ApiModelProperty(value = "退费项目类型")
    Integer type;
    @ApiModelProperty(value = "发票号")
    Long invoiceNo;
    @ApiModelProperty(value = "操作人id")
    Long operatorId;
    @ApiModelProperty(value = "退款金额")
    BigDecimal refundAmount;
    /*
    wang
     */
    @ApiModelProperty(value = "冲红发票号")
    Long redInvoiceNo;
    @ApiModelProperty(value = "新发票号")
    Long newInvoiceNo;
    @ApiModelProperty(value = "结算类型")
    Long settlementCatId;
}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/util/AgeStrUtil.java<|end_filename|>
package com.neu.his.cloud.service.pms.util;

import java.util.Calendar;
import java.util.Date;

public class AgeStrUtil {
    public static String getAgeStr(Date dateOfBirth){
        Calendar calendar = Calendar.getInstance();//传入时间
        calendar.setTime(dateOfBirth);
        //System.out.println("calendar.getTime():"+calendar.getTime());
        Long time = calendar.getTimeInMillis();
        //System.out.println("time:"+time);
        Calendar calendar1 = Calendar.getInstance();//当前时间
        Long time1 = calendar1.getTimeInMillis();
        //System.out.println("time1:"+time1);
        Long betweenDays = (time1-time)/(1000*60*60*24);
        //System.out.println("betweenDays:"+betweenDays);
        if ((betweenDays/365) >=3 ){//如果大于等于3，返回例如5岁
            Long age = betweenDays/365;
            return age + "岁";
        }
        else if(betweenDays > 100 && (betweenDays/365) < 3){//如果大于100天，小于三岁，返回例如2岁3个月{
            Long year = betweenDays/365;//年
            Long restDays = betweenDays%365;//模365剩余的天数
            Long month = restDays/30 + 1;
            return year + "岁" + month + "个月";
        }
        else {
            return betweenDays + "天";
        }
    }

    public static void main(String[] args) {
        System.out.println(getAgeStr(new Date()));
        Date date = new Date(119,0,1);//year是从1990开始算的
        System.out.println(getAgeStr(date));
}
}


<|start_filename|>his-cloud/his-cloud-monitor/src/java/com/neu/his/cloud/monitor/MonitorApplication.java<|end_filename|>
package com.neu.his.cloud.monitor;

import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

/**
 * @ClassName: MonitorApplication
 * @description: TODO
 * @author 赵煜
 * @date 2019/6/169:15
 */
@EnableEurekaClient
@SpringBootApplication
@EnableAdminServer   //spring boot 监控
public class MonitorApplication {
    public static void main(String[] args) {
        SpringApplication.run(MonitorApplication.class,args);
    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/oss/OssPolicyResult.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.oss;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class OssPolicyResult {
    private String accessKeyId;
    private String policy;
    private String signature;
    private String dir;
    private String host;

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/bms/BmsInvoiceDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.bms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.bms.ApiPcBmsInvoiceDistributionService;
import com.neu.his.cloud.zuul.dto.bms.BmsInvoiceResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "BmsInvoiceDistributionController", description = "发票管理")
@RequestMapping("/invoice")
@CrossOrigin(allowCredentials = "true")
public class BmsInvoiceDistributionController {
    @Autowired
    ApiPcBmsInvoiceDistributionService apiPcBmsInvoiceDistributionService;

    @HystrixCommand(fallbackMethod = "supplementPrintInvoiceFallbackInfo")
    @ApiOperation(value = "补打发票")
    @RequestMapping(value = "/supplementPrintInvoice", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult supplementPrintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("registrationId") Long registrationId){
        return apiPcBmsInvoiceDistributionService.supplementPrintInvoice(newInvoiceNo, registrationId);
    }
    private CommonResult supplementPrintInvoiceFallbackInfo( Long newInvoiceNo, Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "reprintInvoiceFallbackInfo")
    @ApiOperation(value = "重打发票")
    @RequestMapping(value = "/reprintInvoice", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult  reprintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("oldInvoiceNo") Long oldInvoiceNo){
        return apiPcBmsInvoiceDistributionService.reprintInvoice(newInvoiceNo, oldInvoiceNo);
    }
    private CommonResult  reprintInvoiceFallbackInfo(Long newInvoiceNo,Long oldInvoiceNo){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "queryInvoiceInfoFallbackInfo")
    @ApiOperation(value = "根据时间和收费员Id查询发票信息")
    @RequestMapping(value = "/queryInvoiceInfo", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfo(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime")String startDatetime, @RequestParam("endDatetime")String endDatetime){
        return apiPcBmsInvoiceDistributionService.queryInvoiceInfo(cashierId, startDatetime, endDatetime);
    }
    private CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfoFallbackInfo(Long cashierId,  String startDatetime, String endDatetime){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "queryInvoiceInfoBySettleIdFallbackInfo")
    @ApiOperation(value = "根据日结记录Id查询发票信息")
    @RequestMapping(value = "/queryInvoiceInfoBySettleId", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfoBySettleId(@RequestParam("settleRecordId") Long settleRecordId){
        return apiPcBmsInvoiceDistributionService.queryInvoiceInfoBySettleId(settleRecordId);
    }
    private CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfoBySettleIdFallbackInfo( Long settleRecordId){
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/dto/app/AppCheckTestResult.java<|end_filename|>
package com.neu.his.cloud.service.bms.dto.app;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class AppCheckTestResult {

    @ApiModelProperty(value = "检查部位")
    String  checkParts;
    @ApiModelProperty(value = "结果")
    String checkResult;
    @ApiModelProperty(value = "结果图片链接")
    String resultImgUrlList;

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsCaseModelController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseModelListResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseModelCatalogNode;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseModelOrCatalogParam;
import com.neu.his.cloud.api.pc.model.DmsCaseModel;
import com.neu.his.cloud.api.pc.service.dms.DmsCaseModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsCaseModelController", description = "病历模板管理")
@RequestMapping("/DmsCaseModel")
@CrossOrigin(allowCredentials = "true")
public class DmsCaseModelController {
    @Autowired
    DmsCaseModelService dmsCaseModelService;


    @ApiOperation(value = "新增病历模板目录或模板")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsCaseModelOrCatalogParam dmsCaseModelOrCatalogParam, BindingResult result) {
        return dmsCaseModelService.createCatOrModel(dmsCaseModelOrCatalogParam);
    }

    @ApiOperation(value = "显示病历模板目录树")
    @RequestMapping(value = "/listModelCatTree", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsCaseModelCatalogNode>> listModelCatTree(@RequestParam Long ownId, @RequestParam Integer scope) {
        return dmsCaseModelService.listModelCatTree(ownId,scope);
    }

    @ApiOperation(value = "删除病历模版或目录")
    @RequestMapping(value = "/deleteModelOrCat", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModel(@RequestParam("id") Long id){
       return dmsCaseModelService.deleteModelOrCat(id);

    }


    @ApiOperation(value = "更新病历模版信息")
    @RequestMapping(value = "/updateModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsCaseModel dmsCaseModel, BindingResult result){
       return dmsCaseModelService.updateModel(modelId,dmsCaseModel);
    }


    @ApiOperation(value = "更新目录或模板的名字")
    @RequestMapping(value = "/updateModel/{id}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult updateName(@PathVariable("id") Long id, @RequestParam("name")String name){
       return dmsCaseModelService.updateName(id,name);
    }


    @ApiOperation(value = "根据模板id查询模板详细信息")
    @RequestMapping(value = "/getModelDetail/{id}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseModel> getModelDetail(@PathVariable("id") Long id){
        return dmsCaseModelService.getModelDetail(id);
    }

    @ApiOperation(value = "根据staffId获取所有病历模板")
    @RequestMapping(value = "/getAllStaffModel", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseModelListResult> getAllStaffModel(@RequestParam("staffId") Long staffId){
        return dmsCaseModelService.getAllStaffModel(staffId);
    }

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/OssService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;



import com.neu.his.cloud.service.dms.dto.oss.OssCallbackResult;
import com.neu.his.cloud.service.dms.dto.oss.OssPolicyResult;

import javax.servlet.http.HttpServletRequest;

/**
 * oss上传管理Service
 */
public interface OssService {
    OssPolicyResult policy();
    OssCallbackResult callback(HttpServletRequest request);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsMedicineItemRecordResult.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

@Setter
@Getter
@ToString
public class DmsMedicineItemRecordResult  implements Serializable {

    private Long id;

    private Long drugId;

    private Integer status;

    private Long prescriptionId;

    private Integer medicineUsage;

    private Integer frequency;

    private Long days;

    private Long num;

    private String medicalAdvice;

    private Long refundNum;

    private Long usageNum;

    private Integer usageMeans;

    private Integer usageNumUnit;

    private BigDecimal price;

    private String drugName;

}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/service/impl/PmsPatientServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.pms.service.impl;


import cn.hutool.core.collection.CollectionUtil;
import com.neu.his.cloud.service.pms.dto.dms.DmsCaseHistoryResult;
import com.neu.his.cloud.service.pms.dto.pms.PmsDiagnosisPatientListResult;
import com.neu.his.cloud.service.pms.dto.pms.PmsDiagnosisPatientResult;
import com.neu.his.cloud.service.pms.dto.pms.PmsPatientResult;
import com.neu.his.cloud.service.pms.mapper.*;
import com.neu.his.cloud.service.pms.model.*;
import com.neu.his.cloud.service.pms.service.PmsPatientService;
import com.neu.his.cloud.service.pms.util.AgeStrUtil;
import com.neu.his.cloud.service.pms.util.DateUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class PmsPatientServiceImpl implements PmsPatientService {
    @Autowired
    private PmsPatientMapper pmsPatientMapper;
    @Autowired
    private SmsStaffMapper smsStaffMapper;
    @Autowired
    private DmsRegistrationMapper dmsRegistrationMapper;
    @Autowired
    private SmsSkdMapper smsSkdMapper;
    @Autowired
    private DmsCaseHistoryMapper dmsCaseHistoryMapper;
    //1.调用PmsPatientDao根据身份证号查询病人信息，并封装
    //2. 如果病人信息不存在，则直接返回


    @Override
    public PmsPatientResult selectPatientByIdNo(String identificationNo) {
        int count;//用于记录是否存在该病人
        PmsPatientExample example = new PmsPatientExample();
        example.createCriteria().andIdentificationNoEqualTo(identificationNo);
        List<PmsPatient> pmsPatientList = pmsPatientMapper.selectByExample(example);
        if(pmsPatientList.size()>0){//如果存在该病人
            PmsPatientResult pmsPatientResult = new PmsPatientResult();
            pmsPatientResult.setName(pmsPatientList.get(0).getName());

            //处理年龄
            Date dateOfBirth = pmsPatientList.get(0).getDateOfBirth();
            String age = AgeStrUtil.getAgeStr(dateOfBirth);
            pmsPatientResult.setAge(age);

            pmsPatientResult.setDateOfBirth(pmsPatientList.get(0).getDateOfBirth());
            pmsPatientResult.setGender(pmsPatientList.get(0).getGender());
            pmsPatientResult.setHomeAddress(pmsPatientList.get(0).getHomeAddress());
            pmsPatientResult.setPhoneNo(pmsPatientList.get(0).getPhoneNo());
            pmsPatientResult.setMedicalRecordNo(pmsPatientList.get(0).getMedicalRecordNo());
            return pmsPatientResult;
        }
        return null;
    }
    //1.传入医生id
    // 2.先根据医生id查找部门id,再从dms_registration中根据bind_status（0）、attendance_date、dept_id、status(1)查找出科室待诊患者
    // 3.
    //	3.1先通过午别、时间、医生id在表sms_skd中查找出sms_skd的id
    //	3.1.从dms_registration中根据bind_status（1）、attendance_date、skd_id查找出分配了的患者信息，并根据status分类（1，2，3）
    /**
     * 描述：
     * <p>author:王思阳
     * <p>author:赵煜  修改mysql5.7中比较时间错误
     *                 修改空指针异常
     *                 修改通过无别筛选列表错误
     */
    @Override
    public PmsDiagnosisPatientListResult refreshPatient(Long staffId) {
        //根据医生id查找部门id
        SmsStaffExample smsStaffExample = new SmsStaffExample();
        smsStaffExample.createCriteria().andIdEqualTo(staffId);
        List<SmsStaff> smsStaffList = smsStaffMapper.selectByExample(smsStaffExample);
        Long deptId = smsStaffList.get(0).getDeptId();
        System.err.println("deptId:"+deptId);


        //从dms_registration中根据bind_status（0）、attendance_date、dept_id、status(1)查找出科室待诊患者
        DmsRegistrationExample dmsRegistrationExample = new DmsRegistrationExample();
        Date date = new Date();//注意：这里的时间判断可能有问题

        //时间  对于科室等待患者，列出今天和昨天的（防止12点出故障）

        Date beforeAday= DateUtil.getDateBefore(date,1);
        System.err.println("date:"+date);
        System.err.println("beforeAday:"+beforeAday);

        dmsRegistrationExample.createCriteria().andBindStatusEqualTo(0).andDeptIdEqualTo(deptId).andStatusEqualTo(1).andAttendanceDateBetween(beforeAday,date);
        List<DmsRegistration> dmsRegistrationList = dmsRegistrationMapper.selectByExample(dmsRegistrationExample);

        System.err.println("dmsRegistrationList.size: " + dmsRegistrationList.size());

        //映射List<DmsRegistration>到List<PmsDiagnosisPatientResult>
        List<PmsDiagnosisPatientResult> deptWaitList = new ArrayList<>();//科室待诊列表
        for (DmsRegistration dmsRegistration : dmsRegistrationList) {
            PmsDiagnosisPatientResult pmsDiagnosisPatientResult = new PmsDiagnosisPatientResult();
            pmsDiagnosisPatientResult.setPatientId(dmsRegistration.getPatientId());
            pmsDiagnosisPatientResult.setPatientAge(dmsRegistration.getPatientAgeStr());
            pmsDiagnosisPatientResult.setRegistrationId(dmsRegistration.getId());
            pmsDiagnosisPatientResult.setRegistrationStatus(dmsRegistration.getStatus());
            //从PmsPatient中查询其他字段并封装
            PmsPatientExample pmsPatientExample = new PmsPatientExample();
            pmsPatientExample.createCriteria().andIdEqualTo(dmsRegistration.getPatientId());
            List<PmsPatient> pmsPatientList = pmsPatientMapper.selectByExample(pmsPatientExample);
            pmsDiagnosisPatientResult.setPatientName(pmsPatientList.get(0).getName());
            pmsDiagnosisPatientResult.setPatientHomeAdress(pmsPatientList.get(0).getHomeAddress());
            pmsDiagnosisPatientResult.setPatientGender(pmsPatientList.get(0).getGender());
            pmsDiagnosisPatientResult.setPatientMedicalRecordNo(pmsPatientList.get(0).getMedicalRecordNo());
            deptWaitList.add(pmsDiagnosisPatientResult);//加入List<PmsDiagnosisPatientResult>
        }
        System.err.println("deptWaitList.size: " + deptWaitList.size());

        //获取当前午别
        SimpleDateFormat df = new SimpleDateFormat("HH");
        String hourStr = df.format(date);

        //通过午别、时间、医生id在表sms_skd中查找出sms_skd的id
        SmsSkdExample smsSkdExample = new SmsSkdExample();
        System.err.println("staffId:"+staffId);
        smsSkdExample.createCriteria().andStaffIdEqualTo(staffId).andDateEqualTo(DateUtil.getDate(DateUtil.setMilliSecond(date,0)));
        List<SmsSkd> smsSkdList = smsSkdMapper.selectByExample(smsSkdExample);

        System.err.println(smsSkdList==null?"smsSkdList=null":"smsSkdList!=null");

        System.err.println(smsSkdList.size());
        if(CollectionUtil.isEmpty(smsSkdList)){
            return null;
        }

        List<Long> idList = new ArrayList<>();
        for(SmsSkd skd : smsSkdList){
            idList.add(skd.getId());
        }



        //从dms_registration中根据bind_status（1）、attendance_date、skd_id查找出分配了的患者信息，并根据status分类（1，2，3）
        DmsRegistrationExample dmsRegistrationExample1 = new DmsRegistrationExample();
        //使用DateUtil只截取日期部分
        dmsRegistrationExample1.createCriteria().andBindStatusEqualTo(1).andAttendanceDateEqualTo(DateUtil.getDate(DateUtil.setMilliSecond(date,0))).andSkdIdIn(idList);
        ;


        List<DmsRegistration> dmsRegistrationList1 = dmsRegistrationMapper.selectByExample(dmsRegistrationExample1);

        List<PmsDiagnosisPatientResult> personalWaitList = new ArrayList<>();//个人待诊
        List<PmsDiagnosisPatientResult> personalDuringList = new ArrayList<>();//个人诊中
        List<PmsDiagnosisPatientResult> personalEndList = new ArrayList<>();//个人已诊
        for (DmsRegistration dmsRegistration:dmsRegistrationList1) {
            PmsDiagnosisPatientResult pmsDiagnosisPatientResult = new PmsDiagnosisPatientResult();
            pmsDiagnosisPatientResult.setPatientId(dmsRegistration.getPatientId());
            pmsDiagnosisPatientResult.setPatientAge(dmsRegistration.getPatientAgeStr());
            pmsDiagnosisPatientResult.setRegistrationId(dmsRegistration.getId());
            pmsDiagnosisPatientResult.setRegistrationStatus(dmsRegistration.getStatus());
            //从PmsPatient中查询其他字段并封装
            PmsPatientExample pmsPatientExample = new PmsPatientExample();
            pmsPatientExample.createCriteria().andIdEqualTo(dmsRegistration.getPatientId());
            List<PmsPatient> pmsPatientList = pmsPatientMapper.selectByExample(pmsPatientExample);
            pmsDiagnosisPatientResult.setPatientName(pmsPatientList.get(0).getName());
            pmsDiagnosisPatientResult.setPatientHomeAdress(pmsPatientList.get(0).getHomeAddress());
            pmsDiagnosisPatientResult.setPatientGender(pmsPatientList.get(0).getGender());
            pmsDiagnosisPatientResult.setPatientMedicalRecordNo(pmsPatientList.get(0).getMedicalRecordNo());
            if (pmsDiagnosisPatientResult.getRegistrationStatus() == 1){//待诊
                personalWaitList.add(pmsDiagnosisPatientResult);
            }
            else if (pmsDiagnosisPatientResult.getRegistrationStatus() == 2){//诊中
                personalDuringList.add(pmsDiagnosisPatientResult);
            }
            else if (pmsDiagnosisPatientResult.getRegistrationStatus() == 3){//诊毕
                personalEndList.add(pmsDiagnosisPatientResult);
            }
        }
        //封装PmsDiagnosisPatientListResult对象并返回
        PmsDiagnosisPatientListResult pmsDiagnosisPatientListResult = new PmsDiagnosisPatientListResult();
        pmsDiagnosisPatientListResult.setDeptWaitList(deptWaitList);
        pmsDiagnosisPatientListResult.setPersonalWaitList(personalWaitList);
        pmsDiagnosisPatientListResult.setPersonalDuringList(personalDuringList);
        pmsDiagnosisPatientListResult.setPersonalEndList(personalEndList);
        return pmsDiagnosisPatientListResult;
    }
    //1. 传入dms_registration的id和医生id
    //2. 先根据医生id、时间、午别查找sms_skd的id
    //3.根据dms_registration的id修改dms_registration中bind_status为1,并添加skd_id
    @Override
    public int bindPatient(Long registrationId, Long staffId) {
        //根据医生id、时间、午别查找sms_skd的id
            //获取当前午别
        Date date = new Date();
        SimpleDateFormat df = new SimpleDateFormat("HH");
        String hourStr = df.format(date);
        int hour = Integer.parseInt(hourStr);
        Integer noon;//午别
        if (hour <= 12){
            noon = 0;//上午
        }
        else {
            noon = 1;//下午
        }
        SmsSkdExample smsSkdExample = new SmsSkdExample();
        smsSkdExample.createCriteria().andStaffIdEqualTo(staffId).andDateEqualTo(DateUtil.getDate(DateUtil.setMilliSecond(date,0))).andNoonEqualTo(noon);
        /*
        时间判断问题
         */
        //smsSkdExample.createCriteria().andStaffIdEqualTo(staffId).andNoonEqualTo(noon);
        List<SmsSkd> smsSkdList = smsSkdMapper.selectByExample(smsSkdExample);
        Long skdId = smsSkdList.get(0).getId();
        if (skdId == null){
            return 0;
        }
        //根据dms_registration的id修改dms_registration中bind_status为1,并添加skd_id
        DmsRegistrationExample dmsRegistrationExample = new DmsRegistrationExample();
        dmsRegistrationExample.createCriteria().andIdEqualTo(registrationId);
        DmsRegistration dmsRegistration = new DmsRegistration();
        dmsRegistration.setBindStatus(1);
        dmsRegistration.setSkdId(skdId);
        dmsRegistrationMapper.updateByExampleSelective(dmsRegistration,dmsRegistrationExample);
        return 1;
    }
    //1.调用PmsPatientService的updateDiagnosisSatus 根据挂号id修改status状态为2
    //2.调用PmsPatientService的selectCaseHistoryByPatient()
    @Override
    public DmsCaseHistoryResult startDiagnosis(Long registrationId) {
        updateDiagnosisStatus(registrationId,2);
        DmsCaseHistoryResult dmsCaseHistoryResult = selectCaseHistoryByPatient(registrationId);
        return dmsCaseHistoryResult;
    }
    //修改状态通用方法
    @Override
    public int updateDiagnosisStatus(Long registrationId, Integer status) {
        DmsRegistration dmsRegistration = new DmsRegistration();
        dmsRegistration.setId(registrationId);
        dmsRegistration.setStatus(status);
        dmsRegistrationMapper.updateByPrimaryKeySelective(dmsRegistration);
        return 1;
    }
    //1.根据registrationId查找出patientId
    //2.根据patientId查询历史病历(status为2)
    @Override
    public DmsCaseHistoryResult selectCaseHistoryByPatient(Long registrationId) {
        DmsRegistration dmsRegistration =  dmsRegistrationMapper.selectByPrimaryKey(registrationId);
        Long patientId = dmsRegistration.getPatientId();
        //List<DmsCaseHistory> dmsCaseHistoryList = new ArrayList<>();
        DmsCaseHistoryExample dmsCaseHistoryExample = new DmsCaseHistoryExample();
        dmsCaseHistoryExample.createCriteria().andPatientIdEqualTo(patientId).andStatusEqualTo(2);
        dmsCaseHistoryExample.setOrderByClause("create_time desc");//按创建时间降序
        List<DmsCaseHistory> dmsCaseHistoryList = dmsCaseHistoryMapper.selectByExample(dmsCaseHistoryExample);
        DmsCaseHistoryResult dmsCaseHistoryResult = new DmsCaseHistoryResult();
        dmsCaseHistoryResult.setDmsCaseHistoryList(dmsCaseHistoryList);
        return dmsCaseHistoryResult;
    }

    @Override
    public PmsPatientResult patientLogin(String identificationNo, String medicalRecordNo) {
       PmsPatientExample pmsPatientExample=new PmsPatientExample();
       pmsPatientExample.createCriteria().andIdentificationNoEqualTo(identificationNo).andMedicalRecordNoEqualTo(medicalRecordNo);
       List<PmsPatient> pmsPatientList = pmsPatientMapper.selectByExample(pmsPatientExample);
        if(CollectionUtil.isEmpty(pmsPatientList)||pmsPatientList.size()>1){
            return null;
        }

        //数据正常的情况下，只会返回一个病人
        PmsPatientResult pmsPatientResult=new PmsPatientResult();
        BeanUtils.copyProperties(pmsPatientList.get(0),pmsPatientResult);

        return pmsPatientResult;

    }
}


<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/SmsFrequentUsedService.java<|end_filename|>
package com.neu.his.sms;

import com.neu.his.common.dto.sms.SmsFrequentUsedResult;

/**
 * 常用项
 */
public interface SmsFrequentUsedService {

    /**
     * 描述：新增常用项
     */
    int addFrequent(Long staffId, int addType, Long addId);

    /**
     * 描述：删除常用项
     */
    int deleteFrequent(Long staffId, int deleteType, Long deleteId);

    /**
     * 描述：根据staffId和type查询常用项
     */
    SmsFrequentUsedResult selectFrequent(Long staffId, int selectType);




}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/mapper/DmsHerbalModelItemMapper.java<|end_filename|>
package com.neu.his.cloud.service.dms.mapper;

import com.neu.his.cloud.service.dms.model.DmsHerbalModelItem;
import com.neu.his.cloud.service.dms.model.DmsHerbalModelItemExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsHerbalModelItemMapper {
    int countByExample(DmsHerbalModelItemExample example);

    int deleteByExample(DmsHerbalModelItemExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsHerbalModelItem record);

    int insertSelective(DmsHerbalModelItem record);

    List<DmsHerbalModelItem> selectByExample(DmsHerbalModelItemExample example);

    DmsHerbalModelItem selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsHerbalModelItem record, @Param("example") DmsHerbalModelItemExample example);

    int updateByExample(@Param("record") DmsHerbalModelItem record, @Param("example") DmsHerbalModelItemExample example);

    int updateByPrimaryKeySelective(DmsHerbalModelItem record);

    int updateByPrimaryKey(DmsHerbalModelItem record);
}

<|start_filename|>HIS-web/src/api/outpatient/prescription.js<|end_filename|>
import request from '@/utils/request'
export function apply(data) {
  return request({
    url: '/DmsMedicinePrescriptionRecord/apply',
    method: 'post',
    data
  })
}

export function listByReg(data) {
  return request({
    url: '/DmsMedicinePrescriptionRecord/listByReg',
    method: 'post',
    params:{
      registrationId:data
    }
  })
}

export function listByIds(data) {
  return request({
    url: '/DmsMedicinePrescriptionRecord/listByIds',
    method: 'post',
    params:{
      ids:data
    }
  })
}

export function invalid(data) {
  return request({
    url: '/DmsMedicinePrescriptionRecord/invalid',
    method: 'post',
    params:{
      ids:data
    }
  })
}

<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/mapper/SmsSkdRuleMapper.java<|end_filename|>
package com.neu.his.mbg.mapper;

import com.neu.his.mbg.model.SmsSkdRule;
import com.neu.his.mbg.model.SmsSkdRuleExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsSkdRuleMapper {
    int countByExample(SmsSkdRuleExample example);

    int deleteByExample(SmsSkdRuleExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsSkdRule record);

    int insertSelective(SmsSkdRule record);

    List<SmsSkdRule> selectByExample(SmsSkdRuleExample example);

    SmsSkdRule selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsSkdRule record, @Param("example") SmsSkdRuleExample example);

    int updateByExample(@Param("record") SmsSkdRule record, @Param("example") SmsSkdRuleExample example);

    int updateByPrimaryKeySelective(SmsSkdRule record);

    int updateByPrimaryKey(SmsSkdRule record);
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/component/RabbitMQOrderReceiver.java<|end_filename|>
package com.neu.his.cloud.service.dms.component;

import com.neu.his.cloud.service.dms.service.DmsFeeRabbitMQService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "his.order.cancel")
public class RabbitMQOrderReceiver {
    private static Logger LOGGER = LoggerFactory.getLogger(RabbitMQOrderReceiver.class);

    @Autowired
    private DmsFeeRabbitMQService dmsFeeRabbitMQService;

    @RabbitHandler
    public void handle(String msg){
        LOGGER.info("receive order message msg:{}",msg);
        String[] temp = msg.split("&");
        if(temp.length != 2){
            LOGGER.warn("处方单超时处理失败： msg:{}",msg);
            return;
        }
        Long id = new Long(temp[0]);
        int type = Integer.parseInt(temp[1]);
        int handleCount = 0;
        if(type == 4){
            handleCount = dmsFeeRabbitMQService.herbalOutOfTime(id);
        }else if(type == 5){
            handleCount = dmsFeeRabbitMQService.medicineOutOfTime(id);
        }else{
            handleCount = dmsFeeRabbitMQService.nonDrugOutOfTime(id);
        }
        System.out.println("处理结果:" + handleCount);
    }

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/SmsRoleService.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;
import com.neu.his.cloud.service.sms.dto.sms.SmsRoleParam;
import com.neu.his.cloud.service.sms.model.SmsPermission;
import com.neu.his.cloud.service.sms.model.SmsRole;


import java.util.List;

/**
 * 角色
 */
public interface SmsRoleService {
    /**
     * 描述：新增角色
     */
    int create(SmsRoleParam smsRoleParam);

    /**
     * 描述：更新角色
     */
    int update(Long id, SmsRoleParam smsRoleParam);

    /**
     * 描述：删除角色
     */
    int delete(List<Long> ids);

    /**
     * 描述：列出所有角色
     */
    List<SmsRole> selectAll();


    /**
     * 描述：查询角色
     */
    List<SmsRole> select(SmsRoleParam smsRoleParam, Integer pageSize, Integer pageNum);


    /**
     * 描述：根据角色Id查询角色的权限
     */
    List<SmsPermission> getPermissionList(Long roleId);

    /**
     * 描述：根据角色ID修改指定角色的权限
     */
    int updatePermission(Long roleId, List<Long> permissionIds);




}


<|start_filename|>HIS-web/src/api/drug.js<|end_filename|>
import request from '@/utils/request'
//获取药品分页列表
export function getdrugList(data) {
  return request({
    url: '/drug/selectDrug',
    method: 'post',
    params: data
  })
}

export function getAlldrug(){
  return request({
    url: '/drug/selectAllDrug',
    method: 'get'
  })
}

export function getAlldosage(){
  return request({
    url: '/drug/selectAllDosage',
    method: 'get'
  })
}

export function updatedrug(data){
  return request({
    url: '/drug/updateDrug/'+data.id,
    method: 'post',
    data
  })
}

export function deletedrug(ids){
  return request({
    url: '/drug/deleteDrug',
    method: 'post',
    params: {ids}
  })
}

export function createdrug(data){
  return request({
    url: '/drug/createDrug',
    method: 'post',
    data
  })
}

export function selectById(data){
  return request({
    url: '/drug/selectById',
    method: 'get',
    params:{
      id:data
    }
  })
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/bms/BmsDailySettlementService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.bms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsDailySettleRecordResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsSettleListItemResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;
import java.util.List;

@FeignClient(value = "his-cloud-service-bms")
public interface BmsDailySettlementService {


    @RequestMapping(value = "/dailySettlement/queryRecentEndDatetime", method = RequestMethod.GET)
    CommonResult queryRecentEndDatetime(@RequestParam("cashierId") Long cashierId);


    @RequestMapping(value = "/dailySettlement/statisticDailySettlement", method = RequestMethod.GET)
    CommonResult<BmsDailySettleRecordResult>  statisticDailySettlement(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime);


    @RequestMapping(value = "/dailySettlement/listDailySettleListRecord", method = RequestMethod.GET)
    CommonResult<List<BmsSettleListItemResult>>  listDailySettleListRecord(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime);


    @RequestMapping(value = "/dailySettlement/querySettleDetailById", method = RequestMethod.GET)
    CommonResult<BmsDailySettleRecordResult>  querySettleDetailById(@RequestParam("id") Long id);


    @RequestMapping(value = "/dailySettlement/dailySettle", method = RequestMethod.GET)
    CommonResult dailySettle(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime") String startDatetime, @RequestParam("endDatetime") String endDatetime);


    @RequestMapping(value = "/dailySettlement/verifySettle", method = RequestMethod.GET)
    CommonResult  verifySettle(@RequestParam("verifyOperatorId") Long verifyOperatorId, @RequestParam("settleRecordId") Long settleRecordId);
}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/util/DateUtil.java<|end_filename|>
package com.neu.his.common.util;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
 * 日期工具类
 */
public class DateUtil {
    /**
     * 修改Date类型的时间中毫秒
     */
    public static Date setMilliSecond(Date date,Integer milliSecond) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(Calendar.MILLISECOND,milliSecond);
        return calendar.getTime();
    }
    /**
     * 得到几天前的时间
     */
    public static Date getDateBefore(Date date, int day) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(Calendar.DATE, calendar.get(Calendar.DATE) - day);
        return calendar.getTime();
    }
    /**
     * 计算日期差
     */
    public static Integer getDateSubtraction(Date startDate, Date endDate) {
        Calendar calendar1 = Calendar.getInstance();
        Calendar calendar2 = Calendar.getInstance();
        calendar1.setTime(startDate);
        calendar2.setTime(endDate);
        int start = calendar1.get(Calendar.DATE);
        int end = calendar2.get(Calendar.DATE);
        if (calendar1.get(Calendar.MONTH )== calendar2.get(Calendar.MONTH)){
            return (end - start);
        }
        return  (end - start + calendar1.getActualMaximum(Calendar.DAY_OF_MONTH));

    }
    /**
     * 将Date类型的时间中设置为今天23.59.59
     */
    public static Date getEndOfDate(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(Calendar.HOUR_OF_DAY, 23);
        calendar.set(Calendar.MINUTE, 59);
        calendar.set(Calendar.SECOND, 59);
        return calendar.getTime();
    }

    /**
     * 从Date类型的时间中提取日期部分
     */
    public static Date getDate(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        return calendar.getTime();
    }

    /**
     * 从Date类型的时间中提取时间部分
     * <p>author:赵煜
     */
    public static Date getTime(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(Calendar.YEAR, 1970);
        calendar.set(Calendar.MONTH, 0);
        calendar.set(Calendar.DAY_OF_MONTH, 1);
        return calendar.getTime();
    }

    /**
     * 从Date类型的时间中提取日期串
     * 8位
     * <p>author:赵煜
     */
    public static String getDateStr(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        String year = calendar.get(calendar.YEAR)+"";
        String  month = calendar.get(calendar.MONTH)+1>9 ? calendar.get(calendar.MONTH)+1+"" :"0"+(calendar.get(calendar.MONTH)+1);
        String  day =  calendar.get(calendar.DAY_OF_MONTH)>9 ?  calendar.get(calendar.DAY_OF_MONTH)+"" :"0"+ calendar.get(calendar.DAY_OF_MONTH);
        String dateStr = year+month+day;
        return dateStr;
    }

    /**
     * 从Date类型的时间中提取时间串
     * 6位
     * <p>author:赵煜
     *
     */
    public static String getTimeStr(Date date,int length) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        String hour = calendar.get(calendar.HOUR_OF_DAY)>9?calendar.get(calendar.HOUR_OF_DAY)+"":"0"+calendar.get(calendar.HOUR_OF_DAY);
        String  minute = calendar.get(calendar.MINUTE)>9?calendar.get(calendar.MINUTE)+"":"0"+calendar.get(calendar.MINUTE);
        String  second =  calendar.get(calendar.SECOND)>9?calendar.get(calendar.SECOND)+"":"0"+calendar.get(calendar.SECOND);
        String timeStr = hour+minute+second;

        //长度大于串的长度，则默认返回整个串
        return timeStr.substring(0,length>timeStr.length()?timeStr.length():length);
    }


    public static void main(String[] args) {
        //System.out.println( getTimeStr(new Date(),100));
        List<Integer> integers = new ArrayList<>(3);
        for (int i = 0 ;i<3;i++){
            integers.add(i);
        }
        integers.set(0,100);
        integers.set(1,null);
        System.out.println(integers.get(0));
        System.out.println(integers.get(1) == null);
        System.out.println(getDateSubtraction(DateUtil.getDateBefore(new Date(),7),new Date()));
    }


}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/model/DmsNonDrugItemRecordExample.java<|end_filename|>
package com.neu.his.cloud.service.pms.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DmsNonDrugItemRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsNonDrugItemRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNull() {
            addCriterion("registration_id is null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIsNotNull() {
            addCriterion("registration_id is not null");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdEqualTo(Long value) {
            addCriterion("registration_id =", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotEqualTo(Long value) {
            addCriterion("registration_id <>", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThan(Long value) {
            addCriterion("registration_id >", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdGreaterThanOrEqualTo(Long value) {
            addCriterion("registration_id >=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThan(Long value) {
            addCriterion("registration_id <", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdLessThanOrEqualTo(Long value) {
            addCriterion("registration_id <=", value, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdIn(List<Long> values) {
            addCriterion("registration_id in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotIn(List<Long> values) {
            addCriterion("registration_id not in", values, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdBetween(Long value1, Long value2) {
            addCriterion("registration_id between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andRegistrationIdNotBetween(Long value1, Long value2) {
            addCriterion("registration_id not between", value1, value2, "registrationId");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andAimIsNull() {
            addCriterion("aim is null");
            return (Criteria) this;
        }

        public Criteria andAimIsNotNull() {
            addCriterion("aim is not null");
            return (Criteria) this;
        }

        public Criteria andAimEqualTo(String value) {
            addCriterion("aim =", value, "aim");
            return (Criteria) this;
        }

        public Criteria andAimNotEqualTo(String value) {
            addCriterion("aim <>", value, "aim");
            return (Criteria) this;
        }

        public Criteria andAimGreaterThan(String value) {
            addCriterion("aim >", value, "aim");
            return (Criteria) this;
        }

        public Criteria andAimGreaterThanOrEqualTo(String value) {
            addCriterion("aim >=", value, "aim");
            return (Criteria) this;
        }

        public Criteria andAimLessThan(String value) {
            addCriterion("aim <", value, "aim");
            return (Criteria) this;
        }

        public Criteria andAimLessThanOrEqualTo(String value) {
            addCriterion("aim <=", value, "aim");
            return (Criteria) this;
        }

        public Criteria andAimLike(String value) {
            addCriterion("aim like", value, "aim");
            return (Criteria) this;
        }

        public Criteria andAimNotLike(String value) {
            addCriterion("aim not like", value, "aim");
            return (Criteria) this;
        }

        public Criteria andAimIn(List<String> values) {
            addCriterion("aim in", values, "aim");
            return (Criteria) this;
        }

        public Criteria andAimNotIn(List<String> values) {
            addCriterion("aim not in", values, "aim");
            return (Criteria) this;
        }

        public Criteria andAimBetween(String value1, String value2) {
            addCriterion("aim between", value1, value2, "aim");
            return (Criteria) this;
        }

        public Criteria andAimNotBetween(String value1, String value2) {
            addCriterion("aim not between", value1, value2, "aim");
            return (Criteria) this;
        }

        public Criteria andDemandIsNull() {
            addCriterion("demand is null");
            return (Criteria) this;
        }

        public Criteria andDemandIsNotNull() {
            addCriterion("demand is not null");
            return (Criteria) this;
        }

        public Criteria andDemandEqualTo(String value) {
            addCriterion("demand =", value, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandNotEqualTo(String value) {
            addCriterion("demand <>", value, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandGreaterThan(String value) {
            addCriterion("demand >", value, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandGreaterThanOrEqualTo(String value) {
            addCriterion("demand >=", value, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandLessThan(String value) {
            addCriterion("demand <", value, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandLessThanOrEqualTo(String value) {
            addCriterion("demand <=", value, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandLike(String value) {
            addCriterion("demand like", value, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandNotLike(String value) {
            addCriterion("demand not like", value, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandIn(List<String> values) {
            addCriterion("demand in", values, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandNotIn(List<String> values) {
            addCriterion("demand not in", values, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandBetween(String value1, String value2) {
            addCriterion("demand between", value1, value2, "demand");
            return (Criteria) this;
        }

        public Criteria andDemandNotBetween(String value1, String value2) {
            addCriterion("demand not between", value1, value2, "demand");
            return (Criteria) this;
        }

        public Criteria andLogStatusIsNull() {
            addCriterion("log_status is null");
            return (Criteria) this;
        }

        public Criteria andLogStatusIsNotNull() {
            addCriterion("log_status is not null");
            return (Criteria) this;
        }

        public Criteria andLogStatusEqualTo(Integer value) {
            addCriterion("log_status =", value, "logStatus");
            return (Criteria) this;
        }

        public Criteria andLogStatusNotEqualTo(Integer value) {
            addCriterion("log_status <>", value, "logStatus");
            return (Criteria) this;
        }

        public Criteria andLogStatusGreaterThan(Integer value) {
            addCriterion("log_status >", value, "logStatus");
            return (Criteria) this;
        }

        public Criteria andLogStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("log_status >=", value, "logStatus");
            return (Criteria) this;
        }

        public Criteria andLogStatusLessThan(Integer value) {
            addCriterion("log_status <", value, "logStatus");
            return (Criteria) this;
        }

        public Criteria andLogStatusLessThanOrEqualTo(Integer value) {
            addCriterion("log_status <=", value, "logStatus");
            return (Criteria) this;
        }

        public Criteria andLogStatusIn(List<Integer> values) {
            addCriterion("log_status in", values, "logStatus");
            return (Criteria) this;
        }

        public Criteria andLogStatusNotIn(List<Integer> values) {
            addCriterion("log_status not in", values, "logStatus");
            return (Criteria) this;
        }

        public Criteria andLogStatusBetween(Integer value1, Integer value2) {
            addCriterion("log_status between", value1, value2, "logStatus");
            return (Criteria) this;
        }

        public Criteria andLogStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("log_status not between", value1, value2, "logStatus");
            return (Criteria) this;
        }

        public Criteria andCheckResultIsNull() {
            addCriterion("check_result is null");
            return (Criteria) this;
        }

        public Criteria andCheckResultIsNotNull() {
            addCriterion("check_result is not null");
            return (Criteria) this;
        }

        public Criteria andCheckResultEqualTo(String value) {
            addCriterion("check_result =", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultNotEqualTo(String value) {
            addCriterion("check_result <>", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultGreaterThan(String value) {
            addCriterion("check_result >", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultGreaterThanOrEqualTo(String value) {
            addCriterion("check_result >=", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultLessThan(String value) {
            addCriterion("check_result <", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultLessThanOrEqualTo(String value) {
            addCriterion("check_result <=", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultLike(String value) {
            addCriterion("check_result like", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultNotLike(String value) {
            addCriterion("check_result not like", value, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultIn(List<String> values) {
            addCriterion("check_result in", values, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultNotIn(List<String> values) {
            addCriterion("check_result not in", values, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultBetween(String value1, String value2) {
            addCriterion("check_result between", value1, value2, "checkResult");
            return (Criteria) this;
        }

        public Criteria andCheckResultNotBetween(String value1, String value2) {
            addCriterion("check_result not between", value1, value2, "checkResult");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListIsNull() {
            addCriterion("result_img_url_list is null");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListIsNotNull() {
            addCriterion("result_img_url_list is not null");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListEqualTo(String value) {
            addCriterion("result_img_url_list =", value, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListNotEqualTo(String value) {
            addCriterion("result_img_url_list <>", value, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListGreaterThan(String value) {
            addCriterion("result_img_url_list >", value, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListGreaterThanOrEqualTo(String value) {
            addCriterion("result_img_url_list >=", value, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListLessThan(String value) {
            addCriterion("result_img_url_list <", value, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListLessThanOrEqualTo(String value) {
            addCriterion("result_img_url_list <=", value, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListLike(String value) {
            addCriterion("result_img_url_list like", value, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListNotLike(String value) {
            addCriterion("result_img_url_list not like", value, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListIn(List<String> values) {
            addCriterion("result_img_url_list in", values, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListNotIn(List<String> values) {
            addCriterion("result_img_url_list not in", values, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListBetween(String value1, String value2) {
            addCriterion("result_img_url_list between", value1, value2, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andResultImgUrlListNotBetween(String value1, String value2) {
            addCriterion("result_img_url_list not between", value1, value2, "resultImgUrlList");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionIsNull() {
            addCriterion("clinical_impression is null");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionIsNotNull() {
            addCriterion("clinical_impression is not null");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionEqualTo(String value) {
            addCriterion("clinical_impression =", value, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionNotEqualTo(String value) {
            addCriterion("clinical_impression <>", value, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionGreaterThan(String value) {
            addCriterion("clinical_impression >", value, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionGreaterThanOrEqualTo(String value) {
            addCriterion("clinical_impression >=", value, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionLessThan(String value) {
            addCriterion("clinical_impression <", value, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionLessThanOrEqualTo(String value) {
            addCriterion("clinical_impression <=", value, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionLike(String value) {
            addCriterion("clinical_impression like", value, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionNotLike(String value) {
            addCriterion("clinical_impression not like", value, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionIn(List<String> values) {
            addCriterion("clinical_impression in", values, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionNotIn(List<String> values) {
            addCriterion("clinical_impression not in", values, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionBetween(String value1, String value2) {
            addCriterion("clinical_impression between", value1, value2, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalImpressionNotBetween(String value1, String value2) {
            addCriterion("clinical_impression not between", value1, value2, "clinicalImpression");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisIsNull() {
            addCriterion("clinical_diagnosis is null");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisIsNotNull() {
            addCriterion("clinical_diagnosis is not null");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisEqualTo(String value) {
            addCriterion("clinical_diagnosis =", value, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisNotEqualTo(String value) {
            addCriterion("clinical_diagnosis <>", value, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisGreaterThan(String value) {
            addCriterion("clinical_diagnosis >", value, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisGreaterThanOrEqualTo(String value) {
            addCriterion("clinical_diagnosis >=", value, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisLessThan(String value) {
            addCriterion("clinical_diagnosis <", value, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisLessThanOrEqualTo(String value) {
            addCriterion("clinical_diagnosis <=", value, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisLike(String value) {
            addCriterion("clinical_diagnosis like", value, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisNotLike(String value) {
            addCriterion("clinical_diagnosis not like", value, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisIn(List<String> values) {
            addCriterion("clinical_diagnosis in", values, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisNotIn(List<String> values) {
            addCriterion("clinical_diagnosis not in", values, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisBetween(String value1, String value2) {
            addCriterion("clinical_diagnosis between", value1, value2, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andClinicalDiagnosisNotBetween(String value1, String value2) {
            addCriterion("clinical_diagnosis not between", value1, value2, "clinicalDiagnosis");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdIsNull() {
            addCriterion("excute_staff_id is null");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdIsNotNull() {
            addCriterion("excute_staff_id is not null");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdEqualTo(Long value) {
            addCriterion("excute_staff_id =", value, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdNotEqualTo(Long value) {
            addCriterion("excute_staff_id <>", value, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdGreaterThan(Long value) {
            addCriterion("excute_staff_id >", value, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdGreaterThanOrEqualTo(Long value) {
            addCriterion("excute_staff_id >=", value, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdLessThan(Long value) {
            addCriterion("excute_staff_id <", value, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdLessThanOrEqualTo(Long value) {
            addCriterion("excute_staff_id <=", value, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdIn(List<Long> values) {
            addCriterion("excute_staff_id in", values, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdNotIn(List<Long> values) {
            addCriterion("excute_staff_id not in", values, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdBetween(Long value1, Long value2) {
            addCriterion("excute_staff_id between", value1, value2, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteStaffIdNotBetween(Long value1, Long value2) {
            addCriterion("excute_staff_id not between", value1, value2, "excuteStaffId");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeIsNull() {
            addCriterion("log_datetime is null");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeIsNotNull() {
            addCriterion("log_datetime is not null");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeEqualTo(Date value) {
            addCriterion("log_datetime =", value, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeNotEqualTo(Date value) {
            addCriterion("log_datetime <>", value, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeGreaterThan(Date value) {
            addCriterion("log_datetime >", value, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("log_datetime >=", value, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeLessThan(Date value) {
            addCriterion("log_datetime <", value, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeLessThanOrEqualTo(Date value) {
            addCriterion("log_datetime <=", value, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeIn(List<Date> values) {
            addCriterion("log_datetime in", values, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeNotIn(List<Date> values) {
            addCriterion("log_datetime not in", values, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeBetween(Date value1, Date value2) {
            addCriterion("log_datetime between", value1, value2, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andLogDatetimeNotBetween(Date value1, Date value2) {
            addCriterion("log_datetime not between", value1, value2, "logDatetime");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdIsNull() {
            addCriterion("no_drug_id is null");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdIsNotNull() {
            addCriterion("no_drug_id is not null");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdEqualTo(Long value) {
            addCriterion("no_drug_id =", value, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdNotEqualTo(Long value) {
            addCriterion("no_drug_id <>", value, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdGreaterThan(Long value) {
            addCriterion("no_drug_id >", value, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdGreaterThanOrEqualTo(Long value) {
            addCriterion("no_drug_id >=", value, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdLessThan(Long value) {
            addCriterion("no_drug_id <", value, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdLessThanOrEqualTo(Long value) {
            addCriterion("no_drug_id <=", value, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdIn(List<Long> values) {
            addCriterion("no_drug_id in", values, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdNotIn(List<Long> values) {
            addCriterion("no_drug_id not in", values, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdBetween(Long value1, Long value2) {
            addCriterion("no_drug_id between", value1, value2, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andNoDrugIdNotBetween(Long value1, Long value2) {
            addCriterion("no_drug_id not between", value1, value2, "noDrugId");
            return (Criteria) this;
        }

        public Criteria andCheckPartsIsNull() {
            addCriterion("check_parts is null");
            return (Criteria) this;
        }

        public Criteria andCheckPartsIsNotNull() {
            addCriterion("check_parts is not null");
            return (Criteria) this;
        }

        public Criteria andCheckPartsEqualTo(String value) {
            addCriterion("check_parts =", value, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsNotEqualTo(String value) {
            addCriterion("check_parts <>", value, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsGreaterThan(String value) {
            addCriterion("check_parts >", value, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsGreaterThanOrEqualTo(String value) {
            addCriterion("check_parts >=", value, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsLessThan(String value) {
            addCriterion("check_parts <", value, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsLessThanOrEqualTo(String value) {
            addCriterion("check_parts <=", value, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsLike(String value) {
            addCriterion("check_parts like", value, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsNotLike(String value) {
            addCriterion("check_parts not like", value, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsIn(List<String> values) {
            addCriterion("check_parts in", values, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsNotIn(List<String> values) {
            addCriterion("check_parts not in", values, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsBetween(String value1, String value2) {
            addCriterion("check_parts between", value1, value2, "checkParts");
            return (Criteria) this;
        }

        public Criteria andCheckPartsNotBetween(String value1, String value2) {
            addCriterion("check_parts not between", value1, value2, "checkParts");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(Integer value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(Integer value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(Integer value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(Integer value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(Integer value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<Integer> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<Integer> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(Integer value1, Integer value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdIsNull() {
            addCriterion("excute_dept_id is null");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdIsNotNull() {
            addCriterion("excute_dept_id is not null");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdEqualTo(Long value) {
            addCriterion("excute_dept_id =", value, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdNotEqualTo(Long value) {
            addCriterion("excute_dept_id <>", value, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdGreaterThan(Long value) {
            addCriterion("excute_dept_id >", value, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdGreaterThanOrEqualTo(Long value) {
            addCriterion("excute_dept_id >=", value, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdLessThan(Long value) {
            addCriterion("excute_dept_id <", value, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdLessThanOrEqualTo(Long value) {
            addCriterion("excute_dept_id <=", value, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdIn(List<Long> values) {
            addCriterion("excute_dept_id in", values, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdNotIn(List<Long> values) {
            addCriterion("excute_dept_id not in", values, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdBetween(Long value1, Long value2) {
            addCriterion("excute_dept_id between", value1, value2, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andExcuteDeptIdNotBetween(Long value1, Long value2) {
            addCriterion("excute_dept_id not between", value1, value2, "excuteDeptId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdIsNull() {
            addCriterion("create_staff_id is null");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdIsNotNull() {
            addCriterion("create_staff_id is not null");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdEqualTo(Long value) {
            addCriterion("create_staff_id =", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdNotEqualTo(Long value) {
            addCriterion("create_staff_id <>", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdGreaterThan(Long value) {
            addCriterion("create_staff_id >", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdGreaterThanOrEqualTo(Long value) {
            addCriterion("create_staff_id >=", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdLessThan(Long value) {
            addCriterion("create_staff_id <", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdLessThanOrEqualTo(Long value) {
            addCriterion("create_staff_id <=", value, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdIn(List<Long> values) {
            addCriterion("create_staff_id in", values, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdNotIn(List<Long> values) {
            addCriterion("create_staff_id not in", values, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdBetween(Long value1, Long value2) {
            addCriterion("create_staff_id between", value1, value2, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andCreateStaffIdNotBetween(Long value1, Long value2) {
            addCriterion("create_staff_id not between", value1, value2, "createStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdIsNull() {
            addCriterion("log_staff_id is null");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdIsNotNull() {
            addCriterion("log_staff_id is not null");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdEqualTo(Long value) {
            addCriterion("log_staff_id =", value, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdNotEqualTo(Long value) {
            addCriterion("log_staff_id <>", value, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdGreaterThan(Long value) {
            addCriterion("log_staff_id >", value, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdGreaterThanOrEqualTo(Long value) {
            addCriterion("log_staff_id >=", value, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdLessThan(Long value) {
            addCriterion("log_staff_id <", value, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdLessThanOrEqualTo(Long value) {
            addCriterion("log_staff_id <=", value, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdIn(List<Long> values) {
            addCriterion("log_staff_id in", values, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdNotIn(List<Long> values) {
            addCriterion("log_staff_id not in", values, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdBetween(Long value1, Long value2) {
            addCriterion("log_staff_id between", value1, value2, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andLogStaffIdNotBetween(Long value1, Long value2) {
            addCriterion("log_staff_id not between", value1, value2, "logStaffId");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeIsNull() {
            addCriterion("excute_time is null");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeIsNotNull() {
            addCriterion("excute_time is not null");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeEqualTo(Date value) {
            addCriterion("excute_time =", value, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeNotEqualTo(Date value) {
            addCriterion("excute_time <>", value, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeGreaterThan(Date value) {
            addCriterion("excute_time >", value, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("excute_time >=", value, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeLessThan(Date value) {
            addCriterion("excute_time <", value, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeLessThanOrEqualTo(Date value) {
            addCriterion("excute_time <=", value, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeIn(List<Date> values) {
            addCriterion("excute_time in", values, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeNotIn(List<Date> values) {
            addCriterion("excute_time not in", values, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeBetween(Date value1, Date value2) {
            addCriterion("excute_time between", value1, value2, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andExcuteTimeNotBetween(Date value1, Date value2) {
            addCriterion("excute_time not between", value1, value2, "excuteTime");
            return (Criteria) this;
        }

        public Criteria andAmountIsNull() {
            addCriterion("amount is null");
            return (Criteria) this;
        }

        public Criteria andAmountIsNotNull() {
            addCriterion("amount is not null");
            return (Criteria) this;
        }

        public Criteria andAmountEqualTo(BigDecimal value) {
            addCriterion("amount =", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotEqualTo(BigDecimal value) {
            addCriterion("amount <>", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThan(BigDecimal value) {
            addCriterion("amount >", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("amount >=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThan(BigDecimal value) {
            addCriterion("amount <", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("amount <=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountIn(List<BigDecimal> values) {
            addCriterion("amount in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotIn(List<BigDecimal> values) {
            addCriterion("amount not in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount not between", value1, value2, "amount");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>HIS-web/src/api/outpatient/dmscase.js<|end_filename|>
import request from '@/utils/request'
export function submitPriliminaryDise(data) {
  return request({
    url: '/caseHistory/submitPriliminaryDise',
    method: 'post',
    params: {
      chiefComplaint:data.chiefComplaint,//主述
      historyOfPresentIllness:data.historyOfPresentIllness,//现病史
      historyOfTreatment:data.historyOfTreatment,//现治疗情况
      pastHistory:data.pastHistory,//既往史
      allergies:data.allergies,//过敏史
      healthCheckup:data.healthCheckup,//体格检查
      registrationId:data.registrationId,//
      priliminaryDiseStrList:data.priliminaryDiseStrList,
      priliminaryDiseIdList:data.priliminaryDiseIdList,
      startDate:data.startDate,
      name:data.name,
      gender:data.gender,
      ageStr:data.ageStr
    }
  })
}


export function submitdefinite(data) {
  return request({
    url: '/caseHistory/submitDefiniteDise',
    method: 'post',
    params:data
  })
}
//诊毕
export function endDiagnosis(data) {
  return request({
    url: '/caseHistory/endDiagnosis',
    method: 'post',
    params:{
      registrationId:data
    }
  })
}
//根据挂号id获取已结束就诊的历史病历
export function selectEndCaseHistoryByReg(data) {
  return request({
    url: '/caseHistory/selectEndCaseHistoryByReg/'+data,
    method: 'get'
  })
}

//
export function getnonend(data) {
  return request({
    url: '/caseHistory/selectNotEndCaseHistoryByReg/'+data,
    method: 'get',
    params:{
      registrationId:data
    }
  })
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/DmsNonDrugItemRecordServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;

import com.neu.his.common.dto.app.AppCheckTestResult;
import com.neu.his.common.dto.dms.DmsNonDrugItemRecordListParam;
import com.neu.his.common.dto.dms.DmsNonDrugItemRecordParam;
import com.neu.his.common.dto.dms.DmsNonDrugItemRecordResult;
import com.neu.his.common.util.DateUtil;
import com.neu.his.dms.service.DmsNonDrugItemRecordService;
import com.neu.his.mbg.mapper.DmsNonDrugItemRecordMapper;
import com.neu.his.mbg.mapper.SmsDeptMapper;
import com.neu.his.mbg.mapper.SmsStaffMapper;
import com.neu.his.mbg.model.DmsNonDrugItemRecord;
import com.neu.his.mbg.model.DmsNonDrugItemRecordExample;
import com.neu.his.mbg.model.SmsDept;
import com.neu.his.mbg.model.SmsStaff;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@Service
public class DmsNonDrugItemRecordServiceImpl implements DmsNonDrugItemRecordService {
    @Autowired
    DmsNonDrugItemRecordMapper dmsNonDrugItemRecordMapper;
    @Autowired
    SmsDeptMapper smsDeptMapper;
    @Autowired
    SmsStaffMapper smsStaffMapper;

    //1.封装多条dms_non_drug_item_record信息并插入
    @Override
    public List<Long> apply(DmsNonDrugItemRecordListParam dmsNonDrugItemRecordListParam) {
        Date startDate = new Date();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(startDate);
        calendar.add(Calendar.SECOND, -1);  //设置时间减一秒
        startDate = calendar.getTime();
        if (dmsNonDrugItemRecordListParam == null){
            return null;
        }
        List<Long> idList = new ArrayList<>();
        List<DmsNonDrugItemRecordParam> dmsNonDrugItemRecordParamList = dmsNonDrugItemRecordListParam.getDmsNonDrugItemRecordParamList();
        Date date = DateUtil.setMilliSecond(new Date(),0);

        for (DmsNonDrugItemRecordParam dmsNonDrugItemRecordParam:dmsNonDrugItemRecordParamList) {
            DmsNonDrugItemRecord dmsNonDrugItemRecord = new DmsNonDrugItemRecord();

            BeanUtils.copyProperties(dmsNonDrugItemRecordParam,dmsNonDrugItemRecord);

            dmsNonDrugItemRecord.setRegistrationId(dmsNonDrugItemRecordListParam.getRegistrationId());
            dmsNonDrugItemRecord.setCreateStaffId(dmsNonDrugItemRecordListParam.getCreateStaffId());
            dmsNonDrugItemRecord.setType(dmsNonDrugItemRecordListParam.getType());
            dmsNonDrugItemRecord.setStatus(1);
            dmsNonDrugItemRecord.setCreateTime(date);
            dmsNonDrugItemRecordMapper.insertSelective(dmsNonDrugItemRecord);
        }
        Date endDate = new Date();
        calendar.setTime(endDate);
        calendar.add(Calendar.SECOND, 1);   //设置时间加一秒
        endDate = calendar.getTime();

        //获取刚才插入的所有非药品项id
        DmsNonDrugItemRecordExample recordExample = new DmsNonDrugItemRecordExample();
        recordExample.createCriteria().andCreateStaffIdEqualTo(dmsNonDrugItemRecordListParam.getCreateStaffId())
                .andCreateTimeBetween(startDate,endDate);
        List<DmsNonDrugItemRecord> recordList = dmsNonDrugItemRecordMapper.selectByExample(recordExample);
        for(DmsNonDrugItemRecord record : recordList){
            idList.add(record.getId());
        }

        return idList;
    }
    //1.如果status为1,则修改为0
    @Override
    public int invalid(List<Long> ids) {
        if (ids.isEmpty()){
            return 0;
        }
        DmsNonDrugItemRecordExample dmsNonDrugItemRecordExample = new DmsNonDrugItemRecordExample();
        DmsNonDrugItemRecord dmsNonDrugItemRecord = new DmsNonDrugItemRecord();
        dmsNonDrugItemRecord.setStatus(0);
        for (Long id:ids) {
            dmsNonDrugItemRecordExample.clear();
            dmsNonDrugItemRecordExample.createCriteria().andStatusEqualTo(1).andIdEqualTo(id);
            dmsNonDrugItemRecordMapper.updateByExampleSelective(dmsNonDrugItemRecord,dmsNonDrugItemRecordExample);
        }
        return 1;
    }

    /**
     * 描述：刷新项目
     * <p>author:王思阳
     * <p>author:赵煜 解决封装参数不完全的bug
     */
    //1.封装非药品记录
    //自己找这几个属性excuteDeptName/excuteStaffName/createStaffName/logStaffName
    @Override
    public List<DmsNonDrugItemRecordResult> listByRegAndType(Long registrationId, Integer type) {
        DmsNonDrugItemRecordExample dmsNonDrugItemRecordExample = new DmsNonDrugItemRecordExample();
        dmsNonDrugItemRecordExample.createCriteria().andRegistrationIdEqualTo(registrationId).andTypeEqualTo(type);
        List<DmsNonDrugItemRecord> dmsNonDrugItemRecordList = dmsNonDrugItemRecordMapper.selectByExample(dmsNonDrugItemRecordExample);

        List<DmsNonDrugItemRecordResult> dmsNonDrugItemRecordResultList = new ArrayList<>();



        for (DmsNonDrugItemRecord dmsNonDrugItemRecord:dmsNonDrugItemRecordList) {
            DmsNonDrugItemRecordResult dmsNonDrugItemRecordResult = new DmsNonDrugItemRecordResult();
            dmsNonDrugItemRecordResult.setId(dmsNonDrugItemRecord.getId());
            dmsNonDrugItemRecordResult.setAim(dmsNonDrugItemRecord.getAim());
          //  System.out.println("Aim: "+dmsNonDrugItemRecordResult.getAim());
            dmsNonDrugItemRecordResult.setDemand(dmsNonDrugItemRecord.getDemand());
            dmsNonDrugItemRecordResult.setClinicalImpression(dmsNonDrugItemRecord.getClinicalImpression());
            dmsNonDrugItemRecordResult.setClinicalDiagnosis(dmsNonDrugItemRecord.getClinicalDiagnosis());
            dmsNonDrugItemRecordResult.setNoDrugId(dmsNonDrugItemRecord.getNoDrugId());
            dmsNonDrugItemRecordResult.setCheckParts(dmsNonDrugItemRecord.getCheckParts());
            dmsNonDrugItemRecordResult.setExcuteDeptId(dmsNonDrugItemRecord.getExcuteDeptId());
            //excuteDeptName
            if (dmsNonDrugItemRecord.getExcuteDeptId() != null){
                SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(dmsNonDrugItemRecord.getExcuteDeptId());
                dmsNonDrugItemRecordResult.setExcuteDeptName(smsDept.getName());
            }
            dmsNonDrugItemRecordResult.setStatus(dmsNonDrugItemRecord.getStatus());
            dmsNonDrugItemRecordResult.setType(dmsNonDrugItemRecord.getType());
            dmsNonDrugItemRecordResult.setCheckResult(dmsNonDrugItemRecord.getCheckResult());
            dmsNonDrugItemRecordResult.setResultImgUrlList(dmsNonDrugItemRecord.getResultImgUrlList());
            dmsNonDrugItemRecordResult.setCreateTime(dmsNonDrugItemRecord.getCreateTime());
            //excuteStaffName
            if (dmsNonDrugItemRecord.getExcuteStaffId() !=  null){
                SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(dmsNonDrugItemRecord.getExcuteStaffId());
                dmsNonDrugItemRecordResult.setExcuteStaffName(smsStaff.getName());
            }

            //createStaffName
            if (dmsNonDrugItemRecord.getCreateStaffId() != null){
                SmsStaff smsStaff1 = smsStaffMapper.selectByPrimaryKey(dmsNonDrugItemRecord.getCreateStaffId());
                dmsNonDrugItemRecordResult.setCreateStaffName(smsStaff1.getName());
            }

            //logStaffName
            if (dmsNonDrugItemRecord.getLogStaffId() != null){
                SmsStaff smsStaff2 = smsStaffMapper.selectByPrimaryKey(dmsNonDrugItemRecord.getLogStaffId());
                dmsNonDrugItemRecordResult.setLogStaffName(smsStaff2.getName());
            }
            dmsNonDrugItemRecordResultList.add(dmsNonDrugItemRecordResult);
        }
        return dmsNonDrugItemRecordResultList;
    }

    @Override
    public AppCheckTestResult appGetResult(Long id){
        AppCheckTestResult result = new AppCheckTestResult();
        DmsNonDrugItemRecord record = dmsNonDrugItemRecordMapper.selectByPrimaryKey(id);
        if(record == null){
            return result;
        }
        result.setCheckParts(record.getCheckParts());
        result.setCheckResult(record.getCheckResult());
        result.setResultImgUrlList(record.getResultImgUrlList());

        return result;
    }

}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/service/sms/SmsDeptService.java<|end_filename|>
package com.neu.his.cloud.api.app.service.sms;

import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.sms.SmsDeptResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient(value = "his-cloud-service-sms")
public interface SmsDeptService {



    @RequestMapping(value = "/dept/selectAll", method = RequestMethod.GET)
    CommonResult<List<SmsDeptResult>> listAll();

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsDiseCatalogService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsDiseCatalogParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsDiseCatalogResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsDiseCatalogService {


    @RequestMapping(value = "/DmsDiseCatalog/create", method = RequestMethod.POST)
    CommonResult create(@RequestBody DmsDiseCatalogParam dmsDiseCatalogParam);

    @RequestMapping(value = "/DmsDiseCatalog/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);

    @RequestMapping(value = "/DmsDiseCatalog/update/{id}", method = RequestMethod.POST)
    CommonResult update(@PathVariable Long id, @RequestBody DmsDiseCatalogParam dmsDiseCatalogParam );

    @RequestMapping(value = "/DmsDiseCatalog/listAll", method = RequestMethod.POST)
    CommonResult<List<DmsDiseCatalogResult>> listAll();

}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/model/BmsInvoiceItemList.java<|end_filename|>
package com.neu.his.cloud.service.bms.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

@Setter
@Getter
@ToString
public class BmsInvoiceItemList {
    Long id;

    Integer type;

    BigDecimal amount;

    public BmsInvoiceItemList(Long id, Integer type) {
        this.id = id;
        this.type = type;
    }

    public BmsInvoiceItemList(Long id, Integer type, BigDecimal amount) {
        this.id = id;
        this.type = type;
        this.amount = amount;
    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/model/DmsRegistrationExample.java<|end_filename|>
package com.neu.his.cloud.api.pc.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DmsRegistrationExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsRegistrationExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andPatientIdIsNull() {
            addCriterion("patient_id is null");
            return (Criteria) this;
        }

        public Criteria andPatientIdIsNotNull() {
            addCriterion("patient_id is not null");
            return (Criteria) this;
        }

        public Criteria andPatientIdEqualTo(Long value) {
            addCriterion("patient_id =", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdNotEqualTo(Long value) {
            addCriterion("patient_id <>", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdGreaterThan(Long value) {
            addCriterion("patient_id >", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdGreaterThanOrEqualTo(Long value) {
            addCriterion("patient_id >=", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdLessThan(Long value) {
            addCriterion("patient_id <", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdLessThanOrEqualTo(Long value) {
            addCriterion("patient_id <=", value, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdIn(List<Long> values) {
            addCriterion("patient_id in", values, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdNotIn(List<Long> values) {
            addCriterion("patient_id not in", values, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdBetween(Long value1, Long value2) {
            addCriterion("patient_id between", value1, value2, "patientId");
            return (Criteria) this;
        }

        public Criteria andPatientIdNotBetween(Long value1, Long value2) {
            addCriterion("patient_id not between", value1, value2, "patientId");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceIsNull() {
            addCriterion("end_attendance is null");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceIsNotNull() {
            addCriterion("end_attendance is not null");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceEqualTo(Integer value) {
            addCriterion("end_attendance =", value, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceNotEqualTo(Integer value) {
            addCriterion("end_attendance <>", value, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceGreaterThan(Integer value) {
            addCriterion("end_attendance >", value, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceGreaterThanOrEqualTo(Integer value) {
            addCriterion("end_attendance >=", value, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceLessThan(Integer value) {
            addCriterion("end_attendance <", value, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceLessThanOrEqualTo(Integer value) {
            addCriterion("end_attendance <=", value, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceIn(List<Integer> values) {
            addCriterion("end_attendance in", values, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceNotIn(List<Integer> values) {
            addCriterion("end_attendance not in", values, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceBetween(Integer value1, Integer value2) {
            addCriterion("end_attendance between", value1, value2, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andEndAttendanceNotBetween(Integer value1, Integer value2) {
            addCriterion("end_attendance not between", value1, value2, "endAttendance");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andSkdIdIsNull() {
            addCriterion("skd_id is null");
            return (Criteria) this;
        }

        public Criteria andSkdIdIsNotNull() {
            addCriterion("skd_id is not null");
            return (Criteria) this;
        }

        public Criteria andSkdIdEqualTo(Long value) {
            addCriterion("skd_id =", value, "skdId");
            return (Criteria) this;
        }

        public Criteria andSkdIdNotEqualTo(Long value) {
            addCriterion("skd_id <>", value, "skdId");
            return (Criteria) this;
        }

        public Criteria andSkdIdGreaterThan(Long value) {
            addCriterion("skd_id >", value, "skdId");
            return (Criteria) this;
        }

        public Criteria andSkdIdGreaterThanOrEqualTo(Long value) {
            addCriterion("skd_id >=", value, "skdId");
            return (Criteria) this;
        }

        public Criteria andSkdIdLessThan(Long value) {
            addCriterion("skd_id <", value, "skdId");
            return (Criteria) this;
        }

        public Criteria andSkdIdLessThanOrEqualTo(Long value) {
            addCriterion("skd_id <=", value, "skdId");
            return (Criteria) this;
        }

        public Criteria andSkdIdIn(List<Long> values) {
            addCriterion("skd_id in", values, "skdId");
            return (Criteria) this;
        }

        public Criteria andSkdIdNotIn(List<Long> values) {
            addCriterion("skd_id not in", values, "skdId");
            return (Criteria) this;
        }

        public Criteria andSkdIdBetween(Long value1, Long value2) {
            addCriterion("skd_id between", value1, value2, "skdId");
            return (Criteria) this;
        }

        public Criteria andSkdIdNotBetween(Long value1, Long value2) {
            addCriterion("skd_id not between", value1, value2, "skdId");
            return (Criteria) this;
        }

        public Criteria andNeedBookIsNull() {
            addCriterion("need_book is null");
            return (Criteria) this;
        }

        public Criteria andNeedBookIsNotNull() {
            addCriterion("need_book is not null");
            return (Criteria) this;
        }

        public Criteria andNeedBookEqualTo(Integer value) {
            addCriterion("need_book =", value, "needBook");
            return (Criteria) this;
        }

        public Criteria andNeedBookNotEqualTo(Integer value) {
            addCriterion("need_book <>", value, "needBook");
            return (Criteria) this;
        }

        public Criteria andNeedBookGreaterThan(Integer value) {
            addCriterion("need_book >", value, "needBook");
            return (Criteria) this;
        }

        public Criteria andNeedBookGreaterThanOrEqualTo(Integer value) {
            addCriterion("need_book >=", value, "needBook");
            return (Criteria) this;
        }

        public Criteria andNeedBookLessThan(Integer value) {
            addCriterion("need_book <", value, "needBook");
            return (Criteria) this;
        }

        public Criteria andNeedBookLessThanOrEqualTo(Integer value) {
            addCriterion("need_book <=", value, "needBook");
            return (Criteria) this;
        }

        public Criteria andNeedBookIn(List<Integer> values) {
            addCriterion("need_book in", values, "needBook");
            return (Criteria) this;
        }

        public Criteria andNeedBookNotIn(List<Integer> values) {
            addCriterion("need_book not in", values, "needBook");
            return (Criteria) this;
        }

        public Criteria andNeedBookBetween(Integer value1, Integer value2) {
            addCriterion("need_book between", value1, value2, "needBook");
            return (Criteria) this;
        }

        public Criteria andNeedBookNotBetween(Integer value1, Integer value2) {
            addCriterion("need_book not between", value1, value2, "needBook");
            return (Criteria) this;
        }

        public Criteria andBindStatusIsNull() {
            addCriterion("bind_status is null");
            return (Criteria) this;
        }

        public Criteria andBindStatusIsNotNull() {
            addCriterion("bind_status is not null");
            return (Criteria) this;
        }

        public Criteria andBindStatusEqualTo(Integer value) {
            addCriterion("bind_status =", value, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andBindStatusNotEqualTo(Integer value) {
            addCriterion("bind_status <>", value, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andBindStatusGreaterThan(Integer value) {
            addCriterion("bind_status >", value, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andBindStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("bind_status >=", value, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andBindStatusLessThan(Integer value) {
            addCriterion("bind_status <", value, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andBindStatusLessThanOrEqualTo(Integer value) {
            addCriterion("bind_status <=", value, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andBindStatusIn(List<Integer> values) {
            addCriterion("bind_status in", values, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andBindStatusNotIn(List<Integer> values) {
            addCriterion("bind_status not in", values, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andBindStatusBetween(Integer value1, Integer value2) {
            addCriterion("bind_status between", value1, value2, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andBindStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("bind_status not between", value1, value2, "bindStatus");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNull() {
            addCriterion("dept_id is null");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNotNull() {
            addCriterion("dept_id is not null");
            return (Criteria) this;
        }

        public Criteria andDeptIdEqualTo(Long value) {
            addCriterion("dept_id =", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotEqualTo(Long value) {
            addCriterion("dept_id <>", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThan(Long value) {
            addCriterion("dept_id >", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThanOrEqualTo(Long value) {
            addCriterion("dept_id >=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThan(Long value) {
            addCriterion("dept_id <", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThanOrEqualTo(Long value) {
            addCriterion("dept_id <=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdIn(List<Long> values) {
            addCriterion("dept_id in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotIn(List<Long> values) {
            addCriterion("dept_id not in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdBetween(Long value1, Long value2) {
            addCriterion("dept_id between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotBetween(Long value1, Long value2) {
            addCriterion("dept_id not between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateIsNull() {
            addCriterion("attendance_date is null");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateIsNotNull() {
            addCriterion("attendance_date is not null");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateEqualTo(Date value) {
            addCriterion("attendance_date =", value, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateNotEqualTo(Date value) {
            addCriterion("attendance_date <>", value, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateGreaterThan(Date value) {
            addCriterion("attendance_date >", value, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateGreaterThanOrEqualTo(Date value) {
            addCriterion("attendance_date >=", value, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateLessThan(Date value) {
            addCriterion("attendance_date <", value, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateLessThanOrEqualTo(Date value) {
            addCriterion("attendance_date <=", value, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateIn(List<Date> values) {
            addCriterion("attendance_date in", values, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateNotIn(List<Date> values) {
            addCriterion("attendance_date not in", values, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateBetween(Date value1, Date value2) {
            addCriterion("attendance_date between", value1, value2, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andAttendanceDateNotBetween(Date value1, Date value2) {
            addCriterion("attendance_date not between", value1, value2, "attendanceDate");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrIsNull() {
            addCriterion("patient_age_str is null");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrIsNotNull() {
            addCriterion("patient_age_str is not null");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrEqualTo(String value) {
            addCriterion("patient_age_str =", value, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrNotEqualTo(String value) {
            addCriterion("patient_age_str <>", value, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrGreaterThan(String value) {
            addCriterion("patient_age_str >", value, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrGreaterThanOrEqualTo(String value) {
            addCriterion("patient_age_str >=", value, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrLessThan(String value) {
            addCriterion("patient_age_str <", value, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrLessThanOrEqualTo(String value) {
            addCriterion("patient_age_str <=", value, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrLike(String value) {
            addCriterion("patient_age_str like", value, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrNotLike(String value) {
            addCriterion("patient_age_str not like", value, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrIn(List<String> values) {
            addCriterion("patient_age_str in", values, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrNotIn(List<String> values) {
            addCriterion("patient_age_str not in", values, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrBetween(String value1, String value2) {
            addCriterion("patient_age_str between", value1, value2, "patientAgeStr");
            return (Criteria) this;
        }

        public Criteria andPatientAgeStrNotBetween(String value1, String value2) {
            addCriterion("patient_age_str not between", value1, value2, "patientAgeStr");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/dto/pms/PmsDiagnosisPatientListResult.java<|end_filename|>
package com.neu.his.cloud.service.pms.dto.pms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

@Setter
@Getter
@ToString
public class PmsDiagnosisPatientListResult {
    @ApiModelProperty(value = "科室待诊")
    List<PmsDiagnosisPatientResult> deptWaitList;
    @ApiModelProperty(value = "个人待诊")
    List<PmsDiagnosisPatientResult> personalWaitList;
    @ApiModelProperty(value = "个人诊中")
    List<PmsDiagnosisPatientResult> personalDuringList;
    @ApiModelProperty(value = "个人已诊")
    List<PmsDiagnosisPatientResult> personalEndList;
}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsNonDrugService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsNonDrugParam;
import com.neu.his.common.dto.dms.DmsNonDrugResult;

import java.util.List;

/**
 * 非药品
 */
public interface DmsNonDrugService {
    /**
     * 描述：新增一个非药品
     */
    int create(DmsNonDrugParam dmsNonDrugParam);
    /**
     * 描述：根据ids删除非药品
     */
    int delete(List<Long> ids);
    /**
     * 描述：更新
     */
    int update(Long id, DmsNonDrugParam dmsNonDrugParam);
    /**
     * 描述：模糊查询非药品、且分页
     */
    List<DmsNonDrugResult> select(DmsNonDrugParam dmsNonDrugParam);
    /**
     * 描述：查询所有非药品
     */
    List<DmsNonDrugResult> selectAll();
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsCaseHistoryController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseHistoryParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsCaseHistoryResult;
import com.neu.his.cloud.api.pc.service.dms.DmsCaseHistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "DmsCaseHistoryController", description = "病历管理")
@RequestMapping("/caseHistory")
@CrossOrigin(allowCredentials = "true")
public class DmsCaseHistoryController {
    @Autowired
    DmsCaseHistoryService dmsCaseHistoryService;


    @ApiOperation(value = "提交初诊信息")
    @RequestMapping(value = "/submitPriliminaryDise", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult submitPriliminaryDise(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam){
       return dmsCaseHistoryService.submitPriliminaryDise(dmsCaseHistoryParam);

    }


    @ApiOperation(value = "根据挂号Id查询未结束就诊的历史病历（只含有初诊信息）")
    @RequestMapping(value = "/selectNotEndCaseHistoryByReg/{registrationId}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseHistoryResult> selectNotEndCaseHistoryByReg(@PathVariable("registrationId") Long registrationId){
        return dmsCaseHistoryService.selectNotEndCaseHistoryByReg(registrationId);
    }


    @ApiOperation(value = "根据挂号id查询已结束就诊的历史病历（病历首页显示各种串）")
    @RequestMapping(value = "/selectEndCaseHistoryByReg/{registrationId}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseHistoryResult> selectEndCaseHistoryByReg(@PathVariable("registrationId") Long registrationId){

        return dmsCaseHistoryService.selectEndCaseHistoryByReg(registrationId);

    }


    @ApiOperation(value = "确诊")
    @RequestMapping(value = "/submitDefiniteDise", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult submitDefiniteDise(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam){
       return  dmsCaseHistoryService.submitDefiniteDise(dmsCaseHistoryParam);
    }

    @ApiOperation(value = "诊毕")
    @RequestMapping(value = "/endDiagnosis", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult endDiagnosis(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam){
        return dmsCaseHistoryService.endDiagnosis(dmsCaseHistoryParam);

    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/model/DmsDrugExample.java<|end_filename|>
package com.neu.his.cloud.api.pc.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DmsDrugExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DmsDrugExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andCodeIsNull() {
            addCriterion("code is null");
            return (Criteria) this;
        }

        public Criteria andCodeIsNotNull() {
            addCriterion("code is not null");
            return (Criteria) this;
        }

        public Criteria andCodeEqualTo(String value) {
            addCriterion("code =", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotEqualTo(String value) {
            addCriterion("code <>", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeGreaterThan(String value) {
            addCriterion("code >", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeGreaterThanOrEqualTo(String value) {
            addCriterion("code >=", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLessThan(String value) {
            addCriterion("code <", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLessThanOrEqualTo(String value) {
            addCriterion("code <=", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLike(String value) {
            addCriterion("code like", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotLike(String value) {
            addCriterion("code not like", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeIn(List<String> values) {
            addCriterion("code in", values, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotIn(List<String> values) {
            addCriterion("code not in", values, "code");
            return (Criteria) this;
        }

        public Criteria andCodeBetween(String value1, String value2) {
            addCriterion("code between", value1, value2, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotBetween(String value1, String value2) {
            addCriterion("code not between", value1, value2, "code");
            return (Criteria) this;
        }

        public Criteria andNameIsNull() {
            addCriterion("name is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("name is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("name =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("name <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("name >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("name >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("name <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("name <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("name like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("name not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("name in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("name not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("name between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("name not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andFormatIsNull() {
            addCriterion("format is null");
            return (Criteria) this;
        }

        public Criteria andFormatIsNotNull() {
            addCriterion("format is not null");
            return (Criteria) this;
        }

        public Criteria andFormatEqualTo(String value) {
            addCriterion("format =", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatNotEqualTo(String value) {
            addCriterion("format <>", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatGreaterThan(String value) {
            addCriterion("format >", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatGreaterThanOrEqualTo(String value) {
            addCriterion("format >=", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatLessThan(String value) {
            addCriterion("format <", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatLessThanOrEqualTo(String value) {
            addCriterion("format <=", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatLike(String value) {
            addCriterion("format like", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatNotLike(String value) {
            addCriterion("format not like", value, "format");
            return (Criteria) this;
        }

        public Criteria andFormatIn(List<String> values) {
            addCriterion("format in", values, "format");
            return (Criteria) this;
        }

        public Criteria andFormatNotIn(List<String> values) {
            addCriterion("format not in", values, "format");
            return (Criteria) this;
        }

        public Criteria andFormatBetween(String value1, String value2) {
            addCriterion("format between", value1, value2, "format");
            return (Criteria) this;
        }

        public Criteria andFormatNotBetween(String value1, String value2) {
            addCriterion("format not between", value1, value2, "format");
            return (Criteria) this;
        }

        public Criteria andPriceIsNull() {
            addCriterion("price is null");
            return (Criteria) this;
        }

        public Criteria andPriceIsNotNull() {
            addCriterion("price is not null");
            return (Criteria) this;
        }

        public Criteria andPriceEqualTo(BigDecimal value) {
            addCriterion("price =", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotEqualTo(BigDecimal value) {
            addCriterion("price <>", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThan(BigDecimal value) {
            addCriterion("price >", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("price >=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThan(BigDecimal value) {
            addCriterion("price <", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("price <=", value, "price");
            return (Criteria) this;
        }

        public Criteria andPriceIn(List<BigDecimal> values) {
            addCriterion("price in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotIn(List<BigDecimal> values) {
            addCriterion("price not in", values, "price");
            return (Criteria) this;
        }

        public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("price between", value1, value2, "price");
            return (Criteria) this;
        }

        public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("price not between", value1, value2, "price");
            return (Criteria) this;
        }

        public Criteria andUnitIsNull() {
            addCriterion("unit is null");
            return (Criteria) this;
        }

        public Criteria andUnitIsNotNull() {
            addCriterion("unit is not null");
            return (Criteria) this;
        }

        public Criteria andUnitEqualTo(String value) {
            addCriterion("unit =", value, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitNotEqualTo(String value) {
            addCriterion("unit <>", value, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitGreaterThan(String value) {
            addCriterion("unit >", value, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitGreaterThanOrEqualTo(String value) {
            addCriterion("unit >=", value, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitLessThan(String value) {
            addCriterion("unit <", value, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitLessThanOrEqualTo(String value) {
            addCriterion("unit <=", value, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitLike(String value) {
            addCriterion("unit like", value, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitNotLike(String value) {
            addCriterion("unit not like", value, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitIn(List<String> values) {
            addCriterion("unit in", values, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitNotIn(List<String> values) {
            addCriterion("unit not in", values, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitBetween(String value1, String value2) {
            addCriterion("unit between", value1, value2, "unit");
            return (Criteria) this;
        }

        public Criteria andUnitNotBetween(String value1, String value2) {
            addCriterion("unit not between", value1, value2, "unit");
            return (Criteria) this;
        }

        public Criteria andManufacturerIsNull() {
            addCriterion("manufacturer is null");
            return (Criteria) this;
        }

        public Criteria andManufacturerIsNotNull() {
            addCriterion("manufacturer is not null");
            return (Criteria) this;
        }

        public Criteria andManufacturerEqualTo(String value) {
            addCriterion("manufacturer =", value, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerNotEqualTo(String value) {
            addCriterion("manufacturer <>", value, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerGreaterThan(String value) {
            addCriterion("manufacturer >", value, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerGreaterThanOrEqualTo(String value) {
            addCriterion("manufacturer >=", value, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerLessThan(String value) {
            addCriterion("manufacturer <", value, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerLessThanOrEqualTo(String value) {
            addCriterion("manufacturer <=", value, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerLike(String value) {
            addCriterion("manufacturer like", value, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerNotLike(String value) {
            addCriterion("manufacturer not like", value, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerIn(List<String> values) {
            addCriterion("manufacturer in", values, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerNotIn(List<String> values) {
            addCriterion("manufacturer not in", values, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerBetween(String value1, String value2) {
            addCriterion("manufacturer between", value1, value2, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andManufacturerNotBetween(String value1, String value2) {
            addCriterion("manufacturer not between", value1, value2, "manufacturer");
            return (Criteria) this;
        }

        public Criteria andDosageIdIsNull() {
            addCriterion("dosage_id is null");
            return (Criteria) this;
        }

        public Criteria andDosageIdIsNotNull() {
            addCriterion("dosage_id is not null");
            return (Criteria) this;
        }

        public Criteria andDosageIdEqualTo(Long value) {
            addCriterion("dosage_id =", value, "dosageId");
            return (Criteria) this;
        }

        public Criteria andDosageIdNotEqualTo(Long value) {
            addCriterion("dosage_id <>", value, "dosageId");
            return (Criteria) this;
        }

        public Criteria andDosageIdGreaterThan(Long value) {
            addCriterion("dosage_id >", value, "dosageId");
            return (Criteria) this;
        }

        public Criteria andDosageIdGreaterThanOrEqualTo(Long value) {
            addCriterion("dosage_id >=", value, "dosageId");
            return (Criteria) this;
        }

        public Criteria andDosageIdLessThan(Long value) {
            addCriterion("dosage_id <", value, "dosageId");
            return (Criteria) this;
        }

        public Criteria andDosageIdLessThanOrEqualTo(Long value) {
            addCriterion("dosage_id <=", value, "dosageId");
            return (Criteria) this;
        }

        public Criteria andDosageIdIn(List<Long> values) {
            addCriterion("dosage_id in", values, "dosageId");
            return (Criteria) this;
        }

        public Criteria andDosageIdNotIn(List<Long> values) {
            addCriterion("dosage_id not in", values, "dosageId");
            return (Criteria) this;
        }

        public Criteria andDosageIdBetween(Long value1, Long value2) {
            addCriterion("dosage_id between", value1, value2, "dosageId");
            return (Criteria) this;
        }

        public Criteria andDosageIdNotBetween(Long value1, Long value2) {
            addCriterion("dosage_id not between", value1, value2, "dosageId");
            return (Criteria) this;
        }

        public Criteria andTypeIdIsNull() {
            addCriterion("type_id is null");
            return (Criteria) this;
        }

        public Criteria andTypeIdIsNotNull() {
            addCriterion("type_id is not null");
            return (Criteria) this;
        }

        public Criteria andTypeIdEqualTo(Long value) {
            addCriterion("type_id =", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotEqualTo(Long value) {
            addCriterion("type_id <>", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdGreaterThan(Long value) {
            addCriterion("type_id >", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdGreaterThanOrEqualTo(Long value) {
            addCriterion("type_id >=", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdLessThan(Long value) {
            addCriterion("type_id <", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdLessThanOrEqualTo(Long value) {
            addCriterion("type_id <=", value, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdIn(List<Long> values) {
            addCriterion("type_id in", values, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotIn(List<Long> values) {
            addCriterion("type_id not in", values, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdBetween(Long value1, Long value2) {
            addCriterion("type_id between", value1, value2, "typeId");
            return (Criteria) this;
        }

        public Criteria andTypeIdNotBetween(Long value1, Long value2) {
            addCriterion("type_id not between", value1, value2, "typeId");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeIsNull() {
            addCriterion("mnemonic_code is null");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeIsNotNull() {
            addCriterion("mnemonic_code is not null");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeEqualTo(String value) {
            addCriterion("mnemonic_code =", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeNotEqualTo(String value) {
            addCriterion("mnemonic_code <>", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeGreaterThan(String value) {
            addCriterion("mnemonic_code >", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeGreaterThanOrEqualTo(String value) {
            addCriterion("mnemonic_code >=", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeLessThan(String value) {
            addCriterion("mnemonic_code <", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeLessThanOrEqualTo(String value) {
            addCriterion("mnemonic_code <=", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeLike(String value) {
            addCriterion("mnemonic_code like", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeNotLike(String value) {
            addCriterion("mnemonic_code not like", value, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeIn(List<String> values) {
            addCriterion("mnemonic_code in", values, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeNotIn(List<String> values) {
            addCriterion("mnemonic_code not in", values, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeBetween(String value1, String value2) {
            addCriterion("mnemonic_code between", value1, value2, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andMnemonicCodeNotBetween(String value1, String value2) {
            addCriterion("mnemonic_code not between", value1, value2, "mnemonicCode");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNull() {
            addCriterion("create_date is null");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNotNull() {
            addCriterion("create_date is not null");
            return (Criteria) this;
        }

        public Criteria andCreateDateEqualTo(Date value) {
            addCriterion("create_date =", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotEqualTo(Date value) {
            addCriterion("create_date <>", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThan(Date value) {
            addCriterion("create_date >", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
            addCriterion("create_date >=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThan(Date value) {
            addCriterion("create_date <", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThanOrEqualTo(Date value) {
            addCriterion("create_date <=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateIn(List<Date> values) {
            addCriterion("create_date in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotIn(List<Date> values) {
            addCriterion("create_date not in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateBetween(Date value1, Date value2) {
            addCriterion("create_date between", value1, value2, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotBetween(Date value1, Date value2) {
            addCriterion("create_date not between", value1, value2, "createDate");
            return (Criteria) this;
        }

        public Criteria andStockIsNull() {
            addCriterion("stock is null");
            return (Criteria) this;
        }

        public Criteria andStockIsNotNull() {
            addCriterion("stock is not null");
            return (Criteria) this;
        }

        public Criteria andStockEqualTo(Long value) {
            addCriterion("stock =", value, "stock");
            return (Criteria) this;
        }

        public Criteria andStockNotEqualTo(Long value) {
            addCriterion("stock <>", value, "stock");
            return (Criteria) this;
        }

        public Criteria andStockGreaterThan(Long value) {
            addCriterion("stock >", value, "stock");
            return (Criteria) this;
        }

        public Criteria andStockGreaterThanOrEqualTo(Long value) {
            addCriterion("stock >=", value, "stock");
            return (Criteria) this;
        }

        public Criteria andStockLessThan(Long value) {
            addCriterion("stock <", value, "stock");
            return (Criteria) this;
        }

        public Criteria andStockLessThanOrEqualTo(Long value) {
            addCriterion("stock <=", value, "stock");
            return (Criteria) this;
        }

        public Criteria andStockIn(List<Long> values) {
            addCriterion("stock in", values, "stock");
            return (Criteria) this;
        }

        public Criteria andStockNotIn(List<Long> values) {
            addCriterion("stock not in", values, "stock");
            return (Criteria) this;
        }

        public Criteria andStockBetween(Long value1, Long value2) {
            addCriterion("stock between", value1, value2, "stock");
            return (Criteria) this;
        }

        public Criteria andStockNotBetween(Long value1, Long value2) {
            addCriterion("stock not between", value1, value2, "stock");
            return (Criteria) this;
        }

        public Criteria andGenericNameIsNull() {
            addCriterion("generic_name is null");
            return (Criteria) this;
        }

        public Criteria andGenericNameIsNotNull() {
            addCriterion("generic_name is not null");
            return (Criteria) this;
        }

        public Criteria andGenericNameEqualTo(String value) {
            addCriterion("generic_name =", value, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameNotEqualTo(String value) {
            addCriterion("generic_name <>", value, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameGreaterThan(String value) {
            addCriterion("generic_name >", value, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameGreaterThanOrEqualTo(String value) {
            addCriterion("generic_name >=", value, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameLessThan(String value) {
            addCriterion("generic_name <", value, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameLessThanOrEqualTo(String value) {
            addCriterion("generic_name <=", value, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameLike(String value) {
            addCriterion("generic_name like", value, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameNotLike(String value) {
            addCriterion("generic_name not like", value, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameIn(List<String> values) {
            addCriterion("generic_name in", values, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameNotIn(List<String> values) {
            addCriterion("generic_name not in", values, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameBetween(String value1, String value2) {
            addCriterion("generic_name between", value1, value2, "genericName");
            return (Criteria) this;
        }

        public Criteria andGenericNameNotBetween(String value1, String value2) {
            addCriterion("generic_name not between", value1, value2, "genericName");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/mapper/SmsDeptMapper.java<|end_filename|>
package com.neu.his.cloud.service.sms.mapper;

import com.neu.his.cloud.service.sms.model.SmsDept;
import com.neu.his.cloud.service.sms.model.SmsDeptExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsDeptMapper {
    int countByExample(SmsDeptExample example);

    int deleteByExample(SmsDeptExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsDept record);

    int insertSelective(SmsDept record);

    List<SmsDept> selectByExample(SmsDeptExample example);

    SmsDept selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsDept record, @Param("example") SmsDeptExample example);

    int updateByExample(@Param("record") SmsDept record, @Param("example") SmsDeptExample example);

    int updateByPrimaryKeySelective(SmsDept record);

    int updateByPrimaryKey(SmsDept record);
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/dms/DmsRegHistoryResult.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
@ToString
public class DmsRegHistoryResult  implements Serializable {
    @ApiModelProperty(value = "挂号时间：哪天挂的号")
    Date createTime;
    @ApiModelProperty(value = "就诊时间：挂的哪天号")
    Date attendanceDate;
    @ApiModelProperty(value = "挂号（门诊）id")
    Long registrationId;
    @ApiModelProperty(value = "status 0删除 1待诊  2诊中  3诊毕  4退号 5过期  ")
    Integer status;
    @ApiModelProperty(value = "科室名称")
    String deptName;
    @ApiModelProperty(value = "就诊年龄")
    String patientAgeStr;
    @ApiModelProperty(value = "绑定状态")
    Integer bindStatus;
    @ApiModelProperty(value = "看诊医生")
    String doctorName;
    @ApiModelProperty(value = "挂号级别name")
    String registrationName;


}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/service/pms/PmsPatientService.java<|end_filename|>
package com.neu.his.cloud.api.app.service.pms;


import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.pms.PmsPatientResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "his-cloud-service-pms")
public interface PmsPatientService {


    @RequestMapping(value = "/pmsPatient/login", method = RequestMethod.POST)
    CommonResult<PmsPatientResult> login(@RequestParam("identificationNo") String identificationNo,
                                                @RequestParam("medicalRecordNo") String medicalRecordNo);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/bms/BmsSettleListItemResult.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.bms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

@Getter
@Setter
@ToString
public class BmsSettleListItemResult  implements Serializable {

    @ApiModelProperty(value="收费员id")
    Long cashierId;
    @ApiModelProperty(value="收费员name")
   String  operatorName;
    @ApiModelProperty(value="日结日期")
    Date createDatetme;
    @ApiModelProperty(value="日结id")
    Long settleRecordId;
    @ApiModelProperty(value="对账状态 0 未对账 1 已对账")
    Integer verifyStatus;

}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsDiseCatalogService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsDiseCatalogParam;
import com.neu.his.common.dto.dms.DmsDiseCatalogResult;

import java.util.List;

/**
 * 诊断类型目录
 */
public interface DmsDiseCatalogService {
    /**
     * 描述：新增一个诊断目录
     */
    int create(DmsDiseCatalogParam DmsDiseCatalogParam);
    /**
     * 描述：根据ids删除诊断目录
     */
    int delete(List<Long> ids);
    /**
     * 描述：根据id更新诊断目录
     */
    int update(Long id, DmsDiseCatalogParam dmsDiseCatalogParam);
    /**
     * 描述：查询诊断目录
     */
    List<DmsDiseCatalogResult> select(DmsDiseCatalogParam dmsDiseCatalogParam, Integer pageSize, Integer pageNum);
    /**
     * 描述：查询所有诊断目录
     */
    List<DmsDiseCatalogResult> selectAll();
}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/dms/DmsNonDrugModelParam.java<|end_filename|>
package com.neu.his.cloud.service.dms.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * 非药品模版
 */

@Setter
@Getter
@ToString
public class DmsNonDrugModelParam  implements Serializable {

    @ApiModelProperty(value = "模版Id")
    private Long id;
    @ApiModelProperty(value = "模版状态 0删除 1 正常")
    private Integer status;
    @ApiModelProperty(value = "模版名称")
    private String name;
    @ApiModelProperty(value = "模版所包括非药品的id")
    private List<Long> nonDrugIdList;
    @ApiModelProperty(value = "模版范围 scope 0个人 1科室 2全院")
    private Integer scope;
    @ApiModelProperty(value = "所属人Id")
    private Long ownId;
    @ApiModelProperty(value = "目的")
    private String aim;
//    @ApiModelProperty(value = "创建时间")
//    private Date createTime;
    @ApiModelProperty(value = "模版编码")
    private String code;
    @ApiModelProperty(value = "模版类型 type 0检查 1检验  2处置 ")
    private Integer type;

}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/controller/SmsDeptController.java<|end_filename|>
package com.neu.his.cloud.service.sms.controller;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

import com.neu.his.cloud.service.sms.common.CommonPage;
import com.neu.his.cloud.service.sms.common.CommonResult;
import com.neu.his.cloud.service.sms.dto.sms.SmsDeptParam;
import com.neu.his.cloud.service.sms.dto.sms.SmsDeptResult;
import com.neu.his.cloud.service.sms.service.SmsDeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "SmsDeptController", description = "科室管理")
@RequestMapping("/dept")
@CrossOrigin(allowCredentials = "true")
public class SmsDeptController {
    @Autowired
    private SmsDeptService smsDeptService;

    @ApiOperation("新增科室")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody SmsDeptParam smsDeptParam, BindingResult result){
        int count = smsDeptService.create(smsDeptParam);
        if(count > 0){
            return CommonResult.success(count, "添加科室成功");
        }
        return CommonResult.failed("添加科室失败，");
    }

    /**
     * 描述:根据ids删除科室
     * <p>author: ma
     */
    @ApiOperation("根据ids删除科室")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        int count = smsDeptService.delete(ids);
        if(count > 0){
            return CommonResult.success(count,"删除科室成功");
        }
        return CommonResult.failed("删除科室失败");
    }

    /**
     * 描述:更新一个科室的全部信息
     * <p>author: ma
     */
    @ApiOperation("更新科室信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable("id") Long id,@RequestBody SmsDeptParam smsDeptParam, BindingResult result){
        int count = smsDeptService.update(id,smsDeptParam);
        if(id > 0){
            return CommonResult.success(count,"更新成功");
        }
        return CommonResult.failed("更新失败");
    }

    /**
     * 描述:模糊查询科室、且分页
     * <p>author: ma
     */
    @ApiOperation("模糊查询科室、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsDeptResult>> list(@RequestBody SmsDeptParam queryParam,
                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        Page page =PageHelper.startPage(pageNum, pageSize);
        List<SmsDeptResult> list = smsDeptService.select(queryParam);
        Long pageTotal=page.getTotal();

        return CommonResult.success(CommonPage.restPage(list,pageTotal));
    }

    /**
     * 描述:查询所有科室信息
     * <p>author: ma
     */
    @ApiOperation("查询所有科室")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsDeptResult>> listAll(){
        List<SmsDeptResult> list = smsDeptService.selectAll();
        return CommonResult.success(list);
    }
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/bo/StaffDetails.java<|end_filename|>
package com.neu.his.bo;

import com.neu.his.mbg.model.SmsPermission;
import com.neu.his.mbg.model.SmsRole;
import com.neu.his.mbg.model.SmsStaff;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;

/**
 * SpringSecurity需要的用户详情
 */
public class StaffDetails implements UserDetails {
    private SmsStaff smsStaff;
    private List<SmsPermission> permissionList;
    public StaffDetails(SmsStaff smsStaff, List<SmsPermission> permissionList) {
        this.smsStaff = smsStaff;
        this.permissionList = permissionList;
    }

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        //返回当前用户的权限
        return permissionList.stream()
                .filter(permission -> permission.getValue()!=null)
                .map(permission ->new SimpleGrantedAuthority(permission.getValue()))
                .collect(Collectors.toList());
    }

    @Override
    public String getPassword() {
        return <PASSWORD>();
    }

    @Override
    public String getUsername() {
        return smsStaff.getUsername();
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return smsStaff.getStatus().equals(1);
    }
}


<|start_filename|>HIS-web/src/api/technology.js<|end_filename|>
import request from '@/utils/request'
export function getMechlist(data) {
  return request({
    url: '/DmsMechanicItemRecord/listByDept',
    method: 'post',
    params:{
      deptId:data
    }
  })
}

export function log(data) {
  return request({
    url: '/DmsMechanicItemRecord/log',
    method: 'post',
    params:{
      itemRecordId:data.id,
      logStaffId:data.logStaffId
    }
  })
}

export function uploadResult(data) {
  return request({
    url: '/DmsMechanicItemRecord/uploadResult',
    method: 'post',
    params:{
      id:data.id,
      executeStaffId:data.executeStaffId,
      checkResult:data.checkResult,
      resultImgUrlList:data.resultImgUrlList
    }
  })
}

<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsMechanicItemRecordService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsMechanicItemRecordResult;

import java.util.List;

/**
 * 医技
 */
public interface DmsMechanicItemRecordService {

    /**
     * 描述：根据科室id刷新患者列表
     */
    List<DmsMechanicItemRecordResult> listByDept(Long deptId);

    /**
     * 描述：医技登记
     */
    int log(Long itemRecordId, Long logStaffId);

    /**
     * 描述：上传结果
     */
    int uploadResult(Long id, Long excuteStaffId, String checkResult, String resultImgUrlList);

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsMechanicItemRecordService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsMechanicItemRecordResult;

import java.util.List;

/**
 * 医技
 */
public interface DmsMechanicItemRecordService {

    /**
     * 描述：根据科室id刷新患者列表
     */
    List<DmsMechanicItemRecordResult> listByDept(Long deptId);

    /**
     * 描述：医技登记
     */
    int log(Long itemRecordId, Long logStaffId);

    /**
     * 描述：上传结果
     */
    int uploadResult(Long id, Long excuteStaffId, String checkResult, String resultImgUrlList);

}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/service/sms/SmsDescriptionService.java<|end_filename|>
package com.neu.his.cloud.api.app.service.sms;


import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.app.AppDeptDescriptionResult;
import com.neu.his.cloud.api.app.dto.app.AppDocSkdResult;
import com.neu.his.cloud.api.app.dto.app.AppStaffDescriptionResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "his-cloud-service-sms")
public interface SmsDescriptionService {

    @RequestMapping(value = "/description/getDeptDescription", method = RequestMethod.POST)
    CommonResult<List<AppDeptDescriptionResult>> getDeptDescription();

    @RequestMapping(value = "/description/listDeptDoctor", method = RequestMethod.POST)
    CommonResult<List<AppStaffDescriptionResult>> listDeptDoctor(@RequestParam("deptId") Long deptId);

    @RequestMapping(value = "/description/getStaffDetailById", method = RequestMethod.POST)
    CommonResult<AppDocSkdResult> getStaffDetailById(@RequestParam("theId")Long theId);
}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/model/DmsHerbalPrescriptionRecord.java<|end_filename|>
package com.neu.his.cloud.service.pms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class DmsHerbalPrescriptionRecord implements Serializable {
    private Long id;

    private Integer status;

    private Date createTime;

    private BigDecimal amount;

    private String name;

    private String therapy;

    private String therapyDetails;

    private String medicalAdvice;

    private Long pairNum;

    private Long registrationId;

    private Integer frequency;

    private Integer usageMeans;

    private Integer type;

    private Long createStaffId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTherapy() {
        return therapy;
    }

    public void setTherapy(String therapy) {
        this.therapy = therapy;
    }

    public String getTherapyDetails() {
        return therapyDetails;
    }

    public void setTherapyDetails(String therapyDetails) {
        this.therapyDetails = therapyDetails;
    }

    public String getMedicalAdvice() {
        return medicalAdvice;
    }

    public void setMedicalAdvice(String medicalAdvice) {
        this.medicalAdvice = medicalAdvice;
    }

    public Long getPairNum() {
        return pairNum;
    }

    public void setPairNum(Long pairNum) {
        this.pairNum = pairNum;
    }

    public Long getRegistrationId() {
        return registrationId;
    }

    public void setRegistrationId(Long registrationId) {
        this.registrationId = registrationId;
    }

    public Integer getFrequency() {
        return frequency;
    }

    public void setFrequency(Integer frequency) {
        this.frequency = frequency;
    }

    public Integer getUsageMeans() {
        return usageMeans;
    }

    public void setUsageMeans(Integer usageMeans) {
        this.usageMeans = usageMeans;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getCreateStaffId() {
        return createStaffId;
    }

    public void setCreateStaffId(Long createStaffId) {
        this.createStaffId = createStaffId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", amount=").append(amount);
        sb.append(", name=").append(name);
        sb.append(", therapy=").append(therapy);
        sb.append(", therapyDetails=").append(therapyDetails);
        sb.append(", medicalAdvice=").append(medicalAdvice);
        sb.append(", pairNum=").append(pairNum);
        sb.append(", registrationId=").append(registrationId);
        sb.append(", frequency=").append(frequency);
        sb.append(", usageMeans=").append(usageMeans);
        sb.append(", type=").append(type);
        sb.append(", createStaffId=").append(createStaffId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/sms/SmsFrequentUsedService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.sms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsFrequentUsedResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "his-cloud-service-sms")
public interface SmsFrequentUsedService {
    @RequestMapping(value = "/frequentUsed/add", method = RequestMethod.POST)
    public CommonResult addFrequent(@RequestParam("staffId") Long staffId,
                                    @RequestParam("addType") int addType,
                                    @RequestParam("addId") Long addId);

    @RequestMapping(value = "/frequentUsed/delete", method = RequestMethod.POST)
    public CommonResult deleteFrequent(@RequestParam("staffId") Long staffId,
                                       @RequestParam("deleteType") int deleteType,
                                       @RequestParam("deleteId") Long deleteId);

    @RequestMapping(value = "/frequentUsed/selectByType", method = RequestMethod.POST)
    public CommonResult<SmsFrequentUsedResult> selectFrequent(@RequestParam("staffId") Long staffId,
                                                              @RequestParam("selectType") int selectType);
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/impl/SmsFrequentUsedServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.sms.service.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.neu.his.cloud.service.sms.dto.dms.DmsDrugResult;
import com.neu.his.cloud.service.sms.dto.dms.DmsNonDrugResult;
import com.neu.his.cloud.service.sms.dto.sms.SmsFrequentUsedResult;
import com.neu.his.cloud.service.sms.mapper.*;
import com.neu.his.cloud.service.sms.model.*;
import com.neu.his.cloud.service.sms.service.SmsFrequentUsedService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;


/**
 * 常用项
 */
@Service
public class SmsFrequentUsedServiceImpl implements SmsFrequentUsedService {

    @Autowired
    private SmsFrequentUsedMapper smsFrequentUsedMapper;
    @Autowired
    private DmsNonDrugMapper dmsNonDrugMapper;
    @Autowired
    private DmsDiseMapper dmsDiseMapper;
    @Autowired
    private DmsDrugMapper dmsDrugMapper;
    @Autowired
    private SmsDeptMapper smsDeptMapper;
    @Autowired
    private DmsDosageMapper dmsDosageMapper;


    @Override
    public int addFrequent(Long staffId,int addType,Long addId){
        SmsFrequentUsedExample example = new SmsFrequentUsedExample();
        example.createCriteria().andStaffIdEqualTo(staffId);
        List<SmsFrequentUsed> frequentUsedList = smsFrequentUsedMapper.selectByExample(example);
        SmsFrequentUsed frequentUsed;
        if(frequentUsedList.size() <= 0){
            //第一次创建
            frequentUsed = new SmsFrequentUsed();
            frequentUsed.setStaffId(staffId);
            if(smsFrequentUsedMapper.insert(frequentUsed) <= 0){
                return 0;
            }
        }else{
            frequentUsed = frequentUsedList.get(0);
        }
        boolean addBoolean = false;
        switch(addType){
            case 1:
                String checkIdStr = frequentUsed.getCheckIdList();
                Set<Long> checkSet = strToSet(checkIdStr);
                addBoolean = checkSet.add(addId);
                frequentUsed.setCheckIdList(setToStr(checkSet));
                break;
            case 2:
                String medicineDiseIdStr = frequentUsed.getMedicineDiseIdList();
                Set<Long> medicineDiseIdSet = strToSet(medicineDiseIdStr);
                addBoolean = medicineDiseIdSet.add(addId);
                frequentUsed.setMedicineDiseIdList(setToStr(medicineDiseIdSet));
                break;
            case 3:
                String dispositionIdStr = frequentUsed.getDispositionIdList();
                Set<Long> dispositionIdSet = strToSet(dispositionIdStr);
                addBoolean = dispositionIdSet.add(addId);
                frequentUsed.setDispositionIdList(setToStr(dispositionIdSet));
                break;
            case 4:
                String testIdStr = frequentUsed.getTestIdList();
                Set<Long> testIdSet = strToSet(testIdStr);
                addBoolean = testIdSet.add(addId);
                frequentUsed.setTestIdList(setToStr(testIdSet));
                break;
            case 5:
                String herbalDiseIdStr = frequentUsed.getHerbalDiseIdList();
                Set<Long> herbalDiseIdSet = strToSet(herbalDiseIdStr);
                addBoolean = herbalDiseIdSet.add(addId);
                frequentUsed.setHerbalDiseIdList(setToStr(herbalDiseIdSet));
                break;
            case 6:
                String drugIdStr = frequentUsed.getDrugIdList();
                Set<Long> drugIdSet = strToSet(drugIdStr);
                addBoolean = drugIdSet.add(addId);
                frequentUsed.setDrugIdList(setToStr(drugIdSet));
                break;
            case 7:
                String checkModelIdStr = frequentUsed.getCheckModelIdList();
                Set<Long> checkModelIdSet = strToSet(checkModelIdStr);
                addBoolean = checkModelIdSet.add(addId);
                frequentUsed.setCheckModelIdList(setToStr(checkModelIdSet));
                break;
            case 8:
                String dispositionModelIdStr = frequentUsed.getDispositionModelIdList();
                Set<Long> dispositionModelIdSet = strToSet(dispositionModelIdStr);
                addBoolean = dispositionModelIdSet.add(addId);
                frequentUsed.setDispositionModelIdList(setToStr(dispositionModelIdSet));
                break;
            case 9:
                String testModelIdStr = frequentUsed.getTestModelIdList();
                Set<Long> testModelIdSet = strToSet(testModelIdStr);
                addBoolean = testModelIdSet.add(addId);
                frequentUsed.setTestModelIdList(setToStr(testModelIdSet));
                break;
            case 0:
                String drugModelIdStr = frequentUsed.getDrugModelIdList();
                Set<Long> drugModelIdSet = strToSet(drugModelIdStr);
                addBoolean = drugModelIdSet.add(addId);
                frequentUsed.setDrugModelIdList(setToStr(drugModelIdSet));
                break;
            default:
                return 0;
        }
        if(addBoolean){
            return smsFrequentUsedMapper.updateByPrimaryKeySelective(frequentUsed);
        }else{
            return 0;
        }
    }

    @Override
    public int deleteFrequent(Long staffId,int deleteType,Long deleteId){
        SmsFrequentUsedExample example = new SmsFrequentUsedExample();
        example.createCriteria().andStaffIdEqualTo(staffId);
        List<SmsFrequentUsed> frequentUsedList = smsFrequentUsedMapper.selectByExample(example);
        SmsFrequentUsed frequentUsed;
        if(frequentUsedList.size() <= 0){
            return 0;
        }
        frequentUsed = frequentUsedList.get(0);
        boolean deleteBoolean = false;
        switch(deleteType){
            case 1:
                String checkIdStr = frequentUsed.getCheckIdList();
                Set<Long> checkSet = strToSet(checkIdStr);
                deleteBoolean = checkSet.remove(deleteId);
                frequentUsed.setCheckIdList(setToStr(checkSet));
                break;
            case 2:
                String medicineDiseIdStr = frequentUsed.getMedicineDiseIdList();
                Set<Long> medicineDiseIdSet = strToSet(medicineDiseIdStr);
                deleteBoolean = medicineDiseIdSet.remove(deleteId);
                frequentUsed.setMedicineDiseIdList(setToStr(medicineDiseIdSet));
                break;
            case 3:
                String dispositionIdStr = frequentUsed.getDispositionIdList();
                Set<Long> dispositionIdSet = strToSet(dispositionIdStr);
                deleteBoolean = dispositionIdSet.remove(deleteId);
                frequentUsed.setDispositionIdList(setToStr(dispositionIdSet));
                break;
            case 4:
                String testIdStr = frequentUsed.getTestIdList();
                Set<Long> testIdSet = strToSet(testIdStr);
                deleteBoolean = testIdSet.remove(deleteId);
                frequentUsed.setTestIdList(setToStr(testIdSet));
                break;
            case 5:
                String herbalDiseIdStr = frequentUsed.getHerbalDiseIdList();
                Set<Long> herbalDiseIdSet = strToSet(herbalDiseIdStr);
                deleteBoolean = herbalDiseIdSet.remove(deleteId);
                frequentUsed.setHerbalDiseIdList(setToStr(herbalDiseIdSet));
                break;
            case 6:
                String drugIdStr = frequentUsed.getDrugIdList();
                Set<Long> drugIdSet = strToSet(drugIdStr);
                deleteBoolean = drugIdSet.remove(deleteId);
                frequentUsed.setDrugIdList(setToStr(drugIdSet));
                break;
            case 7:
                String checkModelIdStr = frequentUsed.getCheckModelIdList();
                Set<Long> checkModelIdSet = strToSet(checkModelIdStr);
                deleteBoolean = checkModelIdSet.remove(deleteId);
                frequentUsed.setCheckModelIdList(setToStr(checkModelIdSet));
                break;
            case 8:
                String dispositionModelIdStr = frequentUsed.getDispositionModelIdList();
                Set<Long> dispositionModelIdSet = strToSet(dispositionModelIdStr);
                deleteBoolean = dispositionModelIdSet.remove(deleteId);
                frequentUsed.setDispositionModelIdList(setToStr(dispositionModelIdSet));
                break;
            case 9:
                String testModelIdStr = frequentUsed.getTestModelIdList();
                Set<Long> testModelIdSet = strToSet(testModelIdStr);
                deleteBoolean = testModelIdSet.remove(deleteId);
                frequentUsed.setTestModelIdList(setToStr(testModelIdSet));
                break;
            case 0:
                String drugModelIdStr = frequentUsed.getDrugModelIdList();
                Set<Long> drugModelIdSet = strToSet(drugModelIdStr);
                deleteBoolean = drugModelIdSet.remove(deleteId);
                frequentUsed.setDrugModelIdList(setToStr(drugModelIdSet));
                break;
            default:
                return 0;
        }
        if(deleteBoolean){
            return smsFrequentUsedMapper.updateByPrimaryKeySelective(frequentUsed);
        }else{
            return 0;
        }
    }

    @Override
    public SmsFrequentUsedResult selectFrequent(Long staffId, int selectType){
        SmsFrequentUsedExample example = new SmsFrequentUsedExample();
        example.createCriteria().andStaffIdEqualTo(staffId);
        List<SmsFrequentUsed> frequentUsedList = smsFrequentUsedMapper.selectByExample(example);
        SmsFrequentUsed frequentUsed;
        if(frequentUsedList.size() <= 0){
            return null;
        }
        frequentUsed = frequentUsedList.get(0);

        SmsFrequentUsedResult result = new SmsFrequentUsedResult();
        result.setId(frequentUsed.getId());
        result.setStaffId(frequentUsed.getStaffId());
        System.err.println("selectType:"+selectType);
        switch(selectType){
            case 1: //检查
                List<Long> checkIdList = strToList(frequentUsed.getCheckIdList());
                if(!checkIdList.isEmpty()){
                    DmsNonDrugExample checkNonDrugExample=new DmsNonDrugExample();
                    checkNonDrugExample.createCriteria().andIdIn(checkIdList);
                    List<DmsNonDrug> checkList=dmsNonDrugMapper.selectByExample(checkNonDrugExample);
                    List<DmsNonDrugResult> checkResultList=new ArrayList<>();

                    //封装deptName属性
                    if(!CollectionUtil.isEmpty(checkList)){
                        for(DmsNonDrug dmsNonDrug: checkList){
                            DmsNonDrugResult dmsNonDrugResult=new DmsNonDrugResult();
                            BeanUtils.copyProperties(dmsNonDrug,dmsNonDrugResult);
                            SmsDept smsDept=smsDeptMapper.selectByPrimaryKey(dmsNonDrug.getDeptId());
                            dmsNonDrugResult.setDeptName(smsDept==null?null:smsDept.getName());
                            checkResultList.add(dmsNonDrugResult);
                        }
                    }
                    result.setCheckList(checkResultList);
                }
                break;

            case 2: //西医诊断
                List<Long> medicineDiseIdList = strToList(frequentUsed.getMedicineDiseIdList());
                if(!medicineDiseIdList.isEmpty()){
                    DmsDiseExample medicineDiseExample=new DmsDiseExample();
                    medicineDiseExample.createCriteria().andIdIn(medicineDiseIdList);
                    result.setMedicineDiseList(dmsDiseMapper.selectByExample(medicineDiseExample));
                }
                break;

            case 3://处置
                List<Long> dispositionIdList = strToList(frequentUsed.getDispositionIdList());
                if(!dispositionIdList.isEmpty()){
                    DmsNonDrugExample dispositionNonDrugExample=new DmsNonDrugExample();
                    dispositionNonDrugExample.createCriteria().andIdIn(dispositionIdList);
                    List<DmsNonDrug> dispositionList=dmsNonDrugMapper.selectByExample(dispositionNonDrugExample);
                    List<DmsNonDrugResult> dispositionResultList=new ArrayList<>();

                    //封装deptName属性
                    if(!CollectionUtil.isEmpty(dispositionList)){
                        for(DmsNonDrug dmsNonDrug: dispositionList){
                            DmsNonDrugResult dmsNonDrugResult=new DmsNonDrugResult();
                            BeanUtils.copyProperties(dmsNonDrug,dmsNonDrugResult);
                            SmsDept smsDept=smsDeptMapper.selectByPrimaryKey(dmsNonDrug.getDeptId());
                            dmsNonDrugResult.setDeptName(smsDept==null?null:smsDept.getName());
                            dispositionResultList.add(dmsNonDrugResult);
                        }
                    }

                    result.setDispositionList(dispositionResultList);
                }
                break;

            case 4://检验
                List<Long> testIdList = strToList(frequentUsed.getTestIdList());
                if(!testIdList.isEmpty()){
                    DmsNonDrugExample testIdListNonDrugExample=new DmsNonDrugExample();
                    testIdListNonDrugExample.createCriteria().andIdIn(testIdList);

                    List<DmsNonDrug> testList=dmsNonDrugMapper.selectByExample(testIdListNonDrugExample);
                    List<DmsNonDrugResult> testResultList=new ArrayList<>();

                    //封装deptName属性
                    if(!CollectionUtil.isEmpty(testList)){
                        for(DmsNonDrug dmsNonDrug: testList){
                            DmsNonDrugResult dmsNonDrugResult=new DmsNonDrugResult();
                            BeanUtils.copyProperties(dmsNonDrug,dmsNonDrugResult);
                            SmsDept smsDept=smsDeptMapper.selectByPrimaryKey(dmsNonDrug.getDeptId());
                            dmsNonDrugResult.setDeptName(smsDept==null?null:smsDept.getName());
                            testResultList.add(dmsNonDrugResult);
                        }
                    }
                    result.setTestList(testResultList);
                }
                break;

            case 5://中医诊断
                List<Long> herbalDiseIdStr = strToList(frequentUsed.getHerbalDiseIdList());
                if(!herbalDiseIdStr.isEmpty()){
                    DmsDiseExample herbalDiseExample=new DmsDiseExample();
                    herbalDiseExample.createCriteria().andIdIn(herbalDiseIdStr);
                    result.setHerbalDiseList(dmsDiseMapper.selectByExample(herbalDiseExample));
                }
                break;

            case 6: //药
                List<Long> drugIdStr = strToList(frequentUsed.getDrugIdList());
                if(!drugIdStr.isEmpty()){
                    DmsDrugExample drugExample=new DmsDrugExample();
                    drugExample.createCriteria().andIdIn(drugIdStr);
                    List<DmsDrug> dmsDrugList = dmsDrugMapper.selectByExample(drugExample);
                    List<DmsDrugResult> smsDrugResultList = new ArrayList<>();
                    for (DmsDrug dmsDrug : dmsDrugList) {
                        DmsDrugResult dmsDrugResult = new DmsDrugResult();
                        BeanUtils.copyProperties(dmsDrug, dmsDrugResult);
                        DmsDosage dmsDosage=dmsDosageMapper.selectByPrimaryKey(dmsDrug.getDosageId());
                        dmsDrugResult.setDosage(dmsDosage);
                        smsDrugResultList.add(dmsDrugResult);
                    }
                    result.setDrugList(smsDrugResultList);
                }
                break;

            case 7: //检查模板id
                String checkModelIdStr = frequentUsed.getCheckModelIdList();
                result.setCheckModelIdList(strToList(checkModelIdStr));
                break;

            case 8://处置模板id
                String dispositionModelIdStr = frequentUsed.getDispositionModelIdList();
                result.setDispositionModelIdList(strToList(dispositionModelIdStr));
                break;

            case 9://检验模板id
                String testModelIdStr = frequentUsed.getTestModelIdList();
                result.setTestModelIdList(strToList(testModelIdStr));
                break;

            case 0://药品模板id
                String drugModelIdStr = frequentUsed.getDrugModelIdList();
                result.setDrugModelIdList(strToList(drugModelIdStr));
                break;

            default:
                return null;
        }
        return result;
    }




    private List<Long> strToList(String itemListStr) {
        List<Long> idList = new ArrayList<>();
        if(itemListStr == null || itemListStr.length() <= 0){
            return idList;
        }
        String[] idArray = itemListStr.split(",");
        for(int i=0;i < idArray.length;i++){
            idList.add(new Long(idArray[i]));
        }
        return idList;
    }

    private String setToStr(Set<Long> itemSet) {
        String itemListStr = "";
        if(itemSet == null || itemSet.isEmpty()){
            return itemListStr;
        }
        for (Long itemId : itemSet) {
            itemListStr += (itemId + "");
            itemListStr += ",";
        }
        return itemListStr.substring(0, itemListStr.length() - 1);
    }

    private HashSet<Long> strToSet(String itemListStr) {
        HashSet<Long> idSet = new HashSet<>();
        if(itemListStr == null || itemListStr.length() <= 0){
            return idSet;
        }
        String[] idArray = itemListStr.split(",");
        for(int i=0;i < idArray.length;i++){
            idSet.add(new Long(idArray[i]));
        }
        return idSet;
    }

}


<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/SmsRegistrationRankService.java<|end_filename|>
package com.neu.his.sms;

import com.neu.his.common.dto.sms.SmsRegistrationRankParam;
import com.neu.his.common.dto.sms.SmsRegistrationRankResult;

import java.util.List;

/**
 * 挂号级别
 */
public interface SmsRegistrationRankService {

    /**
     * 描述：新增挂号级别
     */
    int create(SmsRegistrationRankParam smsRegistrationRankParam);

    /**
     * 描述：删除挂号级别（批量）
     */
    public int delete(List<Long> ids);

    /**
     * 描述：更新挂号级别
     */
    int update(Long id, SmsRegistrationRankParam smsRegistrationRankParam);

    /**
     * 描述：查询挂号级别
     */
    List<SmsRegistrationRankResult> select(SmsRegistrationRankParam smsRegistrationRankParam);

    /**
     * 描述：列出所有挂号级别
     */
    List<SmsRegistrationRankResult> selectAll();
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsDrugModelService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsDrugModelParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsDrugModelResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsDrugModelService {


    @RequestMapping(value = "/drugModel/createModel", method = RequestMethod.POST)
    CommonResult createModel(@RequestBody DmsDrugModelParam dmsDrugModelParam);



    @RequestMapping(value = "/drugModel/deleteModel", method = RequestMethod.POST)
    CommonResult deleteModel(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/drugModel/updateModel", method = RequestMethod.POST)
    public CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsDrugModelParam dmsDrugModelParam);


    @RequestMapping(value = "/drugModel/listModel", method = RequestMethod.POST)
    public CommonResult<CommonPage<DmsDrugModelResult>> listModel(@RequestBody DmsDrugModelParam queryParam,
                                                             @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                             @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/model/SmsStaffExample.java<|end_filename|>
package com.neu.his.cloud.zuul.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class SmsStaffExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SmsStaffExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andUsernameIsNull() {
            addCriterion("username is null");
            return (Criteria) this;
        }

        public Criteria andUsernameIsNotNull() {
            addCriterion("username is not null");
            return (Criteria) this;
        }

        public Criteria andUsernameEqualTo(String value) {
            addCriterion("username =", value, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameNotEqualTo(String value) {
            addCriterion("username <>", value, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameGreaterThan(String value) {
            addCriterion("username >", value, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameGreaterThanOrEqualTo(String value) {
            addCriterion("username >=", value, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameLessThan(String value) {
            addCriterion("username <", value, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameLessThanOrEqualTo(String value) {
            addCriterion("username <=", value, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameLike(String value) {
            addCriterion("username like", value, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameNotLike(String value) {
            addCriterion("username not like", value, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameIn(List<String> values) {
            addCriterion("username in", values, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameNotIn(List<String> values) {
            addCriterion("username not in", values, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameBetween(String value1, String value2) {
            addCriterion("username between", value1, value2, "username");
            return (Criteria) this;
        }

        public Criteria andUsernameNotBetween(String value1, String value2) {
            addCriterion("username not between", value1, value2, "username");
            return (Criteria) this;
        }

        public Criteria andPasswordIsNull() {
            addCriterion("password is null");
            return (Criteria) this;
        }

        public Criteria andPasswordIsNotNull() {
            addCriterion("password is not null");
            return (Criteria) this;
        }

        public Criteria andPasswordEqualTo(String value) {
            addCriterion("password =", value, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordNotEqualTo(String value) {
            addCriterion("password <>", value, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordGreaterThan(String value) {
            addCriterion("password >", value, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordGreaterThanOrEqualTo(String value) {
            addCriterion("password >=", value, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordLessThan(String value) {
            addCriterion("password <", value, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordLessThanOrEqualTo(String value) {
            addCriterion("password <=", value, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordLike(String value) {
            addCriterion("password like", value, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordNotLike(String value) {
            addCriterion("password not like", value, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordIn(List<String> values) {
            addCriterion("password in", values, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordNotIn(List<String> values) {
            addCriterion("password not in", values, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordBetween(String value1, String value2) {
            addCriterion("password between", value1, value2, "password");
            return (Criteria) this;
        }

        public Criteria andPasswordNotBetween(String value1, String value2) {
            addCriterion("password not between", value1, value2, "password");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andGenderIsNull() {
            addCriterion("gender is null");
            return (Criteria) this;
        }

        public Criteria andGenderIsNotNull() {
            addCriterion("gender is not null");
            return (Criteria) this;
        }

        public Criteria andGenderEqualTo(Integer value) {
            addCriterion("gender =", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotEqualTo(Integer value) {
            addCriterion("gender <>", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderGreaterThan(Integer value) {
            addCriterion("gender >", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderGreaterThanOrEqualTo(Integer value) {
            addCriterion("gender >=", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderLessThan(Integer value) {
            addCriterion("gender <", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderLessThanOrEqualTo(Integer value) {
            addCriterion("gender <=", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderIn(List<Integer> values) {
            addCriterion("gender in", values, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotIn(List<Integer> values) {
            addCriterion("gender not in", values, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderBetween(Integer value1, Integer value2) {
            addCriterion("gender between", value1, value2, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotBetween(Integer value1, Integer value2) {
            addCriterion("gender not between", value1, value2, "gender");
            return (Criteria) this;
        }

        public Criteria andSkdFlagIsNull() {
            addCriterion("skd_flag is null");
            return (Criteria) this;
        }

        public Criteria andSkdFlagIsNotNull() {
            addCriterion("skd_flag is not null");
            return (Criteria) this;
        }

        public Criteria andSkdFlagEqualTo(Integer value) {
            addCriterion("skd_flag =", value, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andSkdFlagNotEqualTo(Integer value) {
            addCriterion("skd_flag <>", value, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andSkdFlagGreaterThan(Integer value) {
            addCriterion("skd_flag >", value, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andSkdFlagGreaterThanOrEqualTo(Integer value) {
            addCriterion("skd_flag >=", value, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andSkdFlagLessThan(Integer value) {
            addCriterion("skd_flag <", value, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andSkdFlagLessThanOrEqualTo(Integer value) {
            addCriterion("skd_flag <=", value, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andSkdFlagIn(List<Integer> values) {
            addCriterion("skd_flag in", values, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andSkdFlagNotIn(List<Integer> values) {
            addCriterion("skd_flag not in", values, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andSkdFlagBetween(Integer value1, Integer value2) {
            addCriterion("skd_flag between", value1, value2, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andSkdFlagNotBetween(Integer value1, Integer value2) {
            addCriterion("skd_flag not between", value1, value2, "skdFlag");
            return (Criteria) this;
        }

        public Criteria andTitleIsNull() {
            addCriterion("title is null");
            return (Criteria) this;
        }

        public Criteria andTitleIsNotNull() {
            addCriterion("title is not null");
            return (Criteria) this;
        }

        public Criteria andTitleEqualTo(String value) {
            addCriterion("title =", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotEqualTo(String value) {
            addCriterion("title <>", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThan(String value) {
            addCriterion("title >", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThanOrEqualTo(String value) {
            addCriterion("title >=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThan(String value) {
            addCriterion("title <", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThanOrEqualTo(String value) {
            addCriterion("title <=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLike(String value) {
            addCriterion("title like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotLike(String value) {
            addCriterion("title not like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleIn(List<String> values) {
            addCriterion("title in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotIn(List<String> values) {
            addCriterion("title not in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleBetween(String value1, String value2) {
            addCriterion("title between", value1, value2, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotBetween(String value1, String value2) {
            addCriterion("title not between", value1, value2, "title");
            return (Criteria) this;
        }

        public Criteria andNameIsNull() {
            addCriterion("name is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("name is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("name =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("name <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("name >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("name >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("name <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("name <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("name like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("name not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("name in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("name not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("name between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("name not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNull() {
            addCriterion("dept_id is null");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNotNull() {
            addCriterion("dept_id is not null");
            return (Criteria) this;
        }

        public Criteria andDeptIdEqualTo(Long value) {
            addCriterion("dept_id =", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotEqualTo(Long value) {
            addCriterion("dept_id <>", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThan(Long value) {
            addCriterion("dept_id >", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThanOrEqualTo(Long value) {
            addCriterion("dept_id >=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThan(Long value) {
            addCriterion("dept_id <", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThanOrEqualTo(Long value) {
            addCriterion("dept_id <=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdIn(List<Long> values) {
            addCriterion("dept_id in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotIn(List<Long> values) {
            addCriterion("dept_id not in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdBetween(Long value1, Long value2) {
            addCriterion("dept_id between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotBetween(Long value1, Long value2) {
            addCriterion("dept_id not between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andRoleIdIsNull() {
            addCriterion("role_id is null");
            return (Criteria) this;
        }

        public Criteria andRoleIdIsNotNull() {
            addCriterion("role_id is not null");
            return (Criteria) this;
        }

        public Criteria andRoleIdEqualTo(Long value) {
            addCriterion("role_id =", value, "roleId");
            return (Criteria) this;
        }

        public Criteria andRoleIdNotEqualTo(Long value) {
            addCriterion("role_id <>", value, "roleId");
            return (Criteria) this;
        }

        public Criteria andRoleIdGreaterThan(Long value) {
            addCriterion("role_id >", value, "roleId");
            return (Criteria) this;
        }

        public Criteria andRoleIdGreaterThanOrEqualTo(Long value) {
            addCriterion("role_id >=", value, "roleId");
            return (Criteria) this;
        }

        public Criteria andRoleIdLessThan(Long value) {
            addCriterion("role_id <", value, "roleId");
            return (Criteria) this;
        }

        public Criteria andRoleIdLessThanOrEqualTo(Long value) {
            addCriterion("role_id <=", value, "roleId");
            return (Criteria) this;
        }

        public Criteria andRoleIdIn(List<Long> values) {
            addCriterion("role_id in", values, "roleId");
            return (Criteria) this;
        }

        public Criteria andRoleIdNotIn(List<Long> values) {
            addCriterion("role_id not in", values, "roleId");
            return (Criteria) this;
        }

        public Criteria andRoleIdBetween(Long value1, Long value2) {
            addCriterion("role_id between", value1, value2, "roleId");
            return (Criteria) this;
        }

        public Criteria andRoleIdNotBetween(Long value1, Long value2) {
            addCriterion("role_id not between", value1, value2, "roleId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdIsNull() {
            addCriterion("registration_rank_id is null");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdIsNotNull() {
            addCriterion("registration_rank_id is not null");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdEqualTo(Long value) {
            addCriterion("registration_rank_id =", value, "registrationRankId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdNotEqualTo(Long value) {
            addCriterion("registration_rank_id <>", value, "registrationRankId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdGreaterThan(Long value) {
            addCriterion("registration_rank_id >", value, "registrationRankId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdGreaterThanOrEqualTo(Long value) {
            addCriterion("registration_rank_id >=", value, "registrationRankId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdLessThan(Long value) {
            addCriterion("registration_rank_id <", value, "registrationRankId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdLessThanOrEqualTo(Long value) {
            addCriterion("registration_rank_id <=", value, "registrationRankId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdIn(List<Long> values) {
            addCriterion("registration_rank_id in", values, "registrationRankId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdNotIn(List<Long> values) {
            addCriterion("registration_rank_id not in", values, "registrationRankId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdBetween(Long value1, Long value2) {
            addCriterion("registration_rank_id between", value1, value2, "registrationRankId");
            return (Criteria) this;
        }

        public Criteria andRegistrationRankIdNotBetween(Long value1, Long value2) {
            addCriterion("registration_rank_id not between", value1, value2, "registrationRankId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsDiseCatalogDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;

import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsDiseCatalogParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDiseCatalogResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsDiseCatalogDistributionService {

    @RequestMapping(value = "/DmsDiseCatalog/create", method = RequestMethod.POST)
    CommonResult create(@RequestBody DmsDiseCatalogParam dmsDiseCatalogParam);


    @RequestMapping(value = "/DmsDiseCatalog/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/DmsDiseCatalog/update/{id}", method = RequestMethod.POST)
    CommonResult update(@PathVariable Long id, @RequestBody DmsDiseCatalogParam dmsDiseCatalogParam);

    @RequestMapping(value = "/DmsDiseCatalog/listAll", method = RequestMethod.POST)
    CommonResult<List<DmsDiseCatalogResult>> listAll();
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/dms/DmsHerbalPrescriptionRecordController.java<|end_filename|>
package com.neu.his.api.controller.dms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.dms.DmsHerbalPrescriptionRecordParam;
import com.neu.his.common.dto.dms.DmsHerbalPrescriptionRecordResult;
import com.neu.his.component.RabbitMQOrderSender;
import com.neu.his.dms.service.DmsHerbalPrescriptionRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@Controller
@Api(tags = "DmsHerbalPrescriptionRecordController", description = "草药处方管理")
@RequestMapping("/DmsHerbalPrescriptionRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsHerbalPrescriptionRecordController {

    @Autowired
    private DmsHerbalPrescriptionRecordService dmsHerbalPrescriptionRecordService;
    @Autowired
    private RabbitMQOrderSender rabbitMQOrderSender;

    /**
     * 描述:开立处方（发送）
     * <p>author: ma
     */
    @ApiOperation(value = "开立处方")
    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult apply(@RequestBody DmsHerbalPrescriptionRecordParam dmsHerbalPrescriptionRecordParam, BindingResult result){
        Long currentId = dmsHerbalPrescriptionRecordService.apply(dmsHerbalPrescriptionRecordParam);
        if(currentId > 0){
            //获取订单超时时间，假设为30s
            long delayTimes = 60 * 1000 *60 *12;
            //发送延迟消息
            rabbitMQOrderSender.sendMessage(currentId, 4, delayTimes);

            return CommonResult.success(currentId, "开立成功");
        }
        return CommonResult.failed("开立失败");
    }

    /**
     * 描述:作废处方
     * <p>author: ma
     */
    @ApiOperation(value = "作废处方")
    @RequestMapping(value = "/invalid", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult invalid(@RequestParam("ids") List<Long> ids){
        int count = dmsHerbalPrescriptionRecordService.invalid(ids);
        if(count > 0){
            return CommonResult.success(count, "作废成功");
        }
        return CommonResult.failed("作废失败");
    }

    /**
     * 描述:根据registrationId查询处方
     * <p>author: ma
     */
    @ApiOperation(value = "根据挂号Id查询处方")
    @RequestMapping(value = "/listByReg", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByReg(@RequestParam("registrationId") Long registrationId){
        List<DmsHerbalPrescriptionRecordResult> list = dmsHerbalPrescriptionRecordService.listByReg(registrationId);
        return CommonResult.success(list);
    }

    /**
     * 描述:根据ids查询处方
     * <p>author: 赵煜
     */
    @ApiOperation(value = "根据ids查询草药处方")
    @RequestMapping(value = "/listByIds", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsHerbalPrescriptionRecordResult>>  listByIds(@RequestParam("ids") List<Long> ids){
        List<DmsHerbalPrescriptionRecordResult> list = dmsHerbalPrescriptionRecordService.listByIds(ids);
        return CommonResult.success(list);
    }




}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsNonDrugModelService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsNonDrugModelParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsNonDrugModelResult;


import java.util.List;

/**
 * 非药品模板
 */
public interface DmsNonDrugModelService {

    /**
     * 描述：创建模版
     */
    public int createModel(DmsNonDrugModelParam dmsNonDrugModelParam);

    /**
     * 描述：删除模版
     */
    int deleteModel(List<Long> ids);


    /**
     * 描述：删除模版项
     */
    int deleteModelItem(Long modelId, List<Long> itemIds);


    /**
     * 描述：根据modelId更新model信息（删了重新创建）
     */
    int updateModel(Long modelId, DmsNonDrugModelParam dmsNonDrugModelParam);


    /**
     * 描述：查询模板
     */
    List<DmsNonDrugModelResult> selectModel(Integer type, DmsNonDrugModelParam queryParam, Integer pageSize, Integer pageNum);


}


<|start_filename|>HIS-master/HIS-common/src/main/java/com/neu/his/common/dto/dms/DmsCaseModelListResult.java<|end_filename|>
package com.neu.his.common.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

@Setter
@Getter
@ToString
public class DmsCaseModelListResult {

    @ApiModelProperty(value = "个人病历模板列表")
    List<DmsCaseModelResult> staffList;

    @ApiModelProperty(value = "科室病历模板列表")
    List<DmsCaseModelResult> deptList;

    @ApiModelProperty(value = "全院病历模板列表")
    List<DmsCaseModelResult> hospitalList;

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/sms/SmsStaffDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.sms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.sms.ApiPcSmsSkdDistributionService;
import com.neu.his.cloud.zuul.distribution.api.pc.sms.ApiPcSmsStaffDistributionService;
import com.neu.his.cloud.zuul.dto.sms.SmsSkdDocParam;
import com.neu.his.cloud.zuul.dto.sms.SmsSkdDocResult;
import com.neu.his.cloud.zuul.dto.sms.SmsStaffParam;
import com.neu.his.cloud.zuul.dto.sms.SmsStaffResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "SmsStaffDistributionController", description = "用户管理")
@RequestMapping("/staff")
@CrossOrigin(allowCredentials = "true")
public class SmsStaffDistributionController {

    @Autowired
    private ApiPcSmsStaffDistributionService apiPcSmsStaffDistributionService;
    @Autowired
    private ApiPcSmsSkdDistributionService apiPcSmsSkdDistributionService;


    @HystrixCommand(fallbackMethod = "listDocBySkdFallbackInfo")
    @ApiOperation(value = "查询上班医生")
    @RequestMapping(value = "/listDocBySkd", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<SmsSkdDocResult>> listDocBySkd(@RequestBody SmsSkdDocParam smsSkdDocParam, BindingResult result){
       return apiPcSmsStaffDistributionService.listDocBySkd(smsSkdDocParam);
    }
    private CommonResult<List<SmsSkdDocResult>> listDocBySkdFallbackInfo( SmsSkdDocParam smsSkdDocParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "deleteFallbackInfo")
    @ApiOperation("根据ids删除用户")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids) {
        return apiPcSmsStaffDistributionService.delete(ids);
    }
    private CommonResult deleteFallbackInfo(List<Long> ids) {
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "updateFallbackInfo")
    @ApiOperation("更新用户信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody SmsStaffParam smsStaffParam, BindingResult result){
        return apiPcSmsStaffDistributionService.update(id,smsStaffParam);
    }
    private CommonResult updateFallbackInfo( Long id,  SmsStaffParam smsStaffParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listFallbackInfo")
    @ApiOperation("模糊查询用户、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsStaffResult>> list(@RequestBody SmsStaffParam queryParam,
                                                         @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
       return apiPcSmsStaffDistributionService.list(queryParam,pageSize,pageNum);
    }
    private CommonResult<CommonPage<SmsStaffResult>> listFallbackInfo(SmsStaffParam queryParam,Integer pageSize, Integer pageNum){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listAllFallbackInfo")
    @ApiOperation("查询所有用户")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsStaffResult>> listAll(){
        return  apiPcSmsStaffDistributionService.listAll();
    }
    private CommonResult<List<SmsStaffResult>> listAllFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }




}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/sms/SmsDeptParam.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.sms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

@Setter
@Getter
@ToString
public class SmsDeptParam  implements Serializable {
    @ApiModelProperty(value = "科室编码")
    private String code;
    @ApiModelProperty(value = "科室名称")
    private String name;
    @ApiModelProperty(value = "科室分类")
    private Integer catId;
    @ApiModelProperty(value = "科室类型")
    private Integer type;
    @ApiModelProperty(value = "状态：0->无效;1->有效")
    private Integer status;
}


<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/mapper/PmsPatientMapper.java<|end_filename|>
package com.neu.his.mbg.mapper;

import com.neu.his.mbg.model.PmsPatient;
import com.neu.his.mbg.model.PmsPatientExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface PmsPatientMapper {
    int countByExample(PmsPatientExample example);

    int deleteByExample(PmsPatientExample example);

    int deleteByPrimaryKey(Long id);

    int insert(PmsPatient record);

    int insertSelective(PmsPatient record);

    List<PmsPatient> selectByExample(PmsPatientExample example);

    PmsPatient selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") PmsPatient record, @Param("example") PmsPatientExample example);

    int updateByExample(@Param("record") PmsPatient record, @Param("example") PmsPatientExample example);

    int updateByPrimaryKeySelective(PmsPatient record);

    int updateByPrimaryKey(PmsPatient record);
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsDrugModelDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsDrugModelDistributionService;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsNonDrugModelDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugModelParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDrugModelResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 *药品模版
 */
@RestController
@Api(tags = "DmsDrugModelDistributionController", description = "药品模板管理")
@RequestMapping("/drugModel")
@CrossOrigin(allowCredentials = "true")
public class DmsDrugModelDistributionController {

    @Autowired
    ApiPcDmsDrugModelDistributionService apiPcDmsDrugModelDistributionService;

    @HystrixCommand(fallbackMethod = "createFallbackInfo")
    @ApiOperation(value = "新增药品模版")
    @RequestMapping(value = "/createModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsDrugModelParam dmsDrugModelParam, BindingResult result) {
        return apiPcDmsDrugModelDistributionService.createModel(dmsDrugModelParam);
    }
    private CommonResult createFallbackInfo(DmsDrugModelParam dmsDrugModelParam, BindingResult result) {
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteModelFallbackInfo")
    @ApiOperation(value = "删除药品模版")
    @RequestMapping(value = "/deleteModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModel(@RequestParam("ids") List<Long> ids){
       return apiPcDmsDrugModelDistributionService.deleteModel(ids);
    }
    public CommonResult deleteModelFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateModelFallbackInfo")
    @ApiOperation(value = "更新药品模版")
    @RequestMapping(value = "/updateModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsDrugModelParam dmsDrugModelParam, BindingResult result){
        return apiPcDmsDrugModelDistributionService.updateModel(modelId,dmsDrugModelParam);
    }
    private CommonResult updateModelFallbackInfo(Long modelId,DmsDrugModelParam dmsDrugModelParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listModelFallbackInfo")
    @ApiOperation(value = "模糊查询药品模版、且分页")
    @RequestMapping(value = "/listModel", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<DmsDrugModelResult>> listModel(DmsDrugModelParam queryParam,
                                                                  @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                  @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin){
       return apiPcDmsDrugModelDistributionService.listModel(queryParam, pageSize, pageNum,isAdmin);
    }
    public CommonResult<CommonPage<DmsDrugModelResult>> listModelFallbackInfo(DmsDrugModelParam queryParam,Integer pageSize, Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin){
        return CommonResult.success(null,"请检查您的网络") ;
    }


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsNonDrugModelController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugModelParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugModelResult;
import com.neu.his.cloud.api.pc.service.dms.DmsNonDrugModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsNonDrugModelController", description = "非药品模版管理")
@RequestMapping("/NonDrugModel")
@CrossOrigin(allowCredentials = "true")
public class DmsNonDrugModelController {

    @Autowired
    DmsNonDrugModelService dmsNonDrugModelService;

    @ApiOperation(value = "新增非药品模版")
    @RequestMapping(value = "/createModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsNonDrugModelParam dmsNonDrugModelParam, BindingResult result) {
      return dmsNonDrugModelService.create(dmsNonDrugModelParam);

    }


    @ApiOperation(value = "删除非药品模版")
    @RequestMapping(value = "/deleteModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModel(@RequestParam("ids") List<Long> ids){
       return dmsNonDrugModelService.deleteModel(ids);
    }

    @ApiOperation(value = "删除非药品模版项")
    @RequestMapping(value = "/deleteModelItem", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModelItem(@RequestParam("modelId")Long modelId, @RequestParam("ids") List<Long> itemIds){
        return dmsNonDrugModelService.deleteModelItem(modelId,itemIds);
    }

    @ApiOperation(value = "更新非药品模版")
    @RequestMapping(value = "/updateModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsNonDrugModelParam dmsNonDrugModelParam, BindingResult result){
        return dmsNonDrugModelService.updateModel(modelId,dmsNonDrugModelParam);
    }

    @ApiOperation(value = "模糊查询非药品模版、且分页")
    @RequestMapping(value = "/listModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<DmsNonDrugModelResult>> list(@RequestBody DmsNonDrugModelParam queryParam,
                                                                @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin){

        return dmsNonDrugModelService.list(queryParam, pageSize, pageNum,isAdmin);

    }


}

<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/pms/PmsDiagnosisPatientController.java<|end_filename|>
package com.neu.his.api.controller.pms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.dms.DmsCaseHistoryResult;
import com.neu.his.common.dto.pms.PmsDiagnosisPatientListResult;
import com.neu.his.common.dto.pms.PmsPatientResult;
import com.neu.his.pms.service.PmsPatientService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@Api(tags = "PmsDiagnosisPatientController", description = "诊断病人管理")
@RequestMapping("/diagnosisPatient")
@CrossOrigin(allowCredentials = "true")
public class PmsDiagnosisPatientController {
    @Autowired
    PmsPatientService pmsPatientService;


    //根据身份证号查询患者基本信息
    //1.调用PmsPatientService的selectPatientByIdNo
    @ApiOperation(value = "根据身份证号查询患者基本信息")
    @RequestMapping(value = "/selectPatientByIdNo", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsPatientResult> selectPatientByIdNo(@RequestParam("identificationNo") String identificationNo){
        PmsPatientResult pmsPatientResult = pmsPatientService.selectPatientByIdNo(identificationNo);
        if (pmsPatientResult == null)
            return CommonResult.failed();
        return CommonResult.success(pmsPatientResult);
    }

    //根据医生id查询所有患者
    @ApiOperation(value = "根据医生id查询所有患者")
    @RequestMapping(value = "/refreshPatient", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<PmsDiagnosisPatientListResult> refreshPatient(@RequestParam("staffId") Long staffId){
        PmsDiagnosisPatientListResult pmsDiagnosisPatientListResult = pmsPatientService.refreshPatient(staffId);
        return CommonResult.success(pmsDiagnosisPatientListResult);
    }

    //医生添加患者
    @ApiOperation(value = "医生添加患者")
    @RequestMapping(value = "/bindPatient", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult bindPatient(@RequestParam("registrationId") Long registrationId,@RequestParam("staffId") Long staffId){
        int result;
        result = pmsPatientService.bindPatient(registrationId,staffId);
        if (result == 0){
            return CommonResult.failed();
        }
        else {
            return CommonResult.success(result);
        }
    }
    //医生开始诊断患者
    @ApiOperation(value = "医生开始诊断患者")
    @RequestMapping(value = "/startDiagnosis", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsCaseHistoryResult> startDiagnosis(@RequestParam("registrationId") Long registrationId){
        DmsCaseHistoryResult dmsCaseHistoryResult = pmsPatientService.startDiagnosis(registrationId);
        return CommonResult.success(dmsCaseHistoryResult);
    }
}


<|start_filename|>HIS-web/src/api/admin.js<|end_filename|>
import request from '@/utils/request'
export function getReglist(data) {
  return request({
    url: '/registerRank/select',
    method: 'post',
    params: {
      code:data.code,
      name:data.name,
      price:data.price,
      seqNo:data.seqNo,
      status:data.status,
      pageSize:data.limit,
      pageNum:data.page
    }
  })
}
export function getAllReg(){
  return request({
    url: '/registerRank/selectAll',
    method: 'get'
  })
}

export function createReg(data){
  return request({
    url: '/registerRank/create',
    method: 'post',
    data
  })
}

export function deleteReg(ids){
  return request({
    url: '/registerRank/delete',
    method: 'post',
    params: {ids}
  })
}

export function updateReg(data){
  return request({
    url: '/registerRank/update/'+data.id,
    method: 'post',
    data
  })
}


export function getSettleCatlist(data) {
  return request({
    url: '/settleCat/select',
    method: 'post',
    params: {
      id:data.id,
      name:data.name,
      pageSize:data.limit,
      pageNum:data.page
    }
  })
}
export function getAllSettleCat(){
  return request({
    url: '/settleCat/selectAll',
    method: 'get'
  })
}

export function createSettleCat(data){
  return request({
    url: '/settleCat/create',
    method: 'post',
    data
  })
}

export function deleteSettleCat(ids){
  return request({
    url: '/settleCat/delete',
    method: 'post',
    params: {ids}
  })
}

export function updateSettleCat(data){
  return request({
    url: '/settleCat/update/'+data.id,
    method: 'post',
    data
  })
}



<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/SmsWorkloadService.java<|end_filename|>
package com.neu.his.sms;

import com.neu.his.common.dto.sms.SmsWorkloadResult;

import java.util.Date;
import java.util.List;

/**
 * 工作量
 */
public interface SmsWorkloadService {

    /**
     * 描述：个人工作量统计
     */
    SmsWorkloadResult workloadPersonalStatistic(Long staffId, Date date);

    /**
     * 描述：个人工作量时间段查询
     */
    SmsWorkloadResult queryPersonalWorkloadPeriod(Long staffId, Date startDatetime, Date endDatetime);

    /**
     * 描述：统计某个科室某一天工作量（根据date直接判断是否存在）
     */
    SmsWorkloadResult workloadDeptStatistic(Long deptId, Date date);

    /**
     * 描述：统计某个科室工作量时间段的工作量（只有date，最后一天如果是今天则没有）
     */
    SmsWorkloadResult queryDeptWorkloadPeriod(Long deptId, Date startDatetime, Date endDatetime);

    /**
     * 描述：所有科室工作量分时间段统计
     */
    List<SmsWorkloadResult> queryDeptWorkloadList(Date startDatetime, Date endDatetime);

    /**
     * 描述：某个科室所有员工工作量分时间段统计
     */
    List<SmsWorkloadResult> queryDeptPersonalWorkloadList(Long deptId, Date startDatetime, Date endDatetime);

    /**
     * 描述：工作量插入
     */
    int insertWorkload(SmsWorkloadResult smsWorkLoadResult);

    /**
     * 描述：每日个人工作量统计插入
     */
    int dailyPersonalStatistic(Date date);

    /**
     * 描述：每日科室工作量统计插入
     */
    int dailyDeptStatistic(Date date);

    /**
     * 描述：每日统计插入
     */
    int statistic(Date date);


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/oss/OssCallbackParam.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.oss;


import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;


@Getter
@Setter
@ToString
public class OssCallbackParam implements Serializable {
    private String callbackUrl;
    private String callbackBody;
    private String callbackBodyType;

}


<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/impl/DemoServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.bms.service.impl;


import com.neu.his.cloud.service.bms.service.DemoService;
import org.springframework.stereotype.Service;


@Service
public class DemoServiceImpl implements DemoService {


    @Override
    public void test(){
        System.out.println("zzz");
    }

}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/dms/DmsNonDrugModelController.java<|end_filename|>
package com.neu.his.api.controller.dms;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.common.api.CommonPage;
import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.dms.DmsNonDrugModelParam;
import com.neu.his.common.dto.dms.DmsNonDrugModelResult;
import com.neu.his.common.dto.dms.DmsNonDrugResult;
import com.neu.his.dms.service.DmsNonDrugModelService;
import com.neu.his.mbg.model.DmsNonDrugModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsNonDrugModelController", description = "非药品模版管理")
@RequestMapping("/NonDrugModel")
@CrossOrigin(allowCredentials = "true")
public class DmsNonDrugModelController {

    @Autowired
    DmsNonDrugModelService dmsNonDrugModelService;

    @ApiOperation(value = "新增非药品模版")
    @RequestMapping(value = "/createModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsNonDrugModelParam dmsNonDrugModelParam, BindingResult result) {
        System.err.println("create");
        int count = dmsNonDrugModelService.createModel(dmsNonDrugModelParam);
        System.err.println("created=="+count);

        if (count > 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }


    @ApiOperation(value = "删除非药品模版")
    @RequestMapping(value = "/deleteModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModel(@RequestParam("ids") List<Long> ids){
        int count = dmsNonDrugModelService.deleteModel(ids);
            if (count >= 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }

    @ApiOperation(value = "删除非药品模版项")
    @RequestMapping(value = "/deleteModelItem", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModelItem( @RequestParam("modelId")Long modelId, @RequestParam("ids") List<Long> itemIds){
        int count = dmsNonDrugModelService.deleteModelItem(modelId,itemIds);
        if (count >= 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }

    @ApiOperation(value = "更新非药品模版")
    @RequestMapping(value = "/updateModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateModel(@RequestParam("modelId") Long modelId,@RequestBody DmsNonDrugModelParam dmsNonDrugModelParam, BindingResult result){
        int count = dmsNonDrugModelService.updateModel(modelId,dmsNonDrugModelParam);
        if (count > 0) {
            return CommonResult.success(count);
        }
        return CommonResult.failed();
    }

    @ApiOperation(value = "模糊查询非药品模版、且分页")
    @RequestMapping(value = "/listModel", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<DmsNonDrugModelResult>> list(DmsNonDrugModelParam queryParam,
                                                                @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,@RequestParam(value = "isAdmin") Integer isAdmin){
        Page page = PageHelper.startPage(pageNum, pageSize);
        List<DmsNonDrugModelResult> list = dmsNonDrugModelService.selectModel(isAdmin,queryParam, pageSize, pageNum);
        Long pageTotal=page.getTotal();
        return CommonResult.success(CommonPage.restPage(list,pageTotal));
    }


}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsDrugController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsDosageResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsDrugParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsDrugResult;
import com.neu.his.cloud.api.pc.service.dms.DmsDrugService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsDrugController", description = "药品管理")
@RequestMapping("/drug")
@CrossOrigin(allowCredentials = "true")
public class DmsDrugController {

    @Autowired
    private DmsDrugService dmsDrugService;

    @ApiOperation("新增药品")
    @RequestMapping(value = "/createDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createDrug(@RequestBody DmsDrugParam dmsDrugParam  , BindingResult result){
       return  dmsDrugService.createDrug(dmsDrugParam);
    }

    @ApiOperation("根据ids删除药品")
    @RequestMapping(value = "/deleteDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteDrug(@RequestParam("ids") List<Long> ids){
       return dmsDrugService.deleteDrug(ids);
    }

    @ApiOperation("更新药品信息")
    @RequestMapping(value = "/updateDrug/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateDrug(@PathVariable Long id, @RequestBody DmsDrugParam dmsDrugParam , BindingResult result){
        return  dmsDrugService.updateDrug(id,dmsDrugParam);

    }

    @ApiOperation("模糊查询药品、且分页")
    @RequestMapping(value = "/selectDrug", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<DmsDrugResult>> listDrug(@RequestBody DmsDrugParam queryParam,
                                                            @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){

       return dmsDrugService.listDrug(queryParam,pageSize,pageNum);

    }
    @ApiOperation("查询所有药品")
    @RequestMapping(value = "/selectAllDrug", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<DmsDrugResult>> listAllDrug(){
        return dmsDrugService.listAllDrug();

    }

    @ApiOperation("查询所有药品剂型")
    @RequestMapping(value = "/selectAllDosage", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<DmsDosageResult>> listAllDrugDosage(){
       return dmsDrugService.listAllDrugDosage();
    }


    @ApiOperation("根据id查询药品")
    @RequestMapping(value = "/selectById", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<DmsDrugResult> selectById(@RequestParam("id") Long id){

        return dmsDrugService.selectById(id);
    }

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/bms/BmsInvoiceService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.bms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsInvoiceResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;
import java.util.List;

@FeignClient(value = "his-cloud-service-bms")
public interface BmsInvoiceService {

    @RequestMapping(value = "/invoice/supplementPrintInvoice", method = RequestMethod.GET)
    CommonResult supplementPrintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("registrationId") Long registrationId);

    @RequestMapping(value = "/invoice/reprintInvoice", method = RequestMethod.GET)
    CommonResult  reprintInvoice(@RequestParam("newInvoiceNo") Long newInvoiceNo, @RequestParam("oldInvoiceNo") Long oldInvoiceNo);


    @RequestMapping(value = "/invoice/queryInvoiceInfo", method = RequestMethod.GET)
    CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfo(@RequestParam("cashierId") Long cashierId, @RequestParam("startDatetime")String startDatetime, @RequestParam("endDatetime")String endDatetime);


    @RequestMapping(value = "/invoice/queryInvoiceInfoBySettleId", method = RequestMethod.GET)
    CommonResult<List<BmsInvoiceResult>>  queryInvoiceInfoBySettleId(@RequestParam("settleRecordId") Long settleRecordId);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/service/tms/hystrix/TestFeignServiceHystrix.java<|end_filename|>
package com.neu.his.cloud.zuul.service.tms.hystrix;


import com.neu.his.cloud.zuul.dto.sms.SmsDeptResult;
import com.neu.his.cloud.zuul.service.tms.TestFeignService;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName: TestFeignServiceHystrix
 * @description: TODO
 * @author 赵煜
 * @date 2019/6/15 15:16
 */
@Component
public class TestFeignServiceHystrix implements TestFeignService {


    @Override
    public String hiTest(String message) {
        return "Hi，your message is :\"" + message + "\" but request error.";
    }

    @Override
    public List<SmsDeptResult> selectDept(String message) {
        return null;
    }
}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/DmsDrugStoreServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;

import com.neu.his.common.dto.dms.DmsRefundDrugListParam;
import com.neu.his.common.dto.dms.DmsRefundDrugParam;
import com.neu.his.common.dto.pms.PmsDrugStorePatientListResult;
import com.neu.his.common.dto.pms.PmsDrugStorePatientResult;
import com.neu.his.dms.service.DmsDrugStoreService;
import com.neu.his.mbg.mapper.*;
import com.neu.his.mbg.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;

import java.util.*;

@Service
public class DmsDrugStoreServiceImpl implements DmsDrugStoreService {

    @Autowired
    private DmsHerbalPrescriptionRecordMapper dmsHerbalPrescriptionRecordMapper;

    @Autowired
    private DmsHerbalItemRecordMapper dmsHerbalItemRecordMapper;

    @Autowired
    private DmsMedicinePrescriptionRecordMapper dmsMedicinePrescriptionRecordMapper;

    @Autowired
    private DmsMedicineItemRecordMapper dmsMedicineItemRecordMapper;

    @Autowired
    private DmsRegistrationMapper dmsRegistrationMapper;

    @Autowired
    private PmsPatientMapper pmsPatientMapper;

    @Autowired
    private DmsDrugMapper dmsDrugMapper;

    @Autowired
    private DmsDrugRefundItemRecordMapper dmsDrugRefundItemRecordMapper;

    @Override
    public PmsDrugStorePatientListResult listPatient(Date date, String medicalRecordNo, Integer type){
        //根据type(4 草药，5 成药)判断处方类型
        if(type == 4 ){
            return listWhenHerbal(date,medicalRecordNo);
        }else if(type == 5){
            return listWhenMedicine(date,medicalRecordNo);
        }
        return null;
    }

    //type=4时查草药处方
    public PmsDrugStorePatientListResult listWhenHerbal(Date date, String medicalRecordNo){
        System.err.println("正在查询草药处方");
        List<PmsDrugStorePatientResult> undoPatientList = new ArrayList<>();
        List<PmsDrugStorePatientResult> donePatientList = new ArrayList<>();
        //在处方表中根据时间查询
        List<Date> dateList = createDate(date);
        DmsHerbalPrescriptionRecordExample recordExample = new DmsHerbalPrescriptionRecordExample();
        recordExample.createCriteria().andCreateTimeBetween(dateList.get(0),dateList.get(1)); // 今天之内
        List<DmsHerbalPrescriptionRecord> recordList = dmsHerbalPrescriptionRecordMapper.selectByExample(recordExample);

        //判断处方项状态为2(未领药)\3（已领药）分类，查询挂号Id并去重
        Map<Long, List<Long>> undoPatientToRecord = new Hashtable();
        Map<Long, List<Long>> donePatientToRecord = new Hashtable();
        for(DmsHerbalPrescriptionRecord record : recordList){
            if(record.getStatus() == 2){
                if(undoPatientToRecord.get(record.getRegistrationId()) == null){
                    List<Long> longList = new ArrayList<>();
                    longList.add(record.getId());
                    undoPatientToRecord.put(record.getRegistrationId(),longList);
                }else{
                    List<Long> longList = undoPatientToRecord.get(record.getRegistrationId());
                    longList.add(record.getId());
                    undoPatientToRecord.put(record.getRegistrationId(),longList);
                }
            }else if(record.getStatus() == 3){
                if(donePatientToRecord.get(record.getRegistrationId()) == null){
                    List<Long> longList = new ArrayList<>();
                    longList.add(record.getId());
                    donePatientToRecord.put(record.getRegistrationId(),longList);
                }else{
                    List<Long> longList = donePatientToRecord.get(record.getRegistrationId());
                    longList.add(record.getId());
                    donePatientToRecord.put(record.getRegistrationId(),longList);
                }
            }
        }

        //根据病人id再在患者表中封装病人信息，如果传入患者病历号，则筛选患者
        for(Long key : undoPatientToRecord.keySet()){
            PmsDrugStorePatientResult result = new PmsDrugStorePatientResult();
            //查挂号表
            DmsRegistration registration = dmsRegistrationMapper.selectByPrimaryKey(key);
            if(registration == null){
                continue;
            }
            //查患者表，封装信息
            PmsPatient patient = pmsPatientMapper.selectByPrimaryKey(registration.getPatientId());
            if(patient == null){
                continue;
            }
            if(medicalRecordNo != null){
                if(!patient.getMedicalRecordNo().equals(medicalRecordNo)){
                    continue;
                }
            }
            result.setPatientId(patient.getId());
            result.setPatientName(patient.getName());
            result.setMedicalRecordNo(patient.getMedicalRecordNo());
            result.setPrescriptionIdList(undoPatientToRecord.get(key));
            undoPatientList.add(result);
        }
        for(Long key : donePatientToRecord.keySet()){
            PmsDrugStorePatientResult result = new PmsDrugStorePatientResult();
            //查挂号表
            DmsRegistration registration = dmsRegistrationMapper.selectByPrimaryKey(key);
            if(registration == null){
                continue;
            }
            //查患者表，封装信息
            PmsPatient patient = pmsPatientMapper.selectByPrimaryKey(registration.getPatientId());
            if(patient == null){
                continue;
            }
            if(medicalRecordNo != null){
                if(!patient.getMedicalRecordNo().equals(medicalRecordNo)){
                    continue;
                }
            }
            result.setPatientId(patient.getId());
            result.setPatientName(patient.getName());
            result.setMedicalRecordNo(patient.getMedicalRecordNo());
            result.setPrescriptionIdList(donePatientToRecord.get(key));
            donePatientList.add(result);
        }

        PmsDrugStorePatientListResult result = new PmsDrugStorePatientListResult();
        result.setUndoPatientList(undoPatientList);
        result.setDonePatientList(donePatientList);
        return result;
    }
    //type=5时查成药处方
    public PmsDrugStorePatientListResult listWhenMedicine(Date date, String medicalRecordNo){
        System.err.println("正在查询西药处方");
        List<PmsDrugStorePatientResult> undoPatientList = new ArrayList<>();
        List<PmsDrugStorePatientResult> donePatientList = new ArrayList<>();
        //在处方表中根据时间查询
        List<Date> dateList = createDate(date);
        DmsMedicinePrescriptionRecordExample recordExample = new DmsMedicinePrescriptionRecordExample();
        recordExample.createCriteria().andCreateTimeBetween(dateList.get(0),dateList.get(1));
        List<DmsMedicinePrescriptionRecord> recordList = dmsMedicinePrescriptionRecordMapper.selectByExample(recordExample);
        System.err.println("在时间范围内的西药处方条数："+recordList.size());


        //判断处方项状态为2(未领药)\3（已领药）分类，查询挂号Id并去重
        Map<Long, List<Long>> undoPatientToRecord = new Hashtable();
        Map<Long, List<Long>> donePatientToRecord = new Hashtable();
        for(DmsMedicinePrescriptionRecord record : recordList){
            if(record.getStatus() == 2){  //未领药
                if(undoPatientToRecord.get(record.getRegistrationId()) == null){
                    List<Long> longList = new ArrayList<>();
                    longList.add(record.getId());
                    undoPatientToRecord.put(record.getRegistrationId(),longList);
                }else{
                    List<Long> longList = undoPatientToRecord.get(record.getRegistrationId());
                    longList.add(record.getId());
                    undoPatientToRecord.put(record.getRegistrationId(),longList);
                }
            }else if(record.getStatus() == 3){ //已领药
                if(donePatientToRecord.get(record.getRegistrationId()) == null){
                    List<Long> longList = new ArrayList<>();
                    longList.add(record.getId());
                    donePatientToRecord.put(record.getRegistrationId(),longList);
                }else{
                    List<Long> longList = donePatientToRecord.get(record.getRegistrationId());
                    longList.add(record.getId());
                    donePatientToRecord.put(record.getRegistrationId(),longList);
                }
            }
        }

        //根据病人id再在患者表中封装病人信息，如果传入患者病历号，则筛选患者
        for(Long key : undoPatientToRecord.keySet()){
            PmsDrugStorePatientResult result = new PmsDrugStorePatientResult();
            //查挂号表
            DmsRegistration registration = dmsRegistrationMapper.selectByPrimaryKey(key);
            if(registration == null){
                continue;
            }
            //查患者表，封装信息
            PmsPatient patient = pmsPatientMapper.selectByPrimaryKey(registration.getPatientId());
            if(patient == null){
                continue;
            }
            if(medicalRecordNo != null){
                if(!patient.getMedicalRecordNo().equals(medicalRecordNo)){
                    continue;
                }
            }
            result.setPatientId(patient.getId());
            result.setPatientName(patient.getName());
            result.setMedicalRecordNo(patient.getMedicalRecordNo());
            result.setPrescriptionIdList(undoPatientToRecord.get(key));
            undoPatientList.add(result);
        }
        for(Long key : donePatientToRecord.keySet()){
            PmsDrugStorePatientResult result = new PmsDrugStorePatientResult();
            //查挂号表
            DmsRegistration registration = dmsRegistrationMapper.selectByPrimaryKey(key);
            if(registration == null){
                continue;
            }
            //查患者表，封装信息
            PmsPatient patient = pmsPatientMapper.selectByPrimaryKey(registration.getPatientId());
            if(patient == null){
                continue;
            }
            if(medicalRecordNo != null){
                if(!patient.getMedicalRecordNo().equals(medicalRecordNo)){
                    continue;
                }
            }
            result.setPatientId(patient.getId());
            result.setPatientName(patient.getName());
            result.setMedicalRecordNo(patient.getMedicalRecordNo());
            result.setPrescriptionIdList(donePatientToRecord.get(key));
            donePatientList.add(result);
        }



        PmsDrugStorePatientListResult result = new PmsDrugStorePatientListResult();
        result.setUndoPatientList(undoPatientList);
        result.setDonePatientList(donePatientList);
        return result;
    }


    @Override
    public int releaseDrug(Long prescriptionId,Integer type){
        //根据处方id判断处方状态为2修改为3
        int count = 0;
        if(type == 4){
            DmsHerbalPrescriptionRecord record = new DmsHerbalPrescriptionRecord();
            record.setStatus(3);
            DmsHerbalPrescriptionRecordExample example = new DmsHerbalPrescriptionRecordExample();
            example.createCriteria().andIdEqualTo(prescriptionId).andStatusEqualTo(2);
            count += dmsHerbalPrescriptionRecordMapper.updateByExampleSelective(record,example);
            if(count == 0){
                return count;
            }

            //根据处方id修改处方项status 1的 为 2
            DmsHerbalItemRecordExample itemExample = new DmsHerbalItemRecordExample();
            itemExample.createCriteria().andPrescriptionIdEqualTo(prescriptionId).andStatusEqualTo(1);
            DmsHerbalItemRecord itemRecord = new DmsHerbalItemRecord();
            itemRecord.setStatus(2);
            count += dmsHerbalItemRecordMapper.updateByExampleSelective(itemRecord,itemExample);
        }else if(type == 5){
            DmsMedicinePrescriptionRecord record = new DmsMedicinePrescriptionRecord();
            record.setStatus(3);
            DmsMedicinePrescriptionRecordExample example = new DmsMedicinePrescriptionRecordExample();
            example.createCriteria().andIdEqualTo(prescriptionId).andStatusEqualTo(2);
            count += dmsMedicinePrescriptionRecordMapper.updateByExampleSelective(record,example);
            if(count == 0){
                return count;
            }

            //根据处方id修改处方项status 1的 为 2
            DmsMedicineItemRecordExample itemExample = new DmsMedicineItemRecordExample();
            itemExample.createCriteria().andPrescriptionIdEqualTo(prescriptionId).andStatusEqualTo(1);
            DmsMedicineItemRecord itemRecord = new DmsMedicineItemRecord();
            itemRecord.setStatus(2);
            count += dmsMedicineItemRecordMapper.updateByExampleSelective(itemRecord,itemExample);
        }

        return count;
    }

    @Override
    public int refundDrug(DmsRefundDrugListParam dmsRefundDrugListParam) {
        int count = 0;

        //一个处方项一个处方项退
        for (DmsRefundDrugParam refundItem : dmsRefundDrugListParam.getRefundItemList()) {
            //草药退药
            if (refundItem.getType() == 4) {
                DmsHerbalItemRecord item = dmsHerbalItemRecordMapper.selectByPrimaryKey(refundItem.getRefundPrescriptionItemId());
                if (item == null) {
                    return count;
                }
                //检查是否符合退药条件：状态为 2已发药 或 3退药，退药数量<=当前数量
                if ((item.getStatus() != 2 && item.getStatus() != 3) || item.getCurrentNum() < refundItem.getRefundNum()) {
                   return count;
                }
                //修改状态为3(退药)，并修改current_num
                DmsHerbalItemRecord record = new DmsHerbalItemRecord();
                record.setId(refundItem.getRefundPrescriptionItemId());
                record.setStatus(3);
                record.setCurrentNum(item.getCurrentNum() - refundItem.getRefundNum());
                count += dmsHerbalItemRecordMapper.updateByPrimaryKeySelective(record);

                //修改库存
                DmsDrug drug = dmsDrugMapper.selectByPrimaryKey(item.getDrugId());
                if (drug == null) {
                    return count;
                }
                DmsDrug newDrug = new DmsDrug();
                newDrug.setId(item.getDrugId());
                newDrug.setStock(drug.getStock() + refundItem.getRefundNum());
                count += dmsDrugMapper.updateByPrimaryKeySelective(newDrug);

                //获取草药处方单
                DmsHerbalPrescriptionRecord prescriptionRecord = dmsHerbalPrescriptionRecordMapper.selectByPrimaryKey(item.getPrescriptionId());

                //添加退药记录
                DmsDrugRefundItemRecord refundItemRecord = new DmsDrugRefundItemRecord();
                refundItemRecord.setStatus(1);
                refundItemRecord.setType(4);
                refundItemRecord.setRegistrationId(prescriptionRecord.getRegistrationId());
                refundItemRecord.setDrugId(item.getDrugId());
                refundItemRecord.setRefundNumUnit(item.getUsageNumUnit());
                refundItemRecord.setRefundNum(refundItem.getRefundNum());
                refundItemRecord.setRefundTime(new Date());
                refundItemRecord.setExcutorId(dmsRefundDrugListParam.getExcutorId());
                refundItemRecord.setRefundItemRecordId(item.getId());
                count += dmsDrugRefundItemRecordMapper.insert(refundItemRecord);
            }//草药退药
            else if (refundItem.getType() == 5) { //西药退药
                DmsMedicineItemRecord item = dmsMedicineItemRecordMapper.selectByPrimaryKey(refundItem.getRefundPrescriptionItemId());
                if (item == null) {
                    return count;
                }
                //检查是否符合退药条件：状态为 2已发药 或 3退药，退药数量<=当前数量
                if ((item.getStatus() != 2 && item.getStatus() != 3) || item.getCurrentNum() < refundItem.getRefundNum()) {
                    //不符合条件抛出异常，事务回退
                    return count;
                }
                //修改状态为3(退药)，并修改current_num
                DmsMedicineItemRecord record = new DmsMedicineItemRecord();
                record.setId(refundItem.getRefundPrescriptionItemId());
                record.setStatus(3);
                record.setCurrentNum(item.getCurrentNum() - refundItem.getRefundNum());
                record.setRefundNum(item.getRefundNum()+refundItem.getRefundNum());
                count += dmsMedicineItemRecordMapper.updateByPrimaryKeySelective(record);

                //修改库存
                DmsDrug drug = dmsDrugMapper.selectByPrimaryKey(item.getDrugId());
                if (drug == null) {
                    return count;
                }
                DmsDrug newDrug = new DmsDrug();
                newDrug.setId(item.getDrugId());
                newDrug.setStock(drug.getStock() + refundItem.getRefundNum());
                count += dmsDrugMapper.updateByPrimaryKeySelective(newDrug);

                //获取成药处方单
                DmsMedicinePrescriptionRecord prescriptionRecord = dmsMedicinePrescriptionRecordMapper.selectByPrimaryKey(item.getPrescriptionId());

                //添加退药记录
                DmsDrugRefundItemRecord refundItemRecord = new DmsDrugRefundItemRecord();
                refundItemRecord.setStatus(1);
                refundItemRecord.setType(5);
                refundItemRecord.setRegistrationId(prescriptionRecord.getRegistrationId());
                refundItemRecord.setDrugId(item.getDrugId());
                refundItemRecord.setRefundNumUnit(item.getUsageNumUnit());
                refundItemRecord.setRefundNum(refundItem.getRefundNum());
                refundItemRecord.setRefundTime(new Date());
                refundItemRecord.setExcutorId(dmsRefundDrugListParam.getExcutorId());
                refundItemRecord.setRefundItemRecordId(item.getId());
                count += dmsDrugRefundItemRecordMapper.insert(refundItemRecord);
            } else {
                //不是草药也不是成药，事务回退
                return count;
            }
        }
        return count;
    }


    //获取给定时间的时间段
    public List<Date> createDate(Date date){
        List<Date> dateList = new ArrayList<>();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        // 设置时分秒毫秒为0:0:0
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        dateList.add(calendar.getTime());

        // 设置时分秒毫秒为23:59:59:999
        calendar.set(Calendar.HOUR_OF_DAY, 23);
        calendar.set(Calendar.MINUTE, 59);
        calendar.set(Calendar.SECOND, 59);
        calendar.set(Calendar.MILLISECOND, 999);
        dateList.add(calendar.getTime());

        return dateList;
    }


}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/ServiceDmsApplication.java<|end_filename|>
package com.neu.his.cloud.service.dms;



import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(scanBasePackages = "com.neu.his.cloud.service.dms")
@EnableEurekaClient
@MapperScan("com.neu.his.cloud.service.dms.mapper")

public class ServiceDmsApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceDmsApplication.class,args);
    }
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/sms/SmsSkdController.java<|end_filename|>
package com.neu.his.api.controller.sms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.common.api.CommonPage;
import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.sms.*;
import com.neu.his.mbg.model.SmsSkd;
import com.neu.his.sms.SmsSkdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@Controller
@Api(tags = "SmsSkdController", description = "排班管理")
@RequestMapping("/skd")
@CrossOrigin(allowCredentials = "true")
public class SmsSkdController {

    @Autowired
    private SmsSkdService smsSkdService;

    /**
     * 描述:创建排班规则
     * <p>author: ma
     */
    @ApiOperation("新增排班规则")
    @RequestMapping(value = "/createRule", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createRule(@RequestBody SmsSkdRuleParam smsSkdRuleParam, BindingResult result){
        int count = smsSkdService.createRule(smsSkdRuleParam);
        if(count > 0){
            return CommonResult.success(count, "新增排班规则成功");
        }
        return CommonResult.failed("新增排班规则失败");
    }

    /**
     * 描述:删除排班规则
     * <p>author: ma
     */
    @ApiOperation("删除排班规则")
    @RequestMapping(value = "/deleteRule", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteRule(@RequestParam("ids") List<Long> ids){
        int count = smsSkdService.deleteRule(ids);
        if(count > 0){
            return CommonResult.success(count,"删除成功");
        }
        return CommonResult.failed("删除失败");
    }



    @ApiOperation("更新排班规则")
    @RequestMapping(value = "/updateRule/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateRule(@PathVariable Long id,@RequestBody SmsSkdRuleParam smsSkdRuleParam , BindingResult result){
        int count = smsSkdService.updateRule(id,smsSkdRuleParam);
        if(count > 0){
            return CommonResult.success(count,"更新成功");
        }
        return CommonResult.failed("更新失败");
    }

    /**
     * 描述:根据部门id筛选排版规则基本信息、分页
     * <p>author: ma
     * <p>author: 赵煜  修改查询不到科室排班规则500错误,并返回创建人name
     */
    @ApiOperation("根据部门id筛选排版规则基本信息、分页")
    @RequestMapping(value = "/listRule", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsSkdRuleResult>> listRule(@RequestParam("deptId")  Long deptId,
                                                               @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                               @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        Page page =PageHelper.startPage(pageNum, pageSize);
        List<SmsSkdRuleResult> list = smsSkdService.selectRuleByDept(deptId);
       if( CollectionUtils.isEmpty(list)){
            return CommonResult.success(null,"不存在排班规则");
       }
        Long pageTotal=page.getTotal();
        return CommonResult.success(CommonPage.restPage(list,pageTotal));
    }

    /**
     * 描述:根据规则id查询一条规则详情
     * <p>author: ma
     */
    @ApiOperation("根据规则id查询一条规则详情")
    @RequestMapping(value = "/getRuleDetail", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsSkdRuleResult> getRuleDetail(@RequestParam("ruleId") Long ruleId){
        SmsSkdRuleResult smsSkdRuleResult = smsSkdService.getRuleDetail(ruleId);
        return CommonResult.success(smsSkdRuleResult);
    }

    /**
     * 描述:根据多条排班规则生成skd
     * <p>author: ma
     */
    @ApiOperation("根据多条排班规则生成skd")
    @RequestMapping(value = "/generateSkd", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult generateSkd(@RequestParam("ruleIds") List<Long> ruleIds, @RequestParam("startDate")@DateTimeFormat(pattern = "yyyy-MM-dd")Date startDate, @RequestParam("endDate") @DateTimeFormat(pattern = "yyyy-MM-dd")Date endDate){
        int count = smsSkdService.generateSkd(ruleIds,startDate,endDate);
        if(count > 0){
            return CommonResult.success(count,"生成成功");
        }
        return CommonResult.failed("生成失败");
    }

    /**
     * 描述:查找排班记录、分页
     * <p>author: ma
     */
    @ApiOperation("查找排班记录、分页")
    @RequestMapping(value = "/listSkd", method = RequestMethod.POST)
    @ResponseBody
    public  CommonResult<CommonPage<SmsSkdResult>> listSkd(SmsSkdParam queryParam,
                                                           @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        Page page =PageHelper.startPage(pageNum, pageSize);

        List<SmsSkdResult> smsSkdResultList = smsSkdService.listSkd(queryParam);
        Long pageTotal=page.getTotal();
        return CommonResult.success(CommonPage.restPage(smsSkdResultList,pageTotal));
    }

    @ApiOperation("查找排班记录、不分页")
    @RequestMapping(value = "/querySkd", method = RequestMethod.POST)
    @ResponseBody
    public  CommonResult<List<SmsSkdResult>> listSkd(SmsSkdParam queryParam){

        return CommonResult.success(smsSkdService.listSkd(queryParam));
    }


    /**
     * 描述:新增时候列出的科室下员工信息
     * <p>author:赵煜
     */
    @ApiOperation("新增时候列出的科室下员工信息")
    @RequestMapping(value = "/listCanSkdStaff/{deptId}", method = RequestMethod.POST)
    @ResponseBody
    public  CommonResult<List<SmsSkdRuleItemResult>> listCanSkdStaff(@PathVariable Long deptId){
        List<SmsSkdRuleItemResult> smsSkdResultList = smsSkdService.listCanSkdStaffByDept(deptId);
        return CommonResult.success(smsSkdResultList);
    }

}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/DmsNonDrugService.java<|end_filename|>
package com.neu.his.cloud.service.dms.service;

import com.neu.his.cloud.service.dms.dto.dms.DmsNonDrugParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsNonDrugResult;


import java.util.List;

/**
 * 非药品
 */
public interface DmsNonDrugService {
    /**
     * 描述：新增一个非药品
     */
    int create(DmsNonDrugParam dmsNonDrugParam);
    /**
     * 描述：根据ids删除非药品
     */
    int delete(List<Long> ids);
    /**
     * 描述：更新
     */
    int update(Long id, DmsNonDrugParam dmsNonDrugParam);
    /**
     * 描述：模糊查询非药品、且分页
     */
    List<DmsNonDrugResult> select(DmsNonDrugParam dmsNonDrugParam);
    /**
     * 描述：查询所有非药品
     */
    List<DmsNonDrugResult> selectAll();
}


<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/model/BmsOperatorSettleRecord.java<|end_filename|>
package com.neu.his.cloud.service.pms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class BmsOperatorSettleRecord implements Serializable {
    private Long id;

    private Date startDatetime;

    private Date endDatetime;

    private Date createDatetime;

    private Long cashierId;

    private Long invoiceNum;

    private Long rushInvoiceNum;

    private Long reprintInvoiceNum;

    private String startEndInvoiceIdStr;

    private String rushInvoiceIdListStr;

    private String reprintInvoiceIdListStr;

    private BigDecimal medicineAmount;

    private BigDecimal herbalAmount;

    private BigDecimal checkAmount;

    private BigDecimal dispositionAmount;

    private BigDecimal registrationAmount;

    private BigDecimal testAmount;

    private BigDecimal amount;

    private BigDecimal cashAmount;

    private BigDecimal insuranceAmount;

    private BigDecimal bankCardAmount;

    private BigDecimal alipayAmount;

    private BigDecimal wechatAmount;

    private BigDecimal creditCardAmount;

    private BigDecimal otherAmount;

    private Long verifyOperatorId;

    private Date verifyDatetime;

    private Integer verifyStatus;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getStartDatetime() {
        return startDatetime;
    }

    public void setStartDatetime(Date startDatetime) {
        this.startDatetime = startDatetime;
    }

    public Date getEndDatetime() {
        return endDatetime;
    }

    public void setEndDatetime(Date endDatetime) {
        this.endDatetime = endDatetime;
    }

    public Date getCreateDatetime() {
        return createDatetime;
    }

    public void setCreateDatetime(Date createDatetime) {
        this.createDatetime = createDatetime;
    }

    public Long getCashierId() {
        return cashierId;
    }

    public void setCashierId(Long cashierId) {
        this.cashierId = cashierId;
    }

    public Long getInvoiceNum() {
        return invoiceNum;
    }

    public void setInvoiceNum(Long invoiceNum) {
        this.invoiceNum = invoiceNum;
    }

    public Long getRushInvoiceNum() {
        return rushInvoiceNum;
    }

    public void setRushInvoiceNum(Long rushInvoiceNum) {
        this.rushInvoiceNum = rushInvoiceNum;
    }

    public Long getReprintInvoiceNum() {
        return reprintInvoiceNum;
    }

    public void setReprintInvoiceNum(Long reprintInvoiceNum) {
        this.reprintInvoiceNum = reprintInvoiceNum;
    }

    public String getStartEndInvoiceIdStr() {
        return startEndInvoiceIdStr;
    }

    public void setStartEndInvoiceIdStr(String startEndInvoiceIdStr) {
        this.startEndInvoiceIdStr = startEndInvoiceIdStr;
    }

    public String getRushInvoiceIdListStr() {
        return rushInvoiceIdListStr;
    }

    public void setRushInvoiceIdListStr(String rushInvoiceIdListStr) {
        this.rushInvoiceIdListStr = rushInvoiceIdListStr;
    }

    public String getReprintInvoiceIdListStr() {
        return reprintInvoiceIdListStr;
    }

    public void setReprintInvoiceIdListStr(String reprintInvoiceIdListStr) {
        this.reprintInvoiceIdListStr = reprintInvoiceIdListStr;
    }

    public BigDecimal getMedicineAmount() {
        return medicineAmount;
    }

    public void setMedicineAmount(BigDecimal medicineAmount) {
        this.medicineAmount = medicineAmount;
    }

    public BigDecimal getHerbalAmount() {
        return herbalAmount;
    }

    public void setHerbalAmount(BigDecimal herbalAmount) {
        this.herbalAmount = herbalAmount;
    }

    public BigDecimal getCheckAmount() {
        return checkAmount;
    }

    public void setCheckAmount(BigDecimal checkAmount) {
        this.checkAmount = checkAmount;
    }

    public BigDecimal getDispositionAmount() {
        return dispositionAmount;
    }

    public void setDispositionAmount(BigDecimal dispositionAmount) {
        this.dispositionAmount = dispositionAmount;
    }

    public BigDecimal getRegistrationAmount() {
        return registrationAmount;
    }

    public void setRegistrationAmount(BigDecimal registrationAmount) {
        this.registrationAmount = registrationAmount;
    }

    public BigDecimal getTestAmount() {
        return testAmount;
    }

    public void setTestAmount(BigDecimal testAmount) {
        this.testAmount = testAmount;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getCashAmount() {
        return cashAmount;
    }

    public void setCashAmount(BigDecimal cashAmount) {
        this.cashAmount = cashAmount;
    }

    public BigDecimal getInsuranceAmount() {
        return insuranceAmount;
    }

    public void setInsuranceAmount(BigDecimal insuranceAmount) {
        this.insuranceAmount = insuranceAmount;
    }

    public BigDecimal getBankCardAmount() {
        return bankCardAmount;
    }

    public void setBankCardAmount(BigDecimal bankCardAmount) {
        this.bankCardAmount = bankCardAmount;
    }

    public BigDecimal getAlipayAmount() {
        return alipayAmount;
    }

    public void setAlipayAmount(BigDecimal alipayAmount) {
        this.alipayAmount = alipayAmount;
    }

    public BigDecimal getWechatAmount() {
        return wechatAmount;
    }

    public void setWechatAmount(BigDecimal wechatAmount) {
        this.wechatAmount = wechatAmount;
    }

    public BigDecimal getCreditCardAmount() {
        return creditCardAmount;
    }

    public void setCreditCardAmount(BigDecimal creditCardAmount) {
        this.creditCardAmount = creditCardAmount;
    }

    public BigDecimal getOtherAmount() {
        return otherAmount;
    }

    public void setOtherAmount(BigDecimal otherAmount) {
        this.otherAmount = otherAmount;
    }

    public Long getVerifyOperatorId() {
        return verifyOperatorId;
    }

    public void setVerifyOperatorId(Long verifyOperatorId) {
        this.verifyOperatorId = verifyOperatorId;
    }

    public Date getVerifyDatetime() {
        return verifyDatetime;
    }

    public void setVerifyDatetime(Date verifyDatetime) {
        this.verifyDatetime = verifyDatetime;
    }

    public Integer getVerifyStatus() {
        return verifyStatus;
    }

    public void setVerifyStatus(Integer verifyStatus) {
        this.verifyStatus = verifyStatus;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", startDatetime=").append(startDatetime);
        sb.append(", endDatetime=").append(endDatetime);
        sb.append(", createDatetime=").append(createDatetime);
        sb.append(", cashierId=").append(cashierId);
        sb.append(", invoiceNum=").append(invoiceNum);
        sb.append(", rushInvoiceNum=").append(rushInvoiceNum);
        sb.append(", reprintInvoiceNum=").append(reprintInvoiceNum);
        sb.append(", startEndInvoiceIdStr=").append(startEndInvoiceIdStr);
        sb.append(", rushInvoiceIdListStr=").append(rushInvoiceIdListStr);
        sb.append(", reprintInvoiceIdListStr=").append(reprintInvoiceIdListStr);
        sb.append(", medicineAmount=").append(medicineAmount);
        sb.append(", herbalAmount=").append(herbalAmount);
        sb.append(", checkAmount=").append(checkAmount);
        sb.append(", dispositionAmount=").append(dispositionAmount);
        sb.append(", registrationAmount=").append(registrationAmount);
        sb.append(", testAmount=").append(testAmount);
        sb.append(", amount=").append(amount);
        sb.append(", cashAmount=").append(cashAmount);
        sb.append(", insuranceAmount=").append(insuranceAmount);
        sb.append(", bankCardAmount=").append(bankCardAmount);
        sb.append(", alipayAmount=").append(alipayAmount);
        sb.append(", wechatAmount=").append(wechatAmount);
        sb.append(", creditCardAmount=").append(creditCardAmount);
        sb.append(", otherAmount=").append(otherAmount);
        sb.append(", verifyOperatorId=").append(verifyOperatorId);
        sb.append(", verifyDatetime=").append(verifyDatetime);
        sb.append(", verifyStatus=").append(verifyStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-service-pms/src/main/java/com/neu/his/cloud/service/pms/service/PmsPatientService.java<|end_filename|>
package com.neu.his.cloud.service.pms.service;


import com.neu.his.cloud.service.pms.dto.dms.DmsCaseHistoryResult;
import com.neu.his.cloud.service.pms.dto.pms.PmsDiagnosisPatientListResult;
import com.neu.his.cloud.service.pms.dto.pms.PmsPatientResult;

/**
 * 病人
 */
public interface PmsPatientService {
    /**
     * 描述：根据身份证号查询患者基本信息
     */
    PmsPatientResult selectPatientByIdNo(String identificationNo);
    /**
     * 描述：刷新患者信息
     */
    PmsDiagnosisPatientListResult refreshPatient(Long staffId);
    /**
     * 描述：绑定医生
     */
    int bindPatient(Long registrationId, Long staffId);
    /**
     * 描述：开始诊断
     */
    DmsCaseHistoryResult startDiagnosis(Long registrationId);
    /**
     * 描述：更新诊断状态
     */
    int updateDiagnosisStatus(Long registrationId, Integer status);
    /**
     * 描述：根据门诊号查询历史病历
     */
    DmsCaseHistoryResult selectCaseHistoryByPatient(Long registrationId);

    /**
     * 描述：病人app登录
     */
    PmsPatientResult patientLogin(String identificationNo, String medicalRecordNo);
}


<|start_filename|>HIS-web/src/api/non_drug.js<|end_filename|>
import request from '@/utils/request'

export function getNondrugList(data) {
  return request({
    url: '/DmsNonDrug/list',
    method: 'get',
    params: data
  })
}

export function getAllNondrug(){
  return request({
    url: '/DmsNonDrug/listAll',
    method: 'post'
  })
}

export function updateNondrug(data){
  return request({
    url: '/DmsNonDrug/update/'+data.id,
    method: 'post',
    data
  })
}

export function deleteNondrug(ids){
  return request({
    url: '/DmsNonDrug/delete',
    method: 'post',
    params: {ids}
  })
}

export function createNondrug(data){
  return request({
    url: '/DmsNonDrug/create',
    method: 'post',
    data
  })
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/dto/dms/DmsDosageResult.java<|end_filename|>
package com.neu.his.cloud.service.dms.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
public class DmsDosageResult   implements Serializable {
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "编码")
    private String code;
    @ApiModelProperty(value = "名字")
    private String name;
    @ApiModelProperty(value = "状态")
    private Integer status;

    @Override
    public String toString() {
        return "DmsDosageResult{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", name='" + name + '\'' +
                ", status=" + status +
                '}';
    }
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/ServiceSmsApplication.java<|end_filename|>
package com.neu.his.cloud.service.sms;



import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication(scanBasePackages = "com.neu.his.cloud.service.sms")
@EnableEurekaClient
@MapperScan("com.neu.his.cloud.service.sms.mapper")
public class ServiceSmsApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceSmsApplication.class,args);
    }
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/SmsEchartsService.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;


import com.neu.his.cloud.service.sms.dto.sms.SmsDeptAmountStatisticsResult;
import com.neu.his.cloud.service.sms.dto.sms.SmsPatientsStatisticsResult;
import com.neu.his.cloud.service.sms.dto.sms.SmsStaffAmountStatisticsResult;

/**
 * echarts数据统计
 */
public interface SmsEchartsService {
    /**
     * 描述：统计个人每日接待患者人数（近7日）
     */
    SmsPatientsStatisticsResult staffPatients(Long staffId);
    /**
     * 描述：统计各人每日分类收费信息（近7日）
     */
    SmsStaffAmountStatisticsResult staffClassifyStatistics(Long staffId);
    /**
     * 描述：统计各科室每日接待患者人数（近7日）
     */
    SmsPatientsStatisticsResult deptPatients(Long deptId);
    /**
     * 描述：统计各科室每日分类收费信息（近7日）
     */
    SmsDeptAmountStatisticsResult deptClassifyStatistics(Long deptId);
    /**
     * 描述：统计全院每日接待患者人数（近7日）
     */
    SmsDeptAmountStatisticsResult totalClassifyStatistics();
    /**
     * 描述：统计全院每日分类收费信息（近7日）
     */
    SmsPatientsStatisticsResult totalPatients();
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsDiseCatalogDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsDiseCatalogDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsDiseCatalogParam;
import com.neu.his.cloud.zuul.dto.dms.DmsDiseCatalogResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@Api(tags = "DmsDiseCatalogDistributionController", description = "诊断目录管理")
@RequestMapping("/DmsDiseCatalog")
@CrossOrigin(allowCredentials = "true")
public class DmsDiseCatalogDistributionController {
    @Autowired
    ApiPcDmsDiseCatalogDistributionService apiPcDmsDiseCatalogDistributionService;

    @HystrixCommand(fallbackMethod = "createFallbackInfo")
    @ApiOperation(value = "新增一个诊断目录")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsDiseCatalogParam dmsDiseCatalogParam , BindingResult result){
        return apiPcDmsDiseCatalogDistributionService.create(dmsDiseCatalogParam);
    }
    private CommonResult createFallbackInfo(DmsDiseCatalogParam dmsDiseCatalogParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteFallbackInfo")
    @ApiOperation(value = "根据ids删除诊断目录")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
       return apiPcDmsDiseCatalogDistributionService.delete(ids);
    }
    private CommonResult deleteFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateFallbackInfo")
    @ApiOperation(value = "更新诊断目录信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody DmsDiseCatalogParam dmsDiseCatalogParam , BindingResult result){
        return apiPcDmsDiseCatalogDistributionService.update(id,dmsDiseCatalogParam);
    }
    private CommonResult updateFallbackInfo( Long id,  DmsDiseCatalogParam dmsDiseCatalogParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listAllFallbackInfo")
    @ApiOperation(value = "查询所有诊断目录")
    @RequestMapping(value = "/listAll", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsDiseCatalogResult>> listAll(){
        return apiPcDmsDiseCatalogDistributionService.listAll();
    }
    private CommonResult<List<DmsDiseCatalogResult>> listAllFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }

}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/bms/BmsFeeController.java<|end_filename|>
package com.neu.his.api.controller.bms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.bms.service.BmsFeeService;
import com.neu.his.common.api.CommonPage;
import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.bms.*;
import com.neu.his.common.dto.dms.DmsHerbalPrescriptionRecordResult;
import com.neu.his.common.dto.dms.DmsMedicinePrescriptionRecordResult;
import com.neu.his.common.dto.dms.DmsNonDrugResult;
import com.neu.his.dms.service.DmsHerbalPrescriptionRecordService;
import com.neu.his.dms.service.DmsMedicinePrescriptionRecordService;
import com.neu.his.mbg.model.DmsMedicinePrescriptionRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Controller
@Api(tags = "BmsFeeController", description = "收退费管理")
@RequestMapping("/fee")
@CrossOrigin(allowCredentials = "true")
public class BmsFeeController {

    @Autowired
    BmsFeeService bmsFeeService;

    @ApiOperation(value = "查询挂号人")
    @RequestMapping(value = "/listRegisteredPatient", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<BmsRegistrationPatientResult>> listRegisteredPatient(@RequestParam(required=false,name = "medicalRecordNo") String  medicalRecordNo,
                                                                                  @RequestParam(required=false,name="queryDate")@DateTimeFormat(pattern = "yyyy-MM-dd") Date queryDate,
                                                                                  @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                                  @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){


        Page page = PageHelper.startPage(pageNum, pageSize);
        List<BmsRegistrationPatientResult> list = bmsFeeService.listRegisteredPatient(medicalRecordNo,queryDate);
        Long pageTotal=page.getTotal();
        return CommonResult.success(CommonPage.restPage(list,pageTotal));
    }

    @ApiOperation(value = "收费")
    @RequestMapping(value = "/charge", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult charge(@RequestBody List<BmsChargeParam> bmsChargeParamList){
        int result = bmsFeeService.charge(bmsChargeParamList);
        if (result == 1){
            return CommonResult.success(result);
        }
        else {
            return CommonResult.failed();
        }
    }

    @ApiOperation(value = "根据挂号id查询未缴费项目")
    @RequestMapping(value = "/listRefundByRegistrationId", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsRefundChargeResult>>  listRefundByRegistrationId(@RequestParam("registrationId") Long registrationId){
        List<BmsRefundChargeResult> bmsRefundChargeResultList = bmsFeeService.listRefundByRegistrationId(registrationId);
        if (bmsRefundChargeResultList.isEmpty()){
            return CommonResult.success(null);
        }else {
            return CommonResult.success(bmsRefundChargeResultList);
        }
    }

    @ApiOperation(value = "非药品、药品退费")
    @RequestMapping(value = "/refundCharge", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult refundCharge(@RequestBody List<BmsRefundChargeParam> bmsRefundChargeParamList){
        int result = bmsFeeService.refundCharge(bmsRefundChargeParamList);
        if (result == 1){
            return CommonResult.success(result);
        }else {
            return CommonResult.failed();
        }
    }


    @ApiOperation(value = "挂号退费")
    @RequestMapping(value = "/refundRegistrationCharge", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult refundRegistrationCharge(@RequestBody BmsRefundRegChargeParam bmsRefundRegChargeParam){
        int result = bmsFeeService.refundRegistrationCharge(bmsRefundRegChargeParam);
        if (result == 1){
            return CommonResult.success(result);
        }
        else {
            return CommonResult.failed();
        }
    }


    @ApiOperation(value = "根据挂号Id查询所有未交费项目")
    @RequestMapping(value = "/listChargeByRegistrationId", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsChargeResult>>  listChargeByRegistrationId(@RequestParam("registrationId") Long registrationId){
        List<BmsChargeResult> bmsChargeResultList = bmsFeeService.listChargeByRegistrationId(registrationId);
        if (bmsChargeResultList.isEmpty()){
            return CommonResult.success(null);
        }
        else {
            return CommonResult.success(bmsChargeResultList);
        }
    }
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/impl/SmsRoleServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.sms.service.impl;

import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.service.sms.dto.sms.SmsRoleParam;
import com.neu.his.cloud.service.sms.mapper.SmsRoleMapper;
import com.neu.his.cloud.service.sms.mapper.SmsRolePermissionDao;
import com.neu.his.cloud.service.sms.mapper.SmsRolePermissionRelationMapper;
import com.neu.his.cloud.service.sms.model.*;
import com.neu.his.cloud.service.sms.service.SmsRoleService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 角色
 */
@Service
public class SmsRoleServiceImpl implements SmsRoleService {

    @Autowired
    private SmsRoleMapper roleMapper;

    @Autowired
    private SmsRolePermissionDao rolePermissionDao;

    @Autowired
    private SmsRolePermissionRelationMapper rolePermissionRelationMapper;

    @Override
    public int create(SmsRoleParam smsRoleParam) {
        SmsRole smsRole = new SmsRole();
        BeanUtils.copyProperties(smsRoleParam, smsRole);
        //设置时间
        smsRole.setCreateTime(new Date());
        smsRole.setStatus(1);

        //查询是否有相同名字的角色
        SmsRoleExample example = new SmsRoleExample();
        example.createCriteria().andNameEqualTo(smsRole.getName());
        List<SmsRole> umsAdminList = roleMapper.selectByExample(example);
        if (umsAdminList.size() > 0) { //存在
            return 0;
        }
        return roleMapper.insert(smsRole);
    }

    @Override
    public int update(Long id, SmsRoleParam smsRoleParam) {
        SmsRole smsRole = new SmsRole();
        BeanUtils.copyProperties(smsRoleParam, smsRole);
        return roleMapper.updateByPrimaryKey(smsRole);
    }

    @Override
    public int delete(List<Long> ids) {
        SmsRole smsRole = new SmsRole();
        smsRole.setStatus(0);
        SmsRoleExample example=new SmsRoleExample();
        example.createCriteria().andIdIn(ids);
        return roleMapper.updateByExampleSelective(smsRole,example);
    }

    @Override
    public List<SmsRole> select(SmsRoleParam smsRoleParam, Integer pageSize, Integer pageNum){
        PageHelper.startPage(pageNum, pageSize);
        SmsRoleExample example = new SmsRoleExample();
        SmsRoleExample.Criteria criteria = example.createCriteria();
        if(!StringUtils.isEmpty(smsRoleParam.getName())){
            criteria.andNameLike("%"+smsRoleParam.getName()+"%");
        }
        if(!StringUtils.isEmpty(smsRoleParam.getCreateTime())){
            criteria.andCreateTimeEqualTo(smsRoleParam.getCreateTime());
        }
        if(!StringUtils.isEmpty(smsRoleParam.getStatus())){
            criteria.andStatusEqualTo(smsRoleParam.getStatus());
        }
        if(!StringUtils.isEmpty(smsRoleParam.getDescription())){
            criteria.andNameLike("%"+smsRoleParam.getDescription()+"%");
        }
        example.setOrderByClause("id desc");
        return roleMapper.selectByExample(example);
    }


    @Override
    public List<SmsRole> selectAll() {
        //选出status不为0的
        SmsRoleExample example = new SmsRoleExample();
        SmsRole smsRole=new SmsRole();
        example.createCriteria().andStatusNotEqualTo(new Integer(0));
        return roleMapper.selectByExample(example);
    }


    @Override
    public List<SmsPermission> getPermissionList(Long roleId) {

      return rolePermissionDao.getPermissionList(roleId);
    }

    @Override
    public int updatePermission(Long roleId, List<Long> permissionIds) {
        //先删除原有关系
        SmsRolePermissionRelationExample example=new SmsRolePermissionRelationExample();
        example.createCriteria().andRoleIdEqualTo(roleId);
        rolePermissionRelationMapper .deleteByExample(example);
        // 批量插入新关系
        List<SmsRolePermissionRelation> relationList = new ArrayList<>();
        for(Long permissionId : permissionIds){
            SmsRolePermissionRelation relation = new SmsRolePermissionRelation();
            relation.setRoleId(roleId);
            relation.setPermissionId(permissionId);
            relationList.add(relation);
        }
        return rolePermissionDao.insertList(relationList);
    }


}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/sms/SmsPermissionNode.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.sms;


import com.neu.his.cloud.zuul.model.SmsPermission;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

public class SmsPermissionNode extends SmsPermission implements Serializable {

    @Getter
    @Setter
    private List<SmsPermissionNode> children;
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/dms/DmsRegistrationController.java<|end_filename|>
package com.neu.his.api.controller.dms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.dms.DmsRegistrationParam;
import com.neu.his.common.dto.pms.PmsPatientResult;
import com.neu.his.common.dto.sms.SmsSkdDocParam;
import com.neu.his.common.dto.sms.SmsSkdDocResult;
import com.neu.his.dms.service.DmsRegistrationService;
import com.neu.his.pms.service.PmsPatientService;

import com.neu.his.sms.SmsSkdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsRegistrationController", description = "挂号管理")
@RequestMapping("/registration")
@CrossOrigin(allowCredentials = "true")
public class DmsRegistrationController {

    @Autowired
    DmsRegistrationService dmsRegistrationService;



    //挂号
    //1.调用DmsRegistrationService的createRegistration
    @ApiOperation(value = "挂号")
    @RequestMapping(value = "/createRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createRegistration(@RequestBody DmsRegistrationParam dmsRegistrationParam , BindingResult result){
        int returnResult = dmsRegistrationService.createRegistration(dmsRegistrationParam);
        if (returnResult == 1){
            return CommonResult.success(returnResult);
        }
        else{
            return CommonResult.failed();
        }
    }

}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/impl/DmsRegistrationServiceImpl.java<|end_filename|>
package com.neu.his.dms.service.impl;

import com.neu.his.common.dto.app.AppRegistrationParam;
import com.neu.his.common.dto.dms.DmsRegHistoryResult;
import com.neu.his.common.dto.dms.DmsRegistrationParam;
import com.neu.his.common.util.AgeStrUtil;
import com.neu.his.common.util.DateUtil;
import com.neu.his.dms.service.DmsRegistrationService;
import com.neu.his.mbg.mapper.*;
import com.neu.his.mbg.model.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.support.collections.DefaultRedisList;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class DmsRegistrationServiceImpl implements DmsRegistrationService {
    @Autowired
    private PmsPatientMapper pmsPatientMapper;
    @Autowired
    private SmsSkdMapper smsSkdMapper;
    @Autowired
    private SmsStaffMapper smsStaffMapper;
    @Autowired
    private SmsRegistrationRankMapper smsRegistrationRankMapper;
    @Autowired
    private DmsRegistrationMapper dmsRegistrationMapper;
    @Autowired
    private BmsBillsRecordMapper bmsBillsRecordMapper;
    @Autowired
    private BmsInvoiceRecordMapper bmsInvoiceRecordMapper;
    @Autowired
    private  SmsDeptMapper smsDeptMapper;

    //1.调用PmsPatientDao根据身份证号查询是否存在
    //2.1如果不存在，则向PmsPatient表中插入数据，返回id
    //3.判断是否为专家号
    //3.1 如果为专家号，则先根据skd_id判断remain是否>0，如果大于0，则向dms_registration插入信息，并且绑定医生（skd_id、bind_status=1）,并修改sms_skd中的排班限额（-1），否则挂号失败
    //3.2 如果为非专家号，则向dms_registration插入信息，bin_status=0
    //4.向bms_bills_record中插入账单记录
    //5. 通过门诊号和最近时间返回账单id
    //6.插入发票记录
    @Override
    public int createRegistration(DmsRegistrationParam dmsRegistrationParam) {
        PmsPatientExample example = new PmsPatientExample();
        example.createCriteria().andIdentificationNoEqualTo(dmsRegistrationParam.getIdentificationNo());
        List<PmsPatient> pmsPatientList = pmsPatientMapper.selectByExample(example);
        if (pmsPatientList.size() == 0) {//如果不存在，则向PmsPatient表中插入数据
            PmsPatient pmsPatient = new PmsPatient();
            BeanUtils.copyProperties(dmsRegistrationParam, pmsPatient);
            //生成病历号
            String medicalRecordNo = generateMedicalRecordNo(dmsRegistrationParam.getIdentificationNo());
            pmsPatient.setMedicalRecordNo(medicalRecordNo);
            pmsPatientMapper.insertSelective(pmsPatient);
        }
        //通过身份证号查询并返回病人id
        PmsPatientExample example1 = new PmsPatientExample();
        example1.createCriteria().andIdentificationNoEqualTo(dmsRegistrationParam.getIdentificationNo());
        List<PmsPatient> pmsPatientList1 = pmsPatientMapper.selectByExample(example1);
        if(!pmsPatientList1.isEmpty()){
            Long patientId = pmsPatientList1.get(0).getId();

            //创建要插入的DmsRegistration对象
            DmsRegistration dmsRegistration = new DmsRegistration();
            BeanUtils.copyProperties(dmsRegistrationParam, dmsRegistration);
            dmsRegistration.setPatientId(patientId);
            Date createDate = new Date();//获取当前时间，并在之后通过该时间与病人id获取挂号id
            dmsRegistration.setCreateTime(createDate);
            dmsRegistration.setStatus(1);//挂号状态为待诊1

            //处理年龄
            Date dateOfBirth = dmsRegistrationParam.getDateOfBirth();
            String age = AgeStrUtil.getAgeStr(dateOfBirth);
            dmsRegistration.setPatientAgeStr(age);

            Long registrationId;//用于存储插入的挂号信息的id

            if (dmsRegistrationParam.getSkdId() == null){//非专家号
                dmsRegistration.setBindStatus(0);//非专家号绑定状态为0
                dmsRegistrationMapper.insertSelective(dmsRegistration);//向dms_registration插入信息

                registrationId = dmsRegistration.getId();
            }
            else{//专家号
                SmsSkdExample example2 = new SmsSkdExample();
                example2.createCriteria().andIdEqualTo(dmsRegistrationParam.getSkdId());
                List<SmsSkd> smsSkdList = smsSkdMapper.selectByExample(example2);
                if (!smsSkdList.isEmpty()){
                    if (smsSkdList.get(0).getRemain() > 0) {//如果还有挂号限额
                        dmsRegistration.setBindStatus(1);//专家号绑定状态为1
                        dmsRegistrationMapper.insertSelective(dmsRegistration);//向dms_registration插入信息
                        registrationId = dmsRegistration.getId();

                        SmsSkd smsSkd = smsSkdList.get(0);
                        smsSkd.setRemain(smsSkdList.get(0).getRemain() - 1);
                        //smsSkdList.get(0).setRemain(smsSkdList.get(0).getRemain()-1);
                        smsSkdMapper.updateByPrimaryKey(smsSkd);//修改sms_skd中的排班限额（-1）
                        //return 1;
                    } else {//挂号限额已用完，挂号失败
                        return 0;
                    }
                }
                else {
                    return 0;//无该排班信息,挂号失败
                }

            }
            BmsBillsRecord bmsBillsRecord = new BmsBillsRecord();//保存除了发票号以外的所有属性

            //生成账单号
            String billNo = generateBillNo(registrationId);
            bmsBillsRecord.setBillNo(billNo);
            Date billCreateDate = new Date();//获取当前时间，并在之后通过该时间与病人id获取账单id
            bmsBillsRecord.setCreateTime(billCreateDate);
            bmsBillsRecord.setStatus(1);//1为正常
            bmsBillsRecord.setInvoiceNum(1);//挂号只有一张发票
            bmsBillsRecord.setRegistrationId(registrationId);
            bmsBillsRecord.setRecordList(registrationId + "," + 0 + "><");//recordList怎么用字符串表示,例如挂号id,0><草药id,4><成药,3
            bmsBillsRecordMapper.insertSelective(bmsBillsRecord);//向bms_bills_record中插入账单记录
            //通过挂号id和最近时间返回账单id
            BmsBillsRecordExample example5 = new BmsBillsRecordExample();
            example5.createCriteria().andRegistrationIdEqualTo(registrationId).andBillNoEqualTo(billNo);////通过挂号id和账单号查询刚插入账单的id
            List<BmsBillsRecord> bmsBillsRecordList = bmsBillsRecordMapper.selectByExample(example5);
            Long billId = bmsBillsRecordList.get(0).getId();//账单id

            //插入发票记录
            BmsInvoiceRecord bmsInvoiceRecord = new BmsInvoiceRecord();
            bmsInvoiceRecord.setType(1);//1表示挂号
            Date invoiceCreateTime = new Date();
            bmsInvoiceRecord.setCreateTime(invoiceCreateTime);
            bmsInvoiceRecord.setInvoiceNo(dmsRegistrationParam.getInvoiceNo());
            bmsInvoiceRecord.setBillId(billId);
            bmsInvoiceRecord.setAmount(dmsRegistrationParam.getAmount());
//            bmsInvoiceRecord.setFreezeStatus(1);//冻结状态为1正常
            bmsInvoiceRecord.setOperatorId(dmsRegistrationParam.getOpratorId());
            bmsInvoiceRecord.setSettlementCatId(dmsRegistrationParam.getSettlementCatId());
            bmsInvoiceRecord.setItemList(registrationId + "," + 0 + "," + dmsRegistrationParam.getAmount() + "><");//挂号id,0,amount><
            bmsInvoiceRecordMapper.insertSelective(bmsInvoiceRecord);
            return 1;
        }
        return 0;
    }

    @Override
    public List<DmsRegHistoryResult> listRegHistory(String identificationNo) {
        List<DmsRegHistoryResult> dmsRegHistoryResultList = new ArrayList<>();
        PmsPatientExample pmsPatientExample = new PmsPatientExample();
        pmsPatientExample.createCriteria().andIdentificationNoEqualTo(identificationNo);
        List<PmsPatient> pmsPatientList = pmsPatientMapper.selectByExample(pmsPatientExample);
        if (!pmsPatientList.isEmpty()) {//如果有对应的患者记录
            PmsPatient pmsPatient = pmsPatientList.get(0);
            DmsRegistrationExample dmsRegistrationExample = new DmsRegistrationExample();
            dmsRegistrationExample.createCriteria().andPatientIdEqualTo(pmsPatient.getId());
            dmsRegistrationExample.setOrderByClause("create_time desc");
            List<DmsRegistration> dmsRegistrationList = dmsRegistrationMapper.selectByExample(dmsRegistrationExample);
            for (DmsRegistration dmsRegistration : dmsRegistrationList) {
                DmsRegHistoryResult dmsRegHistoryResult = new DmsRegHistoryResult();
                BeanUtils.copyProperties(dmsRegistration,dmsRegHistoryResult);
                //挂号（门诊）id
                dmsRegHistoryResult.setRegistrationId(dmsRegistration.getId());
                //科室名
                SmsDept smsDept = smsDeptMapper.selectByPrimaryKey(dmsRegistration.getDeptId());
                if (smsDept != null){
                    dmsRegHistoryResult.setDeptName(smsDept.getName());
                }
                //医生姓名,挂号级别名
                SmsSkd smsSkd = smsSkdMapper.selectByPrimaryKey(dmsRegistration.getSkdId());
                if (smsSkd != null){
                    SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(smsSkd.getStaffId());
                    dmsRegHistoryResult.setDoctorName(smsStaff.getName());
                    SmsRegistrationRank smsRegistrationRank = smsRegistrationRankMapper.selectByPrimaryKey(smsStaff.getRegistrationRankId());
                    dmsRegHistoryResult.setRegistrationName(smsRegistrationRank.getName());
                }
                dmsRegHistoryResultList.add(dmsRegHistoryResult);
            }
            return dmsRegHistoryResultList;
        }
            return null;
    }


    //先根据skd_id判断remain是否>0，如果大于0，则向dms_registration插入信息，并且绑定医生（skd_id、bind_status=1）,并修改sms_skd中的排班限额（-1），否则挂号失败
    //向bms_bills_record中插入账单记录
    @Override
    public int appRegistration(AppRegistrationParam appRegistrationParam){
        PmsPatient patient = pmsPatientMapper.selectByPrimaryKey(appRegistrationParam.getPatientId());
        if(patient == null){
            return 0;
        }
        SmsSkd skd = smsSkdMapper.selectByPrimaryKey(appRegistrationParam.getSkdId());
        if(skd == null){
            return 0;
        }
        //先根据skd_id判断remain是否>0
        if(skd.getRemain() <= 0){
            return  0;
        }

        //如果大于0，绑定医生（skd_id、bind_status=1）,并修改sms_skd中的排班限额（-1）
        SmsSkd skdRecord = new SmsSkd();
        skdRecord.setRemain(skd.getRemain() - 1);
        SmsSkdExample example = new SmsSkdExample();
        example.createCriteria().andIdEqualTo(skd.getId()).andRemainGreaterThan(new Long(0));
        int count = smsSkdMapper.updateByExampleSelective(skdRecord,example);
        if(count <= 0){
            return 0;
        }

        //向dms_registration插入信息
        DmsRegistration registration = new DmsRegistration();
        registration.setPatientId(appRegistrationParam.getPatientId());
        registration.setCreateTime(new Date());
        registration.setStatus(1);
        registration.setSkdId(skd.getId());
        registration.setNeedBook(0);    //默认不需要病历本
        registration.setBindStatus(1);
        registration.setDeptId(appRegistrationParam.getDeptId());
        registration.setAttendanceDate(appRegistrationParam.getAttendanceDate());
        if(patient.getDateOfBirth() != null){
            registration.setPatientAgeStr(AgeStrUtil.getAgeStr(patient.getDateOfBirth()));
        }
        int regCount = dmsRegistrationMapper.insertSelective(registration);

        //得到刚插入的挂号记录的registrationId
        DmsRegistrationExample registrationExample = new DmsRegistrationExample();
        registrationExample.createCriteria()
                .andPatientIdEqualTo(appRegistrationParam.getPatientId())
                .andSkdIdEqualTo(appRegistrationParam.getSkdId());//通过病人id和skdId查询刚插入挂号记录的id
        registrationExample.setOrderByClause("create_time desc");   //获取最新一次的
        List<DmsRegistration> dmsRegistrationList = dmsRegistrationMapper.selectByExample(registrationExample);
        if(dmsRegistrationList.size() <= 0){
            return 0;
        }
        Long registrationId = dmsRegistrationList.get(0).getId();

        //向bms_bills_record中插入账单记录
        BmsBillsRecord billsRecord = new BmsBillsRecord();
        //生成账单号
        String billNo = generateBillNo(registrationId);
        billsRecord.setBillNo(billNo);
        billsRecord.setCreateTime(new Date());
        billsRecord.setStatus(1);
        billsRecord.setInvoiceNum(0);   //免费挂号，不产生发票
        billsRecord.setRegistrationId(registrationId);
        billsRecord.setRecordList(registrationId + "," + 0 + "><");//recordList怎么用字符串表示,例如挂号id,0><草药id,4><成药,3
        int billCount = bmsBillsRecordMapper.insertSelective(billsRecord);//向bms_bills_record中插入账单记录

        return billCount;
    }


    //生成病历号
    public String generateMedicalRecordNo(String identificationNo) {
        Date date = new Date();
        String yyyymmdd = DateUtil.getDateStr(date);//年月日字符串
        String hhmm = DateUtil.getTimeStr(date, 4);//时分字符串
        int length = identificationNo.length();
        String lastFour;
        if (length > 4) {
            lastFour = identificationNo.substring(length - 4, length);
            return yyyymmdd + hhmm + lastFour;
        }
        return null;
    }

    //生成账单号
    public String generateBillNo(Long registrationId) {
        Date date = new Date();
        String yyyymmdd = DateUtil.getDateStr(date);//年月日字符串
        String hhmm = DateUtil.getTimeStr(date, 4);//时分字符串
        int length = registrationId.toString().length();
        String lastFour;
        if (length >= 4) {
            Long lastFourNo = registrationId % 10000;
            lastFour = lastFourNo.toString();
        } else if (length == 3) {
            lastFour = "0" + registrationId.toString();
        } else if (length == 2) {
            lastFour = "00" + registrationId.toString();
        } else {
            lastFour = "000" + registrationId.toString();
        }
        return yyyymmdd + hhmm + lastFour;
    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/sms/ApiPcSmsRegistrationRankDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.sms;



import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.sms.SmsRegistrationRankParam;
import com.neu.his.cloud.zuul.dto.sms.SmsRegistrationRankResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcSmsRegistrationRankDistributionService {


    @RequestMapping(value = "/registerRank/create", method = RequestMethod.POST)
    CommonResult create(@RequestBody SmsRegistrationRankParam smsRegistrationRankParam);

    @RequestMapping(value = "/registerRank/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/registerRank/update/{id}", method = RequestMethod.POST)
    CommonResult update(@PathVariable("id") Long id, @RequestBody SmsRegistrationRankParam smsRegistrationRankParam);


    @RequestMapping(value = "/registerRank/select", method = RequestMethod.POST)
    CommonResult<CommonPage<SmsRegistrationRankResult>> list(@RequestBody SmsRegistrationRankParam queryParam,
                                                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

    @RequestMapping(value = "/registerRank/selectAll", method = RequestMethod.GET)
    CommonResult<List<SmsRegistrationRankResult>> listAll();
}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/OssService.java<|end_filename|>
package com.neu.his.dms.service;



import com.neu.his.common.dto.oss.OssCallbackResult;
import com.neu.his.common.dto.oss.OssPolicyResult;

import javax.servlet.http.HttpServletRequest;

/**
 * oss上传管理Service
 */
public interface OssService {
    OssPolicyResult policy();
    OssCallbackResult callback(HttpServletRequest request);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/bms/BmsFeeQueryDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.bms;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.bms.ApiPcBmsFeeQueryDistributionService;
import com.neu.his.cloud.zuul.dto.bms.BmsDoctorPatientFeeResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "BmsFeeQueryDistributionController", description = "费用查询")
@RequestMapping("/feeQuery")
@CrossOrigin(allowCredentials = "true")
public class BmsFeeQueryDistributionController {

    @Autowired
    private ApiPcBmsFeeQueryDistributionService apiPcBmsFeeQueryDistributionService;


    @HystrixCommand(fallbackMethod = "listFeeByRegistrationIdFallbackInfo")
    @ApiOperation("根据挂号Id查询患者费用")
    @RequestMapping(value = "/listByRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<BmsDoctorPatientFeeResult>> listFeeByRegistrationId(@RequestParam("registrationId") Long registrationId){
       return  apiPcBmsFeeQueryDistributionService.listFeeByRegistrationId(registrationId);
    }
    private CommonResult<List<BmsDoctorPatientFeeResult>> listFeeByRegistrationIdFallbackInfo( Long registrationId){
        return CommonResult.success(null,"请检查您的网络") ;
    }



}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/SmsRegistrationRankService.java<|end_filename|>
package com.neu.his.cloud.service.sms.service;


import com.neu.his.cloud.service.sms.dto.sms.SmsRegistrationRankParam;
import com.neu.his.cloud.service.sms.dto.sms.SmsRegistrationRankResult;

import java.util.List;

/**
 * 挂号级别
 */
public interface SmsRegistrationRankService {

    /**
     * 描述：新增挂号级别
     */
    int create(SmsRegistrationRankParam smsRegistrationRankParam);

    /**
     * 描述：删除挂号级别（批量）
     */
    public int delete(List<Long> ids);

    /**
     * 描述：更新挂号级别
     */
    int update(Long id, SmsRegistrationRankParam smsRegistrationRankParam);

    /**
     * 描述：查询挂号级别
     */
    List<SmsRegistrationRankResult> select(SmsRegistrationRankParam smsRegistrationRankParam);

    /**
     * 描述：列出所有挂号级别
     */
    List<SmsRegistrationRankResult> selectAll();
}


<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/model/SmsSkd.java<|end_filename|>
package com.neu.his.cloud.service.sms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

public class SmsSkd implements Serializable {
    private Long id;

    private Date date;

    private Integer status;

    private Long remain;

    private Integer noon;

    private Long staffId;

    private Long deptId;

    private Long skLimit;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getRemain() {
        return remain;
    }

    public void setRemain(Long remain) {
        this.remain = remain;
    }

    public Integer getNoon() {
        return noon;
    }

    public void setNoon(Integer noon) {
        this.noon = noon;
    }

    public Long getStaffId() {
        return staffId;
    }

    public void setStaffId(Long staffId) {
        this.staffId = staffId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getSkLimit() {
        return skLimit;
    }

    public void setSkLimit(Long skLimit) {
        this.skLimit = skLimit;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", date=").append(date);
        sb.append(", status=").append(status);
        sb.append(", remain=").append(remain);
        sb.append(", noon=").append(noon);
        sb.append(", staffId=").append(staffId);
        sb.append(", deptId=").append(deptId);
        sb.append(", skLimit=").append(skLimit);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/model/DmsDrugModel.java<|end_filename|>
package com.neu.his.cloud.service.sms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

public class DmsDrugModel implements Serializable {
    private Long id;

    private Integer status;

    private String name;

    private Integer scope;

    private Long ownId;

    private String aim;

    private Date createTime;

    private String code;

    private Integer type;

    private Long pairNum;

    private Integer frequency;

    private String therapy;

    private String therapyDetails;

    private String medicalAdvice;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getScope() {
        return scope;
    }

    public void setScope(Integer scope) {
        this.scope = scope;
    }

    public Long getOwnId() {
        return ownId;
    }

    public void setOwnId(Long ownId) {
        this.ownId = ownId;
    }

    public String getAim() {
        return aim;
    }

    public void setAim(String aim) {
        this.aim = aim;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getPairNum() {
        return pairNum;
    }

    public void setPairNum(Long pairNum) {
        this.pairNum = pairNum;
    }

    public Integer getFrequency() {
        return frequency;
    }

    public void setFrequency(Integer frequency) {
        this.frequency = frequency;
    }

    public String getTherapy() {
        return therapy;
    }

    public void setTherapy(String therapy) {
        this.therapy = therapy;
    }

    public String getTherapyDetails() {
        return therapyDetails;
    }

    public void setTherapyDetails(String therapyDetails) {
        this.therapyDetails = therapyDetails;
    }

    public String getMedicalAdvice() {
        return medicalAdvice;
    }

    public void setMedicalAdvice(String medicalAdvice) {
        this.medicalAdvice = medicalAdvice;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", status=").append(status);
        sb.append(", name=").append(name);
        sb.append(", scope=").append(scope);
        sb.append(", ownId=").append(ownId);
        sb.append(", aim=").append(aim);
        sb.append(", createTime=").append(createTime);
        sb.append(", code=").append(code);
        sb.append(", type=").append(type);
        sb.append(", pairNum=").append(pairNum);
        sb.append(", frequency=").append(frequency);
        sb.append(", therapy=").append(therapy);
        sb.append(", therapyDetails=").append(therapyDetails);
        sb.append(", medicalAdvice=").append(medicalAdvice);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/sms/SmsWorkloadController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.sms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.sms.SmsWorkloadResult;
import com.neu.his.cloud.api.pc.service.sms.SmsWorkloadService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api(tags = "SmsWorkloadController", description = "工作量统计")
@RequestMapping("/workload")
@CrossOrigin(allowCredentials = "true")
public class SmsWorkloadController {

    @Autowired
    private SmsWorkloadService smsWorkloadService;

    @ApiOperation("根据时间段查询某个人工作量")
    @RequestMapping(value = "/queryPersonal", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsWorkloadResult> queryPersonalWorkload(@RequestParam("staffId") Long staffId,
                                                                 @RequestParam("startDatetime")String startDatetime,
                                                                 @RequestParam("endDatetime")String endDatetime){
        return smsWorkloadService.queryPersonalWorkload(staffId,startDatetime,endDatetime);
    }


    @ApiOperation("根据时间段统计某个科室工作量")
    @RequestMapping(value = "/queryDept", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<SmsWorkloadResult>  queryDeptWorkload(@RequestParam("deptId") Long deptId,
                                                              @RequestParam("startDatetime")String startDatetime,
                                                              @RequestParam("endDatetime")String endDatetime){
        return smsWorkloadService.queryDeptWorkload(deptId,startDatetime,endDatetime);
    }


    @ApiOperation("根据时间段统计所有科室工作量")
    @RequestMapping(value = "/queryDeptWorkloadList", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<SmsWorkloadResult>> queryDeptWorkloadList(@RequestParam("startDatetime")String startDatetime,
                                                                        @RequestParam("endDatetime") String endDatetime){
        return smsWorkloadService.queryDeptWorkloadList(startDatetime,endDatetime);
    }


    @ApiOperation("根据时间段统计科室所有人工作量(一个科室所有人)")
    @RequestMapping(value = "/queryDeptPersonalWorkloadList", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<SmsWorkloadResult>>  queryDeptPersonalWorkloadList(@RequestParam("deptId") Long deptId,
                                                                                @RequestParam("startDatetime") String startDatetime,
                                                                                @RequestParam("endDatetime") String endDatetime){
        return smsWorkloadService.queryDeptPersonalWorkloadList(deptId,startDatetime,endDatetime);
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/sms/SmsRegistrationRankDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.sms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.sms.ApiPcSmsFrequentUsedDistributionService;
import com.neu.his.cloud.zuul.distribution.api.pc.sms.ApiPcSmsRegistrationRankDistributionService;
import com.neu.his.cloud.zuul.dto.sms.SmsRegistrationRankParam;
import com.neu.his.cloud.zuul.dto.sms.SmsRegistrationRankResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "SmsRegistrationRankDistributionController", description = "挂号级别管理")
@RequestMapping("/registerRank")
@CrossOrigin(allowCredentials = "true")
public class SmsRegistrationRankDistributionController {


    @Autowired
    private ApiPcSmsRegistrationRankDistributionService apiPcSmsRegistrationRankDistributionService;

    @HystrixCommand(fallbackMethod = "createFallbackInfo")
    @ApiOperation("新增挂号级别")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody SmsRegistrationRankParam smsRegistrationRankParam, BindingResult result){
       return apiPcSmsRegistrationRankDistributionService.create(smsRegistrationRankParam);
    }
    private CommonResult createFallbackInfo(SmsRegistrationRankParam smsRegistrationRankParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteFallbackInfo")
    @ApiOperation("根据ids删除挂号级别")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
      return  apiPcSmsRegistrationRankDistributionService.delete(ids);
    }
    private CommonResult deleteFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateFallbackInfo")
    @ApiOperation("更新挂号级别信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable("id") Long id, @RequestBody SmsRegistrationRankParam smsRegistrationRankParam, BindingResult result){
      return apiPcSmsRegistrationRankDistributionService.update(id,smsRegistrationRankParam);
    }
    private CommonResult updateFallbackInfo(Long id, @RequestBody SmsRegistrationRankParam smsRegistrationRankParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listFallbackInfo")
    @ApiOperation("模糊查询挂号级别、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<SmsRegistrationRankResult>> list(SmsRegistrationRankParam queryParam,
                                                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
       return  apiPcSmsRegistrationRankDistributionService.list(queryParam,pageSize,pageNum);
    }
    private CommonResult<CommonPage<SmsRegistrationRankResult>> listFallbackInfo(SmsRegistrationRankParam queryParam, Integer pageSize,
                                                                    Integer pageNum){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listAllFallbackInfo")
    @ApiOperation("查询所有挂号级别")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<SmsRegistrationRankResult>> listAll(){
       return apiPcSmsRegistrationRankDistributionService.listAll();
    }
    private CommonResult<List<SmsRegistrationRankResult>> listAllFallbackInfo(){
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/DmsCaseHistoryMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.DmsCaseHistory;
import com.neu.his.cloud.zuul.model.DmsCaseHistoryExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsCaseHistoryMapper {
    int countByExample(DmsCaseHistoryExample example);

    int deleteByExample(DmsCaseHistoryExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsCaseHistory record);

    int insertSelective(DmsCaseHistory record);

    List<DmsCaseHistory> selectByExample(DmsCaseHistoryExample example);

    DmsCaseHistory selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsCaseHistory record, @Param("example") DmsCaseHistoryExample example);

    int updateByExample(@Param("record") DmsCaseHistory record, @Param("example") DmsCaseHistoryExample example);

    int updateByPrimaryKeySelective(DmsCaseHistory record);

    int updateByPrimaryKey(DmsCaseHistory record);
}

<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/service/impl/SmsStaffServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.sms.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.neu.his.cloud.service.sms.dto.sms.SmsStaffParam;
import com.neu.his.cloud.service.sms.dto.sms.SmsStaffResult;
import com.neu.his.cloud.service.sms.mapper.SmsDeptMapper;
import com.neu.his.cloud.service.sms.mapper.SmsRoleMapper;
import com.neu.his.cloud.service.sms.mapper.SmsSkdRuleMapper;
import com.neu.his.cloud.service.sms.mapper.SmsStaffMapper;
import com.neu.his.cloud.service.sms.model.*;
import com.neu.his.cloud.service.sms.service.SmsStaffService;

import com.neu.his.cloud.service.sms.util.RedisUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.List;

@Service
public class SmsStaffServiceImpl implements SmsStaffService {
    private static final Logger LOGGER = LoggerFactory.getLogger(SmsStaffServiceImpl.class);

    @Autowired
    private RedisUtil redisUtil;

    @Autowired
    private SmsStaffMapper smsStaffMapper;

    @Autowired
    private SmsDeptMapper smsDeptMapper;

    @Autowired
    private SmsRoleMapper smsRoleMapper;

    @Autowired
    private SmsSkdRuleMapper smsSkdRuleMapper;

 //   @Autowired
 //   private UserDetailsService userDetailsService;

//    @Autowired
//    private PasswordEncoder passwordEncoder;

//    @Autowired
//    private JwtTokenUtil jwtTokenUtil;

//    @Value("${jwt.tokenHead}")  //application.yml
//    private String tokenHead;


   // @Override//不完善--20190601-赵煜注
//    public int create(SmsStaffParam smsStaffParam){
//        SmsStaff smsStaff = new SmsStaff();
//        BeanUtils.copyProperties(smsStaffParam, smsStaff);
//        smsStaff.setStatus(1);
//        //查询是否有同名字
//        SmsStaffExample example = new SmsStaffExample();
//        example.createCriteria().andUsernameEqualTo(smsStaff.getName());
//        List<SmsStaff> lists = smsStaffMapper.selectByExample(example);
//        if (lists.size() > 0) {
//            return 0;
//        }
//
//        //插入成功，在redis修改flag
//        redisUtil.setObj("staffChangeStatus","1");
//
//        //没有则插入数据
//        return smsStaffMapper.insert(smsStaff);
//    }

//    @Override
//    public SmsStaff register(SmsStaffParam smsStaffParam) {
//        SmsStaff smsStaff = new SmsStaff();
//        BeanUtils.copyProperties(smsStaffParam, smsStaff);
//        //封装dto中没有传来的属性
//        smsStaff.setCreateTime(new Date());
//        smsStaff.setStatus(1);
//        //查询是否有相同用户名的用户
//        SmsStaffExample example = new SmsStaffExample();
//        example.createCriteria().andUsernameEqualTo(smsStaff.getUsername());//spring MVC必须保证Username不为null
//        List<SmsStaff> lists = smsStaffMapper.selectByExample(example);
//
//        List<SmsStaff> staffList = smsStaffMapper.selectByExample(example);
//        if (staffList.size() > 0) { //存在,若通过此接口进行创建，则重复数量只可能为1
//           return null;
//        }
//        //将密码进行加密操作
//        String encodePassword = passwordEncoder.encode(smsStaff.getPassword());
//        smsStaff.setPassword(encodePassword);
//        smsStaffMapper.insert(smsStaff);
//
//        //插入成功，在redis修改flag
//        redisUtil.setObj("staffChangeStatus","1");
//
//        return smsStaff;  //返回对象的密码是经过加密的
//    }

    @Override
    public List<SmsStaff> selectSkdStaff(Long deptId, Long registrationRankId) {
        SmsStaffExample example = new SmsStaffExample();
        example.createCriteria().andDeptIdEqualTo(deptId).andRegistrationRankIdEqualTo(registrationRankId);
        List<SmsStaff> staffList = smsStaffMapper.selectByExample(example);
        return staffList;
    }


    @Override
    public int delete(List<Long> ids){
        SmsStaff smsStaff = new SmsStaff();
        smsStaff.setStatus(0);
        SmsStaffExample example = new SmsStaffExample();
        example.createCriteria().andIdIn(ids);
        int deleteCount = smsStaffMapper.updateByExampleSelective(smsStaff, example);

        //删除排班规则表中与ids相关行
        SmsSkdRuleExample skdRuleExample = new SmsSkdRuleExample();
        skdRuleExample.createCriteria().andIdIn(ids);
        int deleteSkdCount = smsSkdRuleMapper.deleteByExample(skdRuleExample);

        //删除排班表中与ids相关行？
        // TODO: 2019/5/30

        //删除成功，在redis修改flag
        redisUtil.setObj("staffChangeStatus","1");

        return deleteCount;
    }

    @Override
    public int update(Long id,SmsStaffParam smsStaffParam){
        SmsStaff smsStaff = new SmsStaff();
        BeanUtils.copyProperties(smsStaffParam, smsStaff);
        smsStaff.setId(id);

        //删除成功，在redis修改flag
        redisUtil.setObj("staffChangeStatus","1");

        return smsStaffMapper.updateByPrimaryKeySelective(smsStaff);
    }

    @Override
    public List<SmsStaffResult> select(SmsStaffParam smsStaffQueryParam, Integer pageSize, Integer pageNum){
        SmsStaffExample example = new SmsStaffExample();
        SmsStaffExample.Criteria criteria = example.createCriteria();
        //如果没有指明state，返回不为0的
        if(smsStaffQueryParam.getStatus() == null){
            criteria.andStatusNotEqualTo(0);
        }
        //是否按登录名、真实姓名、科室、性别、是否参与排班、职称、角色、挂号级别查询
        if(!StringUtils.isEmpty(smsStaffQueryParam.getUsername())){
            criteria.andUsernameLike("%" + smsStaffQueryParam.getUsername() + "%");
        }
        if(!StringUtils.isEmpty(smsStaffQueryParam.getName())){
            criteria.andNameEqualTo("%" + smsStaffQueryParam.getName() + "%");
        }
        if(smsStaffQueryParam.getDeptId() != null){
            criteria.andDeptIdEqualTo(smsStaffQueryParam.getDeptId());
        }
        if(smsStaffQueryParam.getGender() != null){
            criteria.andGenderEqualTo(smsStaffQueryParam.getGender());
        }
        if(smsStaffQueryParam.getSkdFlag() != null){
            criteria.andSkdFlagEqualTo(smsStaffQueryParam.getSkdFlag());
        }
        if(!StringUtils.isEmpty(smsStaffQueryParam.getTitle())){
            criteria.andTitleEqualTo("%" + smsStaffQueryParam.getTitle() + "%");
        }
        if(smsStaffQueryParam.getRoleId() != null){
            criteria.andRoleIdEqualTo(smsStaffQueryParam.getRoleId());
        }
        if(smsStaffQueryParam.getRegistrationRankId() != null){
            criteria.andRegistrationRankIdEqualTo(smsStaffQueryParam.getRegistrationRankId());
        }
        //返回数据包装成Result



        example.setOrderByClause("id desc");
        List<SmsStaff> results = smsStaffMapper.selectByExample(example);
        List<SmsStaffResult> returnList = new ArrayList<>();
        for (SmsStaff s : results) {
            SmsStaffResult r = new SmsStaffResult();
            BeanUtils.copyProperties(s, r);

            //从科室表中找到对应科室信息
            Long deptid = new Long(s.getDeptId());
            SmsDeptExample deptExample = new SmsDeptExample();
            deptExample.createCriteria().andIdEqualTo(deptid);
            List<SmsDept> dept = smsDeptMapper.selectByExample(deptExample);
            //若果有科室信息则加入，否则加入的是null
            if(dept.size() > 0){
                r.setDept(dept.get(0));
            }

            //从角色表中找到对应角色信息
            Long roleid = new Long(s.getRoleId());
            SmsRoleExample roleExample = new SmsRoleExample();
            roleExample.createCriteria().andIdEqualTo(roleid);
            List<SmsRole> role = smsRoleMapper.selectByExample(roleExample);
            //若果有角色信息则加入，否则加入的是null
            if(role.size() > 0){
                r.setRole(role.get(0));
            }

            returnList.add(r);
        }
        return returnList;
    }

    @Override
    public List<SmsStaffResult> selectAll(){
        //先在redis中查询是否存在
        String status = (String)redisUtil.getObj("staffChangeStatus");
        if(status != null && status.equals("0")){
            List<SmsStaffResult> resultList = (List<SmsStaffResult>)redisUtil.getObj("allStaff");
            if(CollectionUtil.isEmpty(resultList)){
                return resultList;
            }
        }

        //从数据库中读取
        SmsStaffExample example = new SmsStaffExample();
        example.createCriteria().andStatusNotEqualTo(0);
        //返回数据包装成Result
        List<SmsStaff> results = smsStaffMapper.selectByExample(example);
        List<SmsStaffResult> returnList = new ArrayList<>();
        for (SmsStaff s : results) {
            SmsStaffResult r = new SmsStaffResult();
            BeanUtils.copyProperties(s, r);

            //从科室表中找到对应科室信息
            Long deptid = new Long(s.getDeptId());
            SmsDeptExample deptExample = new SmsDeptExample();
            deptExample.createCriteria().andIdEqualTo(deptid);
            List<SmsDept> dept = smsDeptMapper.selectByExample(deptExample);
            //若果有科室信息则加入，否则加入的是null
            if(dept.size() > 0){
                r.setDept(dept.get(0));
            }

            //从角色表中找到对应角色信息
            Long roleid = new Long(s.getRoleId());
            SmsRoleExample roleExample = new SmsRoleExample();
            roleExample.createCriteria().andIdEqualTo(roleid);
            List<SmsRole> role = smsRoleMapper.selectByExample(roleExample);
            //若果有角色信息则加入，否则加入的是null
            if(role.size() > 0){
                r.setRole(role.get(0));
            }

            returnList.add(r);
        }


        //向redis添加
        redisUtil.setObj("allStaff",returnList);
        redisUtil.setObj("staffChangeStatus","0");

        return returnList;
    }

    @Override
    public SmsStaff selectByUserName(String username) {
        SmsStaffExample example = new SmsStaffExample();
        example.createCriteria().andUsernameEqualTo(username).andStatusNotEqualTo(0);//查找名字相同的且状态不为0的用户
        List<SmsStaff> smsStaffList = smsStaffMapper.selectByExample(example);
        if (smsStaffList != null && smsStaffList.size() > 0) {
            return smsStaffList.get(0);
        }
        return null;
    }



//    @Override
//    public String login(String username, String password) {
//        String token = null;
//        //密码需要客户端加密后传递
//        try {
//            UserDetails userDetails = userDetailsService.loadUserByUsername(username);//返回的是一个userDetails的实现类AdminUserDetails
//            if(!passwordEncoder.matches(password,userDetails.getPassword())){  //password是从前端过来未经过编译的，而userDetails.getPassword()是从数据库中出来经过编译的
//                throw new BadCredentialsException("密码不正确");
//            }
//            //创建一个新的token
//            UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
//            SecurityContextHolder.getContext().setAuthentication(authentication);  //在securityContext中添加该验证信息
//            token = jwtTokenUtil.generateToken(userDetails);
//            //updateLoginTimeByUsername(username);
//            //insertLoginLog(username);
//        } catch (AuthenticationException e) {
//            LOGGER.warn("登录异常:{}", e.getMessage());
//        }
//        return token;
//    }

//    @Override
//    public SmsStaff getStaffByPwd(String username, String password) {
//        SmsStaffExample example = new SmsStaffExample();
//        String encodePassword = passwordEncoder.encode(password);
//        example.createCriteria().andUsernameEqualTo(username).andPasswordEqualTo(encodePassword).andStatusNotEqualTo(0);
//        List<SmsStaff> smsStaffList = smsStaffMapper.selectByExample(example);
//        if (smsStaffList != null && smsStaffList.size() > 0) {
//            return smsStaffList.get(0);
//        }
//        return null;
//    }

    /**
     * 描述：仅返回实体信息
     * <p>author: 赵煜
     * <p>return
     */
    @Override
    public List<SmsStaffResult> getStaffByDept(Long deptId) {
        SmsStaffExample example = new SmsStaffExample();
        example.createCriteria().andDeptIdEqualTo(deptId).andStatusNotEqualTo(0);//查找名字相同的且状态不为0的用户
        List<SmsStaff> smsStaffList = smsStaffMapper.selectByExample(example);
        List<SmsStaffResult> smsStaffResultList=new ArrayList<>();
        for (SmsStaff smsStaff:smsStaffList){
            SmsStaffResult smsStaffResult=new SmsStaffResult();
            BeanUtils.copyProperties(smsStaff,smsStaffResult);
            smsStaffResultList.add(smsStaffResult);
        }
        return smsStaffResultList;
    }
}


<|start_filename|>HIS-web/src/api/workload.js<|end_filename|>
import request from '@/utils/request'

export function queryPersonal(data) {
  return request({
    url: '/workload/queryPersonal',
    method: 'post',
    params: data
  })
}

export function queryDeptPersonalWorkloadList(data) {
  return request({
    url: '/workload/queryDeptPersonalWorkloadList',
    method: 'post',
    params: data
  })
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/pms/ApiPcPmsDiagnosisPatientDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.pms;


import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseHistoryResult;
import com.neu.his.cloud.zuul.dto.pms.PmsDiagnosisPatientListResult;
import com.neu.his.cloud.zuul.dto.pms.PmsPatientResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcPmsDiagnosisPatientDistributionService {


    @RequestMapping(value = "/diagnosisPatient/selectPatientByIdNo", method = RequestMethod.POST)
    CommonResult<PmsPatientResult> selectPatientByIdNo(@RequestParam("identificationNo") String identificationNo);

    @RequestMapping(value = "/diagnosisPatient/refreshPatient", method = RequestMethod.POST)
    CommonResult<PmsDiagnosisPatientListResult> refreshPatient(@RequestParam("staffId") Long staffId);


    @RequestMapping(value = "/diagnosisPatient/bindPatient", method = RequestMethod.GET)
    CommonResult bindPatient(@RequestParam("registrationId") Long registrationId, @RequestParam("staffId") Long staffId);

    @RequestMapping(value = "/diagnosisPatient/startDiagnosis", method = RequestMethod.GET)
    CommonResult<DmsCaseHistoryResult> startDiagnosis(@RequestParam("registrationId") Long registrationId);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/SmsSkdMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.SmsSkd;
import com.neu.his.cloud.zuul.model.SmsSkdExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsSkdMapper {
    int countByExample(SmsSkdExample example);

    int deleteByExample(SmsSkdExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsSkd record);

    int insertSelective(SmsSkd record);

    List<SmsSkd> selectByExample(SmsSkdExample example);

    SmsSkd selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsSkd record, @Param("example") SmsSkdExample example);

    int updateByExample(@Param("record") SmsSkd record, @Param("example") SmsSkdExample example);

    int updateByPrimaryKeySelective(SmsSkd record);

    int updateByPrimaryKey(SmsSkd record);
}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/model/SmsWorkloadRecordExample.java<|end_filename|>
package com.neu.his.cloud.api.pc.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class SmsWorkloadRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SmsWorkloadRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andStaffIdIsNull() {
            addCriterion("staff_id is null");
            return (Criteria) this;
        }

        public Criteria andStaffIdIsNotNull() {
            addCriterion("staff_id is not null");
            return (Criteria) this;
        }

        public Criteria andStaffIdEqualTo(Long value) {
            addCriterion("staff_id =", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotEqualTo(Long value) {
            addCriterion("staff_id <>", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdGreaterThan(Long value) {
            addCriterion("staff_id >", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdGreaterThanOrEqualTo(Long value) {
            addCriterion("staff_id >=", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdLessThan(Long value) {
            addCriterion("staff_id <", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdLessThanOrEqualTo(Long value) {
            addCriterion("staff_id <=", value, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdIn(List<Long> values) {
            addCriterion("staff_id in", values, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotIn(List<Long> values) {
            addCriterion("staff_id not in", values, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdBetween(Long value1, Long value2) {
            addCriterion("staff_id between", value1, value2, "staffId");
            return (Criteria) this;
        }

        public Criteria andStaffIdNotBetween(Long value1, Long value2) {
            addCriterion("staff_id not between", value1, value2, "staffId");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountIsNull() {
            addCriterion("medicine_amount is null");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountIsNotNull() {
            addCriterion("medicine_amount is not null");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountEqualTo(BigDecimal value) {
            addCriterion("medicine_amount =", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountNotEqualTo(BigDecimal value) {
            addCriterion("medicine_amount <>", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountGreaterThan(BigDecimal value) {
            addCriterion("medicine_amount >", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("medicine_amount >=", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountLessThan(BigDecimal value) {
            addCriterion("medicine_amount <", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("medicine_amount <=", value, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountIn(List<BigDecimal> values) {
            addCriterion("medicine_amount in", values, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountNotIn(List<BigDecimal> values) {
            addCriterion("medicine_amount not in", values, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("medicine_amount between", value1, value2, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andMedicineAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("medicine_amount not between", value1, value2, "medicineAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountIsNull() {
            addCriterion("herbal_amount is null");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountIsNotNull() {
            addCriterion("herbal_amount is not null");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountEqualTo(BigDecimal value) {
            addCriterion("herbal_amount =", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountNotEqualTo(BigDecimal value) {
            addCriterion("herbal_amount <>", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountGreaterThan(BigDecimal value) {
            addCriterion("herbal_amount >", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("herbal_amount >=", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountLessThan(BigDecimal value) {
            addCriterion("herbal_amount <", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("herbal_amount <=", value, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountIn(List<BigDecimal> values) {
            addCriterion("herbal_amount in", values, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountNotIn(List<BigDecimal> values) {
            addCriterion("herbal_amount not in", values, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("herbal_amount between", value1, value2, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andHerbalAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("herbal_amount not between", value1, value2, "herbalAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountIsNull() {
            addCriterion("check_amount is null");
            return (Criteria) this;
        }

        public Criteria andCheckAmountIsNotNull() {
            addCriterion("check_amount is not null");
            return (Criteria) this;
        }

        public Criteria andCheckAmountEqualTo(BigDecimal value) {
            addCriterion("check_amount =", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountNotEqualTo(BigDecimal value) {
            addCriterion("check_amount <>", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountGreaterThan(BigDecimal value) {
            addCriterion("check_amount >", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("check_amount >=", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountLessThan(BigDecimal value) {
            addCriterion("check_amount <", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("check_amount <=", value, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountIn(List<BigDecimal> values) {
            addCriterion("check_amount in", values, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountNotIn(List<BigDecimal> values) {
            addCriterion("check_amount not in", values, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("check_amount between", value1, value2, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andCheckAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("check_amount not between", value1, value2, "checkAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountIsNull() {
            addCriterion("disposition_amount is null");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountIsNotNull() {
            addCriterion("disposition_amount is not null");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountEqualTo(BigDecimal value) {
            addCriterion("disposition_amount =", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountNotEqualTo(BigDecimal value) {
            addCriterion("disposition_amount <>", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountGreaterThan(BigDecimal value) {
            addCriterion("disposition_amount >", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("disposition_amount >=", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountLessThan(BigDecimal value) {
            addCriterion("disposition_amount <", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("disposition_amount <=", value, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountIn(List<BigDecimal> values) {
            addCriterion("disposition_amount in", values, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountNotIn(List<BigDecimal> values) {
            addCriterion("disposition_amount not in", values, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("disposition_amount between", value1, value2, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andDispositionAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("disposition_amount not between", value1, value2, "dispositionAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountIsNull() {
            addCriterion("registration_amount is null");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountIsNotNull() {
            addCriterion("registration_amount is not null");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountEqualTo(BigDecimal value) {
            addCriterion("registration_amount =", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountNotEqualTo(BigDecimal value) {
            addCriterion("registration_amount <>", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountGreaterThan(BigDecimal value) {
            addCriterion("registration_amount >", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("registration_amount >=", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountLessThan(BigDecimal value) {
            addCriterion("registration_amount <", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("registration_amount <=", value, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountIn(List<BigDecimal> values) {
            addCriterion("registration_amount in", values, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountNotIn(List<BigDecimal> values) {
            addCriterion("registration_amount not in", values, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("registration_amount between", value1, value2, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andRegistrationAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("registration_amount not between", value1, value2, "registrationAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountIsNull() {
            addCriterion("test_amount is null");
            return (Criteria) this;
        }

        public Criteria andTestAmountIsNotNull() {
            addCriterion("test_amount is not null");
            return (Criteria) this;
        }

        public Criteria andTestAmountEqualTo(BigDecimal value) {
            addCriterion("test_amount =", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountNotEqualTo(BigDecimal value) {
            addCriterion("test_amount <>", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountGreaterThan(BigDecimal value) {
            addCriterion("test_amount >", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("test_amount >=", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountLessThan(BigDecimal value) {
            addCriterion("test_amount <", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("test_amount <=", value, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountIn(List<BigDecimal> values) {
            addCriterion("test_amount in", values, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountNotIn(List<BigDecimal> values) {
            addCriterion("test_amount not in", values, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("test_amount between", value1, value2, "testAmount");
            return (Criteria) this;
        }

        public Criteria andTestAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("test_amount not between", value1, value2, "testAmount");
            return (Criteria) this;
        }

        public Criteria andAmountIsNull() {
            addCriterion("amount is null");
            return (Criteria) this;
        }

        public Criteria andAmountIsNotNull() {
            addCriterion("amount is not null");
            return (Criteria) this;
        }

        public Criteria andAmountEqualTo(BigDecimal value) {
            addCriterion("amount =", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotEqualTo(BigDecimal value) {
            addCriterion("amount <>", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThan(BigDecimal value) {
            addCriterion("amount >", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("amount >=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThan(BigDecimal value) {
            addCriterion("amount <", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("amount <=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountIn(List<BigDecimal> values) {
            addCriterion("amount in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotIn(List<BigDecimal> values) {
            addCriterion("amount not in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount not between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andDateIsNull() {
            addCriterion("date is null");
            return (Criteria) this;
        }

        public Criteria andDateIsNotNull() {
            addCriterion("date is not null");
            return (Criteria) this;
        }

        public Criteria andDateEqualTo(Date value) {
            addCriterion("date =", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateNotEqualTo(Date value) {
            addCriterion("date <>", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateGreaterThan(Date value) {
            addCriterion("date >", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateGreaterThanOrEqualTo(Date value) {
            addCriterion("date >=", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateLessThan(Date value) {
            addCriterion("date <", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateLessThanOrEqualTo(Date value) {
            addCriterion("date <=", value, "date");
            return (Criteria) this;
        }

        public Criteria andDateIn(List<Date> values) {
            addCriterion("date in", values, "date");
            return (Criteria) this;
        }

        public Criteria andDateNotIn(List<Date> values) {
            addCriterion("date not in", values, "date");
            return (Criteria) this;
        }

        public Criteria andDateBetween(Date value1, Date value2) {
            addCriterion("date between", value1, value2, "date");
            return (Criteria) this;
        }

        public Criteria andDateNotBetween(Date value1, Date value2) {
            addCriterion("date not between", value1, value2, "date");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumIsNull() {
            addCriterion("registration_num is null");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumIsNotNull() {
            addCriterion("registration_num is not null");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumEqualTo(Long value) {
            addCriterion("registration_num =", value, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumNotEqualTo(Long value) {
            addCriterion("registration_num <>", value, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumGreaterThan(Long value) {
            addCriterion("registration_num >", value, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumGreaterThanOrEqualTo(Long value) {
            addCriterion("registration_num >=", value, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumLessThan(Long value) {
            addCriterion("registration_num <", value, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumLessThanOrEqualTo(Long value) {
            addCriterion("registration_num <=", value, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumIn(List<Long> values) {
            addCriterion("registration_num in", values, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumNotIn(List<Long> values) {
            addCriterion("registration_num not in", values, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumBetween(Long value1, Long value2) {
            addCriterion("registration_num between", value1, value2, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andRegistrationNumNotBetween(Long value1, Long value2) {
            addCriterion("registration_num not between", value1, value2, "registrationNum");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountIsNull() {
            addCriterion("excute_check_amount is null");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountIsNotNull() {
            addCriterion("excute_check_amount is not null");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountEqualTo(BigDecimal value) {
            addCriterion("excute_check_amount =", value, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountNotEqualTo(BigDecimal value) {
            addCriterion("excute_check_amount <>", value, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountGreaterThan(BigDecimal value) {
            addCriterion("excute_check_amount >", value, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("excute_check_amount >=", value, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountLessThan(BigDecimal value) {
            addCriterion("excute_check_amount <", value, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("excute_check_amount <=", value, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountIn(List<BigDecimal> values) {
            addCriterion("excute_check_amount in", values, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountNotIn(List<BigDecimal> values) {
            addCriterion("excute_check_amount not in", values, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("excute_check_amount between", value1, value2, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteCheckAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("excute_check_amount not between", value1, value2, "excuteCheckAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountIsNull() {
            addCriterion("excute_test_amount is null");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountIsNotNull() {
            addCriterion("excute_test_amount is not null");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountEqualTo(BigDecimal value) {
            addCriterion("excute_test_amount =", value, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountNotEqualTo(BigDecimal value) {
            addCriterion("excute_test_amount <>", value, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountGreaterThan(BigDecimal value) {
            addCriterion("excute_test_amount >", value, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("excute_test_amount >=", value, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountLessThan(BigDecimal value) {
            addCriterion("excute_test_amount <", value, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("excute_test_amount <=", value, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountIn(List<BigDecimal> values) {
            addCriterion("excute_test_amount in", values, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountNotIn(List<BigDecimal> values) {
            addCriterion("excute_test_amount not in", values, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("excute_test_amount between", value1, value2, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteTestAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("excute_test_amount not between", value1, value2, "excuteTestAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountIsNull() {
            addCriterion("excute_disposition_amount is null");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountIsNotNull() {
            addCriterion("excute_disposition_amount is not null");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountEqualTo(BigDecimal value) {
            addCriterion("excute_disposition_amount =", value, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountNotEqualTo(BigDecimal value) {
            addCriterion("excute_disposition_amount <>", value, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountGreaterThan(BigDecimal value) {
            addCriterion("excute_disposition_amount >", value, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("excute_disposition_amount >=", value, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountLessThan(BigDecimal value) {
            addCriterion("excute_disposition_amount <", value, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("excute_disposition_amount <=", value, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountIn(List<BigDecimal> values) {
            addCriterion("excute_disposition_amount in", values, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountNotIn(List<BigDecimal> values) {
            addCriterion("excute_disposition_amount not in", values, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("excute_disposition_amount between", value1, value2, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andExcuteDispositionAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("excute_disposition_amount not between", value1, value2, "excuteDispositionAmount");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(Integer value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(Integer value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(Integer value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(Integer value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(Integer value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<Integer> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<Integer> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(Integer value1, Integer value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNull() {
            addCriterion("dept_id is null");
            return (Criteria) this;
        }

        public Criteria andDeptIdIsNotNull() {
            addCriterion("dept_id is not null");
            return (Criteria) this;
        }

        public Criteria andDeptIdEqualTo(Long value) {
            addCriterion("dept_id =", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotEqualTo(Long value) {
            addCriterion("dept_id <>", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThan(Long value) {
            addCriterion("dept_id >", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdGreaterThanOrEqualTo(Long value) {
            addCriterion("dept_id >=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThan(Long value) {
            addCriterion("dept_id <", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdLessThanOrEqualTo(Long value) {
            addCriterion("dept_id <=", value, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdIn(List<Long> values) {
            addCriterion("dept_id in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotIn(List<Long> values) {
            addCriterion("dept_id not in", values, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdBetween(Long value1, Long value2) {
            addCriterion("dept_id between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andDeptIdNotBetween(Long value1, Long value2) {
            addCriterion("dept_id not between", value1, value2, "deptId");
            return (Criteria) this;
        }

        public Criteria andExcuteNumIsNull() {
            addCriterion("excute_num is null");
            return (Criteria) this;
        }

        public Criteria andExcuteNumIsNotNull() {
            addCriterion("excute_num is not null");
            return (Criteria) this;
        }

        public Criteria andExcuteNumEqualTo(Long value) {
            addCriterion("excute_num =", value, "excuteNum");
            return (Criteria) this;
        }

        public Criteria andExcuteNumNotEqualTo(Long value) {
            addCriterion("excute_num <>", value, "excuteNum");
            return (Criteria) this;
        }

        public Criteria andExcuteNumGreaterThan(Long value) {
            addCriterion("excute_num >", value, "excuteNum");
            return (Criteria) this;
        }

        public Criteria andExcuteNumGreaterThanOrEqualTo(Long value) {
            addCriterion("excute_num >=", value, "excuteNum");
            return (Criteria) this;
        }

        public Criteria andExcuteNumLessThan(Long value) {
            addCriterion("excute_num <", value, "excuteNum");
            return (Criteria) this;
        }

        public Criteria andExcuteNumLessThanOrEqualTo(Long value) {
            addCriterion("excute_num <=", value, "excuteNum");
            return (Criteria) this;
        }

        public Criteria andExcuteNumIn(List<Long> values) {
            addCriterion("excute_num in", values, "excuteNum");
            return (Criteria) this;
        }

        public Criteria andExcuteNumNotIn(List<Long> values) {
            addCriterion("excute_num not in", values, "excuteNum");
            return (Criteria) this;
        }

        public Criteria andExcuteNumBetween(Long value1, Long value2) {
            addCriterion("excute_num between", value1, value2, "excuteNum");
            return (Criteria) this;
        }

        public Criteria andExcuteNumNotBetween(Long value1, Long value2) {
            addCriterion("excute_num not between", value1, value2, "excuteNum");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/dto/app/AppDeptDescriptionResult.java<|end_filename|>
package com.neu.his.cloud.service.sms.dto.app;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class AppDeptDescriptionResult {

    @ApiModelProperty(value = "科室Id")
    private Long deptId;
    @ApiModelProperty(value = "科室名")
    private String deptName;
    @ApiModelProperty(value = "科室描述")
    private String description;
    @ApiModelProperty(value = "科室图片url")
    private String url;

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsMechanicItemRecordResult.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
public class DmsMechanicItemRecordResult  implements Serializable {
         @ApiModelProperty(value = "项目记录Id")
         Long itemRecordId;
        @ApiModelProperty(value = "项目名")
        String itemName;
        @ApiModelProperty(value = "项目类型")
        String itemType;
        @ApiModelProperty(value = "门诊号")
        Long registrationId;
        @ApiModelProperty(value = "状态")
        Integer status;
        @ApiModelProperty(value = "检查检验要求")
        String demand;
        @ApiModelProperty(value = "登记状态")
        Integer logStatus;
        @ApiModelProperty(value = "检查检验结果")
        String checkResult;
        @ApiModelProperty(value = "检查检验结果img")
        List<String> resultImgUrlList;
       @ApiModelProperty(value = "病人姓名")
        String patientName;
        @ApiModelProperty(value = "病人年龄")
        String patientAgeStr;
        @ApiModelProperty(value = "病人性别")
        Integer patientGender;

        @ApiModelProperty(value = "目的")
        String aim;
        @ApiModelProperty(value = "检查部位")
        String checkParts;

        @ApiModelProperty(value = "临床印象")
        String clinicalImpression;
        @ApiModelProperty(value = "临床诊断")
        String clinicalDiagnosis;
        //20190621添加属性
        @ApiModelProperty(value = "登记医生姓名")
        String logStaffName;
        @ApiModelProperty(value = "开立时间")
        Date createTime;


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/sms/SmsStaffResult.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.sms;

import com.neu.his.cloud.api.pc.model.SmsDept;

import com.neu.his.cloud.api.pc.model.SmsRole;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;


@Setter
@Getter
@ToString
public class SmsStaffResult  implements Serializable {
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "登录名")
    private String username;
    @ApiModelProperty(value = "密码")
    private String password;
    @ApiModelProperty(value = "真实姓名")
    private String name;
    @ApiModelProperty(value = "所在科室")
    private SmsDept dept;
    @ApiModelProperty(value = "状态：1->有效;0->无效")
    private Integer status;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "性别")
    private Integer gender;
    @ApiModelProperty(value = "是否参与排班：0->否;1->是")
    private Integer skdFlag;
    @ApiModelProperty(value = "职称")
    private String title;
    @ApiModelProperty(value = "角色")
    private SmsRole role;
    @ApiModelProperty(value = "挂号级别id")
    private Long registrationRankId;
}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/EsDrugService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.dms.model.EsDrug;
import org.springframework.data.domain.Page;

import java.util.List;


/**
 * 药品搜索
 */
public interface EsDrugService {
    /**
     * 描述：从数据库中导入所有药品到ES
     */
    int importAll();

    /**
     * 描述：根据id删除药品
     */
    void delete(Long id);

    /**
     * 描述：根据id创建药品
     */
    EsDrug create(Long id);

    /**
     * 描述：批量删除药品
     */
    void delete(List<Long> ids);

    /**
     * 描述：根据关键字搜索
     */
    Page<EsDrug> search(String keyword, Integer pageNum, Integer pageSize);

    /**
     * 描述：根据关键字模糊搜索
     */
    Page<EsDrug> searchFuzzy(String keyword, Integer pageNum, Integer pageSize);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsNonDrugModelDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonPage;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsNonDrugModelDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugModelParam;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugModelResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsNonDrugModelDistributionController", description = "非药品模版管理")
@RequestMapping("/NonDrugModel")
@CrossOrigin(allowCredentials = "true")
public class DmsNonDrugModelDistributionController {

    @Autowired
    ApiPcDmsNonDrugModelDistributionService apiPcDmsNonDrugModelDistributionService;

    @HystrixCommand(fallbackMethod = "createFallbackInfo")
    @ApiOperation(value = "新增非药品模版")
    @RequestMapping(value = "/createModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody DmsNonDrugModelParam dmsNonDrugModelParam, BindingResult result) {
      return apiPcDmsNonDrugModelDistributionService.create(dmsNonDrugModelParam);
    }
    private CommonResult createFallbackInfo(DmsNonDrugModelParam dmsNonDrugModelParam, BindingResult result) {
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteModelFallbackInfo")
    @ApiOperation(value = "删除非药品模版")
    @RequestMapping(value = "/deleteModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModel(@RequestParam("ids") List<Long> ids){
       return apiPcDmsNonDrugModelDistributionService.deleteModel(ids);
    }
    private CommonResult deleteModelFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "deleteModelItemFallbackInfo")
    @ApiOperation(value = "删除非药品模版项")
    @RequestMapping(value = "/deleteModelItem", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult deleteModelItem(@RequestParam("modelId")Long modelId, @RequestParam("ids") List<Long> itemIds){
        return apiPcDmsNonDrugModelDistributionService.deleteModelItem(modelId,itemIds);
    }
    private CommonResult deleteModelItemFallbackInfo(Long modelId, List<Long> itemIds){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "updateModelFallbackInfo")
    @ApiOperation(value = "更新非药品模版")
    @RequestMapping(value = "/updateModel", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult updateModel(@RequestParam("modelId") Long modelId, @RequestBody DmsNonDrugModelParam dmsNonDrugModelParam, BindingResult result){
        return apiPcDmsNonDrugModelDistributionService.updateModel(modelId,dmsNonDrugModelParam);
    }
    private CommonResult updateModelFallbackInfo(Long modelId,  DmsNonDrugModelParam dmsNonDrugModelParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listFallbackInfo")
    @ApiOperation(value = "模糊查询非药品模版、且分页")
    @RequestMapping(value = "/listModel", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<CommonPage<DmsNonDrugModelResult>> list(DmsNonDrugModelParam queryParam,
                                                                @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin){

        return apiPcDmsNonDrugModelDistributionService.list(queryParam, pageSize, pageNum,isAdmin);
    }
    private CommonResult<CommonPage<DmsNonDrugModelResult>> listFallbackInfo(DmsNonDrugModelParam queryParam,
                                                                Integer pageSize,
                                                                Integer pageNum, @RequestParam(value = "isAdmin") Integer isAdmin){
        return CommonResult.success(null,"请检查您的网络") ;
    }


}

<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/ApiPcApplication.java<|end_filename|>
package com.neu.his.cloud.api.pc;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;

@SpringBootApplication(scanBasePackages = "com.neu.his.cloud.api.pc")
@EnableFeignClients
@EnableDiscoveryClient
@EnableHystrixDashboard
public class ApiPcApplication {
    public static void main(String[] args) {
        SpringApplication.run(ApiPcApplication.class,args);
    }

//    @Bean
//    public CorsFilter corsFilter() {
//        final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
//        final CorsConfiguration config = new CorsConfiguration();
//        config.setAllowCredentials(true); // 允许cookies跨域
//        config.addAllowedOrigin("*");// #允许向该服务器提交请求的URI，*表示全部允许，在SpringMVC中，如果设成*，会自动转成当前请求头中的Origin
//        config.addAllowedHeader("*");// #允许访问的头信息,*表示全部
//        config.setMaxAge(18000L);// 预检请求的缓存时间（秒），即在这个时间段里，对于相同的跨域请求不会再预检了
//        config.addAllowedMethod("OPTIONS");// 允许提交请求的方法，*表示全部允许
//        config.addAllowedMethod("HEAD");
//        config.addAllowedMethod("GET");// 允许Get的请求方法
//        config.addAllowedMethod("PUT");
//        config.addAllowedMethod("POST");
//        config.addAllowedMethod("DELETE");
//        config.addAllowedMethod("PATCH");
//        source.registerCorsConfiguration("/**", config);
//        return new CorsFilter(source);
//}
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsNonDrugItemRecordDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;

import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugItemRecordListParam;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugItemRecordResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsNonDrugItemRecordDistributionService {

    @RequestMapping(value = "/nonDrugItemRecord/apply", method = RequestMethod.POST)
    CommonResult apply(@RequestBody DmsNonDrugItemRecordListParam dmsNonDrugItemRecordListParam);

    @RequestMapping(value = "/nonDrugItemRecord/invalid", method = RequestMethod.POST)
    CommonResult invalid(@RequestParam("ids") List<Long> ids);

    @RequestMapping(value = "/nonDrugItemRecord/listByRegAndType", method = RequestMethod.POST)
    CommonResult<List<DmsNonDrugItemRecordResult>> listByRegAndType(@RequestParam("registrationId") Long registrationId, @RequestParam("type") Integer type);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsMedicinePrescriptionRecordDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;



import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsMedicinePrescriptionRecordParam;
import com.neu.his.cloud.zuul.dto.dms.DmsMedicinePrescriptionRecordResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsMedicinePrescriptionRecordDistributionService {

    @RequestMapping(value = "/DmsMedicinePrescriptionRecord/apply", method = RequestMethod.POST)
    CommonResult apply(@RequestBody DmsMedicinePrescriptionRecordParam dmsMedicinePrescriptionRecordParam);


    @RequestMapping(value = "/DmsMedicinePrescriptionRecord/invalid", method = RequestMethod.POST)
    CommonResult invalid(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/DmsMedicinePrescriptionRecord/listByReg", method = RequestMethod.POST)
    CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByReg(@RequestParam("registrationId") Long registrationId);

    @RequestMapping(value = "/DmsMedicinePrescriptionRecord/listByIds", method = RequestMethod.POST)
    CommonResult<List<DmsMedicinePrescriptionRecordResult>> listByIds(@RequestParam("ids") List<Long> ids);

}


<|start_filename|>HIS-web/src/api/nondrugmodel.js<|end_filename|>
import request from '@/utils/request'

export function getNondrugModelList(data) {
  return request({
    url: '/NonDrugModel/listModel',
    method: 'get',
    params: data
  })
}

export function updateModel(data){
  return request({
    url:'/NonDrugModel/updateModel',
    method:'post',
    params:{
      modelId:data.id
    },
    data
  }
  )
}


export function createModel(data){
  return request({
    url:'/NonDrugModel/createModel',
    method:'post',
    data
  }
  )
}

export function deleteModel(ids){
  return request({
    url: '/NonDrugModel/deleteModel',
    method: 'post',
    params: {ids}
  })
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsRegistrationDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsRegistrationDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsRegistrationParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "DmsRegistrationDistributionController", description = "挂号管理")
@RequestMapping("/registration")
@CrossOrigin(allowCredentials = "true")
public class DmsRegistrationDistributionController {

    @Autowired
    ApiPcDmsRegistrationDistributionService apiPcDmsRegistrationDistributionService;

    @HystrixCommand(fallbackMethod = "createRegistrationFallbackInfo")
    @ApiOperation(value = "挂号")
    @RequestMapping(value = "/createRegistration", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult createRegistration(@RequestBody DmsRegistrationParam dmsRegistrationParam , BindingResult result){
       return apiPcDmsRegistrationDistributionService.createRegistration(dmsRegistrationParam);

    }
    private CommonResult createRegistrationFallbackInfo( DmsRegistrationParam dmsRegistrationParam , BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/dms/DmsNonDrugItemRecordController.java<|end_filename|>
package com.neu.his.api.controller.dms;

import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.dms.DmsNonDrugItemRecordListParam;
import com.neu.his.common.dto.dms.DmsNonDrugItemRecordResult;
import com.neu.his.component.RabbitMQOrderSender;
import com.neu.his.dms.service.DmsNonDrugItemRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "DmsNonDrugItemRecordController", description = "非药品收费项目管理")
@RequestMapping("/nonDrugItemRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsNonDrugItemRecordController {
    @Autowired
    DmsNonDrugItemRecordService dmsNonDrugItemRecordService;

    @Autowired
    RabbitMQOrderSender rabbitMQOrderSender;


    //开立项目
    //1.调用DmsNonDrugItemRecordService的apply
    @ApiOperation(value = "开立项目")
    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult apply(@RequestBody DmsNonDrugItemRecordListParam dmsNonDrugItemRecordListParam, BindingResult result){
        List<Long> currentIdList = dmsNonDrugItemRecordService.apply(dmsNonDrugItemRecordListParam);
        if(currentIdList == null || currentIdList.size() <= 0){
            return CommonResult.failed("开立失败");
        }else{
            //获取订单超时时间，假设为30s
            long delayTimes = 60 * 1000 *60 *12;
            //发送延迟消息
            for(Long id : currentIdList){
                rabbitMQOrderSender.sendMessage(id, 1, delayTimes);
            }

            return CommonResult.success("开立成功");
        }
    }
    //作废项目
    //1.调用DmsNonDrugItemRecordService的invalid
    @ApiOperation(value = "作废项目")
    @RequestMapping(value = "/invalid", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult invalid(@RequestParam("ids") List<Long> ids){
        int returnResult = dmsNonDrugItemRecordService.invalid(ids);
        if (returnResult == 1){
            return CommonResult.success(returnResult);
        }
        else{
            return CommonResult.failed();
        }
    }
    //刷新项目
    //1.调用DmsNonDrugItemRecordService的listByRegAndType
    @ApiOperation(value = "刷新项目")
    @RequestMapping(value = "/listByRegAndType", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsNonDrugItemRecordResult>> listByRegAndType(@RequestParam("registrationId") Long registrationId, @RequestParam("type") Integer type){
        List<DmsNonDrugItemRecordResult> dmsNonDrugItemRecordResultList = dmsNonDrugItemRecordService.listByRegAndType(registrationId,type);
        return CommonResult.success(dmsNonDrugItemRecordResultList);
    }
}


<|start_filename|>HIS-master/HIS-mbg/src/main/java/com/neu/his/mbg/mapper/SmsRegistrationRankMapper.java<|end_filename|>
package com.neu.his.mbg.mapper;

import com.neu.his.mbg.model.SmsRegistrationRank;
import com.neu.his.mbg.model.SmsRegistrationRankExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsRegistrationRankMapper {
    int countByExample(SmsRegistrationRankExample example);

    int deleteByExample(SmsRegistrationRankExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsRegistrationRank record);

    int insertSelective(SmsRegistrationRank record);

    List<SmsRegistrationRank> selectByExample(SmsRegistrationRankExample example);

    SmsRegistrationRank selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsRegistrationRank record, @Param("example") SmsRegistrationRankExample example);

    int updateByExample(@Param("record") SmsRegistrationRank record, @Param("example") SmsRegistrationRankExample example);

    int updateByPrimaryKeySelective(SmsRegistrationRank record);

    int updateByPrimaryKey(SmsRegistrationRank record);
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/SmsLoginLogMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.SmsLoginLog;
import com.neu.his.cloud.zuul.model.SmsLoginLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SmsLoginLogMapper {
    int countByExample(SmsLoginLogExample example);

    int deleteByExample(SmsLoginLogExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SmsLoginLog record);

    int insertSelective(SmsLoginLog record);

    List<SmsLoginLog> selectByExample(SmsLoginLogExample example);

    SmsLoginLog selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SmsLoginLog record, @Param("example") SmsLoginLogExample example);

    int updateByExample(@Param("record") SmsLoginLog record, @Param("example") SmsLoginLogExample example);

    int updateByPrimaryKeySelective(SmsLoginLog record);

    int updateByPrimaryKey(SmsLoginLog record);
}

<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/mapper/BmsBillsRecordMapper.java<|end_filename|>
package com.neu.his.cloud.service.dms.mapper;

import com.neu.his.cloud.service.dms.model.BmsBillsRecord;
import com.neu.his.cloud.service.dms.model.BmsBillsRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface BmsBillsRecordMapper {
    int countByExample(BmsBillsRecordExample example);

    int deleteByExample(BmsBillsRecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(BmsBillsRecord record);

    int insertSelective(BmsBillsRecord record);

    List<BmsBillsRecord> selectByExample(BmsBillsRecordExample example);

    BmsBillsRecord selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") BmsBillsRecord record, @Param("example") BmsBillsRecordExample example);

    int updateByExample(@Param("record") BmsBillsRecord record, @Param("example") BmsBillsRecordExample example);

    int updateByPrimaryKeySelective(BmsBillsRecord record);

    int updateByPrimaryKey(BmsBillsRecord record);
}

<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/BmsSettlementCatService.java<|end_filename|>
package com.neu.his.cloud.service.bms.service;

import com.neu.his.cloud.service.bms.dto.bms.BmsSettlementCatParam;
import com.neu.his.cloud.service.bms.dto.bms.BmsSettlementCatResult;


import java.util.List;

/**
 * 结算类型
 */
public interface BmsSettlementCatService {

    /**
     * 描述：新增结算类型
     */
    int create(BmsSettlementCatParam bmsSettlementCatParam);

    /**
     * 描述：删除结算类型
     */
    int delete(List<Long> ids);

    /**
     * 描述：更新结算类型
     */
    int update(Long id, BmsSettlementCatParam bmsSettlementCatParam);

    /**
     * 描述：查询结算类型
     */
    List<BmsSettlementCatResult> select(BmsSettlementCatParam bmsSettlementCatParam);

    /**
     * 描述：列出所有结算类型
     */
    List<BmsSettlementCatResult> selectAll();
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/DmsDosageMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.DmsDosage;
import com.neu.his.cloud.zuul.model.DmsDosageExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsDosageMapper {
    int countByExample(DmsDosageExample example);

    int deleteByExample(DmsDosageExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsDosage record);

    int insertSelective(DmsDosage record);

    List<DmsDosage> selectByExample(DmsDosageExample example);

    DmsDosage selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsDosage record, @Param("example") DmsDosageExample example);

    int updateByExample(@Param("record") DmsDosage record, @Param("example") DmsDosageExample example);

    int updateByPrimaryKeySelective(DmsDosage record);

    int updateByPrimaryKey(DmsDosage record);
}

<|start_filename|>his-cloud/his-cloud-service-bms/src/main/java/com/neu/his/cloud/service/bms/service/impl/BmsDailySettlementServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.bms.service.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.neu.his.cloud.service.bms.dto.bms.BmsDailySettleRecordResult;
import com.neu.his.cloud.service.bms.dto.bms.BmsSettleListItemResult;
import com.neu.his.cloud.service.bms.mapper.BmsInvoiceRecordMapper;
import com.neu.his.cloud.service.bms.mapper.BmsOperatorSettleRecordMapper;
import com.neu.his.cloud.service.bms.mapper.SmsStaffMapper;
import com.neu.his.cloud.service.bms.model.*;
import com.neu.his.cloud.service.bms.service.BmsDailySettlementService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class BmsDailySettlementServiceImpl implements BmsDailySettlementService {
    @Autowired
    BmsOperatorSettleRecordMapper bmsOperatorSettleRecordMapper;
    @Autowired
    BmsInvoiceRecordMapper bmsInvoiceRecordMapper;
    @Autowired
    SmsStaffMapper smsStaffMapper;

    //1. 根据收费员id在日结记录表中查询最近的end_datetime
    //如果没有日结记录则返回该收费员最早的操作记录时间，则返回最早最早发票的时间
    @Override
    public Date queryRecentEndDatetime(Long staffId) {
        BmsOperatorSettleRecordExample bmsOperatorSettleRecordExample = new BmsOperatorSettleRecordExample();
        bmsOperatorSettleRecordExample.createCriteria().andCashierIdEqualTo(staffId);
        //按截止时间倒序，选取最上面的一条记录
        bmsOperatorSettleRecordExample.setOrderByClause("end_datetime desc");
        List<BmsOperatorSettleRecord> bmsOperatorSettleRecordList = bmsOperatorSettleRecordMapper.selectByExample(bmsOperatorSettleRecordExample);
        Date endDatetime = null;
        if (!bmsOperatorSettleRecordList.isEmpty()){
            BmsOperatorSettleRecord bmsOperatorSettleRecord = bmsOperatorSettleRecordList.get(0);//可能有问题
            endDatetime = bmsOperatorSettleRecord.getEndDatetime();
        }
        else {
            BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();
            bmsInvoiceRecordExample.createCriteria().andOperatorIdEqualTo(staffId);

            bmsInvoiceRecordExample.setOrderByClause("create_time asc");
            List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
            if (!bmsInvoiceRecordList.isEmpty()){
                endDatetime = bmsInvoiceRecordList.get(0).getCreateTime();
            }
            else {//所操作发票最早的时间
                BmsInvoiceRecordExample bmsInvoiceRecordExampleTemp=new BmsInvoiceRecordExample();
                bmsInvoiceRecordExampleTemp.createCriteria().andOperatorIdEqualTo(staffId);
                bmsInvoiceRecordExampleTemp.setOrderByClause("create_time desc");
                List<BmsInvoiceRecord> bmsInvoiceRecordListTemp = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExampleTemp);
                if(!CollectionUtil.isEmpty(bmsInvoiceRecordListTemp))
                    endDatetime = bmsInvoiceRecordListTemp.get(0).getCreateTime();
            }
        }
        return endDatetime;

    }


    //根据起始、结束时间和收费员id统计日结信息
    //1. 传入新的start_datetime和end_datetime和收费员id，查询发票信息
    //2. 在发票表中查询记录并封装信息，（所有发票先按时间排序，++看是否断开）
    //除了日结时间CreateDatetime，对账人id verifyOperatorId，对账时间 verifyDatetime，对账状态 verifyStatus
    @Override
    public BmsDailySettleRecordResult statisticDailySettlement(Long cashierId, Date startDatetime, Date endDatetime) {
        BmsDailySettleRecordResult bmsDailySettleRecordResult = new BmsDailySettleRecordResult();

        BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();

        bmsInvoiceRecordExample.createCriteria().andOperatorIdEqualTo(cashierId).andCreateTimeBetween(startDatetime,endDatetime);
        bmsInvoiceRecordExample.setOrderByClause("create_time asc");
        List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);

        Long invoiceNum = 0l;//发票总数量
        Long rushInvoiceNum = 0l;//冲红发票数量
        Long reprintInvoiceNum = 0l;//重打发票数量

        String startEndInvoiceIdStr = "";//起始结束发票id串
        String rushInvoiceIdListStr = "";//冲红发票id list
        String reprintInvoiceIdListStr = "";//重打发票id list

        BigDecimal medicineAmount = new BigDecimal(0);//成药总金额
        BigDecimal herbalAmount = new BigDecimal(0);//草药总金额
        BigDecimal checkAmount = new BigDecimal(0);//检查总金额
        BigDecimal registrationAmount = new BigDecimal(0);//挂号总金额
        BigDecimal dispositionAmount = new BigDecimal(0);//处置总金额
        BigDecimal testAmount = new BigDecimal(0);//检验总金额

        BigDecimal amount = new BigDecimal(0);//总金额
        BigDecimal cashAmount = new BigDecimal(0);//现金总金额
        BigDecimal insuranceAmount = new BigDecimal(0);//医保总金额
        BigDecimal bankCardAmount = new BigDecimal(0);//银行卡总金额
        BigDecimal  alipayAmount = new BigDecimal(0);//支付宝总金额
        BigDecimal  wechatAmount = new BigDecimal(0);//微信总金额
        BigDecimal  creditCardAmount = new BigDecimal(0);//信用卡总金额
        BigDecimal otherAmount = new BigDecimal(0);//其他总金额

        if (!bmsInvoiceRecordList.isEmpty()){
            Long lastInvoiceNo = null;//存上一张发票的发票号
            Long startInvoice = null;
            Long endInvoice = null;
            for (int i=0;i<bmsInvoiceRecordList.size();i++){
                //拼接起始结束发票id串
                if (lastInvoiceNo == null){
                    startInvoice = bmsInvoiceRecordList.get(i).getInvoiceNo();
                }
                else if (bmsInvoiceRecordList.get(i).getInvoiceNo() != (lastInvoiceNo+1)){
                    endInvoice = lastInvoiceNo;
                    if (startInvoice != endInvoice){
                        startEndInvoiceIdStr = startEndInvoiceIdStr + (startInvoice + "-" + endInvoice + ",");
                    }
                    else if (startInvoice == endInvoice){
                        startEndInvoiceIdStr = startEndInvoiceIdStr + (startInvoice + ",");
                    }
                    startInvoice = bmsInvoiceRecordList.get(i).getInvoiceNo();
                }
                if (i == (bmsInvoiceRecordList.size()-1)){
                    if (bmsInvoiceRecordList.get(i).getInvoiceNo() == (lastInvoiceNo + 1)){
                        startEndInvoiceIdStr = startEndInvoiceIdStr + (startInvoice + "-" + bmsInvoiceRecordList.get(i).getInvoiceNo());
                    }
                    else{
                        if (startInvoice == lastInvoiceNo){
                            startEndInvoiceIdStr = startEndInvoiceIdStr + (startInvoice + "," + bmsInvoiceRecordList.get(i).getInvoiceNo());
                        }
                        else{
                            startEndInvoiceIdStr = startEndInvoiceIdStr + bmsInvoiceRecordList.get(i).getInvoiceNo();
                        }
                    }
                }
                lastInvoiceNo = bmsInvoiceRecordList.get(i).getInvoiceNo();
                invoiceNum++;//发票总数量
                if (bmsInvoiceRecordList.get(i).getType() == 2){//冲红发票
                    rushInvoiceNum++;
                    if (rushInvoiceIdListStr == ""){
                        rushInvoiceIdListStr = rushInvoiceIdListStr + (bmsInvoiceRecordList.get(i).getInvoiceNo());
                    }
                    else{
                        rushInvoiceIdListStr = rushInvoiceIdListStr + ("," + bmsInvoiceRecordList.get(i).getInvoiceNo() );
                    }
                }
                else if (bmsInvoiceRecordList.get(i).getType() == 4){//重打发票
                    reprintInvoiceNum++;
                    if (reprintInvoiceIdListStr == ""){
                        reprintInvoiceIdListStr = reprintInvoiceIdListStr + (bmsInvoiceRecordList.get(i).getInvoiceNo());
                    }
                    else{
                        reprintInvoiceIdListStr = reprintInvoiceIdListStr + ( "," + bmsInvoiceRecordList.get(i).getInvoiceNo());
                    }
                }
                if (bmsInvoiceRecordList.get(i).getType() == 1){//正常发票
                    String itemList = bmsInvoiceRecordList.get(i).getItemList();
                    if (itemList != null){
                        String[][] resolvedItemList = resolveItemList(itemList);
                        if (resolvedItemList.length != 0){
                            for(int x = 0; x < resolvedItemList.length ; x++) {
                           //     Long idOfOneItem = Long.valueOf(resolvedItemList[x][0]);
                                Integer typeOfOneItem = Integer.valueOf(resolvedItemList[x][1]);
                                BigDecimal amountOfOneItem = new BigDecimal(resolvedItemList[x][2]);
                                if (typeOfOneItem == 0){//挂号
                                    registrationAmount = registrationAmount.add(amountOfOneItem);
                                }
                                else if (typeOfOneItem == 1){//检查
                                    checkAmount = checkAmount.add(amountOfOneItem);
                                }
                                else if (typeOfOneItem == 2){//检验
                                    testAmount = testAmount.add(amountOfOneItem);
                                }
                                else if (typeOfOneItem == 3){//处置
                                    dispositionAmount = dispositionAmount.add(amountOfOneItem);
                                }
                                else if (typeOfOneItem == 4){//草药
                                    herbalAmount = herbalAmount.add(amountOfOneItem);

                                }
                                else if (typeOfOneItem == 5){//成药
                                    medicineAmount = medicineAmount.add(amountOfOneItem);
                                }
                            }
                            amount = amount.add(bmsInvoiceRecordList.get(i).getAmount());//总金额
                            if (bmsInvoiceRecordList.get(i).getSettlementCatId() == 1){//现金
                                cashAmount = cashAmount.add(bmsInvoiceRecordList.get(i).getAmount());
                            }
                            else if (bmsInvoiceRecordList.get(i).getSettlementCatId() == 2){//银行卡
                                bankCardAmount = bankCardAmount.add(bmsInvoiceRecordList.get(i).getAmount());
                            }
                            else if (bmsInvoiceRecordList.get(i).getSettlementCatId() == 3){//医保
                                insuranceAmount = insuranceAmount.add(bmsInvoiceRecordList.get(i).getAmount());
                            }
                            else if (bmsInvoiceRecordList.get(i).getSettlementCatId() == 4){//信用卡
                                creditCardAmount = creditCardAmount.add(bmsInvoiceRecordList.get(i).getAmount());
                            }
                            else  if (bmsInvoiceRecordList.get(i).getSettlementCatId() == 5){//支付宝
                                alipayAmount = alipayAmount.add(bmsInvoiceRecordList.get(i).getAmount());
                            }
                            else if (bmsInvoiceRecordList.get(i).getSettlementCatId() == 6){//微信
                                wechatAmount = wechatAmount.add(bmsInvoiceRecordList.get(i).getAmount());
                            }
                            else if (bmsInvoiceRecordList.get(i).getSettlementCatId() == 7){//其他
                                otherAmount = otherAmount.add(bmsInvoiceRecordList.get(i).getAmount());
                            }
                        }
                    }
                }
            }
        }
        //开始,截止时间
        bmsDailySettleRecordResult.setStartDatetime(startDatetime);
        bmsDailySettleRecordResult.setEndDatetime(endDatetime);
        //收银员（日结员）id
        bmsDailySettleRecordResult.setCashierId(cashierId);

        bmsDailySettleRecordResult.setInvoiceNum(invoiceNum);
        bmsDailySettleRecordResult.setRushInvoiceNum(rushInvoiceNum);
        bmsDailySettleRecordResult.setReprintInvoiceNum(reprintInvoiceNum);
        bmsDailySettleRecordResult.setStartEndInvoiceIdStr(startEndInvoiceIdStr);
        bmsDailySettleRecordResult.setRushInvoiceIdListStr(rushInvoiceIdListStr);
        bmsDailySettleRecordResult.setReprintInvoiceIdListStr(reprintInvoiceIdListStr);
        bmsDailySettleRecordResult.setMedicineAmount(medicineAmount);
        bmsDailySettleRecordResult.setHerbalAmount(herbalAmount);
        bmsDailySettleRecordResult.setCheckAmount(checkAmount);
        bmsDailySettleRecordResult.setRegistrationAmount(registrationAmount);
        bmsDailySettleRecordResult.setDispositionAmount(dispositionAmount);
        bmsDailySettleRecordResult.setTestAmount(testAmount);
        bmsDailySettleRecordResult.setAmount(amount);
        bmsDailySettleRecordResult.setCashAmount(cashAmount);
        bmsDailySettleRecordResult.setInsuranceAmount(insuranceAmount);
        bmsDailySettleRecordResult.setBankCardAmount(bankCardAmount);
        bmsDailySettleRecordResult.setAlipayAmount(alipayAmount);
        bmsDailySettleRecordResult.setWechatAmount(wechatAmount);
        bmsDailySettleRecordResult.setCreditCardAmount(creditCardAmount);
        bmsDailySettleRecordResult.setOtherAmount(otherAmount);

        return bmsDailySettleRecordResult;
    }
    //根据起始、结束时间和收费员id列出日结历史
    @Override
    public List<BmsSettleListItemResult> listDailySettleListRecord(Long cashierId, Date startDatetime, Date endDatetime) {
        List<BmsSettleListItemResult> bmsSettleListItemResultList = new ArrayList<>();
        BmsOperatorSettleRecordExample bmsOperatorSettleRecordExample = new BmsOperatorSettleRecordExample();
        bmsOperatorSettleRecordExample.createCriteria().andCashierIdEqualTo(cashierId).andCreateDatetimeBetween(startDatetime,endDatetime);
        List<BmsOperatorSettleRecord> bmsOperatorSettleRecordList = bmsOperatorSettleRecordMapper.selectByExample(bmsOperatorSettleRecordExample);
        if (!bmsOperatorSettleRecordList.isEmpty()){
            SmsStaff smsStaff = smsStaffMapper.selectByPrimaryKey(cashierId);
            String cashierName = smsStaff.getName();
            for (BmsOperatorSettleRecord bmsOperatorSettleRecord : bmsOperatorSettleRecordList){
                BmsSettleListItemResult bmsSettleListItemResult = new BmsSettleListItemResult();
                bmsSettleListItemResult.setCashierId(cashierId);
                bmsSettleListItemResult.setOperatorName(cashierName);
                bmsSettleListItemResult.setCreateDatetme(bmsOperatorSettleRecord.getCreateDatetime());
                bmsSettleListItemResult.setSettleRecordId(bmsOperatorSettleRecord.getId());
                bmsSettleListItemResult.setVerifyStatus(bmsOperatorSettleRecord.getVerifyStatus());
                bmsSettleListItemResultList.add(bmsSettleListItemResult);
            }
        }

        return bmsSettleListItemResultList;
    }
    //根据日结记录id查询日结详细信息
    @Override
    public BmsDailySettleRecordResult querySettleDetailById(Long id) {
        BmsOperatorSettleRecord bmsOperatorSettleRecord = bmsOperatorSettleRecordMapper.selectByPrimaryKey(id);
        BmsDailySettleRecordResult bmsDailySettleRecordResult = new BmsDailySettleRecordResult();
        if (bmsOperatorSettleRecord != null){

            BeanUtils.copyProperties(bmsOperatorSettleRecord,bmsDailySettleRecordResult);
            return bmsDailySettleRecordResult;
        }
        return null;
    }
    //收费员日结：
    //1. 传入新的start_datetime和end_datetime和收费员id，查询发票信息
    //2. 在发票表中查询记录并封装信息，（所有发票先按时间排序，++看是否断开）插入日结记录，并根据start_datetime和end_datetime和收费员id查询并返回刚插入的日结记录id
    //3. 遍历相关发票，设置发票所属日结记录id，并修改freeze_status为1
    @Override
    public Long dailySettle(Long cashierId, Date startDatetime, Date endDatetime) {
        BmsDailySettleRecordResult bmsDailySettleRecordResult = statisticDailySettlement(cashierId, startDatetime, endDatetime);
        BmsOperatorSettleRecord bmsOperatorSettleRecord = new BmsOperatorSettleRecord();
        BeanUtils.copyProperties(bmsDailySettleRecordResult,bmsOperatorSettleRecord);
        //日结时间
        bmsOperatorSettleRecord.setCreateDatetime(new Date());
        bmsOperatorSettleRecordMapper.insertSelective(bmsOperatorSettleRecord);
        Long bmsOperatorSettleRecordId = bmsOperatorSettleRecord.getId();//插入的日结记录id
        //遍历相关发票，设置发票所属日结记录id，并修改freeze_status为1
        BmsInvoiceRecordExample bmsInvoiceRecordExample = new BmsInvoiceRecordExample();
        bmsInvoiceRecordExample.createCriteria().andOperatorIdEqualTo(cashierId).andCreateTimeBetween(startDatetime,endDatetime);
        bmsInvoiceRecordExample.setOrderByClause("create_time asc");
        List<BmsInvoiceRecord> bmsInvoiceRecordList = bmsInvoiceRecordMapper.selectByExample(bmsInvoiceRecordExample);
        if (!bmsInvoiceRecordList.isEmpty()){
            for (BmsInvoiceRecord bmsInvoiceRecord : bmsInvoiceRecordList){
                bmsInvoiceRecord.setFreezeStatus(1);
                bmsInvoiceRecord.setSettleRecordId(bmsOperatorSettleRecordId);
                bmsInvoiceRecordMapper.updateByPrimaryKeySelective(bmsInvoiceRecord);
            }
        }
        return bmsOperatorSettleRecordId;
    }
    //财务处对账
    //1.根据settleRecordId找出日结记录，并修改status为1，更新对账时间和对账人id
    @Override
    public int verifySettle(Long verifyOperatorId, Long settleRecordId) {
        BmsOperatorSettleRecord bmsOperatorSettleRecord = bmsOperatorSettleRecordMapper.selectByPrimaryKey(settleRecordId);
        if (bmsOperatorSettleRecord != null){
            bmsOperatorSettleRecord.setVerifyStatus(1);
            bmsOperatorSettleRecord.setVerifyDatetime(new Date());
            bmsOperatorSettleRecord.setVerifyOperatorId(verifyOperatorId);
            bmsOperatorSettleRecordMapper.updateByPrimaryKeySelective(bmsOperatorSettleRecord);
            return 1;
        }
        return 0;
    }

    //解析发票的itemList
    public String[][] resolveItemList(String itemList){
        String[] prescription = itemList.split("><");
        String[][] result = new String[prescription.length][3];
        for (int i = 0 ; i < prescription.length ; i++){
            String[] item = prescription[i].split(",");
            for (int j = 0 ; j < item.length ; j++){
                result[i][j] = item[j];
            }
        }
        return result;
    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/dms/DmsMechanicItemRecordController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsMechanicItemRecordResult;
import com.neu.his.cloud.api.pc.service.dms.DmsMechanicItemRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsMechanicItemRecordController", description = "医技工作台")
@RequestMapping("/DmsMechanicItemRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsMechanicItemRecordController {

    @Autowired
    private DmsMechanicItemRecordService dmsMechanicItemRecordService;


    @ApiOperation(value = "根据科室id刷新患者列表")
    @RequestMapping(value = "/listByDept", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsMechanicItemRecordResult>> listByDept(@RequestParam("deptId") Long deptId){
        return  dmsMechanicItemRecordService.listByDept(deptId);
    }


    @ApiOperation(value = "登记")
    @RequestMapping(value = "/log", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult log(@RequestParam("itemRecordId") Long itemRecordId, @RequestParam("logStaffId") Long logStaffId){
        return dmsMechanicItemRecordService.log(itemRecordId,logStaffId);

    }


    @ApiOperation(value = "上传结果")
    @RequestMapping(value = "/uploadResult", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult uploadResult(@RequestParam("id") Long id,
                                     @RequestParam("executeStaffId") Long excuteStaffId,
                                     @RequestParam("checkResult") String checkResult,
                                     @RequestParam("resultImgUrlList") String resultImgUrlList){
        return dmsMechanicItemRecordService.uploadResult(id,excuteStaffId,checkResult,resultImgUrlList);
    }

}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/controller/bms/BmsSettlementCatController.java<|end_filename|>
package com.neu.his.cloud.api.pc.controller.bms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.bms.BmsSettlementCatParam;
import com.neu.his.cloud.api.pc.dto.bms.BmsSettlementCatResult;
import com.neu.his.cloud.api.pc.service.bms.BmsSettlementCatService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "BmsSettlementCatController", description = "结算类别管理")
@RequestMapping("/settleCat")
@CrossOrigin(allowCredentials = "true")
public class BmsSettlementCatController {

    @Autowired
    private BmsSettlementCatService bmsSettlementCatService;


    @ApiOperation("新增一个结算类别")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody BmsSettlementCatParam bmsSettlementCatParam , BindingResult result){
        return bmsSettlementCatService.create(bmsSettlementCatParam);
    }

    @ApiOperation("根据ids删除结算类别")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        return bmsSettlementCatService.delete(ids);
    }

    @ApiOperation("更新一个结算类别信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody BmsSettlementCatParam bmsSettlementCatParam , BindingResult result){
      return bmsSettlementCatService.update(id,bmsSettlementCatParam);
    }


    @ApiOperation("模糊查询结算类别、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<BmsSettlementCatResult>> list(@RequestBody BmsSettlementCatParam queryParam,
                                                                 @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                 @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        return bmsSettlementCatService.list(queryParam,pageSize,pageNum);
    }

    @ApiOperation("查询所有结算类别")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsSettlementCatResult >> listAll(){
        return bmsSettlementCatService.listAll();
    }


}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/sms/SmsSkdResult.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.sms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
@ToString
public class SmsSkdResult  implements Serializable {
    @ApiModelProperty(value = "主键")
    private Long id;
    @ApiModelProperty(value = "医生name")
    private String staffName;
//    @ApiModelProperty(value = "起始时间")
//    private Date startDate;
//    @ApiModelProperty(value = "截止时间")
//    private Date endDate;
@ApiModelProperty(value = "时间")
    private Date date;

    @ApiModelProperty(value = "午别")
    private Integer noon;
    @ApiModelProperty(value = "科室名")
    private String deptName;
    @ApiModelProperty(value = "排班限额")
    private Long skLimit;
    @ApiModelProperty(value = "挂号级别")
    private String registrationRank;

    //20190625 马
    @ApiModelProperty(value = "剩余号数")
    private Long remain;
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/distribution/api/pc/dms/ApiPcDmsCaseHistoryDistributionService.java<|end_filename|>
package com.neu.his.cloud.zuul.distribution.api.pc.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseHistoryParam;
import com.neu.his.cloud.zuul.dto.dms.DmsCaseHistoryResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "his-cloud-api-pc")
public interface ApiPcDmsCaseHistoryDistributionService {


    @RequestMapping(value = "/caseHistory/submitPriliminaryDise", method = RequestMethod.POST)
    CommonResult submitPriliminaryDise(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam);


    @RequestMapping(value = "/caseHistory/selectNotEndCaseHistoryByReg/{registrationId}", method = RequestMethod.GET)
    CommonResult<DmsCaseHistoryResult> selectNotEndCaseHistoryByReg(@PathVariable("registrationId") Long registrationId);


    @RequestMapping(value = "/caseHistory/selectEndCaseHistoryByReg/{registrationId}", method = RequestMethod.GET)
    CommonResult<DmsCaseHistoryResult> selectEndCaseHistoryByReg(@PathVariable("registrationId") Long registrationId);


    @RequestMapping(value = "/caseHistory/submitDefiniteDise", method = RequestMethod.POST)
    CommonResult submitDefiniteDise(DmsCaseHistoryParam dmsCaseHistoryParam);


    @RequestMapping(value = "/caseHistory/endDiagnosis", method = RequestMethod.POST)
    CommonResult endDiagnosis(DmsCaseHistoryParam dmsCaseHistoryParam);
}


<|start_filename|>HIS-master/HIS-service/HIS-bms-service/src/main/java/com/neu/his/bms/service/DemoService.java<|end_filename|>
package com.neu.his.bms.service;

import org.springframework.stereotype.Service;


public interface DemoService {

    public void test();
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/DmsNonDrugItemRecordDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiPcDmsNonDrugItemRecordDistributionService;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugItemRecordListParam;
import com.neu.his.cloud.zuul.dto.dms.DmsNonDrugItemRecordResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "DmsNonDrugItemRecordDistributionController", description = "非药品收费项目管理")
@RequestMapping("/nonDrugItemRecord")
@CrossOrigin(allowCredentials = "true")
public class DmsNonDrugItemRecordDistributionController {
    @Autowired
    ApiPcDmsNonDrugItemRecordDistributionService apiPcDmsNonDrugItemRecordDistributionService;

    @HystrixCommand(fallbackMethod = "applyFallbackInfo")
    @ApiOperation(value = "开立项目")
    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult apply(@RequestBody DmsNonDrugItemRecordListParam dmsNonDrugItemRecordListParam, BindingResult result){
        return apiPcDmsNonDrugItemRecordDistributionService.apply(dmsNonDrugItemRecordListParam);
    }
    public CommonResult applyFallbackInfo( DmsNonDrugItemRecordListParam dmsNonDrugItemRecordListParam, BindingResult result){
        return CommonResult.success(null,"请检查您的网络") ;
    }


    @HystrixCommand(fallbackMethod = "invalidFallbackInfo")
    @ApiOperation(value = "作废项目")
    @RequestMapping(value = "/invalid", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult invalid(@RequestParam("ids") List<Long> ids){
        return apiPcDmsNonDrugItemRecordDistributionService.invalid(ids);
    }
    private CommonResult invalidFallbackInfo(List<Long> ids){
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @HystrixCommand(fallbackMethod = "listByRegAndTypeFallbackInfo")
    @ApiOperation(value = "刷新项目")
    @RequestMapping(value = "/listByRegAndType", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<List<DmsNonDrugItemRecordResult>> listByRegAndType(@RequestParam("registrationId") Long registrationId, @RequestParam("type") Integer type){
       return apiPcDmsNonDrugItemRecordDistributionService.listByRegAndType(registrationId,type);
    }
    private CommonResult<List<DmsNonDrugItemRecordResult>> listByRegAndTypeFallbackInfo(Long registrationId, Integer type){
        return CommonResult.success(null,"请检查您的网络") ;
    }
}


<|start_filename|>HIS-master/HIS-api/src/main/java/com/neu/his/api/controller/bms/BmsSettlementCatController.java<|end_filename|>
package com.neu.his.api.controller.bms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.bms.service.BmsSettlementCatService;
import com.neu.his.common.api.CommonPage;
import com.neu.his.common.api.CommonResult;
import com.neu.his.common.dto.bms.BmsSettlementCatParam;
import com.neu.his.common.dto.bms.BmsSettlementCatResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@Api(tags = "BmsSettlementCatController", description = "结算类别管理")
@RequestMapping("/settleCat")
@CrossOrigin(allowCredentials = "true")
public class BmsSettlementCatController {

    @Autowired
    private BmsSettlementCatService bmsSettlementCatService;

    /**
     * 描述:新增一个结算类别
     * <p>author: ma
     */
    @ApiOperation("新增一个结算类别")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult create(@RequestBody BmsSettlementCatParam bmsSettlementCatParam , BindingResult result){
        int count = bmsSettlementCatService.create(bmsSettlementCatParam);
        if(count > 0){
            return CommonResult.success(count, "添加成功");
        }
        return CommonResult.failed("添加失败");
    }

    /**
     * 描述:根据ids删除结算类别
     * <p>author: ma
     */
    @ApiOperation("根据ids删除结算类别")
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult delete(@RequestParam("ids") List<Long> ids){
        int count = bmsSettlementCatService.delete(ids);
        if(count > 0){
            return CommonResult.success(count,"删除成功");
        }
        return CommonResult.failed("删除失败");
    }

    /**
     * 描述:更新一个结算类别的全部信息
     * <p>author: ma
     */
    @ApiOperation("更新一个结算类别信息")
    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult update(@PathVariable Long id,@RequestBody BmsSettlementCatParam bmsSettlementCatParam , BindingResult result){
        int count = bmsSettlementCatService.update(id,bmsSettlementCatParam);
        if(id > 0){
            return CommonResult.success(count,"更新成功");
        }
        return CommonResult.failed("更新失败");
    }

    /**
     * 模糊查询结算类别、且分页
     * <p>author: ma
     */
    @ApiOperation("模糊查询结算类别、且分页")
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<CommonPage<BmsSettlementCatResult>> list(BmsSettlementCatParam queryParam,
                                                                 @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                 @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum){
        Page page =PageHelper.startPage(pageNum, pageSize);
        List<BmsSettlementCatResult> list = bmsSettlementCatService.select(queryParam);
        Long pageTotal=page.getTotal();
        return CommonResult.success(CommonPage.restPage(list,pageTotal));
    }

    /**
     * 描述:查询所有结算类别
     * <p>author: ma
     */
    @ApiOperation("查询所有结算类别")
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<BmsSettlementCatResult >> listAll(){
        List<BmsSettlementCatResult> list = bmsSettlementCatService.selectAll();
        return CommonResult.success(list);
    }
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsNonDrugService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.neu.his.cloud.api.pc.common.CommonPage;
import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsNonDrugService {

    @RequestMapping(value = "/DmsNonDrug/create", method = RequestMethod.POST)
    CommonResult create(@RequestBody DmsNonDrugParam dmsNonDrugParam);

    @RequestMapping(value = "/DmsNonDrug/delete", method = RequestMethod.POST)
    CommonResult delete(@RequestParam("ids") List<Long> ids);

    @RequestMapping(value = "/DmsNonDrug/update/{id}", method = RequestMethod.POST)
    CommonResult update(@PathVariable Long id, @RequestBody DmsNonDrugParam dmsNonDrugParam);

    @RequestMapping(value = "/DmsNonDrug/list", method = RequestMethod.POST)
    CommonResult<CommonPage<DmsNonDrugResult>> list(@RequestBody DmsNonDrugParam queryParam,
                                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);


    @RequestMapping(value = "/DmsNonDrug/listAll", method = RequestMethod.POST)
    public CommonResult<List<DmsNonDrugResult>> listAll();


}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/mapper/DmsNonDrugModelMapper.java<|end_filename|>
package com.neu.his.cloud.zuul.mapper;

import com.neu.his.cloud.zuul.model.DmsNonDrugModel;
import com.neu.his.cloud.zuul.model.DmsNonDrugModelExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DmsNonDrugModelMapper {
    int countByExample(DmsNonDrugModelExample example);

    int deleteByExample(DmsNonDrugModelExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DmsNonDrugModel record);

    int insertSelective(DmsNonDrugModel record);

    List<DmsNonDrugModel> selectByExample(DmsNonDrugModelExample example);

    DmsNonDrugModel selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DmsNonDrugModel record, @Param("example") DmsNonDrugModelExample example);

    int updateByExample(@Param("record") DmsNonDrugModel record, @Param("example") DmsNonDrugModelExample example);

    int updateByPrimaryKeySelective(DmsNonDrugModel record);

    int updateByPrimaryKey(DmsNonDrugModel record);
}

<|start_filename|>his-cloud/his-cloud-service-sms/src/main/java/com/neu/his/cloud/service/sms/model/SmsFrequentUsed.java<|end_filename|>
package com.neu.his.cloud.service.sms.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;

public class SmsFrequentUsed implements Serializable {
    private Long id;

    private String medicineDiseIdList;

    private String dispositionIdList;

    private String testIdList;

    private String herbalDiseIdList;

    private String checkModelIdList;

    private String dispositionModelIdList;

    private String testModelIdList;

    private String drugModelIdList;

    private Long staffId;

    private String checkIdList;

    private String drugIdList;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMedicineDiseIdList() {
        return medicineDiseIdList;
    }

    public void setMedicineDiseIdList(String medicineDiseIdList) {
        this.medicineDiseIdList = medicineDiseIdList;
    }

    public String getDispositionIdList() {
        return dispositionIdList;
    }

    public void setDispositionIdList(String dispositionIdList) {
        this.dispositionIdList = dispositionIdList;
    }

    public String getTestIdList() {
        return testIdList;
    }

    public void setTestIdList(String testIdList) {
        this.testIdList = testIdList;
    }

    public String getHerbalDiseIdList() {
        return herbalDiseIdList;
    }

    public void setHerbalDiseIdList(String herbalDiseIdList) {
        this.herbalDiseIdList = herbalDiseIdList;
    }

    public String getCheckModelIdList() {
        return checkModelIdList;
    }

    public void setCheckModelIdList(String checkModelIdList) {
        this.checkModelIdList = checkModelIdList;
    }

    public String getDispositionModelIdList() {
        return dispositionModelIdList;
    }

    public void setDispositionModelIdList(String dispositionModelIdList) {
        this.dispositionModelIdList = dispositionModelIdList;
    }

    public String getTestModelIdList() {
        return testModelIdList;
    }

    public void setTestModelIdList(String testModelIdList) {
        this.testModelIdList = testModelIdList;
    }

    public String getDrugModelIdList() {
        return drugModelIdList;
    }

    public void setDrugModelIdList(String drugModelIdList) {
        this.drugModelIdList = drugModelIdList;
    }

    public Long getStaffId() {
        return staffId;
    }

    public void setStaffId(Long staffId) {
        this.staffId = staffId;
    }

    public String getCheckIdList() {
        return checkIdList;
    }

    public void setCheckIdList(String checkIdList) {
        this.checkIdList = checkIdList;
    }

    public String getDrugIdList() {
        return drugIdList;
    }

    public void setDrugIdList(String drugIdList) {
        this.drugIdList = drugIdList;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", medicineDiseIdList=").append(medicineDiseIdList);
        sb.append(", dispositionIdList=").append(dispositionIdList);
        sb.append(", testIdList=").append(testIdList);
        sb.append(", herbalDiseIdList=").append(herbalDiseIdList);
        sb.append(", checkModelIdList=").append(checkModelIdList);
        sb.append(", dispositionModelIdList=").append(dispositionModelIdList);
        sb.append(", testModelIdList=").append(testModelIdList);
        sb.append(", drugModelIdList=").append(drugModelIdList);
        sb.append(", staffId=").append(staffId);
        sb.append(", checkIdList=").append(checkIdList);
        sb.append(", drugIdList=").append(drugIdList);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}

<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsNonDrugParam.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


@Setter
@Getter
@ToString
public class DmsNonDrugParam  implements Serializable {
    @ApiModelProperty(value = "项目编码")
    private String code;
    @ApiModelProperty(value = "项目名称")
    private String name;
    @ApiModelProperty(value = "规格")
    private String format;
    @ApiModelProperty(value = "价格")
    private BigDecimal price;
    @ApiModelProperty(value = "所属费用科目ID")
    private Long expClassId;
    @ApiModelProperty(value = "执行科室ID")
    private Long  deptId;
    @ApiModelProperty(value = "拼音助记码")
    private String mnemonicCode;
    @ApiModelProperty(value = "项目类型:1->检查检验;2->处置")
    private Integer recordType;
    @ApiModelProperty(value = "创建时间")
    private Date createDate;
    @ApiModelProperty(value = "状态")
    private Integer status;
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/service/dms/DmsNonDrugItemRecordService.java<|end_filename|>
package com.neu.his.cloud.api.pc.service.dms;

import com.neu.his.cloud.api.pc.common.CommonResult;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugItemRecordListParam;
import com.neu.his.cloud.api.pc.dto.dms.DmsNonDrugItemRecordResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "his-cloud-service-dms")
public interface DmsNonDrugItemRecordService {


    @RequestMapping(value = "/nonDrugItemRecord/apply", method = RequestMethod.POST)
    CommonResult apply(@RequestBody DmsNonDrugItemRecordListParam dmsNonDrugItemRecordListParam);


    @RequestMapping(value = "/nonDrugItemRecord/invalid", method = RequestMethod.POST)
    CommonResult invalid(@RequestParam("ids") List<Long> ids);


    @RequestMapping(value = "/nonDrugItemRecord/listByRegAndType", method = RequestMethod.POST)
    CommonResult<List<DmsNonDrugItemRecordResult>> listByRegAndType(@RequestParam("registrationId") Long registrationId, @RequestParam("type") Integer type);
}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/oss/OssCallbackResult.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.oss;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class OssCallbackResult {
    private String filename;
    private String size;
    private String mimeType;
    private String width;
    private String height;


}


<|start_filename|>his-cloud/his-cloud-service-dms/src/main/java/com/neu/his/cloud/service/dms/service/impl/DmsDrugModelServiceImpl.java<|end_filename|>
package com.neu.his.cloud.service.dms.service.impl;


import com.neu.his.cloud.service.dms.dto.dms.DmsDrugModelParam;
import com.neu.his.cloud.service.dms.dto.dms.DmsDrugModelResult;
import com.neu.his.cloud.service.dms.mapper.DmsDrugModelMapper;
import com.neu.his.cloud.service.dms.mapper.DmsHerbalModelItemMapper;
import com.neu.his.cloud.service.dms.mapper.DmsMedicineModelItemMapper;
import com.neu.his.cloud.service.dms.model.*;
import com.neu.his.cloud.service.dms.service.DmsDrugModelService;
import com.neu.his.cloud.service.dms.util.DateUtil;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class DmsDrugModelServiceImpl implements DmsDrugModelService {
    @Autowired
    DmsDrugModelMapper dmsDrugModelMapper;
    @Autowired
    DmsMedicineModelItemMapper dmsMedicineModelItemMapper;
    @Autowired
    DmsHerbalModelItemMapper dmsHerbalModelItemMapper;

    @Override
    public int createModel(DmsDrugModelParam dmsDrugModelParam) {

        DmsDrugModelExample example=new DmsDrugModelExample();
        //插入模版
        DmsDrugModel dmsDrugModel=new DmsDrugModel();
        BeanUtils.copyProperties(dmsDrugModelParam,dmsDrugModel);
        dmsDrugModel.setStatus(1);//正常
        Date currentTime=new Date();
        dmsDrugModel.setCreateTime(currentTime);
        String code=codeGenerator(currentTime);
        dmsDrugModel.setCode(code);
        dmsDrugModelMapper.insert(dmsDrugModel);
        //根据code返回id
        example.clear();
        example.createCriteria().andCodeEqualTo(code);
        Long id = dmsDrugModelMapper.selectByExample(example).get(0).getId();
        //插入模版项
        if(dmsDrugModelParam.getType()==0){//草药
            for(DmsHerbalModelItem dmsHerbalModelItem:dmsDrugModelParam.getDmsHerbalModelItemList()){
                dmsHerbalModelItem.setModelId(id);
                dmsHerbalModelItem.setStatus(1);//正常
                dmsHerbalModelItemMapper.insert(dmsHerbalModelItem);
            }
        }else{//成药
            for(DmsMedicineModelItem dmsMedicineModelItem:dmsDrugModelParam.getDmsMedicineModelItemList()){
                dmsMedicineModelItem.setModelId(id);
                dmsMedicineModelItem.setStatus(1);//正常
                dmsMedicineModelItemMapper.insert(dmsMedicineModelItem);
            }
        }
        return 1;
    }

    @Override
    public int deleteModel(List<Long> ids) {
        int count = ids == null ? 0 : ids.size();//得到要删除的数量
        if(!CollectionUtils.isEmpty(ids)){
            for(Long id : ids) {
               DmsDrugModel dmsDrugModel= dmsDrugModelMapper.selectByPrimaryKey(id);
                if(null == dmsDrugModel){
                    count--;
                    continue;
                }
                Integer mdoelType=dmsDrugModelMapper.selectByPrimaryKey(id).getType();//  0草药   1成药
                dmsDrugModelMapper.deleteByPrimaryKey(id);
                if(mdoelType==0){//草药
                    DmsHerbalModelItemExample example=new DmsHerbalModelItemExample();
                    example.createCriteria().andModelIdEqualTo(id);
                    dmsHerbalModelItemMapper.deleteByExample(example);
                }else{//成药
                    DmsMedicineModelItemExample example=new DmsMedicineModelItemExample();
                    example.createCriteria().andModelIdEqualTo(id);
                    dmsMedicineModelItemMapper.deleteByExample(example);
                }
            }
        }
        return count;
    }

    @Override
    public int deleteModelItem(Long modelId, List<Long> itemIds) {
        return 0;
    }

    @Override
    public int updateModel(Long modelId, DmsDrugModelParam dmsDrugModelParam) {
       //先找出原model信息
        DmsDrugModel oldDmsNonDrugModel=dmsDrugModelMapper.selectByPrimaryKey(modelId);
        if(null==oldDmsNonDrugModel)
            return 0;

        dmsDrugModelParam.setCreateTime(oldDmsNonDrugModel.getCreateTime());
        dmsDrugModelParam.setCode(oldDmsNonDrugModel.getCode());
        List<Long> ids=new ArrayList<>();
        ids.add(modelId);
        deleteModel(ids);//删除原model和modelId
        // 插入新model
        DmsDrugModelExample example=new DmsDrugModelExample();
        //插入模版
        DmsDrugModel dmsDrugModel=new DmsDrugModel();
        BeanUtils.copyProperties(dmsDrugModelParam,dmsDrugModel);
        //不用再初始化状态和code
        dmsDrugModelMapper.insert(dmsDrugModel);
        //更新Id
        example.clear();
        example.createCriteria().andCodeEqualTo(dmsDrugModel.getCode());
        dmsDrugModel=new DmsDrugModel();
        dmsDrugModel.setId(modelId);//modelId不变
        dmsDrugModelMapper.updateByExampleSelective(dmsDrugModel,example);

        //插入模版项
        if(dmsDrugModelParam.getType()==0){//草药
            for(DmsHerbalModelItem dmsHerbalModelItem:dmsDrugModelParam.getDmsHerbalModelItemList()){
                dmsHerbalModelItem.setModelId(modelId);
                dmsHerbalModelItem.setStatus(1);//正常
                dmsHerbalModelItemMapper.insert(dmsHerbalModelItem);
            }
        }else{//成药
            for(DmsMedicineModelItem dmsMedicineModelItem:dmsDrugModelParam.getDmsMedicineModelItemList()){
                dmsMedicineModelItem.setModelId(modelId);
                dmsMedicineModelItem.setStatus(1);//正常
                dmsMedicineModelItemMapper.insert(dmsMedicineModelItem);
            }
        }











        //



        return 0;
    }


    /**
     * 描述：根据modelId更新model信息
     *       删了重新创建
     * <p>author:赵煜
     * <p>author:赵煜  排除空指针异常
     * <p>author:赵煜  排除根据type和name查询异常
     */
    @Override
    public List<DmsDrugModelResult> selectModel(Integer isAdmin, DmsDrugModelParam queryParam, Integer pageSize, Integer pageNum) {
        DmsDrugModelExample example = null;
        List<DmsDrugModel> dmsDrugModelList = null;
        if(null==isAdmin){
            return null;
        }

        if(isAdmin == 0){  //非管理员   前台 查询个人、科室、全院
            example=  new DmsDrugModelExample();
            DmsDrugModelExample.Criteria criteria = example.createCriteria();
            criteria.andStatusNotEqualTo(0);
            criteria.andScopeEqualTo(queryParam.getScope()); //必须mvc保证不为空
            criteria.andOwnIdEqualTo(queryParam.getOwnId()); //如果isAdmin为0，则必有ownId
            if(queryParam.getType()!=null){
                criteria.andTypeEqualTo(queryParam.getType());
            }
            if(!StringUtils.isEmpty(queryParam.getName())){
                criteria.andNameLike("%"+queryParam.getType()+"%");
            }

            dmsDrugModelList=dmsDrugModelMapper.selectByExample(example);
            System.err.println("非管理员查询");
        }else{//后台 查询所有--后端模糊查询
            example=  new DmsDrugModelExample();
            DmsDrugModelExample.Criteria criteria = example.createCriteria();
            if(queryParam.getType()!=null){
                criteria.andTypeEqualTo(queryParam.getType());
            }

            if(queryParam.getStatus() == null){
                criteria.andStatusNotEqualTo(0);
            }
            if(!StringUtils.isEmpty(queryParam.getCode())){
                criteria.andCodeLike("%" + queryParam.getCode() + "%");
            }
            if(!StringUtils.isEmpty(queryParam.getName())){
                criteria.andNameLike("%" + queryParam.getName() + "%");
            }
            example.setOrderByClause("id desc");
            dmsDrugModelList=dmsDrugModelMapper.selectByExample(example);
        }

        //封装result
        List<DmsDrugModelResult> dmsDrugModelResultList = new ArrayList<>();
        for (DmsDrugModel dmsDrugModel : dmsDrugModelList) {
            DmsDrugModelResult dmsDrugModelResult = new DmsDrugModelResult();
            BeanUtils.copyProperties(dmsDrugModel, dmsDrugModelResult);
            //封装模版项
            if (dmsDrugModel.getType() == 0) {//草药
                DmsHerbalModelItemExample dmsHerbalModelItemExample = new DmsHerbalModelItemExample();
                dmsHerbalModelItemExample.createCriteria().andModelIdEqualTo(dmsDrugModel.getId());
                dmsDrugModelResult.setDmsHerbalModelItemList(dmsHerbalModelItemMapper.selectByExample(dmsHerbalModelItemExample));
            } else {//成药
                DmsMedicineModelItemExample dmsMedicineModelItemExample = new DmsMedicineModelItemExample();
                dmsMedicineModelItemExample.createCriteria().andModelIdEqualTo(dmsDrugModel.getId());
                dmsDrugModelResult.setDmsMedicineModelItemList(dmsMedicineModelItemMapper.selectByExample(dmsMedicineModelItemExample));
            }

            dmsDrugModelResultList.add(dmsDrugModelResult);
        }
        return dmsDrugModelResultList;
    }

    private String codeGenerator(Date date) {
        return DateUtil.getDateStr(date) + DateUtil.getTimeStr(date, 6);
    }

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/dto/dms/DmsCaseHistoryResult.java<|end_filename|>
package com.neu.his.cloud.zuul.dto.dms;

import com.neu.his.cloud.zuul.model.DmsCaseHistory;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Setter
@Getter
@ToString
public class DmsCaseHistoryResult  implements Serializable {
    @ApiModelProperty(value = "历史病历列表")
    List<DmsCaseHistory> dmsCaseHistoryList;
}


<|start_filename|>his-cloud/his-cloud-api-pc/src/main/java/com/neu/his/cloud/api/pc/dto/sms/SmsStaffLoginParam.java<|end_filename|>
package com.neu.his.cloud.api.pc.dto.sms;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.NotEmpty;

import java.io.Serializable;


@Setter
@Getter
@ToString
public class SmsStaffLoginParam  implements Serializable {
    @ApiModelProperty(value = "用户名", required = true)
    @NotEmpty(message = "用户名不能为空")
    private String username;
    @ApiModelProperty(value = "密码", required = true)
    @NotEmpty(message = "密码不能为空")
    private String password;

}


<|start_filename|>HIS-master/HIS-service/HIS-sms-service/src/main/java/com/neu/his/sms/impl/SmsDeptServiceImpl.java<|end_filename|>
package com.neu.his.sms.impl;

import com.github.pagehelper.PageHelper;
import com.neu.his.common.dto.sms.SmsDeptParam;
import com.neu.his.common.dto.sms.SmsDeptResult;
import com.neu.his.common.util.RedisUtil;
import com.neu.his.mbg.mapper.SmsDeptMapper;
import com.neu.his.mbg.model.SmsDept;
import com.neu.his.mbg.model.SmsDeptExample;
import com.neu.his.sms.SmsDeptService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.rmi.ServerError;
import java.util.ArrayList;
import java.util.List;

/**
 *  科室
 */
@Service
public class SmsDeptServiceImpl implements SmsDeptService {

    @Autowired
    private SmsDeptMapper smsDeptMapper;
    @Autowired
    private RedisUtil redisUtil;
    /**
     * 描述:1.调用SmsDeptDao根据code查询科室是否存在
     * 2.1.如果不存在则向SmsDeptDao插入则插入数据，并返回1
     * 2.2.如果存在则返回值0
     * <p>author: ma
     * <p>author: 赵煜 修改科室新增的问题（不能新增同名科室）
     */
    @Override
    public int create(SmsDeptParam smsDeptParam){
        SmsDept smsDept = new SmsDept();
        BeanUtils.copyProperties(smsDeptParam, smsDept);
        smsDept.setStatus(1);
        //查询是否有同code科室
        SmsDeptExample example = new SmsDeptExample();
        example.createCriteria().andNameEqualTo(smsDept.getName()).andStatusNotEqualTo(0);
        List<SmsDept> SmsDeptList = smsDeptMapper.selectByExample(example);
        if (SmsDeptList.size() > 0) {
            return 0;
        }

        //插入成功，在redis修改flag
        redisUtil.setObj("deptChangeStatus","1");

        //没有则插入数据
        return smsDeptMapper.insert(smsDept);
    }

    @Override
    public int delete(List<Long> ids){
        SmsDept smsDept = new SmsDept();
        smsDept.setStatus(0);
        SmsDeptExample example = new SmsDeptExample();
        example.createCriteria().andIdIn(ids);

        //删除成功，在redis修改flag
        redisUtil.setObj("deptChangeStatus","1");

        return smsDeptMapper.updateByExampleSelective(smsDept, example);
    }

    @Override
    public int update(Long id,SmsDeptParam smsDeptParam){
        SmsDept smsDept = new SmsDept();
        BeanUtils.copyProperties(smsDeptParam, smsDept);
        smsDept.setId(id);

        //修改成功，在redis修改flag
        redisUtil.setObj("deptChangeStatus","1");

        return smsDeptMapper.updateByPrimaryKeySelective(smsDept);
    }

    @Override
    public List<SmsDeptResult> select(SmsDeptParam smsDeptQueryParam){

        SmsDeptExample example = new SmsDeptExample();
        SmsDeptExample.Criteria criteria = example.createCriteria();
        //如果没有指明state，返回不为0的
        if(smsDeptQueryParam.getStatus() == null){
            criteria.andStatusNotEqualTo(0);
        }
        //是否按编码、名称、分类、类型查询
        if(!StringUtils.isEmpty(smsDeptQueryParam.getCode())){
            criteria.andCodeLike("%" + smsDeptQueryParam.getCode() + "%");
        }
        if(!StringUtils.isEmpty(smsDeptQueryParam.getName())){
            criteria.andNameLike("%" + smsDeptQueryParam.getName() + "%");
        }
        if(smsDeptQueryParam.getCatId() != null){
            criteria.andCatIdEqualTo(smsDeptQueryParam.getCatId());
        }
        if(smsDeptQueryParam.getType() != null){
            criteria.andTypeEqualTo(smsDeptQueryParam.getType());
        }
        //返回数据包装成Result
        example.setOrderByClause("id desc");
        List<SmsDept> smsDepts = smsDeptMapper.selectByExample(example);
        List<SmsDeptResult> smsDeptResults = new ArrayList<>();
        for (SmsDept s : smsDepts) {
            SmsDeptResult r = new SmsDeptResult();
            BeanUtils.copyProperties(s, r);
            smsDeptResults.add(r);
        }
        return smsDeptResults;
    }

    @Override
    public List<SmsDeptResult> selectAll(){
        //先在redis中查询是否存在
        String status = (String)redisUtil.getObj("deptChangeStatus");
        if(status != null && status.equals("0")){
            List<SmsDeptResult> resultList = (List<SmsDeptResult>)redisUtil.getObj("allDept");
            if(resultList != null){
                System.err.println("从redis中取出全部科室数据");
                return resultList;
            }
        }else{
            System.err.println("从mysql中取出全部科室数据");
        }

        //数据库查询
        SmsDeptExample example = new SmsDeptExample();
        example.createCriteria().andStatusNotEqualTo(0);
        //返回数据包装成Result
        List<SmsDept> smsDepts = smsDeptMapper.selectByExample(example);
        List<SmsDeptResult> smsDeptResults = new ArrayList<>();
        for (SmsDept s : smsDepts) {
            SmsDeptResult r = new SmsDeptResult();
            BeanUtils.copyProperties(s, r);
            smsDeptResults.add(r);
        }

        //向redis添加
        redisUtil.setObj("allDept",smsDeptResults);
        redisUtil.setObj("deptChangeStatus","0");


        return smsDeptResults;
    }

}


<|start_filename|>HIS-master/HIS-service/HIS-dms-service/src/main/java/com/neu/his/dms/service/DmsCaseHistoryService.java<|end_filename|>
package com.neu.his.dms.service;

import com.neu.his.common.dto.dms.DmsCaseHistoryParam;
import com.neu.his.common.dto.dms.DmsCaseHistoryResult;

/**
 * 历史病例
 */
public interface DmsCaseHistoryService {
    /**
     * 描述：插入初诊信息
     */
    int insertPriliminaryDise(DmsCaseHistoryParam dmsCaseHistoryParam);
    /**
     * 描述：根据门诊号查询历史病历
     */
    DmsCaseHistoryResult selectCaseHistoryByReg(Long registrationId, Integer status);
    /**
     * 描述：提交门诊确诊信息
     */
    int submitDefiniteDise(DmsCaseHistoryParam dmsCaseHistoryParam);
    /**
     * 描述：诊毕
     */
    int endDiagnosis(DmsCaseHistoryParam dmsCaseHistoryParam);
}


<|start_filename|>his-cloud/his-cloud-api-app/src/main/java/com/neu/his/cloud/api/app/service/bms/BmsFeeQueryService.java<|end_filename|>
package com.neu.his.cloud.api.app.service.bms;

import com.neu.his.cloud.api.app.common.CommonResult;
import com.neu.his.cloud.api.app.dto.app.AppDrugItemResult;
import com.neu.his.cloud.api.app.dto.app.AppHistoryRegResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "his-cloud-service-bms")
public interface BmsFeeQueryService {

    @RequestMapping(value = "/feeQuery/listFee", method = RequestMethod.POST)
    public CommonResult<List<AppHistoryRegResult>> listFee(@RequestParam("registrationId") Long registrationId);

    @RequestMapping(value = "/feeQuery/listDetail", method = RequestMethod.POST)
    public CommonResult<List<AppDrugItemResult>> listFeeDetail(@RequestParam("prescriptionId") Long prescriptionId ,
                                                               @RequestParam("type") int type);

}


<|start_filename|>his-cloud/his-cloud-zuul/src/main/java/com/neu/his/cloud/zuul/controller/dms/OssDistributionController.java<|end_filename|>
package com.neu.his.cloud.zuul.controller.dms;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.neu.his.cloud.zuul.common.CommonResult;
import com.neu.his.cloud.zuul.distribution.api.pc.dms.ApiOssServiceDistributionService;
import com.neu.his.cloud.zuul.dto.oss.OssCallbackResult;
import com.neu.his.cloud.zuul.dto.oss.OssPolicyResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Oss相关操作接口
 */
@RestController
@Api(tags = "OssController", description = "Oss管理")
@RequestMapping("/aliyun/oss")
public class OssDistributionController {
    @Autowired
    private ApiOssServiceDistributionService apiOssServiceDistributionService;

    @HystrixCommand(fallbackMethod = "policyFallbackInfo")
    @ApiOperation(value = "oss上传签名生成")
    @RequestMapping(value = "/policy", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<OssPolicyResult> policy() {
        return apiOssServiceDistributionService.policy();
    }
    private CommonResult<OssPolicyResult> policyFallbackInfo() {
        return CommonResult.success(null,"请检查您的网络") ;
    }

    @ApiOperation(value = "oss上传成功回调")
    @RequestMapping(value = "/callback", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<OssCallbackResult> callback(HttpServletRequest request) {
        return apiOssServiceDistributionService.callback(request);
    }
}
