LAPTOP-FO2T5SIU\35838 před 7 měsíci
rodič
revize
4659942007

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

@@ -132,9 +132,9 @@ public class MnpBuildingController extends BaseController {
             EasyExcel.read(excel, MnpBuildingExcel.class, listener).headRowNumber(2).sheet().doRead();
             excel.delete();
             // 启动一个新的线程来触发另一个方法
-            new Thread(() -> {
-                invoiceTask.sendBuild();
-            }).start();
+//            new Thread(() -> {
+//                invoiceTask.sendBuild();
+//            }).start();
         } catch (Exception e) {
             e.printStackTrace();
             return AjaxResult.error(e.getMessage());

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

@@ -161,9 +161,9 @@ public class ParkRoomController extends BaseController {
             EasyExcel.read(excel, ParkRoomExcel.class, listener).headRowNumber(2).sheet().doRead();
             excel.delete();
             // 启动一个新的线程来触发另一个方法
-            new Thread(() -> {
-                invoiceTask.sendHouse();
-            }).start();
+//            new Thread(() -> {
+//                invoiceTask.sendHouse();
+//            }).start();
         } catch (Exception e) {
             e.printStackTrace();
             return AjaxResult.error(e.getMessage());

+ 16 - 0
pro-base/src/main/java/com/idea/buildManage/dto/ProjectHouseVo.java

@@ -0,0 +1,16 @@
+package com.idea.buildManage.dto;
+
+import com.idea.buildManage.model.ParkRoom;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ProjectHouseVo {
+
+    private String buildName;
+
+    private List<ParkRoom> roomList;
+
+
+}

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

@@ -204,13 +204,13 @@ public class MnpBuildingService implements BaseService<MnpBuilding, MnpBuildingE
         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);
-        }
+//        try {
+//            JSONObject json = new JSONObject();
+//            json.put("ncid", building.getNcid());
+//            InvoiceUtil.defdocDisable(json);
+//        }catch (Exception e){
+//            log.error("楼栋禁用失败:",e);
+//        }
         return result;
     }
 
@@ -279,31 +279,31 @@ public class MnpBuildingService implements BaseService<MnpBuilding, MnpBuildingE
 
         ParkInfo parkInfo = parkInfoMapper.selectByPrimaryKey(record.getGroupId());
 
-        try {
-            JSONObject json = new JSONObject();
-            json.put("srcsystemid", id);
-            json.put("code", id);
-            json.put("name", record.getBuildNum());
-            json.put("pk_org", parkInfo.getOrganizationalCode());
-            json.put("pk_defdoclist", InvoiceUtil.pk_defdoclist_build);
-            log.info("推送载体详情:{}", json.toJSONString());
-            // 给nc推送载体数据
-            String resultJson = InvoiceUtil.defdocAdd(json);
-            JSONObject jsonObject = JSONObject.parseObject(resultJson);
-            String success = jsonObject.getString("success");
-            if (success.equals("true")) {
-                JSONObject data = jsonObject.getJSONObject("data");
-                String code = data.getString("code");
-                String ncid = data.getString("ncid");
-                MnpBuilding model = new MnpBuilding();
-                model.setId(id);
-                model.setNcid(ncid);
-                model.setNcCode(code);
-                updateByPrimaryKeySelective(model);
-            }
-        } catch (Exception e) {
-            log.error("推送载体失败", e);
-        }
+//        try {
+//            JSONObject json = new JSONObject();
+//            json.put("srcsystemid", id);
+//            json.put("code", id);
+//            json.put("name", record.getBuildNum());
+//            json.put("pk_org", parkInfo.getOrganizationalCode());
+//            json.put("pk_defdoclist", InvoiceUtil.pk_defdoclist_build);
+//            log.info("推送载体详情:{}", json.toJSONString());
+//            // 给nc推送载体数据
+//            String resultJson = InvoiceUtil.defdocAdd(json);
+//            JSONObject jsonObject = JSONObject.parseObject(resultJson);
+//            String success = jsonObject.getString("success");
+//            if (success.equals("true")) {
+//                JSONObject data = jsonObject.getJSONObject("data");
+//                String code = data.getString("code");
+//                String ncid = data.getString("ncid");
+//                MnpBuilding model = new MnpBuilding();
+//                model.setId(id);
+//                model.setNcid(ncid);
+//                model.setNcCode(code);
+//                updateByPrimaryKeySelective(model);
+//            }
+//        } catch (Exception e) {
+//            log.error("推送载体失败", e);
+//        }
 
         return result;
     }
@@ -312,17 +312,17 @@ public class MnpBuildingService implements BaseService<MnpBuilding, MnpBuildingE
 
         int result = updateByPrimaryKeySelective(model);
 
-        try {
-            MnpBuilding building = selectByPrimaryKey(model.getId());
-            JSONObject json = new JSONObject();
-            json.put("ncid", building.getNcid());
-            json.put("code", building.getNcCode());
-            json.put("name", building.getBuildNum());
-            // 给nc推送修改载体数据
-            InvoiceUtil.defdocUpdate(json);
-        }catch (Exception e){
-            log.error("推送修改载体失败",e);
-        }
+//        try {
+//            MnpBuilding building = selectByPrimaryKey(model.getId());
+//            JSONObject json = new JSONObject();
+//            json.put("ncid", building.getNcid());
+//            json.put("code", building.getNcCode());
+//            json.put("name", building.getBuildNum());
+//            // 给nc推送修改载体数据
+//            InvoiceUtil.defdocUpdate(json);
+//        }catch (Exception e){
+//            log.error("推送修改载体失败",e);
+//        }
 
         return result;
     }

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

@@ -210,18 +210,18 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
 
         model.setUpdatedAt(new Date());
         model.setUpdatedId(ShiroUtils.getUserId());
-        try {
-            ParkRoom parkRoom = selectByPrimaryKey(model.getId());
-            JSONObject json = new JSONObject();
-            json.put("ncid", parkRoom.getNcid());
-            json.put("code", parkRoom.getNcCode());
-            json.put("name", parkRoom.getRoomNo());
-            log.info("推送房间修改详情:{}", json.toJSONString());
-            // 给nc推送修改载体数据
-            InvoiceUtil.defdocUpdate(json);
-        }catch (Exception e){
-            log.error("推送修改房间失败",e);
-        }
+//        try {
+//            ParkRoom parkRoom = selectByPrimaryKey(model.getId());
+//            JSONObject json = new JSONObject();
+//            json.put("ncid", parkRoom.getNcid());
+//            json.put("code", parkRoom.getNcCode());
+//            json.put("name", parkRoom.getRoomNo());
+//            log.info("推送房间修改详情:{}", json.toJSONString());
+//            // 给nc推送修改载体数据
+//            InvoiceUtil.defdocUpdate(json);
+//        }catch (Exception e){
+//            log.error("推送修改房间失败",e);
+//        }
         return updateByPrimaryKeySelective(model);
     }
 
@@ -310,13 +310,13 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
         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);
-        }
+//        try {
+//            JSONObject json = new JSONObject();
+//            json.put("ncid", parkRoom.getNcid());
+//            InvoiceUtil.defdocDisable(json);
+//        }catch (Exception e){
+//            log.error("房间禁用失败:",e);
+//        }
 
         return result;
     }
@@ -394,35 +394,35 @@ public class ParkRoomService implements BaseService<ParkRoom, ParkRoomExample> {
         record.setOrderNum(orderNum);
         int result = insertWithoutId(record);
 
-        try {
-            ParkInfo parkInfo = parkInfoService.selectByPrimaryKey(record.getGroupId());
-            ParkFloorDisc parkFloorDisc = floorDiscService.selectByPrimaryKey(record.getDiscId());
-            MnpBuilding mnpBuilding = buildingService.selectByPrimaryKey(record.getBuildId());
-            String name = parkInfo.getGroupName() + "-" + parkFloorDisc.getName() + "-" + mnpBuilding.getBuildNum()
-                    + "-" + record.getRoomNo();
-            JSONObject json = new JSONObject();
-            json.put("srcsystemid", id);
-            json.put("code", id);
-            json.put("name", name);
-            json.put("pk_org", parkInfo.getOrganizationalCode());
-            json.put("pk_defdoclist", InvoiceUtil.pk_defdoclist_room);
-            // 给nc推送房间数据
-            String resultJson = InvoiceUtil.defdocAdd(json);
-            JSONObject jsonObject = JSONObject.parseObject(resultJson);
-            String success = jsonObject.getString("success");
-            if (success.equals("true")) {
-                JSONObject data = jsonObject.getJSONObject("data");
-                String code = data.getString("code");
-                String ncid = data.getString("ncid");
-                ParkRoom model = new ParkRoom();
-                model.setId(id);
-                model.setNcid(ncid);
-                model.setNcCode(code);
-                updateByPrimaryKeySelective(model);
-            }
-        } catch (Exception e) {
-            log.error("推送房间失败", e);
-        }
+//        try {
+//            ParkInfo parkInfo = parkInfoService.selectByPrimaryKey(record.getGroupId());
+//            ParkFloorDisc parkFloorDisc = floorDiscService.selectByPrimaryKey(record.getDiscId());
+//            MnpBuilding mnpBuilding = buildingService.selectByPrimaryKey(record.getBuildId());
+//            String name = parkInfo.getGroupName() + "-" + parkFloorDisc.getName() + "-" + mnpBuilding.getBuildNum()
+//                    + "-" + record.getRoomNo();
+//            JSONObject json = new JSONObject();
+//            json.put("srcsystemid", id);
+//            json.put("code", id);
+//            json.put("name", name);
+//            json.put("pk_org", parkInfo.getOrganizationalCode());
+//            json.put("pk_defdoclist", InvoiceUtil.pk_defdoclist_room);
+//            // 给nc推送房间数据
+//            String resultJson = InvoiceUtil.defdocAdd(json);
+//            JSONObject jsonObject = JSONObject.parseObject(resultJson);
+//            String success = jsonObject.getString("success");
+//            if (success.equals("true")) {
+//                JSONObject data = jsonObject.getJSONObject("data");
+//                String code = data.getString("code");
+//                String ncid = data.getString("ncid");
+//                ParkRoom model = new ParkRoom();
+//                model.setId(id);
+//                model.setNcid(ncid);
+//                model.setNcCode(code);
+//                updateByPrimaryKeySelective(model);
+//            }
+//        } catch (Exception e) {
+//            log.error("推送房间失败", e);
+//        }
         return result;
 
     }

+ 25 - 25
pro-base/src/main/java/com/idea/customerManagement/service/CustomerManagementService.java

@@ -236,31 +236,31 @@ public class CustomerManagementService implements BaseService<CustomerManagement
         model.setCreatedId(userId);
         int result = insertWithOutId(model);
 
-        try {
-            // 给nc推送客户数据
-            JSONObject json = new JSONObject();
-            json.put("srcsystemid", id);
-            json.put("name", builder.toString());
-            json.put("pk_custclass", "02"); //客户基本分类 ,,(默认是02),必选,01内部客户,02外部客户
-            json.put("custprop", "0");//财务组织客户类型,必选,默认0
-            json.put("taxpayerid",identityCardBuilder.toString() ); //统一社会信用代码,必选
-            log.info("推送客户详情:{}", json.toJSONString());
-            String resultJson = InvoiceUtil.customerAdd(json);
-            JSONObject jsonObject = JSONObject.parseObject(resultJson);
-            String success = jsonObject.getString("success");
-            if (success.equals("true")) {
-                JSONObject data = jsonObject.getJSONObject("data");
-                String code = data.getString("code");
-                String ncid = data.getString("ncid");
-                CustomerManagement record = new CustomerManagement();
-                record.setId(id);
-                record.setNcid(ncid);
-                record.setNcCode(code);
-                updateByPrimaryKeySelective(record);
-            }
-        }catch (Exception e){
-            log.error("推送客户失败",e);
-        }
+//        try {
+//            // 给nc推送客户数据
+//            JSONObject json = new JSONObject();
+//            json.put("srcsystemid", id);
+//            json.put("name", builder.toString());
+//            json.put("pk_custclass", "02"); //客户基本分类 ,,(默认是02),必选,01内部客户,02外部客户
+//            json.put("custprop", "0");//财务组织客户类型,必选,默认0
+//            json.put("taxpayerid",identityCardBuilder.toString() ); //统一社会信用代码,必选
+//            log.info("推送客户详情:{}", json.toJSONString());
+//            String resultJson = InvoiceUtil.customerAdd(json);
+//            JSONObject jsonObject = JSONObject.parseObject(resultJson);
+//            String success = jsonObject.getString("success");
+//            if (success.equals("true")) {
+//                JSONObject data = jsonObject.getJSONObject("data");
+//                String code = data.getString("code");
+//                String ncid = data.getString("ncid");
+//                CustomerManagement record = new CustomerManagement();
+//                record.setId(id);
+//                record.setNcid(ncid);
+//                record.setNcCode(code);
+//                updateByPrimaryKeySelective(record);
+//            }
+//        }catch (Exception e){
+//            log.error("推送客户失败",e);
+//        }
 
 //        try {
 //            // 客户分配

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

@@ -410,16 +410,16 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
         }
         customerManagement.setHouseName(builder.toString());
         customerManagementMapper.updateByPrimaryKeySelective(customerManagement);
-        try {
-            ParkInfo parkInfo = parkInfoMapper.selectByPrimaryKey(response.getGroupId());
-            // 客户分配
-            JSONObject json = new JSONObject();
-            json.put("pk_org", parkInfo.getOrganizationalCode());
-            json.put("ncid", customerManagement.getBuyerIdentityCard());
-            InvoiceUtil.customerAssign(json);
-        } catch (Exception e) {
-            log.error("客户分配失败", e);
-        }
+//        try {
+//            ParkInfo parkInfo = parkInfoMapper.selectByPrimaryKey(response.getGroupId());
+//            // 客户分配
+//            JSONObject json = new JSONObject();
+//            json.put("pk_org", parkInfo.getOrganizationalCode());
+//            json.put("ncid", customerManagement.getBuyerIdentityCard());
+//            InvoiceUtil.customerAssign(json);
+//        } catch (Exception e) {
+//            log.error("客户分配失败", e);
+//        }