瀏覽代碼

代码修改

liubing 4 年之前
父節點
當前提交
6a043f7086

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/security/SecurityMonitoringOrderEndpoint.java

@ -61,7 +61,7 @@ public class SecurityMonitoringOrderEndpoint extends EnvelopRestEndpoint {
                                            @ApiParam(name="status",value = "工单状态-1已取消1待处置2前往居民定位3已签到4已登记小结5待补录6待评价7已完成")
                                            @RequestParam(value = "status",required = false)String status,
                                            @ApiParam(name = "topicItem", value = "专题code,security安防相关专题", required = false)
                                            @RequestParam(value = "topicItem",required = false,defaultValue = "preventLost") String topicItem,
                                            @RequestParam(value = "topicItem",required = false) String topicItem,
                                            @ApiParam(name="page",value = "page",required = true)
                                            @RequestParam(value = "page")Integer page,
                                            @ApiParam(name="pageSize",value = "pageSize",required = true)

+ 5 - 5
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/sign/SignEndpoint.java

@ -172,15 +172,15 @@ public class SignEndpoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "servicePackageByTopicItem")
    @GetMapping(value = "servicePackageByTopicType")
    @ApiOperation(value = "根据服务专题获取服务项目")
    public ObjEnvelop servicePackageByTopicItem (
    public ObjEnvelop servicePackageByTopicType (
            @ApiParam(name = "patient", value = "patient", required = true)
            @RequestParam(value = "patient") String patient,
            @ApiParam(name = "topicItem", value = "专题code,security安防相关专题", required = true)
            @RequestParam(value = "topicItem") String topicItem) throws Exception {
            @ApiParam(name = "topicType", value = "专题类型,security安防相关专题", required = true)
            @RequestParam(value = "topicType") String topicType) throws Exception {
        try{
            return ObjEnvelop.getSuccess("查询成功",servicePackageService.servicePackageByTopicItem(patient,topicItem));
            return ObjEnvelop.getSuccess("查询成功",servicePackageService.servicePackageByTopicType(patient,topicType));
        }catch (Exception e){
            e.printStackTrace();
            return ObjEnvelop.getError("查询失败");

+ 3 - 3
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/sign/ServicePackageService.java

@ -482,16 +482,16 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
    /**
     * 根据服务专题获取服务项目
     * @param patient
     * @param topicItem
     * @param topicType
     * @return
     */
    public List<Map<String, Object>> servicePackageByTopicItem(String patient, String topicItem)
    public List<Map<String, Object>> servicePackageByTopicType(String patient, String topicType)
    {
        String sql="\n" +
                "select  DISTINCT item.code serverItem,item.name,pack.introduce,pack.type packageType,pack.`name` packageName \n" +
                "from base_service_package_record re, base_service_package_item item,base_service_package pack \n" +
                "where re.service_package_id = item.service_package_id and item.service_package_id = pack.id\n" +
                " and pack.del=1 and  item.topic_item='"+topicItem+"' and re.sign_id in (\n" +
                " and pack.del=1 and  item.topic_item='"+topicType+"' and re.sign_id in (\n" +
                "select rd.id from base_service_package_sign_record rd  where rd.patient='"+patient+"' and rd.status=1) GROUP BY item.code; ";
        List<Map<String,Object>> result = jdbcTemplate.queryForList(sql);
        return result;