Przeglądaj źródła

Merge commit '5dfa466aa8c00bde068a65d5af7c379efa279c7e' into release

release_toaliyun_real
luozukai 6 lat temu
rodzic
commit
06ef6419cd
5 zmienionych plików z 25 dodań i 6 usunięć
  1. +14
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/device/KwMeterController.java
  2. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxRentPropertyContractVo.java
  3. +5
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  5. +2
    -1
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 14
- 1
mallinkAdmin/src/main/java/com/iformall/controller/device/KwMeterController.java Wyświetl plik

@@ -177,6 +177,17 @@ public class KwMeterController extends BaseController {
kwMerchantMeterService.saveOrUpdate(kwMerchantMeter);
}

private void addOrUpdate(KwMeter kwMeter) {
KwMeter record = new KwMeter();
record.setTenantId(getTenantId());
record.setAddress(kwMeter.getAddress());
record.setStatus(EnumMeterStatus.VALID.getCode());
List<KwMeter> kwMeters = kwMeterService.findList(record);
if (kwMeters.size() > 0)
kwMeter.setId(kwMeters.get(0).getId());
kwMeterService.saveOrUpdate(kwMeter);
}

@ApiOperation("导入设备")
@PostMapping(value = "import", consumes = "multipart/*")
@SystemControllerLog(description = "电表管理-导入数据")
@@ -190,6 +201,8 @@ public class KwMeterController extends BaseController {
XSSFSheet sheet = workbook.getSheetAt(0);
for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) {
XSSFRow row = sheet.getRow(i);
if (row == null)
continue;
KwMeter kwMeter = new KwMeter();
Cell c = row.getCell(0,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL);
if (c != null) {
@@ -226,7 +239,7 @@ public class KwMeterController extends BaseController {
kwMeter.setBoxId(kwBox.getId());
}

add(kwMeter);
addOrUpdate(kwMeter);

c = row.getCell(7,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL);
if (c != null) {


+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxRentPropertyContractVo.java Wyświetl plik

@@ -74,5 +74,8 @@ public class WxRentPropertyContractVo extends BaseEntity {

@io.swagger.annotations.ApiModelProperty(value = "物业费单价单位", name = "propertyPriceUnit")
private Integer propertyPriceUnit;

@io.swagger.annotations.ApiModelProperty(value = "审批流类型", name = "businessType")
private Integer businessType;
}


+ 5
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Wyświetl plik

@@ -18,7 +18,6 @@ import com.iformall.mapper.*;
import com.iformall.mq.MqBaseProducer;
import com.iformall.service.*;
import com.iformall.utils.Constant;
import com.iformall.utils.DateUtils;
import com.iformall.utils.JsonUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.map.HashedMap;
@@ -42,7 +41,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -167,7 +165,11 @@ public class WxFlowServiceImpl implements WxFlowService {
|| EnumFlowKey.NEW_RENT_END.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_POINT_CONTRACT_END.getCode().equals(flowType)
){
if(EnumFlowContractType.RENT.getCode().equals(contractType) || EnumFlowContractType.RENT_POINT.getCode().equals(contractType) ){
if(EnumFlowContractType.RENT.getCode().equals(contractType) ||
EnumFlowContractType.RENT_POINT.getCode().equals(contractType) ||
EnumFlowContractType.RENT_POINT.getCode().equals(contractType) ||
EnumFlowContractType.WHOLE_SHOP.getCode().equals(contractType) ||
EnumFlowContractType.WHOLE_POINT.getCode().equals(contractType)){
WxRentContract rent = new WxRentContract();
rent.setId(businessId);
rent.setApplyStatus(applyStatus);


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Wyświetl plik

@@ -1139,7 +1139,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
SimpleDateFormat sdMR = new SimpleDateFormat("MM-dd");
SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM");
if(i == billTimeVoListSize - 1){//最后
if(sdMR.format(startDate).equals(sdMR.format(wxRentContract.getStartDate())) && sdMR.format(endDate).equals(sdMR.format(wxRentContract.getEndDate())) ){
if(sdMR.format(startDate).equals(sdMR.format(wxRentContract.getRentalStartDate())) && sdMR.format(endDate).equals(sdMR.format(wxRentContract.getRentalEndDate())) ){
int months = getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01");
months++;
needpay = new Double(months * priceD).longValue();


+ 2
- 1
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml Wyświetl plik

@@ -326,7 +326,8 @@
select rc.id,rc.merchant_name,rc.rental_start_date,rc.rental_end_date,rc.`status`,
rc.price as rent_price,rc.contract_number,s.shop_number,rc.type,rc.apply_status,
rc.rent_shop_type,rc.rent_info,pc.price as property_price,rc.merchant_id,pc.`status` as property_status,
rc.price_unit as rent_price_unit,pc.price_unit as property_price_unit
rc.price_unit as rent_price_unit,pc.price_unit as property_price_unit,
rc.business_type businessType
from wx_rent_contract rc left join wx_property_contract pc on rc.id=pc.rent_contract_id
left join wx_shop s on rc.shop_id=s.id
<where>


Ładowanie…
Anuluj
Zapisz