chenyuesheng 2 年 前
コミット
d4595b4acf

+ 12 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/controller/AccountantReimbursementBusinessTwoController.java

@@ -62,4 +62,16 @@ public class AccountantReimbursementBusinessTwoController {
 
         return ResponseEntity.ok("成功");
     }
+
+    @ApiLog("展示下拉列表所有年份")
+    @RequestMapping("findSelectYearList")
+    public ResponseEntity findSelectYearList(){
+        return ResponseEntity.ok(accountantReimbursementBusinessTwoService.findSelectYearList());
+    }
+
+    @ApiLog("根据年份展示所有编号")
+    @RequestMapping("findSelectCodeListByYear/{year}")
+    public ResponseEntity findSelectCodeListByYear(@PathVariable("year")String year){
+        return ResponseEntity.ok(accountantReimbursementBusinessTwoService.findSelectCodeListByYear(year));
+    }
 }

+ 2 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/mapper/AccountantReimbursementBusinessTwoMapper.java

@@ -42,7 +42,7 @@ public interface AccountantReimbursementBusinessTwoMapper extends BaseMapper<Acc
     List<AccountantReimbursementDTO> findSelectList();
 
 
+    List<String> findSelectYearList();
 
-
-
+    List<AccountantReimbursementDTO> findSelectCodeListByYear(String year);
 }

+ 8 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/mapper/xml/AccountantReimbursementBusinessTwoMapper.xml

@@ -90,7 +90,14 @@
     <select id="findSelectList"
             resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementDTO">
 
-        select id,business_code from zs_reimbursement_accountant_info where business_code is not null and business_code != '' group by business_code
+        select id,business_code as businessCode from zs_reimbursement_accountant_info where business_code is not null and business_code != '' group by business_code
+    </select>
+    <select id="findSelectYearList" resultType="java.lang.String">
+        SELECT year FROM `zs_reimbursement_accountant_info` GROUP BY `year` order by `year` desc
+    </select>
+    <select id="findSelectCodeListByYear"
+            resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementDTO">
+        select id,business_code as businessCode from zs_reimbursement_accountant_info where year = #{year} and business_code is not null and business_code != '' group by business_code
     </select>
 
 

+ 4 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/service/AccountantReimbursementBusinessTwoService.java

@@ -20,4 +20,8 @@ public interface AccountantReimbursementBusinessTwoService {
     List<AccountantReimbursementDTO> findSelectList();
 
     void modifyBindCode(String ids,String businessCode);
+
+    List<String> findSelectYearList();
+
+    List<AccountantReimbursementDTO> findSelectCodeListByYear(String year);
 }

+ 10 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/service/impl/AccountantReimbursementBusinessTwoServiceImpl.java

@@ -47,4 +47,14 @@ public class AccountantReimbursementBusinessTwoServiceImpl implements Accountant
     public void modifyBindCode(String ids,String businessCode) {
         accountantReimbursementBusinessTwoMapper.modifyBindCode(ids,businessCode);
     }
+
+    @Override
+    public List<String> findSelectYearList() {
+        return accountantReimbursementBusinessTwoMapper.findSelectYearList();
+    }
+
+    @Override
+    public List<AccountantReimbursementDTO> findSelectCodeListByYear(String year) {
+        return accountantReimbursementBusinessTwoMapper.findSelectCodeListByYear(year);
+    }
 }