From 095680513b91606cec58d21a0bac3d3c4d0414e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Fri, 10 Mar 2023 16:15:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=99=A2=E5=86=85=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E5=85=B3=E8=81=94=E8=A1=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/BasicHospTypeController.java | 10 -- .../basic/BasicInCodeController.java | 5 +- .../api/dao/basic/BasicHospTypeRelDao.java | 18 --- .../basic/BasicHospTypeRelService.java | 17 --- .../impl/BasicHospTypeRelServiceImpl.java | 41 ------ .../basic/impl/BasicHospTypeServiceImpl.java | 8 +- .../mapper/basic/BasicHospTypeRelDao.xml | 119 ------------------ 7 files changed, 5 insertions(+), 213 deletions(-) delete mode 100644 src/main/java/com/glxp/api/dao/basic/BasicHospTypeRelDao.java delete mode 100644 src/main/java/com/glxp/api/service/basic/BasicHospTypeRelService.java delete mode 100644 src/main/java/com/glxp/api/service/basic/impl/BasicHospTypeRelServiceImpl.java delete mode 100644 src/main/resources/mybatis/mapper/basic/BasicHospTypeRelDao.xml diff --git a/src/main/java/com/glxp/api/controller/basic/BasicHospTypeController.java b/src/main/java/com/glxp/api/controller/basic/BasicHospTypeController.java index 4413d679f..a3867833d 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicHospTypeController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicHospTypeController.java @@ -1,27 +1,19 @@ package com.glxp.api.controller.basic; -import cn.hutool.core.stream.StreamUtil; -import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageInfo; import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; -import com.glxp.api.dao.basic.BasicHospTypeRelDao; import com.glxp.api.entity.basic.BasicHospTypeEntity; -import com.glxp.api.entity.basic.BasicHospTypeRelEntity; -import com.glxp.api.entity.basic.UdiEntity; import com.glxp.api.req.basic.BasicHospTypeFilterRequest; import com.glxp.api.req.basic.BasicHospTypeRequest; import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.basic.BasicHospTypeResponse; import com.glxp.api.res.basic.UdiRelevanceResponse; -import com.glxp.api.service.basic.BasicHospTypeRelService; import com.glxp.api.service.basic.BasicHospTypeService; -import com.glxp.api.util.StreamUtils; import com.glxp.api.util.StringUtils; -import com.glxp.api.util.udi.FilterUdiUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -37,8 +29,6 @@ public class BasicHospTypeController { @Resource BasicHospTypeService basicHospTypeService; - @Resource - BasicHospTypeRelService basicHospTypeRelService; diff --git a/src/main/java/com/glxp/api/controller/basic/BasicInCodeController.java b/src/main/java/com/glxp/api/controller/basic/BasicInCodeController.java index 4bab7c428..2547ae79a 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicInCodeController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicInCodeController.java @@ -73,7 +73,10 @@ public class BasicInCodeController { public BaseResponse addOrderPrint(@RequestBody invInnerOrderprintReques invInnerOrderprintReques){ if(invInnerOrderprintReques.getOrderIdFk()!=null){ - invInnerOrderPrintService.addInCodeList(invInnerOrderprintReques.getOrderIdFk(),invInnerOrderprintReques.isChack()); + Boolean falg=invInnerOrderPrintService.addInCodeList(invInnerOrderprintReques.getOrderIdFk(),invInnerOrderprintReques.isChack()); + if(!falg){ + return ResultVOUtils.error(999,"生成失败!"); + } }else{ return ResultVOUtils.error(999,"参数错误!"); } diff --git a/src/main/java/com/glxp/api/dao/basic/BasicHospTypeRelDao.java b/src/main/java/com/glxp/api/dao/basic/BasicHospTypeRelDao.java deleted file mode 100644 index efb3ae34d..000000000 --- a/src/main/java/com/glxp/api/dao/basic/BasicHospTypeRelDao.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.glxp.api.dao.basic; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.glxp.api.entity.basic.BasicHospTypeRelEntity; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface BasicHospTypeRelDao extends BaseMapper { - int updateBatch(List list); - - int updateBatchSelective(List list); - - int batchInsert(@Param("list") List list); - - int insertOrUpdate(BasicHospTypeRelEntity record); - - int insertOrUpdateSelective(BasicHospTypeRelEntity record); -} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/service/basic/BasicHospTypeRelService.java b/src/main/java/com/glxp/api/service/basic/BasicHospTypeRelService.java deleted file mode 100644 index f6bfae5c0..000000000 --- a/src/main/java/com/glxp/api/service/basic/BasicHospTypeRelService.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.glxp.api.service.basic; - -import com.glxp.api.entity.basic.BasicHospTypeEntity; -import com.glxp.api.entity.basic.BasicHospTypeRelEntity; -import com.glxp.api.req.basic.BasicHospTypeFilterRequest; -import com.glxp.api.req.basic.BasicHospTypeRequest; -import com.glxp.api.req.basic.FilterUdiRelRequest; -import com.glxp.api.res.basic.BasicHospTypeResponse; -import com.glxp.api.res.basic.UdiRelevanceResponse; - -import java.util.List; - -public interface BasicHospTypeRelService { - - List getBasicHospTypeRelList(String code); - -} diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicHospTypeRelServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicHospTypeRelServiceImpl.java deleted file mode 100644 index 840511ca2..000000000 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicHospTypeRelServiceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.glxp.api.service.basic.impl; - -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.github.pagehelper.PageHelper; -import com.glxp.api.dao.basic.BasicHospTypeDao; -import com.glxp.api.dao.basic.BasicHospTypeRelDao; -import com.glxp.api.dao.basic.UdiRelevanceDao; -import com.glxp.api.entity.basic.BasicHospTypeEntity; -import com.glxp.api.entity.basic.BasicHospTypeRelEntity; -import com.glxp.api.req.basic.BasicHospTypeFilterRequest; -import com.glxp.api.req.basic.BasicHospTypeRequest; -import com.glxp.api.req.basic.FilterUdiRelRequest; -import com.glxp.api.res.basic.BasicHospTypeResponse; -import com.glxp.api.res.basic.UdiRelevanceResponse; -import com.glxp.api.service.auth.CustomerService; -import com.glxp.api.service.basic.BasicHospTypeRelService; -import com.glxp.api.service.basic.BasicHospTypeService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; - -@Service -public class BasicHospTypeRelServiceImpl implements BasicHospTypeRelService { - - @Resource - BasicHospTypeRelDao basicHospTypeRelDao; - - - @Override - public List getBasicHospTypeRelList(String code) { - List basicHospTypeRelEntityList=new ArrayList<>(); - QueryWrapper ew=new QueryWrapper<>(); - basicHospTypeRelEntityList =basicHospTypeRelDao.selectList(ew); - return basicHospTypeRelEntityList; - } -} diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicHospTypeServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicHospTypeServiceImpl.java index 0f0faeb76..24c3884c8 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicHospTypeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicHospTypeServiceImpl.java @@ -4,9 +4,7 @@ import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.glxp.api.dao.basic.BasicHospTypeDao; -import com.glxp.api.dao.basic.BasicHospTypeRelDao; import com.glxp.api.dao.basic.UdiRelevanceDao; -import com.glxp.api.entity.basic.BasicCorpEntity; import com.glxp.api.entity.basic.BasicHospTypeEntity; import com.glxp.api.entity.basic.BasicHospTypeRelEntity; import com.glxp.api.entity.basic.UdiRelevanceEntity; @@ -34,8 +32,6 @@ public class BasicHospTypeServiceImpl implements BasicHospTypeService { @Resource CustomerService customerService; - @Resource - BasicHospTypeRelDao basicHospTypeRelDao; @Resource UdiRelevanceDao udiRelevanceDao; @@ -122,9 +118,7 @@ public class BasicHospTypeServiceImpl implements BasicHospTypeService { return "请先删除该节点底下的数据!"; } //查询有没有产品绑定 - QueryWrapper ew2=new QueryWrapper<>(); - ew2.eq("code",basicHospTypeRequest.getCode()); - count=basicHospTypeRelDao.selectCount(ew2); + count=udiRelevanceDao.selectProductByRelCode(basicHospTypeRequest.getCode()); if(count>0){ return "该节点还存在产品,请先删除!"; } diff --git a/src/main/resources/mybatis/mapper/basic/BasicHospTypeRelDao.xml b/src/main/resources/mybatis/mapper/basic/BasicHospTypeRelDao.xml deleted file mode 100644 index 2fa22b669..000000000 --- a/src/main/resources/mybatis/mapper/basic/BasicHospTypeRelDao.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - id, code, relId - - - - update basic_hosp_type_rel - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.relId,jdbcType=VARCHAR} - - - - where id in - - #{item.id,jdbcType=INTEGER} - - - - - update basic_hosp_type_rel - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.relId,jdbcType=VARCHAR} - - - - - where id in - - #{item.id,jdbcType=INTEGER} - - - - - insert into basic_hosp_type_rel - (id, code, relId) - values - - (#{item.id,jdbcType=INTEGER}, #{item.code,jdbcType=VARCHAR}, #{item.relId,jdbcType=VARCHAR} - ) - - - - - insert into basic_hosp_type_rel - (id, code, relId) - values - (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{relId,jdbcType=VARCHAR}) - on duplicate key update - id = #{id,jdbcType=INTEGER}, - code = #{code,jdbcType=VARCHAR}, - relId = #{relId,jdbcType=VARCHAR} - - - - insert into basic_hosp_type_rel - - - id, - - - code, - - - relId, - - - values - - - #{id,jdbcType=INTEGER}, - - - #{code,jdbcType=VARCHAR}, - - - #{relId,jdbcType=VARCHAR}, - - - on duplicate key update - - - id = #{id,jdbcType=INTEGER}, - - - code = #{code,jdbcType=VARCHAR}, - - - relId = #{relId,jdbcType=VARCHAR}, - - - - \ No newline at end of file