| @@ -7,9 +7,11 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxBillProperty; | |||
| import com.iformall.domain.po.WxBillRent; | |||
| import com.iformall.service.WxBillPropertyService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -61,6 +63,14 @@ public class WxBillPropertyController extends BaseController { | |||
| return wxBillPropertyService.saveOrUpdate(wxBillProperty, getUser()); | |||
| } | |||
| @ApiOperation("修改滞纳金") | |||
| @PostMapping("updateLatePayMoney") | |||
| @SystemControllerLog(description = "修改滞纳金") | |||
| public ResultData updateLatePayMoney(@RequestBody WxBillProperty wxBillProperty) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateLatePayMoney"); | |||
| return wxBillPropertyService.updateLatePayMoney(wxBillProperty, getUser()); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业账单-删除") | |||
| @@ -10,6 +10,7 @@ import com.iformall.domain.po.WxBillRent; | |||
| import com.iformall.service.WxBillRentService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -60,6 +61,14 @@ public class WxBillRentController extends BaseController { | |||
| return wxBillRentService.saveOrUpdate(wxBillRent, getUser()); | |||
| } | |||
| @ApiOperation("修改滞纳金") | |||
| @PostMapping("updateLatePayMoney") | |||
| @SystemControllerLog(description = "修改滞纳金") | |||
| public ResultData updateLatePayMoney(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateLatePayMoney"); | |||
| return wxBillRentService.updateLatePayMoney(wxBillRent, getUser()); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金账单-删除") | |||
| @@ -176,4 +176,10 @@ public class WxBillProperty extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "n日后开始计算滞纳金", name = "latePayRatio") | |||
| @Transient | |||
| private Integer latePayDay; | |||
| @Transient | |||
| private String latePayMoneyBefore; | |||
| @Transient | |||
| private String latePayMoneyUpdate; | |||
| } | |||
| @@ -189,5 +189,10 @@ public class WxBillRent extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "n日后开始计算滞纳金", name = "latePayRatio") | |||
| @Transient | |||
| private Integer latePayDay; | |||
| @Transient | |||
| private String latePayMoneyBefore; | |||
| @Transient | |||
| private String latePayMoneyUpdate; | |||
| } | |||
| @@ -45,6 +45,14 @@ public interface WxBillPropertyService { | |||
| */ | |||
| ResultData saveOrUpdate(WxBillProperty record, MallUserInfo user); | |||
| /** | |||
| * 修改滞纳金 | |||
| * | |||
| * @param record | |||
| * @param user | |||
| */ | |||
| ResultData updateLatePayMoney(WxBillProperty record, MallUserInfo user); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| @@ -42,6 +42,14 @@ public interface WxBillRentService { | |||
| */ | |||
| ResultData saveOrUpdate(WxBillRent record, MallUserInfo user); | |||
| /** | |||
| * 修改滞纳金 | |||
| * @param record | |||
| * @param user | |||
| * @return | |||
| */ | |||
| ResultData updateLatePayMoney(WxBillRent record, MallUserInfo user); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| @@ -10,6 +10,7 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBillActionMapper; | |||
| import com.iformall.mapper.WxBillPropertyDepositMapper; | |||
| import com.iformall.mapper.WxBillPropertyMapper; | |||
| import com.iformall.service.ExcelService; | |||
| @@ -48,6 +49,9 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| @Autowired | |||
| ExcelService excelService; | |||
| @Autowired | |||
| WxBillActionMapper wxBillActionMapper; | |||
| @Override | |||
| public PageInfo<WxBillProperty> listAsPage(WxBillProperty record, Integer pageIndex, Integer pageSize) { | |||
| PageHelper.startPage(pageIndex, pageSize); | |||
| @@ -166,9 +170,6 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| property.setPayDate(record.getPayDate()); | |||
| property.setUpdatetime(date); | |||
| property.setPayWay(record.getPayWay()); | |||
| if(record.getLatePayPriceStr() != null) { | |||
| property.setLatePayPrice(Long.parseLong(record.getLatePayPriceStr()) * 100); | |||
| } | |||
| try { | |||
| wxBillPropertyMapper.updateByPrimaryKeySelective(property); | |||
| } catch (Exception e) { | |||
| @@ -298,4 +299,24 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| public List<WxBillProperty> findLatePayBill() { | |||
| return wxBillPropertyMapper.findLatePayBill(); | |||
| } | |||
| @Override | |||
| public ResultData updateLatePayMoney(WxBillProperty record, MallUserInfo user) { | |||
| if(record.getLatePayMoneyUpdate() != null) { | |||
| record.setLatePayPrice(Long.parseLong(record.getLatePayMoneyUpdate()) * 100); | |||
| } | |||
| wxBillPropertyMapper.updateByPrimaryKeySelective(record); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxBillAction billAction = new WxBillAction(); | |||
| billAction.setId(idWorker.nextId()); | |||
| billAction.setCreatetime(new Date()); | |||
| billAction.setUserName("系统端"); | |||
| billAction.setAction(EnumBillAction.UPDATE_LATE_PAY_MONEY.getCode()); | |||
| billAction.setBillId(record.getId()); | |||
| billAction.setDetails(record.getLatePayMoneyBefore()+"元变更为" +record.getLatePayMoneyUpdate()+"元"); | |||
| billAction.setUpdatetime(new Date()); | |||
| wxBillActionMapper.insertSelective(billAction); | |||
| return new ResultData(); | |||
| } | |||
| } | |||
| @@ -10,6 +10,7 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBillActionMapper; | |||
| import com.iformall.mapper.WxBillDepositMapper; | |||
| import com.iformall.mapper.WxBillRentMapper; | |||
| import com.iformall.service.ExcelService; | |||
| @@ -48,6 +49,9 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| @Autowired | |||
| ExcelService excelService; | |||
| @Autowired | |||
| WxBillActionMapper wxBillActionMapper; | |||
| @Override | |||
| public PageInfo<WxBillRent> listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize) { | |||
| PageHelper.startPage(pageIndex, pageSize); | |||
| @@ -165,10 +169,6 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| wxBillRent.setPayDate(record.getPayDate()); | |||
| wxBillRent.setUpdatetime(date); | |||
| wxBillRent.setPayWay(record.getPayWay()); | |||
| if(record.getLatePayPriceStr() != null) { | |||
| wxBillRent.setLatePayPrice(Long.parseLong(record.getLatePayPriceStr()) * 100); | |||
| } | |||
| try { | |||
| wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); | |||
| } catch (Exception e) { | |||
| @@ -335,4 +335,24 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| public List<WxBillRent> findLatePayBill() { | |||
| return wxBillRentMapper.findLatePayBill(); | |||
| } | |||
| @Override | |||
| public ResultData updateLatePayMoney(WxBillRent record, MallUserInfo user) { | |||
| if(record.getLatePayMoneyUpdate() != null) { | |||
| record.setLatePayPrice(Long.parseLong(record.getLatePayMoneyUpdate()) * 100); | |||
| } | |||
| wxBillRentMapper.updateByPrimaryKeySelective(record); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxBillAction billAction = new WxBillAction(); | |||
| billAction.setId(idWorker.nextId()); | |||
| billAction.setCreatetime(new Date()); | |||
| billAction.setUserName("系统端"); | |||
| billAction.setAction(EnumBillAction.UPDATE_LATE_PAY_MONEY.getCode()); | |||
| billAction.setBillId(record.getId()); | |||
| billAction.setDetails(record.getLatePayMoneyBefore()+"元变更为" +record.getLatePayMoneyUpdate()+"元"); | |||
| billAction.setUpdatetime(new Date()); | |||
| wxBillActionMapper.insertSelective(billAction); | |||
| return new ResultData(); | |||
| } | |||
| } | |||