LAPTOP-FO2T5SIU\35838 8 月之前
父节点
当前提交
2e4f3b9bd9

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

@@ -79,6 +79,10 @@ public class ParkRoomListener extends AnalysisEventListener<ParkRoomExcel> {
                 boolean buildNumFlag = true;
                 boolean roomNoFlag = true;
                 boolean floorFlag = true;
+                boolean predictionInternalAreaFlag = true;
+                boolean predictionShareAreaFlag = true;
+                boolean predictionLandAreaFlag = true;
+                boolean predictionBuildAreaFlag = true;
                 boolean actualInternalAreaFlag = true;
                 boolean actualShareAreaFlag = true;
                 boolean actualBuildAreaFlag = true;
@@ -151,17 +155,41 @@ public class ParkRoomListener extends AnalysisEventListener<ParkRoomExcel> {
                     }
                     data.setFloor(excel.getFloor());
 
-                    if (StringUtils.isEmpty(excel.getPredictionShareArea())) {
-                        data.setPredictionShareArea(Double.valueOf(excel.getPredictionShareArea()));
+                    if (StringUtils.isNotEmpty(excel.getPredictionShareArea())) {
+                        try {
+                            data.setPredictionShareArea(Double.valueOf(excel.getPredictionShareArea()));
+                        }catch (NumberFormatException e){
+                            predictionShareAreaFlag = false;
+                            builder.append("预测分摊面积格式有误").append(",");
+                            excel.setPredictionShareArea("{" + excel.getPredictionShareArea() + "}");
+                        }
                     }
-                    if (StringUtils.isEmpty(excel.getPredictionInternalArea())) {
-                        data.setPredictionInternalArea(Double.valueOf(excel.getPredictionInternalArea()));
+                    if (StringUtils.isNotEmpty(excel.getPredictionInternalArea())) {
+                        try {
+                            data.setPredictionInternalArea(Double.valueOf(excel.getPredictionInternalArea()));
+                        }catch (NumberFormatException e){
+                            predictionInternalAreaFlag = false;
+                            builder.append("预测套内面积格式有误").append(",");
+                            excel.setPredictionInternalArea("{" + excel.getPredictionInternalArea() + "}");
+                        }
                     }
-                    if (StringUtils.isEmpty(excel.getPredictionLandArea())) {
-                        data.setPredictionLandArea(Double.valueOf(excel.getPredictionLandArea()));
+                    if (StringUtils.isNotEmpty(excel.getPredictionLandArea())) {
+                        try {
+                            data.setPredictionLandArea(Double.valueOf(excel.getPredictionLandArea()));
+                        }catch (NumberFormatException e){
+                            predictionLandAreaFlag = false;
+                            builder.append("预测土地面积格式有误").append(",");
+                            excel.setPredictionLandArea("{" + excel.getPredictionLandArea() + "}");
+                        }
                     }
-                    if (StringUtils.isEmpty(excel.getPredictionBuildArea())) {
-                        data.setPredictionBuildArea(Double.valueOf(excel.getPredictionBuildArea()));
+                    if (StringUtils.isNotEmpty(excel.getPredictionBuildArea())) {
+                        try {
+                            data.setPredictionBuildArea(Double.valueOf(excel.getPredictionBuildArea()));
+                        }catch (NumberFormatException e){
+                            predictionBuildAreaFlag = false;
+                            builder.append("预测建筑面积格式有误").append(",");
+                            excel.setPredictionBuildArea("{" + excel.getPredictionBuildArea() + "}");
+                        }
                     }
 
 
@@ -281,16 +309,20 @@ public class ParkRoomListener extends AnalysisEventListener<ParkRoomExcel> {
                     badList.add(excel);
                 }
 
-                count = list.size();
-                jsonObject.put("successCount", count);
-                jsonObject.put("errorList", badList);
-                jsonObject.put("errorCount", badList.size());
-                //保存
-                saveData();
 
-                excelList.clear();
-                list.clear();
             }
+
+            count = list.size();
+            jsonObject.put("successCount", count);
+            jsonObject.put("errorList", badList);
+            jsonObject.put("errorCount", badList.size());
+            //保存
+            saveData();
+
+            excelList.clear();
+            list.clear();
+
+
         } else {
             throw new RuntimeException("excel无数据");
         }

+ 4 - 4
pro-base/src/main/java/com/idea/customerManagement/service/IntentionalDepositService.java

@@ -568,12 +568,12 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
 
     /**
      * 诚意金转定金 凭证推送
-     * @param model
+     * @param id
      * @return
      */
-    public AjaxResult sendToDepositVoucher(IntentionalDepositDto model){
+    public AjaxResult sendToDepositVoucher(String id){
 
-        IntentionalDeposit intentionalDeposit = selectByPrimaryKey(model.getId());
+        IntentionalDeposit intentionalDeposit = selectByPrimaryKey(id);
         CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(intentionalDeposit.getCustomerManagementId());
         BuyerExample buyerExample = new BuyerExample();
         buyerExample.setOrderByClause("order_num");
@@ -583,7 +583,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
 
         JSONObject json = new JSONObject();
         JSONObject ar_gatherbill = new JSONObject();
-        String srcsystemid = MD5Util.encode(model.getId());
+        String srcsystemid = MD5Util.encode(id);
         String billdate = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
         ar_gatherbill.put("srcsystemid", srcsystemid); //外系统标识,必选
         ar_gatherbill.put("pk_tradetype", InvoiceConstant.INVOICE_BUSINESS_F2_Cxx_07); //交易类型,必选

+ 5 - 0
pro-base/src/main/java/com/idea/invoice/util/InvoiceConstant.java

@@ -146,5 +146,10 @@ public class InvoiceConstant {
     // 增值税(普)
     public static final String INVOICE_RECEIPT_TYPE_5 = "5";
 
+    /**
+     * 项目档案
+     */
+    public static final String INVOICE_PROJECT_CODE_mwjyAdk = "mwjyAdk";
+
 
 }

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

@@ -258,9 +258,9 @@ public class InvoiceUtil {
         APICurUtils util = new APICurUtils();
         String token = InvoiceUtil.getToken(util);
         util.setApiUrl("nccloud/api/wxyy/arap/gatheringbill/saveandcommit");
-        log.info("收款单接口-新增提交:{}", json.toJSONString());
+        log.info("收款单接口-新增提交传参:{}", json.toJSONString());
         String result = util.getAPIRetrun(token, json.toJSONString());
-        log.info("收款单接口-新增提交:{}", result);
+        log.info("收款单接口-新增提交结果:{}", result);
         return result;
     }
 
@@ -302,7 +302,7 @@ public class InvoiceUtil {
         util.setApiUrl("nccloud/api/wxyy/arap/gatheringbill/saveandcommit");
         log.info("单据提交——转账单传参:{}", json.toJSONString());
         String result = util.getAPIRetrun(token, json.toJSONString());
-        log.info("单据提交——转账单:{}", result);
+        log.info("单据提交——转账单结果:{}", result);
         return result;
     }
 

+ 90 - 3
pro-base/src/main/java/com/idea/oa/apply/controller/ApplyPaymentSettleController.java

@@ -8,11 +8,14 @@ import com.idea.oa.apply.model.inout.ApplyPaymentSettleIn;
 import com.idea.oa.apply.service.ApplyPaymentSettleService;
 import com.idea.oa.apply.util.constant.ConstantFlowType;
 import com.idea.oa.flow2.model.FlowMain;
+import com.idea.oa.flow2.model.FlowMainExample;
 import com.idea.oa.flow2.model.FlowMainPush;
+import com.idea.oa.flow2.model.FlowMainPushExample;
 import com.idea.oa.flow2.model.in.FlowMainCcVo;
 import com.idea.oa.flow2.service.FlowMainCcService;
 import com.idea.oa.flow2.service.FlowMainPushService;
 import com.idea.oa.flow2.service.FlowMainService;
+import com.idea.util.DateUtils;
 import com.rockstar.common.base.BaseController;
 import com.rockstar.common.domain.AjaxResult;
 import com.rockstar.flow.exception.FlowException;
@@ -20,7 +23,9 @@ import com.rockstar.frame.service.FrameUserService;
 import com.rockstar.shiro.util.ShiroUtils;
 import com.rockstar.util.UUIDUtils;
 import io.swagger.annotations.Api;
+import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
@@ -59,7 +64,8 @@ public class ApplyPaymentSettleController extends BaseController {
     @Autowired
     private FrameUserService frameUserService;
 
-
+    @Value("${serverUrl}")
+    private String serverUrl;
 
 
 
@@ -120,6 +126,40 @@ public class ApplyPaymentSettleController extends BaseController {
             if ("ok_end".equals(isOkString)) {
                 isEnd = true;
                 isAgree = true;
+            }else {
+                // 推送OA信息
+                FlowMain flowMain = flowMainService.selectByPrimaryKey(flowMainPush.getFlowMainId());
+
+                String syscode = "CESHI";
+                String flowId = "";
+                String requestname = flowMain.getApplyTheme();
+                String workflowname = ConstantFlowType.PAYMENT_NAME;
+                String nodeName = flowMainPush.getNodeName();
+                String pcurl = serverUrl;
+                String appurl = "";
+                String isremark = "0";
+                String viewtype = "0";
+                // TODO: 2024/11/15 创建者和接收者需求oa协商
+                String creator = "";
+                String receiver = "";
+                String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
+                String receivets = System.currentTimeMillis()+ "";
+
+                JSONObject json = new JSONObject();
+                json.put("syscode",syscode);
+                json.put("flowId",flowId);
+                json.put("requestname",requestname);
+                json.put("workflowname",workflowname);
+                json.put("nodeName",nodeName);
+                json.put("pcurl",pcurl);
+                json.put("appurl",appurl);
+                json.put("isremark",isremark);
+                json.put("viewtype",viewtype);
+                json.put("creator",creator);
+                json.put("receiver",receiver);
+                json.put("date",date);
+                json.put("receivets",receivets);
+
             }
         }
         //添加业务信息(将请假信息中的修改掉,剩余年假,剩余调休,冻结年假,冻结调休都修改掉)
@@ -187,7 +227,7 @@ public class ApplyPaymentSettleController extends BaseController {
     public AjaxResult myaddApplyPayment(ApplyPaymentSettleIn record,String addSystemRemark) throws FlowException {
 
 
-
+        String id = UUIDUtils.middleUUID();
         {
             record.setUpdatedAt(new Date());
             record.setCreatedAt(record.getUpdatedAt());
@@ -196,7 +236,8 @@ public class ApplyPaymentSettleController extends BaseController {
             record.setCreatedByDept(ShiroUtils.getUser().getDepartment());
             record.setFlowNum(UUIDUtils.middleUUID());
             record.setStatus(0);
-            modelService.insert(record);
+            record.setId(id);
+            modelService.insertWithoutId(record);
         }
 
         HashMap<String, Object> feeMoneyTotalMap = null;//new HashMap<>();
@@ -220,6 +261,52 @@ public class ApplyPaymentSettleController extends BaseController {
                 ConstantFlowType.PAYMENT_PROCESSDEFINE, ConstantFlowType.PAYMENT_DEPLOYMENTID,
                 feeMoneyTotalMap, ConstantFlowType.PAYMENT_NAME, ConstantFlowType.PAYMENT,ShiroUtils.getUser());
 
+        // 推送OA信息
+        String syscode = "CESHI";
+        String flowId = "";
+        String requestname = applyTheme;
+        String workflowname = ConstantFlowType.PAYMENT_NAME;
+        String nodeName = "";
+        String pcurl = serverUrl;
+        String appurl = "";
+        String isremark = "0";
+        String viewtype = "0";
+        // TODO: 2024/11/15 创建者和接收者需求oa协商
+        String creator = "";
+        String receiver = "";
+        String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
+        String receivets = System.currentTimeMillis()+ "";
+
+        FlowMainExample flowMainExample = new FlowMainExample();
+        flowMainExample.createCriteria().andFormIdEqualTo(id).andFlowTypeEqualTo(ConstantFlowType.PAYMENT);
+        List<FlowMain> flowMains = flowMainService.selectByExample(flowMainExample);
+        if(CollectionUtils.isNotEmpty(flowMains)){
+            FlowMain flowMain = flowMains.get(0);
+            flowId = flowMain.getId();
+        }
+        FlowMainPushExample flowMainPushExample = new FlowMainPushExample();
+        flowMainPushExample.createCriteria().andFlowMainIdEqualTo(flowId).andStatusEqualTo(0);
+        List<FlowMainPush> flowMainPushes = flowMainPushService.selectByExample(flowMainPushExample);
+        if(CollectionUtils.isNotEmpty(flowMainPushes)){
+            FlowMainPush flowMainPush = flowMainPushes.get(0);
+            nodeName = flowMainPush.getNodeName();
+        }
+
+        JSONObject json = new JSONObject();
+        json.put("syscode",syscode);
+        json.put("flowId",flowId);
+        json.put("requestname",requestname);
+        json.put("workflowname",workflowname);
+        json.put("nodeName",nodeName);
+        json.put("pcurl",pcurl);
+        json.put("appurl",appurl);
+        json.put("isremark",isremark);
+        json.put("viewtype",viewtype);
+        json.put("creator",creator);
+        json.put("receiver",receiver);
+        json.put("date",date);
+        json.put("receivets",receivets);
+
         if (ajaxResult.get("code").equals(1688)) {
 //            //表成功了 且已经审核完成
 ////            需要进行后续的处理

+ 12 - 7
pro-base/src/main/java/com/idea/paymentManagement/service/PayLogService.java

@@ -445,11 +445,16 @@ public class PayLogService implements BaseService<PayLog, PayLogExample> {
 
     }
 
-    public AjaxResult sendVoucher(PayLogDto model) {
+    /**
+     * 收款凭证推送
+     * @param id
+     * @return
+     */
+    public AjaxResult sendVoucher(String id) {
 
         // 银行流水id
-        String pkInformerId = model.getPkInformerId();
-        PayLog payLog = selectByPrimaryKey(model.getId());
+//        String pkInformerId = model.getPkInformerId();
+        PayLog payLog = selectByPrimaryKey(id);
         CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(payLog.getCustomerManagementId());
         BuyerExample buyerExample = new BuyerExample();
         buyerExample.setOrderByClause("order_num");
@@ -478,7 +483,7 @@ public class PayLogService implements BaseService<PayLog, PayLogExample> {
 
         JSONObject json = new JSONObject();
         JSONObject ar_gatherbill = new JSONObject();
-        String srcsystemid = model.getId();
+        String srcsystemid = id;
         String billdate = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
         ar_gatherbill.put("srcsystemid", srcsystemid); //外系统标识,必选
         ar_gatherbill.put("pk_tradetype", InvoiceConstant.INVOICE_BUSINESS_F2_Cxx_06); //交易类型,必选
@@ -506,8 +511,8 @@ public class PayLogService implements BaseService<PayLog, PayLogExample> {
         ar_gatheritemJson.put("def9", InvoiceConstant.INVOICE_BUSINESS_FORMAT_001); //业态,必选,看云文档业态
         ar_gatheritemJson.put("def11", payLog.getHouseId()); //转出前房号编码,收除了诚意金之外的首期等需要选
         // TODO: 2024/11/14 具体编码应该是根据小区来的
-        ar_gatheritemJson.put("def10", InvoiceConstant.INVOICE_MATERIAL_djjy); //项目档案编码,看云文档项目档案对照
-        ar_gatheritemJson.put("top_billid", pkInformerId); //到账通知生单时,(银行流水中返回的id,见5.2.10到账通知认领查询pk_informer字段)
+        ar_gatheritemJson.put("def10", InvoiceConstant.INVOICE_PROJECT_CODE_mwjyAdk); //项目档案编码,看云文档项目档案对照
+//        ar_gatheritemJson.put("top_billid", pkInformerId); //到账通知生单时,(银行流水中返回的id,见5.2.10到账通知认领查询pk_informer字段)
         ar_gatheritem.add(ar_gatheritemJson);
         json.put("ar_gatheritem", ar_gatheritem);
 
@@ -520,7 +525,7 @@ public class PayLogService implements BaseService<PayLog, PayLogExample> {
             }
 
         } catch (Exception e) {
-            log.error("收诚意金凭证推送报错",e);
+            log.error("各种凭证推送报错",e);
             return AjaxResult.error(e.getMessage());
         }
         return AjaxResult.success();

+ 14 - 0
pro-wx/src/main/java/com/idea/pro/wx/controller/buildManage/WxParkRoomController.java

@@ -11,6 +11,8 @@ import com.idea.buildManage.service.MnpBuildingService;
 import com.idea.buildManage.service.ParkFloorDiscService;
 import com.idea.buildManage.service.ParkInfoService;
 import com.idea.buildManage.service.ParkRoomService;
+import com.idea.customerManagement.service.IntentionalDepositService;
+import com.idea.paymentManagement.service.PayLogService;
 import com.idea.util.ExcelUtils;
 import com.rockstar.common.base.BaseController;
 import com.rockstar.common.domain.AjaxResult;
@@ -51,6 +53,10 @@ public class WxParkRoomController extends BaseController {
     private ParkInfoService parkInfoService;
     @Autowired
     private SysDictService sysDictService;
+    @Autowired
+    private PayLogService payLogService;
+    @Autowired
+    private IntentionalDepositService intentionalDepositService;
 
 
     @PostMapping(value = "list", produces = {"application/json;charset=UTF-8"})
@@ -177,4 +183,12 @@ public class WxParkRoomController extends BaseController {
         modelService.errorListExport(list, response);
     }
 
+    @PostMapping(value = "test")
+    @ResponseBody
+    public AjaxResult test(String id){
+//        payLogService.sendVoucher(id);
+        intentionalDepositService.sendToDepositVoucher(id);
+        return success();
+    }
+
 }