jialh
1 天以前 dd6687b118561100e1677e88a9c2f5842a54c531
service-store/src/main/java/com/java110/store/api/ContractApi.java
@@ -202,10 +202,10 @@
        Assert.hasKeyAndValue(reqJson, "contractType", "请求报文中未包含contractType");
        Assert.hasKeyAndValue(reqJson, "partyA", "请求报文中未包含partyA");
        Assert.hasKeyAndValue(reqJson, "partyB", "请求报文中未包含partyB");
        Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
        Assert.hasKeyAndValue(reqJson, "aLink", "请求报文中未包含aLink");
        Assert.hasKeyAndValue(reqJson, "bContacts", "请求报文中未包含bContacts");
        Assert.hasKeyAndValue(reqJson, "bLink", "请求报文中未包含bLink");
//        Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
//        Assert.hasKeyAndValue(reqJson, "aLink", "请求报文中未包含aLink");
//        Assert.hasKeyAndValue(reqJson, "bContacts", "请求报文中未包含bContacts");
//        Assert.hasKeyAndValue(reqJson, "bLink", "请求报文中未包含bLink");
        Assert.hasKeyAndValue(reqJson, "operator", "请求报文中未包含operator");
        Assert.hasKeyAndValue(reqJson, "operatorLink", "请求报文中未包含operatorLink");
        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
@@ -215,6 +215,7 @@
        ContractPo contractPo = BeanConvertUtil.covertBean(reqJson, ContractPo.class);
        contractPo.setStoreId(storeId);
        contractPo.setStartUserId(userId);
        contractPo.setCommunityId(reqJson.getString("communityId"));
        if (!reqJson.containsKey("contractParentId") || "-1".equals(reqJson.getString("contractParentId"))) {
            contractPo.setContractParentId("-1");
        }
@@ -248,34 +249,36 @@
    @RequestMapping(value = "/updateContract", method = RequestMethod.POST)
    public ResponseEntity<String> updateContract(@RequestBody JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "contractCode", "请求报文中未包含contractCode");
        Assert.hasKeyAndValue(reqJson, "contractName", "请求报文中未包含contractName");
        Assert.hasKeyAndValue(reqJson, "contractType", "请求报文中未包含contractType");
        Assert.hasKeyAndValue(reqJson, "partyA", "请求报文中未包含partyA");
        Assert.hasKeyAndValue(reqJson, "partyB", "请求报文中未包含partyB");
        Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
        Assert.hasKeyAndValue(reqJson, "aLink", "请求报文中未包含aLink");
        Assert.hasKeyAndValue(reqJson, "bContacts", "请求报文中未包含bContacts");
        Assert.hasKeyAndValue(reqJson, "bLink", "请求报文中未包含bLink");
        Assert.hasKeyAndValue(reqJson, "operator", "请求报文中未包含operator");
        Assert.hasKeyAndValue(reqJson, "operatorLink", "请求报文中未包含operatorLink");
        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
        Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
        Assert.hasKeyAndValue(reqJson, "signingTime", "请求报文中未包含signingTime");
        Assert.hasKeyAndValue(reqJson, "contractId", "contractId不能为空");
//        Assert.hasKeyAndValue(reqJson, "contractCode", "请求报文中未包含contractCode");
//        Assert.hasKeyAndValue(reqJson, "contractName", "请求报文中未包含contractName");
//        Assert.hasKeyAndValue(reqJson, "contractType", "请求报文中未包含contractType");
//        Assert.hasKeyAndValue(reqJson, "partyA", "请求报文中未包含partyA");
//        Assert.hasKeyAndValue(reqJson, "partyB", "请求报文中未包含partyB");
//        Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
//        Assert.hasKeyAndValue(reqJson, "aLink", "请求报文中未包含aLink");
//        Assert.hasKeyAndValue(reqJson, "bContacts", "请求报文中未包含bContacts");
//        Assert.hasKeyAndValue(reqJson, "bLink", "请求报文中未包含bLink");
//        Assert.hasKeyAndValue(reqJson, "operator", "请求报文中未包含operator");
//        Assert.hasKeyAndValue(reqJson, "operatorLink", "请求报文中未包含operatorLink");
//        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
//        Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
//        Assert.hasKeyAndValue(reqJson, "signingTime", "请求报文中未包含signingTime");
//        Assert.hasKeyAndValue(reqJson, "contractId", "contractId不能为空");
        ContractPo contractPo = BeanConvertUtil.covertBean(reqJson, ContractPo.class);
        ContractDto contractPo = BeanConvertUtil.covertBean(reqJson, ContractDto.class);
        JSONArray contractFiles = reqJson.getJSONArray("contractFilePo");
        List<ContractFilePo> contractFilePos = new ArrayList<>();
        for (int conFileIndex = 0; conFileIndex < contractFiles.size(); conFileIndex++) {
            JSONObject resourceStore = contractFiles.getJSONObject(conFileIndex);
            ContractFilePo contractFilePo = BeanConvertUtil.covertBean(resourceStore, ContractFilePo.class);
            contractFilePo.setContractFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_contractFileId));
            contractFilePos.add(contractFilePo);
        if (contractFiles != null) {
            for (int conFileIndex = 0; conFileIndex < contractFiles.size(); conFileIndex++) {
                JSONObject resourceStore = contractFiles.getJSONObject(conFileIndex);
                ContractFilePo contractFilePo = BeanConvertUtil.covertBean(resourceStore, ContractFilePo.class);
                contractFilePo.setContractFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_contractFileId));
                contractFilePos.add(contractFilePo);
            }
        }
        contractPo.setContractFilePo(contractFilePos);
//        contractPo.setContractFilePo(contractFilePos);
        return updateContractBMOImpl.update(contractPo, reqJson);
    }
@@ -353,7 +356,7 @@
     */
    @RequestMapping(value = "/deleteContract", method = RequestMethod.POST)
    public ResponseEntity<String> deleteContract(@RequestBody JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
//        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
        Assert.hasKeyAndValue(reqJson, "contractId", "contractId不能为空");
@@ -467,10 +470,12 @@
        Assert.hasKeyAndValue(reqJson, "typeName", "请求报文中未包含typeName");
        Assert.hasKeyAndValue(reqJson, "audit", "请求报文中未包含audit");
        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含小区编号");
        ContractTypePo contractTypePo = BeanConvertUtil.covertBean(reqJson, ContractTypePo.class);
        contractTypePo.setStoreId(storeId);
        contractTypePo.setCommunityId(reqJson.getString("communityId"));
        return saveContractTypeBMOImpl.save(contractTypePo);
    }
@@ -526,6 +531,7 @@
                                                    @RequestParam(value = "audit", required = false) String audit,
                                                    @RequestParam(value = "typeName", required = false) String typeName,
                                                    @RequestParam(value = "contractTypeId", required = false) String contractTypeId,
                                                    @RequestParam(value = "communityId", required = false) String communityId,
                                                    @RequestParam(value = "page") int page,
                                                    @RequestParam(value = "row") int row) {
        ContractTypeDto contractTypeDto = new ContractTypeDto();
@@ -534,7 +540,8 @@
        contractTypeDto.setAudit(audit);
        contractTypeDto.setTypeName(typeName);
        contractTypeDto.setContractTypeId(contractTypeId);
        contractTypeDto.setStoreId(storeId);
        contractTypeDto.setStoreId(null);
        contractTypeDto.setCommunityId(communityId);
        return getContractTypeBMOImpl.get(contractTypeDto);
    }
@@ -909,6 +916,7 @@
                                                          @RequestParam(value = "logStartTime", required = false) String logStartTime,
                                                          @RequestParam(value = "logEndTime", required = false) String logEndTime,
                                                          @RequestParam(value = "staffNameLike", required = false) String staffNameLike,
                                                          @RequestParam(value = "communityId", required = false) String communityId,
                                                          @RequestParam(value = "planId", required = false) String planId) {
        ContractChangePlanDto contractChangePlanDto = new ContractChangePlanDto();
        contractChangePlanDto.setPage(page);
@@ -922,6 +930,7 @@
        contractChangePlanDto.setStartTime(logStartTime);
        contractChangePlanDto.setEndTime(logEndTime);
        contractChangePlanDto.setStaffNameLike(staffNameLike);
        contractChangePlanDto.setCommunityId(communityId);
        return getContractChangePlanBMOImpl.get(contractChangePlanDto);
    }
@@ -968,10 +977,10 @@
        Assert.hasKeyAndValue(reqJson, "contractType", "请求报文中未包含contractType");
        Assert.hasKeyAndValue(reqJson, "partyA", "请求报文中未包含partyA");
        Assert.hasKeyAndValue(reqJson, "partyB", "请求报文中未包含partyB");
        Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
        Assert.hasKeyAndValue(reqJson, "aLink", "请求报文中未包含aLink");
        Assert.hasKeyAndValue(reqJson, "bContacts", "请求报文中未包含bContacts");
        Assert.hasKeyAndValue(reqJson, "bLink", "请求报文中未包含bLink");
//        Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
//        Assert.hasKeyAndValue(reqJson, "aLink", "请求报文中未包含aLink");
//        Assert.hasKeyAndValue(reqJson, "bContacts", "请求报文中未包含bContacts");
//        Assert.hasKeyAndValue(reqJson, "bLink", "请求报文中未包含bLink");
        Assert.hasKeyAndValue(reqJson, "operator", "请求报文中未包含operator");
        Assert.hasKeyAndValue(reqJson, "operatorLink", "请求报文中未包含operatorLink");
        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
@@ -1000,10 +1009,10 @@
        Assert.hasKeyAndValue(reqJson, "contractType", "请求报文中未包含contractType");
        Assert.hasKeyAndValue(reqJson, "partyA", "请求报文中未包含partyA");
        Assert.hasKeyAndValue(reqJson, "partyB", "请求报文中未包含partyB");
        Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
        Assert.hasKeyAndValue(reqJson, "aLink", "请求报文中未包含aLink");
        Assert.hasKeyAndValue(reqJson, "bContacts", "请求报文中未包含bContacts");
        Assert.hasKeyAndValue(reqJson, "bLink", "请求报文中未包含bLink");
//        Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts");
//        Assert.hasKeyAndValue(reqJson, "aLink", "请求报文中未包含aLink");
//        Assert.hasKeyAndValue(reqJson, "bContacts", "请求报文中未包含bContacts");
//        Assert.hasKeyAndValue(reqJson, "bLink", "请求报文中未包含bLink");
        Assert.hasKeyAndValue(reqJson, "operator", "请求报文中未包含operator");
        Assert.hasKeyAndValue(reqJson, "operatorLink", "请求报文中未包含operatorLink");
        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");