LAPTOP-FO2T5SIU\35838 7 kuukautta sitten
vanhempi
commit
2cb565d32f

+ 14 - 0
pro-base/src/main/java/com/idea/invoice/controller/InvoiceManageController.java

@@ -75,6 +75,20 @@ public class InvoiceManageController extends BaseController {
         return list;
     }
 
+    /**
+     * 预收款 正式 列表
+     * @param model
+     * @param dt
+     * @return
+     */
+    @PostMapping(value = "listAll", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object listAll(InvoiceManageDto model, DateTrans dt) {
+        List<InvoiceManageDto> list = modelService.listAll(model, dt);
+        return list;
+    }
+
+
     /**
      * 新增预收款发票
      *

+ 5 - 0
pro-base/src/main/java/com/idea/invoice/dto/InvoiceManageDto.java

@@ -54,5 +54,10 @@ public class InvoiceManageDto extends InvoiceManage {
      */
     private String invoiceDateTo;
 
+    /**
+     * 房间id
+     */
+    private String houseId;
+
 
 }

+ 35 - 0
pro-base/src/main/java/com/idea/invoice/service/InvoiceManageService.java

@@ -263,6 +263,41 @@ public class InvoiceManageService implements BaseService<InvoiceManage, InvoiceM
     }
 
 
+    /**
+     * 开票列表 包括 预收款 正式
+     * @param model
+     * @param dt
+     * @return
+     */
+    public List<InvoiceManageDto> listAll(InvoiceManageDto model, DateTrans dt) {
+        List<InvoiceManageDto> list = extendMapper.listByModel(model);
+        for (InvoiceManageDto invoiceManage : list) {
+
+            // 预收款发票
+            if("1".equals(invoiceManage.getType())){
+                invoiceManage.setReceivedMoney(invoiceManage.getInvoiceAmount());
+            }
+            // 正式发票
+            if("2".equals(invoiceManage.getType())){
+                String money = "";
+                // 房款
+                if (invoiceManage.getPaymentType().equals("1")) {
+                    money = payLogService.getMoneyByContractId(invoiceManage.getContractId(), 1,null);
+                    invoiceManage.setReceivableMoney(invoiceManage.getBuyerMoney());
+                }
+                // 专项维修资金
+                if (invoiceManage.getPaymentType().equals("2")) {
+                    money = payLogService.getMoneyByContractId(invoiceManage.getContractId(), 2,null);
+                    invoiceManage.setReceivableMoney(invoiceManage.getMaintenanceTotalPrice());
+                }
+                invoiceManage.setReceivedMoney(new BigDecimal(money));
+            }
+        }
+        return list;
+    }
+
+
+
     /**
      * 根据合同id查询
      *

+ 21 - 13
pro-base/src/main/java/com/idea/paymentManagement/controller/RefundManageController.java

@@ -28,31 +28,33 @@ public class RefundManageController extends BaseController {
 
     /**
      * 根据身份证号带出关联房屋
+     *
      * @param identityCard
      * @return
      */
-    @PostMapping(value = "getHouseListByIdCard",produces = {"application/json;charset=UTF-8"})
+    @PostMapping(value = "getHouseListByIdCard", produces = {"application/json;charset=UTF-8"})
     @ResponseBody
-    public List<ParkRoomResponse> getHouseListByIdCard(String identityCard){
+    public List<ParkRoomResponse> getHouseListByIdCard(String identityCard) {
 
         List<ParkRoomResponse> result = modelService.getHouseListByIdCard(identityCard);
         return result;
     }
 
-    @PostMapping(value = "getById",produces = {"application/json;charset=UTF-8"})
+    @PostMapping(value = "getById", produces = {"application/json;charset=UTF-8"})
     @ResponseBody
-    public Object getById(String id){
+    public Object getById(String id) {
         return modelService.getById(id);
     }
 
     /**
      * 新增退款
+     *
      * @param model
      * @return
      */
-    @PostMapping(value = "add",produces = {"application/json;charset=UTF-8"})
+    @PostMapping(value = "add", produces = {"application/json;charset=UTF-8"})
     @ResponseBody
-    public AjaxResult add(RefundManageDto model){
+    public AjaxResult add(RefundManageDto model) {
         int result = modelService.add(model);
         return result(result);
     }
@@ -60,26 +62,32 @@ public class RefundManageController extends BaseController {
 
     /**
      * 编辑退款
+     *
      * @param model
      * @return
      */
-    @PostMapping(value = "edit",produces = {"application/json;charset=UTF-8"})
+    @PostMapping(value = "edit", produces = {"application/json;charset=UTF-8"})
     @ResponseBody
-    public AjaxResult edit(RefundManageDto model){
+    public AjaxResult edit(RefundManageDto model) {
         int result = modelService.edit(model);
         return result(result);
     }
 
 
-    @PostMapping(value = "list",produces = {"application/json;charset=UTF-8"})
+    @PostMapping(value = "list", produces = {"application/json;charset=UTF-8"})
     @ResponseBody
-    public Object list(Tablepar tablepar, RefundManageDto model, DateTrans dt){
-        PageInfo<RefundManageDto> page= modelService.listByModel(tablepar,model,dt);
+    public Object list(Tablepar tablepar, RefundManageDto model, DateTrans dt) {
+        PageInfo<RefundManageDto> page = modelService.listByModel(tablepar, model, dt);
         TableSplitResult<RefundManageDto> result = new TableSplitResult<RefundManageDto>(page.getPageNum(), page.getTotal(), page.getList());
-        return  result;
+        return result;
     }
 
-
+    @PostMapping(value = "listAll", produces = {"application/json;charset=UTF-8"})
+    @ResponseBody
+    public Object list(RefundManageDto model) {
+        List<RefundManageDto> result = modelService.listAll(model);
+        return result;
+    }
 
 
 }

+ 6 - 0
pro-base/src/main/java/com/idea/paymentManagement/service/RefundManageService.java

@@ -272,6 +272,12 @@ public class RefundManageService implements BaseService<RefundManage, RefundMana
         return pageInfo;
     }
 
+    public List<RefundManageDto> listAll(RefundManageDto model) {
+        List<RefundManageDto> list = extendMapper.listByModel(model);
+        return list;
+    }
+
+
     public RefundManageDto getById(String id) {
         RefundManage refundManage = selectByPrimaryKey(id);
         RefundManageDto result = new RefundManageDto();

+ 3 - 0
pro-base/src/main/resources/mybatis/invoice/InvoiceManageExtendMapper.xml

@@ -39,6 +39,9 @@
           <if test="invoiceDateTo !=null and invoiceDateTo !=''">
               and i.invoice_date &lt;= #{sendDateTo}
           </if>
+          <if test="houseId !=null and houseId !=''">
+              cm.house_id = #{houseId}
+          </if>
       </where>
       order by i.create_time desc
   </select>

+ 3 - 0
pro-base/src/main/resources/mybatis/paymentManagement/RefundManageExtendMapper.xml

@@ -28,6 +28,9 @@
       <if test="applicant != null and applicant != ''">
         and applicant like concat('%',#{applicant},'%')
       </if>
+      <if test="houseId != null and houseId != ''">
+        and refund_manage.house_id = #{houseId}
+      </if>
     </where>
   </select>
 </mapper>