Sfoglia il codice sorgente

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

Conflicts:
	svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorServiceApplicationService.java
	svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/WlyyDoorServiceOrderService.java
	svr/svr-door-serivce/src/main/java/com/yihu/jw/door/util/MessageUtil.java
	svr/svr-door-serivce/src/main/resources/application.yml
yeshijie 4 anni fa
parent
commit
f04cac4e2f

+ 3 - 1
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/doctor/DoorOrderController.java

@ -518,10 +518,12 @@ public class DoorOrderController extends BaseController {
            @RequestParam(value = "serverItemName", required = false) String serverItemName,
            @ApiParam(value = "类型", name = "type")
            @RequestParam(value = "type", required = false) String type,
            @ApiParam(value = "医生", name = "doctor")
            @RequestParam(value = "doctor", required = false) String doctor,
            @ApiParam(value = "居民", name = "patient")
            @RequestParam(value = "patient", required = false) String patient) {
        try {
            return write(200, "获取成功","dara",serverPackageService.selectServiceByHospital(hospital,serverItemName,type,patient,getUID()));
            return write(200, "获取成功","dara",serverPackageService.selectServiceByHospital(hospital,serverItemName,type,patient,doctor));
        } catch (Exception e) {
            error(e);
            return error(-1, "获取失败!" + e.getMessage());

+ 1 - 27
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorOrderService.java

@ -32,7 +32,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
@ -1244,13 +1243,6 @@ public class DoorOrderService {
        Map<String, Object> map = new HashMap<>();
        BigDecimal serverPackagePrice = new BigDecimal("0.00");
        BigDecimal cashPrice = new BigDecimal("0.00");
        //获取居民签约服务项及次数
//        SignFamily signFamily = signFamilyDao.findByPatient(patient);
        String sql = "SELECT ip.service_item_code as itemCode, sum(ip.service_times) as times  FROM wlyy_server_package_patient pp , wlyy_server_package_item_patient ip " +
                "where pp.`code` = ip.server_package_patient_code and  pp.patient = '" + patient + "' and pp.hospital = '" + "" + "' and pp.`status` = 1 " +
//                "where pp.`code` = ip.server_package_patient_code and  pp.patient = '" + patient + "' and pp.hospital = '" + signFamily.getHospital() + "' and pp.`status` = 1 " +
                "GROUP BY ip.service_item_code ";
        List<Map<String, Object>> list =jdbcTemplate.query(sql, new BeanPropertyRowMapper(String.class));
        JSONArray jsonArray = JSONArray.parseArray(jsonData);
        for(Object o : jsonArray){
@ -1260,25 +1252,7 @@ public class DoorOrderService {
            String itemCode = jsonObject.getString("itemCode");
            BigDecimal fee = jsonObject.getBigDecimal("fee");
            BigDecimal number = jsonObject.getBigDecimal("number");
            //遍历是否是居民签约的服务项,如果是,看还剩多少次数
            for(Map<String, Object> m : list){
                if((m.get(itemCode) + "").equals(itemCode)){
                    b = true;
                    times = (BigDecimal)map.get("times");
                }
            }
            //判断服务包里面的次数是否够抵扣,不够的仍需支付
            if(b){
                if(times.compareTo(number) > -1) {
                    serverPackagePrice = serverPackagePrice.add(fee.multiply(number));
                }else {
                    //还需另外支付次数
                    BigDecimal t = number.subtract(times);
                    cashPrice = cashPrice.add(fee.multiply(t));
                }
            }else {
                cashPrice = cashPrice.add(fee.multiply(number));
            }
            cashPrice = cashPrice.add(fee.multiply(number));
        }
        map.put("serverPackagePrice", serverPackagePrice);
        map.put("cashPrice", cashPrice);

+ 1 - 1
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/common/ServerPackageService.java

@ -98,7 +98,7 @@ public class ServerPackageService  {
                if("used".equals(type)){
                    sql += " JOIN wlyy_door_order_item i on i.code = a.FYXH and (i.patient = '"+patient+"' or i.doctor='"+doctor+"') ";
                }else if("other".equals(type)){
                    sql = " where a.FYGB not in (SELECT code from base_system_dict_entry WHERE dict_code = 'door_service_subject_class_dict')";
                    sql += " where a.FYGB not in (SELECT code from base_system_dict_entry WHERE dict_code = 'door_service_subject_class_dict')";
                }else{
                    sql += " WHERE a.FYGB ="+type;
                }