hxm 3 gadi atpakaļ
vecāks
revīzija
330fa9f5ae

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -340,7 +340,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
            basePatientDO1.setCommitteeCode(basePatientDO.getCommitteeCode());
            basePatientDO1.setCommitteeName(basePatientDO.getCommitteeName());
            // 保存修改的居民信息
            this.save(basePatientDO1);
            basePatientDao.save(basePatientDO1);
        }
        Set<Object> cardIdList = basePatientMedicardCardService.findIdListByPatientCode(basePatientDO.getId());

+ 7 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/device/DeviceManageEndpoint.java

@ -376,14 +376,18 @@ public class DeviceManageEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping("findDmDeviceDictName")
    @ApiOperation("查询设备名称以及型号")
    public ObjEnvelop findDmDeviceDictName(){
    @ApiOperation("根据设备类型查询设备名称以及型号")
    public ObjEnvelop findDmDeviceDictName(@ApiParam(name = "code", value = "category_code")
                                               @RequestParam(value = "code", required = false) String code,
                                           @ApiParam(name = "name", value = "name", required = false)
                                               @RequestParam(value = "name", required = false) String name){
            try{
                return ObjEnvelop.getSuccess("查询成功",deviceManageService.findDmDeviceDictName()) ;
                return ObjEnvelop.getSuccess("查询成功",deviceManageService.findDmDeviceDictName(code,name)) ;
            }catch (Exception e) {
                return failedObjEnvelopException2(e);
            }
    }
}

+ 19 - 17
svr/svr-base/src/main/java/com/yihu/jw/base/service/device/DeviceManageService.java

@ -33,18 +33,6 @@ public class DeviceManageService extends BaseJpaService<DeviceDetail,DeviceDetai
    @Autowired
    private DeviceDao deviceDao;
    public JSONObject findDmDeviceDictName() {
        String deviceNameSql = "select name, id from dm_device";
        String deviceModelSql = "select model, id from dm_device";
        List<Map<String, Object>> deviceName = jdbcTemplate.queryForList(deviceNameSql);
        List<Map<String, Object>> deviceModel = jdbcTemplate.queryForList(deviceModelSql);
        JSONObject result = new JSONObject();
        result.put("deviceName",deviceName);
        result.put("deviceModel",deviceModel);
        return result;
    }
    public JSONObject saveWlyyDevice(String json)throws Exception{
        JSONObject result = new JSONObject();
        DeviceDetail deviceDetail = objectMapper.readValue(json, DeviceDetail.class);
@ -63,11 +51,8 @@ public class DeviceManageService extends BaseJpaService<DeviceDetail,DeviceDetai
        String iccid = deviceDetail.getIccid();
        String imsi = deviceDetail.getImsi();
        DeviceDetail tmps1 =  deviceDetailDao.findBySn(deviceSn);
        if (tmps1.getId()!=deviceDetail.getId()) {
            if (tmps1 != null) {
                if (tmps1.getId()!=deviceDetail.getId()) {
                }
        if (tmps1 != null) {
            if (tmps1.getId()!=deviceDetail.getId()) {
                result.put(ResponseContant.resultFlag, ResponseContant.fail);
                result.put(ResponseContant.resultMsg, "设备SN码重复");
                return result;
@ -206,4 +191,21 @@ public class DeviceManageService extends BaseJpaService<DeviceDetail,DeviceDetai
        ws.addCell(label);
    }
    public JSONObject findDmDeviceDictName(String code, String name) {
        JSONObject result = new JSONObject();
        String deviceSql = "select id, name, model from dm_device where 1=1 ";
        if (StringUtils.isNotBlank(code)){
            deviceSql+=" and category_code = "+ code;
        }
        if (StringUtils.isNotBlank(name)){
            deviceSql+=" and name = " + "'" + name + "'";
        }
        List<Map<String, Object>> deviceName = jdbcTemplate.queryForList(deviceSql);
        result.put("deviceName",deviceName);
        return result;
    }
}