Преглед изворни кода

添加实体类和查询接口

zhouzeyu пре 9 месеци
родитељ
комит
d444206134

+ 5 - 3
pump-web/src/main/java/com/tuoren/web/layer/controller/BusReceiveRecordController.java

@@ -76,7 +76,7 @@ public class BusReceiveRecordController{
      */
     @ApiOperation("分页查询所有数据")
     @PostMapping("/list")
-    public CommonResult<IPage<BusReceiveRecordCopyEntity>>selectCopyAll(Integer pageNo, Integer pageSize, BusReceiveRecordCopyParam busReceiveRecordCopyParam) {
+    public CommonResult<IPage<BusReceiveRecordCopyParam>>selectCopyAll(Integer pageNo, Integer pageSize, BusReceiveRecordCopyParam busReceiveRecordCopyParam) {
         return CommonResult.success(iBusReceiveRecordEntityCopyService.selectCopyAll(pageNo, pageSize, busReceiveRecordCopyParam));
     }
 
@@ -102,8 +102,10 @@ public class BusReceiveRecordController{
      */
     @ApiOperation("通过主键查询单条数据")
     @GetMapping("/copy/{id}")
-    public CommonResult<BusReceiveRecordCopyParam> selectCopyOne(@PathVariable Serializable id) {
+    public CommonResult<BusReceiveRecordCopyParam> selectCopyOne(@PathVariable("id") String id) {
+        System.out.println(iBusReceiveRecordEntityCopyService.selectCopyById(id));
         return CommonResult.success(iBusReceiveRecordEntityCopyService.selectCopyById(id));
+
     }
 
 
@@ -226,7 +228,7 @@ public class BusReceiveRecordController{
     @PostMapping("/query/getFuzzyHistory")
     public CommonResult getFuzzyHistoryCopy(@RequestBody ReceiveRecordCopyParam receiveRecordCopyParam) {
         try{
-            IPage<BusReceiveRecordCopyEntity> iPage = iBusReceiveRecordEntityCopyService.queryFuzzyHistoryCopy(receiveRecordCopyParam);
+            IPage<BusReceiveRecordCopyParam> iPage = iBusReceiveRecordEntityCopyService.queryFuzzyHistoryCopy(receiveRecordCopyParam);
             if( iPage.getRecords().size() > 0 ){
                 return CommonResult.success(iPage);
             }

+ 10 - 3
pump-web/src/main/java/com/tuoren/web/layer/mapper/BusReceiveRecordCopyMapper.java

@@ -20,10 +20,17 @@ import java.util.List;
  */
 public interface BusReceiveRecordCopyMapper extends BaseMapper<BusReceiveRecordCopyEntity> {
 
-    BusReceiveRecordCopyParam selectReceiveAndHosipital(IPage<BusReceiveRecordCopyEntity> page, @Param("param")BusReceiveRecordCopyParam busReceiveRecordCopyParam);
+    List<BusReceiveRecordCopyParam> selectReceiveAndHosipital( IPage<BusReceiveRecordCopyParam> page, @Param("param")BusReceiveRecordCopyParam busReceiveRecordCopyParam);
 
-    BusReceiveRecordCopyParam selectReceiveAndHosipitalById(Serializable id);
+    BusReceiveRecordCopyParam selectReceiveAndHosipitalById(String id);
 
-    List<BusReceiveRecordCopyEntity> queryFuzzyHistoryCopy(IPage<BusReceiveRecordCopyEntity> iPage, String hospitalCode, String patientCode, String pumpCode, String productCode, String viewState);
+    List<BusReceiveRecordCopyParam> queryFuzzyHistoryCopy(
+            IPage<BusReceiveRecordCopyParam> page,
+            @Param("hospitalCode") String hospitalCode,
+            @Param("patientCode") String patientCode,
+            @Param("pumpCode") String pumpCode,
+            @Param("productCode") String productCode,
+            @Param("viewState") String viewState
+    );
 
 }

+ 3 - 3
pump-web/src/main/java/com/tuoren/web/layer/service/IBusReceiveRecordCopyService.java

@@ -21,9 +21,9 @@ import java.io.Serializable;
 public interface IBusReceiveRecordCopyService extends IService<BusReceiveRecordCopyEntity> {
 
 
-    IPage<BusReceiveRecordCopyEntity> selectCopyAll(Integer pageNo, Integer pageSize, BusReceiveRecordCopyParam busReceiveRecordCopyParam);
+    IPage<BusReceiveRecordCopyParam> selectCopyAll(Integer pageNo, Integer pageSize, BusReceiveRecordCopyParam busReceiveRecordCopyParam);
 
-    BusReceiveRecordCopyParam selectCopyById(Serializable id);
+    BusReceiveRecordCopyParam selectCopyById(String id);
 
-    IPage<BusReceiveRecordCopyEntity> queryFuzzyHistoryCopy(ReceiveRecordCopyParam receiveRecordCopyParam);
+    IPage<BusReceiveRecordCopyParam> queryFuzzyHistoryCopy(ReceiveRecordCopyParam receiveRecordCopyParam);
 }

+ 7 - 7
pump-web/src/main/java/com/tuoren/web/layer/service/impl/BusReceiveRecordCopyServiceImpl.java

@@ -33,22 +33,22 @@ public class BusReceiveRecordCopyServiceImpl extends ServiceImpl<BusReceiveRecor
     @Autowired
     private BusReceiveRecordCopyMapper busReceiveRecordCopyMapper;
     @Override
-    public IPage<BusReceiveRecordCopyEntity> selectCopyAll(Integer pageNo, Integer pageSize, BusReceiveRecordCopyParam busReceiveRecordCopyParam) {
-        IPage<BusReceiveRecordCopyEntity> page = new Page<>(pageNo,pageSize);
-        busReceiveRecordCopyMapper.selectReceiveAndHosipital(page,busReceiveRecordCopyParam);
+    public IPage<BusReceiveRecordCopyParam> selectCopyAll(Integer pageNo, Integer pageSize, BusReceiveRecordCopyParam busReceiveRecordCopyParam) {
+        IPage<BusReceiveRecordCopyParam> page = new Page<>(pageNo,pageSize);
+        page.setRecords((busReceiveRecordCopyMapper.selectReceiveAndHosipital(page, busReceiveRecordCopyParam)));
         return page;
     }
 
     @Override
-    public BusReceiveRecordCopyParam selectCopyById(Serializable id) {
+    public BusReceiveRecordCopyParam selectCopyById(String id) {
         return busReceiveRecordCopyMapper.selectReceiveAndHosipitalById(id);
     }
 
     @Override
-    public IPage<BusReceiveRecordCopyEntity> queryFuzzyHistoryCopy(ReceiveRecordCopyParam receiveRecordCopyParam) {
+    public IPage<BusReceiveRecordCopyParam> queryFuzzyHistoryCopy(ReceiveRecordCopyParam receiveRecordCopyParam) {
 
-        IPage<BusReceiveRecordCopyEntity> iPage = new Page<>(receiveRecordCopyParam.getPageNo(), receiveRecordCopyParam.getPageSize());
-        List<BusReceiveRecordCopyEntity> list = this.getBaseMapper().queryFuzzyHistoryCopy(
+        IPage<BusReceiveRecordCopyParam> iPage = new Page<>(receiveRecordCopyParam.getPageNo(), receiveRecordCopyParam.getPageSize());
+        List<BusReceiveRecordCopyParam> list = this.getBaseMapper().queryFuzzyHistoryCopy(
                 iPage,
                 receiveRecordCopyParam.getHospitalCode(),
                 receiveRecordCopyParam.getPatientCode(),

+ 99 - 95
pump-web/src/main/resources/mapper/BusReceiveRecordCopyEntityMapper.xml

@@ -64,7 +64,7 @@
         <result column="motor_code" property="motorCode" />
         <result column="data_version" property="dataVersion" />
     </resultMap>
-    <select id="queryFuzzyHistoryCopy" parameterType="com.tuoren.web.layer.entity.BusReceiveRecordEntity"  resultType="com.tuoren.web.layer.entity.BusReceiveRecordCopyEntity">
+    <select id="queryFuzzyHistoryCopy" parameterType="com.tuoren.web.layer.vo.BusReceiveRecordCopyParam"  resultType="com.tuoren.web.layer.vo.BusReceiveRecordCopyParam">
         select  * from bus_receive_record where
         <if test="viewState!=null">
             view_state like '%${viewState}%'
@@ -90,52 +90,52 @@
     <select id="selectReceiveAndHosipital" resultMap="BaseResultMap">
         SELECT
             brrc.id,
-            brrc.pump_code as pumpCode,
-            brrc.product_code as productCode,
-            brrc.hospital_code as hospitalCode,
-            bh.hosptial_name as hospitalName,
-            brrc.patient_code as patientCode,
-            brrc.remain_quantity as remainQuantity,
-            brrc.continue_quantity as continueQuantity,
-            brrc.self_control_quantity as selfControlQuantity,
-            brrc.lock_time as lockTime,
-            brrc.input_quantity as inputQuantity,
-            brrc.valid_time as validTime,
-            brrc.invalid_time as invalidTime,
-            brrc.max_quantity as maxQuantity,
-            brrc.first_quantity as firstQuantity,
-            brrc.single_quantity as singleQuantity,
-            brrc.total_count as totalCount,
-            brrc.pulse_quantity as pulseQuantity,
-            brrc.pulse_lock_time as pulseLockTime,
-            brrc.first_lock_time as firstLockTime,
-            brrc.upper_limit as upperLimit,
-            brrc.lower_limit as lowerLimit,
-            brrc.custom_scate as customScate,
-            brrc.add_valid_time as addValidTime,
-            brrc.run_state as runState,
-            brrc.buf_state1 as bufState1,
-            brrc.buf_state2 as bufState2,
-            brrc.buf_state3 as bufState3,
-            brrc.buf_state4 as bufState4,
-            brrc.buf_state5 as bufState5,
-            brrc.buf_state6 as bufState6,
-            brrc.buf_state7 as bufState7,
-            brrc.buf_state8 as bufState8,
-            brrc.buf_state9 as bufState9,
+            brrc.pump_code as pump_code,
+            brrc.product_code as product_code,
+            brrc.hospital_code as hospital_code,
+            bh.hosptial_name as hosptial_name,
+            brrc.patient_code as patient_code,
+            brrc.remain_quantity as remain_quantity,
+            brrc.continue_quantity as continue_quantity,
+            brrc.self_control_quantity as self_control_quantity,
+            brrc.lock_time as lock_time,
+            brrc.input_quantity as input_quantity,
+            brrc.valid_time as valid_time,
+            brrc.invalid_time as invalid_time,
+            brrc.max_quantity as max_quantity,
+            brrc.first_quantity as first_quantity,
+            brrc.single_quantity as single_quantity,
+            brrc.total_count as total_count,
+            brrc.pulse_quantity as pulse_quantity,
+            brrc.pulse_lock_time as pulse_lock_time,
+            brrc.first_lock_time as first_lock_time,
+            brrc.upper_limit as upper_limit,
+            brrc.lower_limit as lower_limit,
+            brrc.custom_scate as custom_scate,
+            brrc.add_valid_time as add_valid_time,
+            brrc.run_state as run_state,
+            brrc.buf_state1 as buf_state1,
+            brrc.buf_state2 as buf_state2,
+            brrc.buf_state3 as buf_state3,
+            brrc.buf_state4 as buf_state4,
+            brrc.buf_state5 as buf_state5,
+            brrc.buf_state6 as buf_state6,
+            brrc.buf_state7 as buf_state7,
+            brrc.buf_state8 as buf_state8,
+            brrc.buf_state9 as buf_state9,
             brrc.score as score,
-            brrc.add_cycle as addCycle,
-            brrc.reduce_cycle as reduceCycle,
-            brrc.call_flag as callFlag,
-            brrc.start_time as startTime,
-            brrc.is_remove as isRemove,
-            brrc.state_flag as stateFlag,
-            brrc.no_signal as noSignal,
-            brrc.view_state as viewState,
+            brrc.add_cycle as add_cycle,
+            brrc.reduce_cycle as reduce_cycle,
+            brrc.call_flag as call_flag,
+            brrc.start_time as start_time,
+            brrc.is_remove as is_remove,
+            brrc.state_flag as state_flag,
+            brrc.no_signal as no_signal,
+            brrc.view_state as view_state,
             brrc.remark as remark,
-            brrc.last_upload_time as lastUploadTime,
-            brrc.gmt_create as gmtCreate,
-            brrc.gmt_modified as gmtModified,
+            brrc.last_upload_time as last_upload_time,
+            brrc.gmt_create as gmt_create,
+            brrc.gmt_modified as gmt_modified,
             brrc.number1 as number1,
             brrc.number2 as number2,
             brrc.number3 as number3,
@@ -144,10 +144,10 @@
             brrc.number6 as number6,
             brrc.number7 as number7,
             brrc.number8 as number8,
-            brrc.data_version as dataVersion,
-            brrc.motor_code as motorCode
+            brrc.data_version as data_version,
+            brrc.motor_code as motor_code
         from bus_receive_record_copy brrc
-        INNER JOIN bus_hospital bh on bh.hospital_code = brrc.hospital_code
+        LEFT JOIN bus_hospital bh on bh.hospital_code = brrc.hospital_code
         order by last_upload_time desc
 
     </select>
@@ -155,52 +155,52 @@
     <select id="selectReceiveAndHosipitalById" resultMap="BaseResultMap">
         SELECT
             brrc.id,
-            brrc.pump_code as pumpCode,
-            brrc.product_code as productCode,
-            brrc.hospital_code as hospitalCode,
-            bh.hosptial_name as hospitalName,
-            brrc.patient_code as patientCode,
-            brrc.remain_quantity as remainQuantity,
-            brrc.continue_quantity as continueQuantity,
-            brrc.self_control_quantity as selfControlQuantity,
-            brrc.lock_time as lockTime,
-            brrc.input_quantity as inputQuantity,
-            brrc.valid_time as validTime,
-            brrc.invalid_time as invalidTime,
-            brrc.max_quantity as maxQuantity,
-            brrc.first_quantity as firstQuantity,
-            brrc.single_quantity as singleQuantity,
-            brrc.total_count as totalCount,
-            brrc.pulse_quantity as pulseQuantity,
-            brrc.pulse_lock_time as pulseLockTime,
-            brrc.first_lock_time as firstLockTime,
-            brrc.upper_limit as upperLimit,
-            brrc.lower_limit as lowerLimit,
-            brrc.custom_scate as customScate,
-            brrc.add_valid_time as addValidTime,
-            brrc.run_state as runState,
-            brrc.buf_state1 as bufState1,
-            brrc.buf_state2 as bufState2,
-            brrc.buf_state3 as bufState3,
-            brrc.buf_state4 as bufState4,
-            brrc.buf_state5 as bufState5,
-            brrc.buf_state6 as bufState6,
-            brrc.buf_state7 as bufState7,
-            brrc.buf_state8 as bufState8,
-            brrc.buf_state9 as bufState9,
+            brrc.pump_code as pump_code,
+            brrc.product_code as product_code,
+            brrc.hospital_code as hospital_code,
+            bh.hosptial_name as hosptial_name,
+            brrc.patient_code as patient_code,
+            brrc.remain_quantity as remain_quantity,
+            brrc.continue_quantity as continue_quantity,
+            brrc.self_control_quantity as self_control_quantity,
+            brrc.lock_time as lock_time,
+            brrc.input_quantity as input_quantity,
+            brrc.valid_time as valid_time,
+            brrc.invalid_time as invalid_time,
+            brrc.max_quantity as max_quantity,
+            brrc.first_quantity as first_quantity,
+            brrc.single_quantity as single_quantity,
+            brrc.total_count as total_count,
+            brrc.pulse_quantity as pulse_quantity,
+            brrc.pulse_lock_time as pulse_lock_time,
+            brrc.first_lock_time as first_lock_time,
+            brrc.upper_limit as upper_limit,
+            brrc.lower_limit as lower_limit,
+            brrc.custom_scate as custom_scate,
+            brrc.add_valid_time as add_valid_time,
+            brrc.run_state as run_state,
+            brrc.buf_state1 as buf_state1,
+            brrc.buf_state2 as buf_state2,
+            brrc.buf_state3 as buf_state3,
+            brrc.buf_state4 as buf_state4,
+            brrc.buf_state5 as buf_state5,
+            brrc.buf_state6 as buf_state6,
+            brrc.buf_state7 as buf_state7,
+            brrc.buf_state8 as buf_state8,
+            brrc.buf_state9 as buf_state9,
             brrc.score as score,
-            brrc.add_cycle as addCycle,
-            brrc.reduce_cycle as reduceCycle,
-            brrc.call_flag as callFlag,
-            brrc.start_time as startTime,
-            brrc.is_remove as isRemove,
-            brrc.state_flag as stateFlag,
-            brrc.no_signal as noSignal,
-            brrc.view_state as viewState,
+            brrc.add_cycle as add_cycle,
+            brrc.reduce_cycle as reduce_cycle,
+            brrc.call_flag as call_flag,
+            brrc.start_time as start_time,
+            brrc.is_remove as is_remove,
+            brrc.state_flag as state_flag,
+            brrc.no_signal as no_signal,
+            brrc.view_state as view_state,
             brrc.remark as remark,
-            brrc.last_upload_time as lastUploadTime,
-            brrc.gmt_create as gmtCreate,
-            brrc.gmt_modified as gmtModified,
+            brrc.last_upload_time as last_upload_time,
+            brrc.gmt_create as gmt_create,
+            brrc.gmt_modified as gmt_modified,
             brrc.number1 as number1,
             brrc.number2 as number2,
             brrc.number3 as number3,
@@ -209,12 +209,16 @@
             brrc.number6 as number6,
             brrc.number7 as number7,
             brrc.number8 as number8,
-            brrc.data_version as dataVersion,
-            brrc.motor_code as motorCode
+            brrc.data_version as data_version,
+            brrc.motor_code as motor_code
         from bus_receive_record_copy brrc
-        INNER JOIN bus_hospital bh on bh.hospital_code = brrc.hospital_code
+        LEFT JOIN bus_hospital bh on bh.hospital_code = brrc.hospital_code
         <where>
             and brrc.id = #{id}
         </where>
     </select>
+
+    <select id="queryFuzzyHistory" resultType="com.tuoren.web.layer.entity.BusReceiveRecordCopyEntity">
+
+    </select>
 </mapper>