LAPTOP-FO2T5SIU\35838 11 mēneši atpakaļ
vecāks
revīzija
c52225534f
23 mainītis faili ar 582 papildinājumiem un 74 dzēšanām
  1. 7 0
      pro-base/src/main/java/com/idea/buildManage/controller/MnpBuildingController.java
  2. 7 0
      pro-base/src/main/java/com/idea/buildManage/controller/ParkRoomController.java
  3. 1 0
      pro-base/src/main/java/com/idea/buildManage/excel/MnpBuildingListener.java
  4. 1 1
      pro-base/src/main/java/com/idea/buildManage/excel/ParkRoomListener.java
  5. 10 0
      pro-base/src/main/java/com/idea/buildManage/model/MnpBuilding.java
  6. 70 0
      pro-base/src/main/java/com/idea/buildManage/model/MnpBuildingExample.java
  7. 10 0
      pro-base/src/main/java/com/idea/buildManage/model/ParkRoom.java
  8. 70 0
      pro-base/src/main/java/com/idea/buildManage/model/ParkRoomExample.java
  9. 13 1
      pro-base/src/main/java/com/idea/buildManage/service/MnpBuildingService.java
  10. 14 1
      pro-base/src/main/java/com/idea/buildManage/service/ParkRoomService.java
  11. 20 0
      pro-base/src/main/java/com/idea/invoice/model/InvoiceManage.java
  12. 140 0
      pro-base/src/main/java/com/idea/invoice/model/InvoiceManageExample.java
  13. 20 1
      pro-base/src/main/java/com/idea/invoice/util/InvoiceUtil.java
  14. 71 42
      pro-base/src/main/java/com/idea/transactionRecordManage/service/TransactionRecordService.java
  15. 16 0
      pro-base/src/main/java/com/idea/transactionRecordManage/vo/NccRecordVo.java
  16. 4 2
      pro-base/src/main/resources/mybatis/buildManage/MnpBuildingExtendMapper.xml
  17. 24 5
      pro-base/src/main/resources/mybatis/buildManage/MnpBuildingMapper.xml
  18. 5 2
      pro-base/src/main/resources/mybatis/buildManage/ParkRoomExtendMapper.xml
  19. 24 7
      pro-base/src/main/resources/mybatis/buildManage/ParkRoomMapper.xml
  20. 3 0
      pro-base/src/main/resources/mybatis/customerManagement/CustomerManagementExtendMapper.xml
  21. 43 7
      pro-base/src/main/resources/mybatis/invoice/InvoiceManageMapper.xml
  22. 3 0
      pro-base/src/main/resources/mybatis/invoice/ReceiptManageExtendMapper.xml
  23. 6 5
      pro-base/src/main/resources/mybatis/transactionRecord/TransactionRecord.xml

+ 7 - 0
pro-base/src/main/java/com/idea/buildManage/controller/MnpBuildingController.java

@@ -14,6 +14,7 @@ import com.idea.buildManage.service.ParkRoomService;
 import com.idea.buildManage.model.MnpBuilding;
 import com.idea.buildManage.model.MnpBuildingExample;
 import com.idea.buildManage.service.MnpBuildingService;
+import com.idea.invoice.task.InvoiceTask;
 import com.idea.invoice.util.InvoiceUtil;
 import com.idea.util.ExcelUtils;
 import com.rockstar.common.base.BaseController;
@@ -55,6 +56,8 @@ public class MnpBuildingController extends BaseController {
     private ParkInfoService parkInfoService;
     @Autowired
     private SysDictService sysDictService;
+    @Autowired
+    private InvoiceTask invoiceTask;
 
 
     @PostMapping(value = "list", produces = {"application/json;charset=UTF-8"})
@@ -128,6 +131,10 @@ public class MnpBuildingController extends BaseController {
             }
             EasyExcel.read(excel, MnpBuildingExcel.class, listener).headRowNumber(2).sheet().doRead();
             excel.delete();
+            // 启动一个新的线程来触发另一个方法
+            new Thread(() -> {
+                invoiceTask.sendBuild();
+            }).start();
         } catch (Exception e) {
             e.printStackTrace();
             return AjaxResult.error(e.getMessage());

+ 7 - 0
pro-base/src/main/java/com/idea/buildManage/controller/ParkRoomController.java

@@ -14,6 +14,7 @@ import com.idea.buildManage.service.ParkFloorDiscService;
 import com.idea.buildManage.service.ParkInfoService;
 import com.idea.buildManage.service.ParkRoomService;
 import com.idea.buildManage.vo.ParkRoomHistory;
+import com.idea.invoice.task.InvoiceTask;
 import com.idea.invoice.util.InvoiceUtil;
 import com.idea.util.ExcelUtils;
 import com.rockstar.common.base.BaseController;
@@ -59,6 +60,8 @@ public class ParkRoomController extends BaseController {
     private ParkInfoService parkInfoService;
     @Autowired
     private SysDictService sysDictService;
+    @Autowired
+    private InvoiceTask invoiceTask;
 
 
     @PostMapping(value = "list", produces = {"application/json;charset=UTF-8"})
@@ -157,6 +160,10 @@ public class ParkRoomController extends BaseController {
             }
             EasyExcel.read(excel, ParkRoomExcel.class, listener).headRowNumber(2).sheet().doRead();
             excel.delete();
+            // 启动一个新的线程来触发另一个方法
+            new Thread(() -> {
+                invoiceTask.sendHouse();
+            }).start();
         } catch (Exception e) {
             e.printStackTrace();
             return AjaxResult.error(e.getMessage());

+ 1 - 0
pro-base/src/main/java/com/idea/buildManage/excel/MnpBuildingListener.java

@@ -311,6 +311,7 @@ public class MnpBuildingListener extends AnalysisEventListener<MnpBuildingExcel>
                         data.setId(IdUtil.simpleUUID());
                         data.setCreatedId(ShiroUtils.getUserId());
                         data.setCreatedAt(new Date());
+                        data.setDelFlag("0");
                         list.add(data);
                     } else {
                         throw new RuntimeException(builder.toString());

+ 1 - 1
pro-base/src/main/java/com/idea/buildManage/excel/ParkRoomListener.java

@@ -322,7 +322,7 @@ public class ParkRoomListener extends AnalysisEventListener<ParkRoomExcel> {
                         data.setSoldStatus(1);
                         // 选房状态
                         data.setIsChoose(0);
-
+                        data.setDelFlag("0");
                         list.add(data);
                     } else {
                         throw new RuntimeException(builder.toString());

+ 10 - 0
pro-base/src/main/java/com/idea/buildManage/model/MnpBuilding.java

@@ -62,8 +62,18 @@ public class MnpBuilding implements Serializable {
 
     private String priceRemark;
 
+    private String delFlag;
+
     private static final long serialVersionUID = 1L;
 
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
     public String getId() {
         return id;
     }

+ 70 - 0
pro-base/src/main/java/com/idea/buildManage/model/MnpBuildingExample.java

@@ -1894,6 +1894,76 @@ public class MnpBuildingExample {
             addCriterion("nc_code not between", value1, value2, "ncCode");
             return (Criteria) this;
         }
+
+        public Criteria andDelFlagIsNull() {
+            addCriterion("del_flag is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIsNotNull() {
+            addCriterion("del_flag is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagEqualTo(String value) {
+            addCriterion("del_flag =", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotEqualTo(String value) {
+            addCriterion("del_flag <>", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThan(String value) {
+            addCriterion("del_flag >", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThanOrEqualTo(String value) {
+            addCriterion("del_flag >=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThan(String value) {
+            addCriterion("del_flag <", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThanOrEqualTo(String value) {
+            addCriterion("del_flag <=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLike(String value) {
+            addCriterion("del_flag like", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotLike(String value) {
+            addCriterion("del_flag not like", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIn(List<String> values) {
+            addCriterion("del_flag in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotIn(List<String> values) {
+            addCriterion("del_flag not in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagBetween(String value1, String value2) {
+            addCriterion("del_flag between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotBetween(String value1, String value2) {
+            addCriterion("del_flag not between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 10 - 0
pro-base/src/main/java/com/idea/buildManage/model/ParkRoom.java

@@ -68,6 +68,16 @@ public class ParkRoom implements Serializable {
 
     private String remark;
 
+    private String delFlag;
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
     private static final long serialVersionUID = 1L;
 
     public String getId() {

+ 70 - 0
pro-base/src/main/java/com/idea/buildManage/model/ParkRoomExample.java

@@ -2124,6 +2124,76 @@ public class ParkRoomExample {
             addCriterion("nc_code not between", value1, value2, "ncCode");
             return (Criteria) this;
         }
+
+        public Criteria andDelFlagIsNull() {
+            addCriterion("del_flag is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIsNotNull() {
+            addCriterion("del_flag is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagEqualTo(String value) {
+            addCriterion("del_flag =", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotEqualTo(String value) {
+            addCriterion("del_flag <>", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThan(String value) {
+            addCriterion("del_flag >", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagGreaterThanOrEqualTo(String value) {
+            addCriterion("del_flag >=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThan(String value) {
+            addCriterion("del_flag <", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLessThanOrEqualTo(String value) {
+            addCriterion("del_flag <=", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagLike(String value) {
+            addCriterion("del_flag like", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotLike(String value) {
+            addCriterion("del_flag not like", value, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagIn(List<String> values) {
+            addCriterion("del_flag in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotIn(List<String> values) {
+            addCriterion("del_flag not in", values, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagBetween(String value1, String value2) {
+            addCriterion("del_flag between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andDelFlagNotBetween(String value1, String value2) {
+            addCriterion("del_flag not between", value1, value2, "delFlag");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 13 - 1
pro-base/src/main/java/com/idea/buildManage/service/MnpBuildingService.java

@@ -200,7 +200,18 @@ public class MnpBuildingService implements BaseService<MnpBuilding, MnpBuildingE
         if(CollectionUtils.isNotEmpty(parkRooms)){
             throw new RuntimeException("该数据有子房间存在,无法删除");
         }
-        return deleteByPrimaryKey(id);
+        MnpBuilding building = selectByPrimaryKey(id);
+        building.setDelFlag("1");
+        int result = updateByPrimaryKeySelective(building);
+        // 用友推送楼栋禁用
+        try {
+            JSONObject json = new JSONObject();
+            json.put("ncid", building.getNcid());
+            InvoiceUtil.defdocDisable(json);
+        }catch (Exception e){
+            log.error("楼栋禁用失败:",e);
+        }
+        return result;
     }
 
     public String getOrderNum(MnpBuilding model){
@@ -263,6 +274,7 @@ public class MnpBuildingService implements BaseService<MnpBuilding, MnpBuildingE
         String orderNum = getOrderNum(record);
         record.setOrderNum(orderNum);
         record.setId(id);
+        record.setDelFlag("0");
         int result = insertWithoutId(record);
 
         ParkInfo parkInfo = parkInfoMapper.selectByPrimaryKey(record.getGroupId());

+ 14 - 1
pro-base/src/main/java/com/idea/buildManage/service/ParkRoomService.java

@@ -284,7 +284,19 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
         if (CollectionUtils.isNotEmpty(list)) {
             throw new RuntimeException("该房间已收取认购金,无法删除");
         }
-        return deleteByPrimaryKey(id);
+        ParkRoom parkRoom = selectByPrimaryKey(id);
+        parkRoom.setDelFlag("1");
+        int result = updateByPrimaryKeySelective(parkRoom);
+        // 用友推送房间禁用
+        try {
+            JSONObject json = new JSONObject();
+            json.put("ncid", parkRoom.getNcid());
+            InvoiceUtil.defdocDisable(json);
+        }catch (Exception e){
+            log.error("房间禁用失败:",e);
+        }
+
+        return result;
     }
 
     /**
@@ -355,6 +367,7 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
         record.setSaleStatus(1);
         // 选房状态
         record.setIsChoose(0);
+        record.setDelFlag("0");
         String orderNum = getOrderNum(record);
         record.setOrderNum(orderNum);
         int result = insertWithoutId(record);

+ 20 - 0
pro-base/src/main/java/com/idea/invoice/model/InvoiceManage.java

@@ -125,8 +125,28 @@ public class InvoiceManage implements Serializable {
 
     private String ncJson;
 
+    private String ncId;
+
+    private String carryOverStatus;
+
     private static final long serialVersionUID = 1L;
 
+    public String getNcId() {
+        return ncId;
+    }
+
+    public void setNcId(String ncId) {
+        this.ncId = ncId;
+    }
+
+    public String getCarryOverStatus() {
+        return carryOverStatus;
+    }
+
+    public void setCarryOverStatus(String carryOverStatus) {
+        this.carryOverStatus = carryOverStatus;
+    }
+
     public String getId() {
         return id;
     }

+ 140 - 0
pro-base/src/main/java/com/idea/invoice/model/InvoiceManageExample.java

@@ -4086,6 +4086,76 @@ public class InvoiceManageExample {
             return (Criteria) this;
         }
 
+        public Criteria andNcIdIsNull() {
+            addCriterion("nc_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdIsNotNull() {
+            addCriterion("nc_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdEqualTo(String value) {
+            addCriterion("nc_id =", value, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdNotEqualTo(String value) {
+            addCriterion("nc_id <>", value, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdGreaterThan(String value) {
+            addCriterion("nc_id >", value, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdGreaterThanOrEqualTo(String value) {
+            addCriterion("nc_id >=", value, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdLessThan(String value) {
+            addCriterion("nc_id <", value, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdLessThanOrEqualTo(String value) {
+            addCriterion("nc_id <=", value, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdLike(String value) {
+            addCriterion("nc_id like", value, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdNotLike(String value) {
+            addCriterion("nc_id not like", value, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdIn(List<String> values) {
+            addCriterion("nc_id in", values, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdNotIn(List<String> values) {
+            addCriterion("nc_id not in", values, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdBetween(String value1, String value2) {
+            addCriterion("nc_id between", value1, value2, "ncId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcIdNotBetween(String value1, String value2) {
+            addCriterion("nc_id not between", value1, value2, "ncId");
+            return (Criteria) this;
+        }
+
         public Criteria andNcCodeIsNull() {
             addCriterion("nc_code is null");
             return (Criteria) this;
@@ -4155,6 +4225,76 @@ public class InvoiceManageExample {
             addCriterion("nc_code not between", value1, value2, "ncCode");
             return (Criteria) this;
         }
+
+        public Criteria andCarryOverStatusIsNull() {
+            addCriterion("carry_over_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusIsNotNull() {
+            addCriterion("carry_over_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusEqualTo(String value) {
+            addCriterion("carry_over_status =", value, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusNotEqualTo(String value) {
+            addCriterion("carry_over_status <>", value, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusGreaterThan(String value) {
+            addCriterion("carry_over_status >", value, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusGreaterThanOrEqualTo(String value) {
+            addCriterion("carry_over_status >=", value, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusLessThan(String value) {
+            addCriterion("carry_over_status <", value, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusLessThanOrEqualTo(String value) {
+            addCriterion("carry_over_status <=", value, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusLike(String value) {
+            addCriterion("carry_over_status like", value, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusNotLike(String value) {
+            addCriterion("carry_over_status not like", value, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusIn(List<String> values) {
+            addCriterion("carry_over_status in", values, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusNotIn(List<String> values) {
+            addCriterion("carry_over_status not in", values, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusBetween(String value1, String value2) {
+            addCriterion("carry_over_status between", value1, value2, "carryOverStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCarryOverStatusNotBetween(String value1, String value2) {
+            addCriterion("carry_over_status not between", value1, value2, "carryOverStatus");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 20 - 1
pro-base/src/main/java/com/idea/invoice/util/InvoiceUtil.java

@@ -115,12 +115,31 @@ public class InvoiceUtil {
         log.info("楼栋或房间查看:{}", result);
     }
 
+    /**
+     * 楼栋或房间更新 pk_defdoclist 楼栋传CJ19 房间传CJ21
+     * @throws Exception
+     */
     public static String defdocUpdate(JSONObject json) throws Exception {
         APICurUtils util = new APICurUtils();
         String token = InvoiceUtil.getToken(util);
         util.setApiUrl("nccloud/api/wxyy/uapbd/defdoc/update");
         String result = util.getAPIRetrun(token, json.toJSONString());
-        log.info("楼栋或房间更新:{}", result);
+        log.info("楼栋或房间更新结果:{}", result);
+        return result;
+    }
+
+    /**
+     * 楼栋或房间禁用
+     * @param json
+     * @return
+     * @throws Exception
+     */
+    public static String defdocDisable(JSONObject json) throws Exception {
+        APICurUtils util = new APICurUtils();
+        String token = InvoiceUtil.getToken(util);
+        util.setApiUrl("nccloud/api/wxyy/uapbd/defdoc/disable");
+        String result = util.getAPIRetrun(token, json.toJSONString());
+        log.info("楼栋或房间禁用结果:{}", result);
         return result;
     }
 

+ 71 - 42
pro-base/src/main/java/com/idea/transactionRecordManage/service/TransactionRecordService.java

@@ -90,13 +90,20 @@ public class TransactionRecordService {
         }
         // 收款记录
         List<NccRecordVo> list = modelMapper.collectionRecord(model);
-//        for (NccRecordVo recordVo : list) {
-//            for(Map<String, String> map : contentType){
-//                if(recordVo.getContentType().equals(map.get("value"))){
-//                    recordVo.setContentType(map.get("label"));
-//                }
-//            }
-//        }
+        for (NccRecordVo recordVo : list) {
+            // 已推送
+            if (recordVo.getNcSubmitStatus() != null && recordVo.getNcSubmitStatus() == 1) {
+                JSONObject jsonObject = JSONObject.parseObject(recordVo.getNcJson());
+                String code = jsonObject.getJSONObject("data").getJSONObject("ar_gatherbill").getString("code");
+                recordVo.setNcCode(code);
+            }
+            // 推送失败
+            if (recordVo.getNcSubmitStatus() != null && recordVo.getNcSubmitStatus() == 2) {
+                JSONObject jsonObject = JSONObject.parseObject(recordVo.getNcJson());
+                String message = jsonObject.getString("message");
+                recordVo.setErrorMessage(message);
+            }
+        }
         PageInfo<NccRecordVo> pageInfo = new PageInfo<>(list);
         return pageInfo;
     }
@@ -133,13 +140,20 @@ public class TransactionRecordService {
         }
         // 收款记录
         List<NccRecordVo> list = modelMapper.reFundRecord(model);
-//        for (NccRecordVo recordVo : list) {
-//            for(Map<String, String> map : contentType){
-//                if(recordVo.getContentType().equals(map.get("value"))){
-//                    recordVo.setContentType(map.get("label"));
-//                }
-//            }
-//        }
+        for (NccRecordVo recordVo : list) {
+            // 已推送
+            if (recordVo.getNcSubmitStatus() != null && recordVo.getNcSubmitStatus() == 1) {
+                JSONObject jsonObject = JSONObject.parseObject(recordVo.getNcJson());
+                String code = jsonObject.getJSONObject("data").getJSONObject("ap_paybill").getString("code");
+                recordVo.setNcCode(code);
+            }
+            // 推送失败
+            if (recordVo.getNcSubmitStatus() != null && recordVo.getNcSubmitStatus() == 2) {
+                JSONObject jsonObject = JSONObject.parseObject(recordVo.getNcJson());
+                String message = jsonObject.getString("message");
+                recordVo.setErrorMessage(message);
+            }
+        }
         PageInfo<NccRecordVo> pageInfo = new PageInfo<>(list);
         return pageInfo;
     }
@@ -175,8 +189,8 @@ public class TransactionRecordService {
         // 查询房间名称
         List<ParkRoomResponse> fullNames = parkRoomExtendMapper.getFullNames(null);
         Map<String, String> nameMap = new HashMap<>();
-        for(ParkRoomResponse response : fullNames){
-            nameMap.put(response.getId(),response.getBuildName() + "-" + response.getRoomNo());
+        for (ParkRoomResponse response : fullNames) {
+            nameMap.put(response.getId(), response.getBuildName() + "-" + response.getRoomNo());
         }
 
         PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
@@ -186,9 +200,21 @@ public class TransactionRecordService {
         }
         // 转换记录
         List<NccRecordVo> list = modelMapper.convertRecord(model);
-        for(NccRecordVo vo : list){
-            if(nameMap.containsKey(vo.getHouseId())){
-                vo.setHouseName(nameMap.get(vo.getHouseId()));
+        for (NccRecordVo recordVo : list) {
+            if (nameMap.containsKey(recordVo.getHouseId())) {
+                recordVo.setHouseName(nameMap.get(recordVo.getHouseId()));
+            }
+            // 已推送
+            if (recordVo.getNcSubmitStatus() != null && recordVo.getNcSubmitStatus() == 1) {
+                JSONObject jsonObject = JSONObject.parseObject(recordVo.getNcJson());
+                String code = jsonObject.getJSONObject("data").getJSONObject("ar_gatherbill").getString("code");
+                recordVo.setNcCode(code);
+            }
+            // 推送失败
+            if (recordVo.getNcSubmitStatus() != null && recordVo.getNcSubmitStatus() == 2) {
+                JSONObject jsonObject = JSONObject.parseObject(recordVo.getNcJson());
+                String message = jsonObject.getString("message");
+                recordVo.setErrorMessage(message);
             }
         }
 
@@ -201,8 +227,8 @@ public class TransactionRecordService {
         // 查询房间名称
         List<ParkRoomResponse> fullNames = parkRoomExtendMapper.getFullNames(null);
         Map<String, String> nameMap = new HashMap<>();
-        for(ParkRoomResponse response : fullNames){
-            nameMap.put(response.getId(),response.getBuildName() + "-" + response.getRoomNo());
+        for (ParkRoomResponse response : fullNames) {
+            nameMap.put(response.getId(), response.getBuildName() + "-" + response.getRoomNo());
         }
 
         if (StringUtils.isNotEmpty(model.getDiscIds())) {
@@ -211,8 +237,8 @@ public class TransactionRecordService {
         }
         // 收款记录
         List<NccRecordVo> list = modelMapper.convertRecord(model);
-        for(NccRecordVo vo : list){
-            if(nameMap.containsKey(vo.getHouseId())){
+        for (NccRecordVo vo : list) {
+            if (nameMap.containsKey(vo.getHouseId())) {
                 vo.setHouseName(nameMap.get(vo.getHouseId()));
             }
         }
@@ -339,13 +365,14 @@ public class TransactionRecordService {
                     String result = InvoiceUtil.gatheringbillAdd(json);
                     JSONObject jsonObject = JSONObject.parseObject(result);
                     if (jsonObject.getString("success").equals("true")) {
-                        payLog.setNcJson(result);
                         payLog.setNcSubmitStatus(1);
-                        payLog.setNcSubmitDate(new Date());
-                        payLog.setNcSubmitName(ShiroUtils.getLoginName());
-                        payLogMapper.updateByPrimaryKeySelective(payLog);
+                    } else {
+                        payLog.setNcSubmitStatus(2);
                     }
-
+                    payLog.setNcJson(result);
+                    payLog.setNcSubmitDate(new Date());
+                    payLog.setNcSubmitName(ShiroUtils.getUser().getTruename());
+                    payLogMapper.updateByPrimaryKeySelective(payLog);
 
                 }
 
@@ -474,20 +501,21 @@ public class TransactionRecordService {
 
                     log.info("退款凭证推送详情:{}", json.toJSONString());
 
+                    RefundDetail detail = new RefundDetail();
+                    detail.setId(refundManage.getRefundDetailId());
+
                     String result = InvoiceUtil.paybillAdd(json);
                     JSONObject jsonObject = JSONObject.parseObject(result);
-                    if (jsonObject.getString("success").equals("true")) {
 
-                        RefundDetail detail = new RefundDetail();
-                        detail.setId(refundManage.getRefundDetailId());
-                        detail.setNcJson(result);
+                    if (jsonObject.getString("success").equals("true")) {
                         detail.setNcSubmitStatus(1);
-                        detail.setNcSubmitDate(new Date());
-                        detail.setNcSubmitName(ShiroUtils.getLoginName());
-                        refundDetailMapper.updateByPrimaryKeySelective(detail);
+                    } else {
+                        detail.setNcSubmitStatus(2);
                     }
-
-
+                    detail.setNcJson(result);
+                    detail.setNcSubmitDate(new Date());
+                    detail.setNcSubmitName(ShiroUtils.getUser().getTruename());
+                    refundDetailMapper.updateByPrimaryKeySelective(detail);
                 }
 
             } catch (Exception e) {
@@ -597,13 +625,14 @@ public class TransactionRecordService {
                     String result = InvoiceUtil.gatheringbillTurn(json);
                     JSONObject jsonObject = JSONObject.parseObject(result);
                     if (jsonObject.getString("success").equals("true")) {
-                        intentionalDeposit.setNcJson(result);
                         intentionalDeposit.setNcSubmitStatus(1);
-                        intentionalDeposit.setNcSubmitDate(new Date());
-                        intentionalDeposit.setNcSubmitName(ShiroUtils.getLoginName());
-                        intentionalDepositMapper.updateByPrimaryKeySelective(intentionalDeposit);
+                    } else {
+                        intentionalDeposit.setNcSubmitStatus(2);
                     }
-
+                    intentionalDeposit.setNcJson(result);
+                    intentionalDeposit.setNcSubmitDate(new Date());
+                    intentionalDeposit.setNcSubmitName(ShiroUtils.getUser().getTruename());
+                    intentionalDepositMapper.updateByPrimaryKeySelective(intentionalDeposit);
                 }
 
             } catch (Exception e) {

+ 16 - 0
pro-base/src/main/java/com/idea/transactionRecordManage/vo/NccRecordVo.java

@@ -97,6 +97,22 @@ public class NccRecordVo {
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date payTime;
 
+    /**
+     * ncId  p.nc_json,
+     *             p.nc_submit_status,
+     *             p.nc_submit_date,
+     *             p.nc_submit_name,
+     */
+    private String ncCode;
+
+    private String ncJson;
+
+    /**
+     * nc 报错信息
+     */
+    private String errorMessage;
+
+
 
     // 条件查询
     /*

+ 4 - 2
pro-base/src/main/resources/mybatis/buildManage/MnpBuildingExtendMapper.xml

@@ -10,7 +10,7 @@
     floors, overground_floors, underground_floors,
     structure, regionalism_code, land_code,
     created_id, created_at, updated_at,
-    updated_id, remark, price_remark
+    updated_id, remark, price_remark,del_flag
     )
     values
     <foreach collection="list" item="item" separator=",">
@@ -22,7 +22,8 @@
       #{item.floors,jdbcType=INTEGER}, #{item.overgroundFloors,jdbcType=INTEGER}, #{item.undergroundFloors,jdbcType=INTEGER},
       #{item.structure,jdbcType=VARCHAR}, #{item.regionalismCode,jdbcType=VARCHAR}, #{item.landCode,jdbcType=VARCHAR},
       #{item.createdId,jdbcType=VARCHAR}, #{item.createdAt,jdbcType=TIMESTAMP}, #{item.updatedAt,jdbcType=TIMESTAMP},
-      #{item.updatedId,jdbcType=VARCHAR}, #{item.remark,jdbcType=LONGVARCHAR}, #{item.priceRemark,jdbcType=LONGVARCHAR}
+      #{item.updatedId,jdbcType=VARCHAR}, #{item.remark,jdbcType=LONGVARCHAR}, #{item.priceRemark,jdbcType=LONGVARCHAR},
+      #{item.delFlag,jdbcType=VARCHAR}
       )
     </foreach>
   </insert>
@@ -32,6 +33,7 @@
     left JOIN park_info on mnp_building.group_id = park_info.id
     left JOIN park_floor_disc on mnp_building.disc_id = park_floor_disc.id
     <where>
+        and mnp_building.del_flag != '0'
       <if test="buildNum != null and buildNum != '' ">
         and mnp_building.build_num like  concat('%',#{buildNum},'%')
       </if>

+ 24 - 5
pro-base/src/main/resources/mybatis/buildManage/MnpBuildingMapper.xml

@@ -29,6 +29,7 @@
     <result column="updated_id" jdbcType="VARCHAR" property="updatedId" />
     <result column="ncid" jdbcType="VARCHAR" property="ncid" />
     <result column="nc_code" jdbcType="VARCHAR" property="ncCode" />
+    <result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.idea.buildManage.model.MnpBuilding">
     <result column="remark" jdbcType="LONGVARCHAR" property="remark" />
@@ -96,7 +97,7 @@
     id, group_id, group_name, disc_id, disc_name, order_num, build_num, construction_num,
     area, residential_area, un_residential_area, cover_an_area, underground_area, room_num,
     number_info, floors, overground_floors, underground_floors, structure, regionalism_code,
-    land_code, created_id, created_at, updated_at, updated_id, ncid, nc_code
+    land_code, created_id, created_at, updated_at, updated_id, ncid, nc_code, del_flag
   </sql>
   <sql id="Blob_Column_List">
     remark, price_remark
@@ -159,7 +160,8 @@
                               structure, regionalism_code, land_code,
                               created_id, created_at, updated_at,
                               updated_id, ncid, nc_code,
-                              remark, price_remark)
+                              del_flag, remark, price_remark
+    )
     values (#{id,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR}, #{groupName,jdbcType=VARCHAR},
             #{discId,jdbcType=VARCHAR}, #{discName,jdbcType=VARCHAR}, #{orderNum,jdbcType=VARCHAR},
             #{buildNum,jdbcType=VARCHAR}, #{constructionNum,jdbcType=VARCHAR}, #{area,jdbcType=DOUBLE},
@@ -169,7 +171,8 @@
             #{structure,jdbcType=VARCHAR}, #{regionalismCode,jdbcType=VARCHAR}, #{landCode,jdbcType=VARCHAR},
             #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
             #{updatedId,jdbcType=VARCHAR}, #{ncid,jdbcType=VARCHAR}, #{ncCode,jdbcType=VARCHAR},
-            #{remark,jdbcType=LONGVARCHAR}, #{priceRemark,jdbcType=LONGVARCHAR})
+            #{delFlag,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR}, #{priceRemark,jdbcType=LONGVARCHAR}
+           )
   </insert>
   <insert id="insertSelective" parameterType="com.idea.buildManage.model.MnpBuilding">
     insert into mnp_building
@@ -255,6 +258,9 @@
       <if test="ncCode != null">
         nc_code,
       </if>
+      <if test="delFlag != null">
+        del_flag,
+      </if>
       <if test="remark != null">
         remark,
       </if>
@@ -344,6 +350,9 @@
       <if test="ncCode != null">
         #{ncCode,jdbcType=VARCHAR},
       </if>
+      <if test="delFlag != null">
+        #{delFlag,jdbcType=VARCHAR},
+      </if>
       <if test="remark != null">
         #{remark,jdbcType=LONGVARCHAR},
       </if>
@@ -442,6 +451,9 @@
       <if test="record.ncCode != null">
         nc_code = #{record.ncCode,jdbcType=VARCHAR},
       </if>
+      <if test="record.delFlag != null">
+        del_flag = #{record.delFlag,jdbcType=VARCHAR},
+      </if>
       <if test="record.remark != null">
         remark = #{record.remark,jdbcType=LONGVARCHAR},
       </if>
@@ -482,6 +494,7 @@
     updated_id = #{record.updatedId,jdbcType=VARCHAR},
     ncid = #{record.ncid,jdbcType=VARCHAR},
     nc_code = #{record.ncCode,jdbcType=VARCHAR},
+    del_flag = #{record.delFlag,jdbcType=VARCHAR},
     remark = #{record.remark,jdbcType=LONGVARCHAR},
     price_remark = #{record.priceRemark,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
@@ -516,7 +529,8 @@
     updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
     updated_id = #{record.updatedId,jdbcType=VARCHAR},
     ncid = #{record.ncid,jdbcType=VARCHAR},
-    nc_code = #{record.ncCode,jdbcType=VARCHAR}
+    nc_code = #{record.ncCode,jdbcType=VARCHAR},
+    del_flag = #{record.delFlag,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -602,6 +616,9 @@
       <if test="ncCode != null">
         nc_code = #{ncCode,jdbcType=VARCHAR},
       </if>
+      <if test="delFlag != null">
+        del_flag = #{delFlag,jdbcType=VARCHAR},
+      </if>
       <if test="remark != null">
         remark = #{remark,jdbcType=LONGVARCHAR},
       </if>
@@ -639,6 +656,7 @@
         updated_id = #{updatedId,jdbcType=VARCHAR},
         ncid = #{ncid,jdbcType=VARCHAR},
         nc_code = #{ncCode,jdbcType=VARCHAR},
+        del_flag = #{delFlag,jdbcType=VARCHAR},
         remark = #{remark,jdbcType=LONGVARCHAR},
         price_remark = #{priceRemark,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=VARCHAR}
@@ -670,7 +688,8 @@
         updated_at = #{updatedAt,jdbcType=TIMESTAMP},
         updated_id = #{updatedId,jdbcType=VARCHAR},
         ncid = #{ncid,jdbcType=VARCHAR},
-        nc_code = #{ncCode,jdbcType=VARCHAR}
+        nc_code = #{ncCode,jdbcType=VARCHAR},
+        del_flag = #{delFlag,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 5 - 2
pro-base/src/main/resources/mybatis/buildManage/ParkRoomExtendMapper.xml

@@ -9,6 +9,7 @@
     left join park_floor_disc d on d.id = r.disc_id
     left join park_info p on p.id = r.group_id
     <where>
+        and r.del_flag != '0'
       <if test="roomUseStr != null and roomUseStr != ''">
         and r.room_use in (${roomUseStr})
       </if>
@@ -65,7 +66,7 @@
                            decoration_situation, house_type_id, house_type_picture,
                            created_id, created_at, updated_at,
                            updated_id, sale_status, sold_status,
-                           two_point_two, remark, is_choose)
+                           two_point_two, remark, is_choose,del_flag)
     values
     <foreach collection="list" item="item" separator=",">
       (#{item.id,jdbcType=VARCHAR}, #{item.buildId,jdbcType=VARCHAR}, #{item.discId,jdbcType=VARCHAR},
@@ -77,7 +78,9 @@
       #{item.decorationSituation,jdbcType=INTEGER}, #{item.houseTypeId,jdbcType=VARCHAR}, #{item.houseTypePicture,jdbcType=VARCHAR},
       #{item.createdId,jdbcType=VARCHAR}, #{item.createdAt,jdbcType=TIMESTAMP}, #{item.updatedAt,jdbcType=TIMESTAMP},
       #{item.updatedId,jdbcType=VARCHAR}, #{item.saleStatus,jdbcType=INTEGER}, #{item.soldStatus,jdbcType=INTEGER},
-      #{item.twoPointTwo,jdbcType=VARCHAR}, #{item.remark,jdbcType=LONGVARCHAR}, #{item.isChoose,jdbcType=INTEGER})
+      #{item.twoPointTwo,jdbcType=VARCHAR}, #{item.remark,jdbcType=LONGVARCHAR}, #{item.isChoose,jdbcType=INTEGER},
+      #{item.delFlag,jdbcType=VARCHAR}
+      )
     </foreach>
   </insert>
 

+ 24 - 7
pro-base/src/main/resources/mybatis/buildManage/ParkRoomMapper.xml

@@ -33,6 +33,7 @@
         <result column="is_choose" jdbcType="INTEGER" property="isChoose" />
         <result column="ncid" jdbcType="VARCHAR" property="ncid" />
         <result column="nc_code" jdbcType="VARCHAR" property="ncCode" />
+        <result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
     </resultMap>
     <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.idea.buildManage.model.ParkRoom">
         <result column="remark" jdbcType="LONGVARCHAR" property="remark" />
@@ -100,7 +101,7 @@
     prediction_share_area, prediction_build_area, prediction_land_area, actual_internal_area,
     actual_share_area, actual_build_area, actual_land_area, room_use, room_number, decoration_situation,
     house_type_id, house_type_picture, created_id, created_at, updated_at, updated_id,
-    sale_status, sold_status, two_point_two, order_num, is_choose, ncid, nc_code
+    sale_status, sold_status, two_point_two, order_num, is_choose, ncid, nc_code, del_flag
     </sql>
     <sql id="Blob_Column_List">
         remark
@@ -164,8 +165,8 @@
                                created_id, created_at, updated_at,
                                updated_id, sale_status, sold_status,
                                two_point_two, order_num, is_choose,
-                               ncid, nc_code, remark
-        )
+                               ncid, nc_code, del_flag,
+                               remark)
         values (#{id,jdbcType=VARCHAR}, #{buildId,jdbcType=VARCHAR}, #{discId,jdbcType=VARCHAR},
                 #{groupId,jdbcType=VARCHAR}, #{roomNo,jdbcType=VARCHAR}, #{nature,jdbcType=VARCHAR},
                 #{floor,jdbcType=VARCHAR}, #{predictionInternalArea,jdbcType=DOUBLE}, #{predictionShareArea,jdbcType=DOUBLE},
@@ -176,8 +177,8 @@
                 #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
                 #{updatedId,jdbcType=VARCHAR}, #{saleStatus,jdbcType=INTEGER}, #{soldStatus,jdbcType=INTEGER},
                 #{twoPointTwo,jdbcType=VARCHAR}, #{orderNum,jdbcType=VARCHAR}, #{isChoose,jdbcType=INTEGER},
-                #{ncid,jdbcType=VARCHAR}, #{ncCode,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR}
-               )
+                #{ncid,jdbcType=VARCHAR}, #{ncCode,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR},
+                #{remark,jdbcType=LONGVARCHAR})
     </insert>
     <insert id="insertSelective" parameterType="com.idea.buildManage.model.ParkRoom">
         insert into park_room
@@ -275,6 +276,9 @@
             <if test="ncCode != null">
                 nc_code,
             </if>
+            <if test="delFlag != null">
+                del_flag,
+            </if>
             <if test="remark != null">
                 remark,
             </if>
@@ -373,6 +377,9 @@
             <if test="ncCode != null">
                 #{ncCode,jdbcType=VARCHAR},
             </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=VARCHAR},
+            </if>
             <if test="remark != null">
                 #{remark,jdbcType=LONGVARCHAR},
             </if>
@@ -480,6 +487,9 @@
             <if test="record.ncCode != null">
                 nc_code = #{record.ncCode,jdbcType=VARCHAR},
             </if>
+            <if test="record.delFlag != null">
+                del_flag = #{record.delFlag,jdbcType=VARCHAR},
+            </if>
             <if test="record.remark != null">
                 remark = #{record.remark,jdbcType=LONGVARCHAR},
             </if>
@@ -521,6 +531,7 @@
         is_choose = #{record.isChoose,jdbcType=INTEGER},
         ncid = #{record.ncid,jdbcType=VARCHAR},
         nc_code = #{record.ncCode,jdbcType=VARCHAR},
+        del_flag = #{record.delFlag,jdbcType=VARCHAR},
         remark = #{record.remark,jdbcType=LONGVARCHAR}
         <if test="_parameter != null">
             <include refid="Update_By_Example_Where_Clause" />
@@ -558,7 +569,8 @@
         order_num = #{record.orderNum,jdbcType=VARCHAR},
         is_choose = #{record.isChoose,jdbcType=INTEGER},
         ncid = #{record.ncid,jdbcType=VARCHAR},
-        nc_code = #{record.ncCode,jdbcType=VARCHAR}
+        nc_code = #{record.ncCode,jdbcType=VARCHAR},
+        del_flag = #{record.delFlag,jdbcType=VARCHAR}
         <if test="_parameter != null">
             <include refid="Update_By_Example_Where_Clause" />
         </if>
@@ -656,6 +668,9 @@
             <if test="ncCode != null">
                 nc_code = #{ncCode,jdbcType=VARCHAR},
             </if>
+            <if test="delFlag != null">
+                del_flag = #{delFlag,jdbcType=VARCHAR},
+            </if>
             <if test="remark != null">
                 remark = #{remark,jdbcType=LONGVARCHAR},
             </if>
@@ -694,6 +709,7 @@
             is_choose = #{isChoose,jdbcType=INTEGER},
             ncid = #{ncid,jdbcType=VARCHAR},
             nc_code = #{ncCode,jdbcType=VARCHAR},
+            del_flag = #{delFlag,jdbcType=VARCHAR},
             remark = #{remark,jdbcType=LONGVARCHAR}
         where id = #{id,jdbcType=VARCHAR}
     </update>
@@ -728,7 +744,8 @@
             order_num = #{orderNum,jdbcType=VARCHAR},
             is_choose = #{isChoose,jdbcType=INTEGER},
             ncid = #{ncid,jdbcType=VARCHAR},
-            nc_code = #{ncCode,jdbcType=VARCHAR}
+            nc_code = #{ncCode,jdbcType=VARCHAR},
+            del_flag = #{delFlag,jdbcType=VARCHAR}
         where id = #{id,jdbcType=VARCHAR}
     </update>
 </mapper>

+ 3 - 0
pro-base/src/main/resources/mybatis/customerManagement/CustomerManagementExtendMapper.xml

@@ -31,6 +31,9 @@
       <if test="batchNumber != null and batchNumber != ''">
         and customer_management.batch_number like concat ('%',#{batchNumber},'%')
       </if>
+      <if test="roomSelectionNumber != null and roomSelectionNumber != ''">
+        and customer_management.room_selection_number like concat ('%',#{roomSelectionNumber},'%')
+      </if>
       <if test="groupIdList != null">
         and customer_management.group_id in
         <foreach collection="groupIdList" item="groupId" open="(" close=")" separator="," >

+ 43 - 7
pro-base/src/main/resources/mybatis/invoice/InvoiceManageMapper.xml

@@ -60,7 +60,9 @@
     <result column="e_invoice_url" jdbcType="VARCHAR" property="eInvoiceUrl" />
     <result column="serial_no" jdbcType="VARCHAR" property="serialNo" />
     <result column="specifications" jdbcType="VARCHAR" property="specifications" />
+    <result column="nc_id" jdbcType="VARCHAR" property="ncId" />
     <result column="nc_code" jdbcType="VARCHAR" property="ncCode" />
+    <result column="carry_over_status" jdbcType="VARCHAR" property="carryOverStatus" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.idea.invoice.model.InvoiceManage">
     <result column="nc_json" jdbcType="LONGVARCHAR" property="ncJson" />
@@ -134,7 +136,7 @@
     invoice_header_bank_number, bad_debt_reason, create_user, create_time, update_user,
     update_time, invoice_file, take_status, take_user, take_date, take_notes, take_update_user,
     red_invoice_no, red_confirm_uuid, red_confirm_no, red_confirm_serial_no, confirm_state,
-    remark, e_invoice_url, serial_no, specifications, nc_code
+    remark, e_invoice_url, serial_no, specifications, nc_id, nc_code, carry_over_status
   </sql>
   <sql id="Blob_Column_List">
     nc_json
@@ -208,8 +210,9 @@
                                 take_notes, take_update_user, red_invoice_no,
                                 red_confirm_uuid, red_confirm_no, red_confirm_serial_no,
                                 confirm_state, remark, e_invoice_url,
-                                serial_no, specifications, nc_code,
-                                nc_json)
+                                serial_no, specifications, nc_id,
+                                nc_code, carry_over_status, nc_json
+    )
     values (#{id,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR}, #{customerManagementId,jdbcType=VARCHAR},
             #{contractNumber,jdbcType=VARCHAR}, #{recordNumber,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
             #{costType,jdbcType=VARCHAR}, #{paymentType,jdbcType=VARCHAR}, #{sendStatus,jdbcType=VARCHAR},
@@ -230,8 +233,9 @@
             #{takeNotes,jdbcType=VARCHAR}, #{takeUpdateUser,jdbcType=VARCHAR}, #{redInvoiceNo,jdbcType=VARCHAR},
             #{redConfirmUuid,jdbcType=VARCHAR}, #{redConfirmNo,jdbcType=VARCHAR}, #{redConfirmSerialNo,jdbcType=VARCHAR},
             #{confirmState,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{eInvoiceUrl,jdbcType=VARCHAR},
-            #{serialNo,jdbcType=VARCHAR}, #{specifications,jdbcType=VARCHAR}, #{ncCode,jdbcType=VARCHAR},
-            #{ncJson,jdbcType=LONGVARCHAR})
+            #{serialNo,jdbcType=VARCHAR}, #{specifications,jdbcType=VARCHAR}, #{ncId,jdbcType=VARCHAR},
+            #{ncCode,jdbcType=VARCHAR}, #{carryOverStatus,jdbcType=VARCHAR}, #{ncJson,jdbcType=LONGVARCHAR}
+           )
   </insert>
   <insert id="insertSelective" parameterType="com.idea.invoice.model.InvoiceManage">
     insert into invoice_manage
@@ -410,9 +414,15 @@
       <if test="specifications != null">
         specifications,
       </if>
+      <if test="ncId != null">
+        nc_id,
+      </if>
       <if test="ncCode != null">
         nc_code,
       </if>
+      <if test="carryOverStatus != null">
+        carry_over_status,
+      </if>
       <if test="ncJson != null">
         nc_json,
       </if>
@@ -592,9 +602,15 @@
       <if test="specifications != null">
         #{specifications,jdbcType=VARCHAR},
       </if>
+      <if test="ncId != null">
+        #{ncId,jdbcType=VARCHAR},
+      </if>
       <if test="ncCode != null">
         #{ncCode,jdbcType=VARCHAR},
       </if>
+      <if test="carryOverStatus != null">
+        #{carryOverStatus,jdbcType=VARCHAR},
+      </if>
       <if test="ncJson != null">
         #{ncJson,jdbcType=LONGVARCHAR},
       </if>
@@ -783,9 +799,15 @@
       <if test="record.specifications != null">
         specifications = #{record.specifications,jdbcType=VARCHAR},
       </if>
+      <if test="record.ncId != null">
+        nc_id = #{record.ncId,jdbcType=VARCHAR},
+      </if>
       <if test="record.ncCode != null">
         nc_code = #{record.ncCode,jdbcType=VARCHAR},
       </if>
+      <if test="record.carryOverStatus != null">
+        carry_over_status = #{record.carryOverStatus,jdbcType=VARCHAR},
+      </if>
       <if test="record.ncJson != null">
         nc_json = #{record.ncJson,jdbcType=LONGVARCHAR},
       </if>
@@ -854,7 +876,9 @@
     e_invoice_url = #{record.eInvoiceUrl,jdbcType=VARCHAR},
     serial_no = #{record.serialNo,jdbcType=VARCHAR},
     specifications = #{record.specifications,jdbcType=VARCHAR},
+    nc_id = #{record.ncId,jdbcType=VARCHAR},
     nc_code = #{record.ncCode,jdbcType=VARCHAR},
+    carry_over_status = #{record.carryOverStatus,jdbcType=VARCHAR},
     nc_json = #{record.ncJson,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -920,7 +944,9 @@
     e_invoice_url = #{record.eInvoiceUrl,jdbcType=VARCHAR},
     serial_no = #{record.serialNo,jdbcType=VARCHAR},
     specifications = #{record.specifications,jdbcType=VARCHAR},
-    nc_code = #{record.ncCode,jdbcType=VARCHAR}
+    nc_id = #{record.ncId,jdbcType=VARCHAR},
+    nc_code = #{record.ncCode,jdbcType=VARCHAR},
+    carry_over_status = #{record.carryOverStatus,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -1099,9 +1125,15 @@
       <if test="specifications != null">
         specifications = #{specifications,jdbcType=VARCHAR},
       </if>
+      <if test="ncId != null">
+        nc_id = #{ncId,jdbcType=VARCHAR},
+      </if>
       <if test="ncCode != null">
         nc_code = #{ncCode,jdbcType=VARCHAR},
       </if>
+      <if test="carryOverStatus != null">
+        carry_over_status = #{carryOverStatus,jdbcType=VARCHAR},
+      </if>
       <if test="ncJson != null">
         nc_json = #{ncJson,jdbcType=LONGVARCHAR},
       </if>
@@ -1167,7 +1199,9 @@
         e_invoice_url = #{eInvoiceUrl,jdbcType=VARCHAR},
         serial_no = #{serialNo,jdbcType=VARCHAR},
         specifications = #{specifications,jdbcType=VARCHAR},
+        nc_id = #{ncId,jdbcType=VARCHAR},
         nc_code = #{ncCode,jdbcType=VARCHAR},
+        carry_over_status = #{carryOverStatus,jdbcType=VARCHAR},
         nc_json = #{ncJson,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -1230,7 +1264,9 @@
         e_invoice_url = #{eInvoiceUrl,jdbcType=VARCHAR},
         serial_no = #{serialNo,jdbcType=VARCHAR},
         specifications = #{specifications,jdbcType=VARCHAR},
-        nc_code = #{ncCode,jdbcType=VARCHAR}
+        nc_id = #{ncId,jdbcType=VARCHAR},
+        nc_code = #{ncCode,jdbcType=VARCHAR},
+        carry_over_status = #{carryOverStatus,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

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

@@ -22,6 +22,9 @@
             <if test="batchNumber != null and batchNumber != ''">
                 and receipt_manage.batch_number like concat('%',#{batchNumber},'%')
             </if>
+            <if test="receiptType != null and receiptType != ''">
+                and receipt_manage.receipt_type in (${receiptType})
+            </if>
         </where>
         order by receipt_manage.created_at desc
     </select>

+ 6 - 5
pro-base/src/main/resources/mybatis/transactionRecord/TransactionRecord.xml

@@ -10,10 +10,11 @@
             p.content_type,
             p.pay_time,
             p.payment_method,
-            p.nc_submit_status,
+            ifnull(p.nc_submit_status,0) as nc_submit_status,
             p.nc_submit_date,
             p.nc_submit_name,
             p.bank_number,
+            p.nc_json,
             u.truename created_name,
             cm.buyer_name,
             c.house_name
@@ -58,16 +59,14 @@
     <select id="reFundRecord" resultType="com.idea.transactionRecordManage.vo.NccRecordVo">
         SELECT
             d.*,
+            ifnull(d.nc_submit_status,0) as nc_submit_status,
             d.actual_refund_amount money,
             r.customer_management_id,
             r.house_id,
             r.buyer_name,
             r.bank_number,
             r.house_name,
-            u.truename createdName,
-            d.nc_submit_status,
-            d.nc_submit_date,
-            d.nc_submit_name
+            u.truename createdName
         FROM
             refund_detail d
         LEFT JOIN refund_manage r ON d.refund_manage_id = r.id
@@ -109,6 +108,7 @@
         select * from (
         select
         cr.id,cr.convert_type,cr.convert_date,cr.house_id,cr.disc_id,
+        cr.nc_json,cr.nc_submit_date,cr.nc_submit_name,ifnull(cr.nc_submit_status,0) as nc_submit_status,
         cm. buyer_name,
         i.received_amount money,
         i.serial_number,
@@ -122,6 +122,7 @@
         union ALL
         select
         cr.id,cr.convert_type,cr.convert_date,cr.house_id,cr.disc_id,
+        cr.nc_json,cr.nc_submit_date,cr.nc_submit_name,ifnull(cr.nc_submit_status,0) as nc_submit_status,
         cm. buyer_name,
         p.pay_money money,
         p.serial_number,