ソースを参照

fix

release_toaliyun_real
winter 10ヶ月前
コミット
0777e5af3d
8個のファイルの変更68行の追加10行の削除
  1. +21
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxAgileContractController.java
  2. +16
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java
  3. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java
  5. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxAgileContractService.java
  6. +6
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxAgileContractServiceImpl.java
  7. +12
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  8. +7
    -1
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 21
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxAgileContractController.java ファイルの表示

@@ -666,6 +666,27 @@ public class WxAgileContractController extends WxContractBaseController {
return new ResultData();
}
/**
* 设置合同跳点汇算是否按照实际天数来算
*/
@PostMapping("setRevenueJumpByRealDays")
public ResultData setRevenueJumpByRealDays(@RequestBody WxRentContract rentContract) {
if (null == rentContract.getId() || null == rentContract.getRevenueJumpByRealDays()) {
return new ResultData(Result.ERROR,"参数错误");
}
rentContract.updateTenantInfo(getTenantInfo());
WxRentContract rc = wxAgileContractService.selectById(rentContract.getId());
if (null == rc) {
return new ResultData(Result.ERROR,"合同未查询到");
}
try {
wxAgileContractService.updateRevenueJumpByRealDays(rentContract);
}catch(Exception e) {
return new ResultData(Result.ERROR,"保存信息失败:"+e.getMessage());
}
return new ResultData();
}
@ApiOperation("分页列表接口")
@GetMapping("billList")


+ 16
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java ファイルの表示

@@ -413,6 +413,22 @@ public class WxRentContractController extends WxContractBaseController {
return new ResultData(wxRentContractService.setRevenueSales(this.getUser(),rentContract,wxRentContract.getSalesMoney(),wxRentContract.getSalesStartTime(),wxRentContract.getSalesEndTime()));
}
//查询合同年度汇算账单列表
@GetMapping("getRevenueSalesBills")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
public ResultData getRevenueSalesBills(@ModelAttribute WxRentContract wxRentContract, Integer pageNum, Integer pageSize) {
if (null == wxRentContract) wxRentContract = new WxRentContract();
WxRentContract rentContract = wxRentContractMapper.selectById(wxRentContract.getId());
WxAllBill billd = new WxAllBill();
billd.updateTenantInfo(rentContract);
billd.setRentContractId(rentContract.getId());
billd.setExtraCreateFrom(EnumBillExtraCreateFrom.RNET_REVENUE_SALES.getCode());
billd.setStarttimeEqual(wxRentContract.getSalesStartTime());
return new ResultData(wxAllBillService.listAsPage(billd,pageNum,pageSize));
}
//查询合同年限
@GetMapping("getContractYears")
public ResultData getContractYears(@ModelAttribute WxRentContract wxRentContract) {


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java ファイルの表示

@@ -123,6 +123,8 @@ public class WxRentContract extends TenantEntity {
private String remark;
@io.swagger.annotations.ApiModelProperty(value = "来源ID,用于履约中合同修改影子数据", name = "orginId")
private Long orginId;
@io.swagger.annotations.ApiModelProperty(value = "跳点汇算是否按照实际天数来计算EnumYesOrNo", name = "revenueJumpByRealDays")
private Integer revenueJumpByRealDays;
public List<Long> shopIdsByRentInfo() {
List<Long> shopList = Lists.newArrayList();


+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java ファイルの表示

@@ -42,4 +42,6 @@ public interface WxRentContractMapper extends CommonMapper<WxRentContract, Long>
List<WxRentContract> findToEndContractList(WxRentContract rentContract);
void setOrgIdNull(@Param("tenantId") String tenantId,@Param("id") Long id,@Param("orgId") Long orgId);
void setRevenueJumpByRealDays(WxRentContract rentContract);
}

+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxAgileContractService.java ファイルの表示

@@ -92,4 +92,6 @@ public interface WxAgileContractService {
void deleteContract(Long id,TenantEntity tenantEntity);
void deleteContractFees(Long id,TenantEntity tenantEntity);
void updateRevenueJumpByRealDays(WxRentContract rentContract);
}

+ 6
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxAgileContractServiceImpl.java ファイルの表示

@@ -1333,7 +1333,7 @@ public class WxAgileContractServiceImpl implements WxAgileContractService {
ari.setRentContractId(newContractId);
ari.setRenevueId(renevueId);
ari.setBeginTime(rentContract.getRentalStartDate());
ari.setBeginTime(rentContract.getRentalEndDate());
ari.setEndTime(rentContract.getRentalEndDate());
ari.setRate("0");
ari.setIsFree(EnumYesOrNo.NO.getCode());
ari.setIsFather(EnumYesOrNo.YES.getCode());
@@ -1518,4 +1518,9 @@ public class WxAgileContractServiceImpl implements WxAgileContractService {
brDel.setIsPreview(EnumYesOrNo.YES.getCode());
wxAllBillMapper.deletePreviewBill(brDel);
}

@Override
public void updateRevenueJumpByRealDays(WxRentContract rentContract) {
wxRentContractMapper.setRevenueJumpByRealDays(rentContract);
}
}

+ 12
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java ファイルの表示

@@ -1284,18 +1284,22 @@ public class WxRentContractServiceImpl implements WxRentContractService {
BigDecimal jumpRevenuePay = jumppays[0];
//BigDecimal jumpRentPay = jumppays[1];
//销售收入不满足一年怎么算。
int yearDays = DateUtils.daysBetween(rentcontract.getYearsBegin(), rentcontract.getYearsEnd())+1;
//闰年是366
if (yearDays >= 365) {
}else {
if (rentcontract.getDayPriceCalcute().intValue() == EnumRentDayPriceCalcute.AVERAGE_DAYS.getCode()) {
jumpRevenuePay = jumpRevenuePay.multiply(new BigDecimal(yearDays)).divide(new BigDecimal(12*rentcontract.getMonthAverageDays()),rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP);
if (null != rentcontract.getRevenueJumpByRealDays() && rentcontract.getRevenueJumpByRealDays().intValue() == EnumYesOrNo.YES.getCode()) {
//销售收入不满足一年怎么算。
int yearDays = DateUtils.daysBetween(rentcontract.getYearsBegin(), rentcontract.getYearsEnd())+1;
//闰年是366
if (yearDays >= 365) {
}else {
jumpRevenuePay = jumpRevenuePay.multiply(new BigDecimal(yearDays)).divide(new BigDecimal(365),rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP);
if (rentcontract.getDayPriceCalcute().intValue() == EnumRentDayPriceCalcute.AVERAGE_DAYS.getCode()) {
jumpRevenuePay = jumpRevenuePay.multiply(new BigDecimal(yearDays)).divide(new BigDecimal(12*rentcontract.getMonthAverageDays()),rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP);
}else {
jumpRevenuePay = jumpRevenuePay.multiply(new BigDecimal(yearDays)).divide(new BigDecimal(365),rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP);
}
}
}
//查询未删除的参与扣点计算的非押金账单或者录入销售额生成的账单之和
BigDecimal receivepay = getAllRenevueBillsReceivePayTotal(rentcontract,rentcontract.getYearsBegin(),rentcontract.getYearsEnd());
if (null == receivepay ){


+ 7
- 1
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml ファイルの表示

@@ -37,6 +37,7 @@
<result column="shop_id_str" jdbcType="VARCHAR" property="shopIdStr"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="orgin_id" jdbcType="BIGINT" property="orginId"/>
<result column="revenue_jump_by_real_days" jdbcType="BIGINT" property="revenueJumpByRealDays"/>
</resultMap>

<sql id="allColumns">
@@ -51,7 +52,7 @@
`apply_status`,`create_by_name`,`update_by_name`,
`rent_info`, `file_names`,
shop_id_str,
design_file,remark,orgin_id
design_file,remark,orgin_id,revenue_jump_by_real_days
</sql>


@@ -60,6 +61,7 @@
<if test=" null != id ">and `id` = #{id}</if>
<if test=" null != fromId ">and `from_id` = #{fromId}</if>
<if test=" null != orginId ">and `orgin_id` = #{orginId}</if>
<if test=" null != revenueJumpByRealDays ">and `revenue_jump_by_real_days` = #{revenueJumpByRealDays}</if>
<if test=" null != customersId ">and `customers_id` = #{customersId}</if>
<if test=" null != rentalStartDate and '' != rentalStartDate">and `rental_start_date` = #{rentalStartDate}</if>
<if test=" null != rentalEndDate and '' != rentalEndDate">and `rental_end_date` = #{rentalEndDate}</if>
@@ -247,5 +249,9 @@
update wx_rent_contract set orgin_id = null,remark=concat('来自',#{orgId},'编辑') where id = #{id} and `tenant_id` = #{tenantId}
</update>
<update id = "setRevenueJumpByRealDays" parameterType="com.iformall.domain.po.WxRentContract" >
update wx_rent_contract set revenue_jump_by_real_days = #{revenueJumpByRealDays} where id = #{id} and `tenant_id` = #{tenantId}
</update>
</mapper>


読み込み中…
キャンセル
保存