Ver código fonte

fix

release_toaliyun_real
winter 1 ano atrás
pai
commit
70bb3b4d63
5 arquivos alterados com 133 adições e 28 exclusões
  1. +20
    -18
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java
  2. +1
    -0
      mallinkAdmin/src/main/resources/db/migration/V202410000000001.sql
  3. +77
    -4
      mallinkService/src/main/java/com/iformall/domain/po/WxFinanceFinish.java
  4. +28
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java
  5. +7
    -5
      mallinkService/src/main/resources/mapper/WxFinanceFinishMapper.xml

+ 20
- 18
mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java Ver arquivo

@@ -601,7 +601,7 @@ public class WxFinanceController extends BaseController {
return new ResultData(list);
}
@ApiOperation("结账列表")
@ApiOperation("交款列表")
@GetMapping("finishList")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@@ -614,7 +614,7 @@ public class WxFinanceController extends BaseController {
return new ResultData(page);
}
@ApiOperation("结账")
@ApiOperation("新增交款")
@PostMapping("saveFinish")
public ResultData saveFinish(@RequestBody WxFinanceFinish record) {
record.updateTenantInfo(getTenantInfo());
@@ -622,22 +622,6 @@ public class WxFinanceController extends BaseController {
return new ResultData();
}
@ApiOperation("结账列表")
@GetMapping("finishReceiveList")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true),
})
public ResultData finishList(@ModelAttribute WxFinanceReceive record, Integer pageNum, Integer pageSize) {
if (null == record.getFinishId()) {
return new ResultData(Result.ERROR,"finishId参数不能为空");
}
record.updateTenantInfo(getTenantInfo());
record.setSortColumns("status asc,create_time asc");
PageInfo<WxFinanceReceiveVo> page = wxFinanceService.receiveVoListAsPage(record, pageNum, pageSize);
return new ResultData(page);
}
@ApiOperation("批次结账统计合计")
@GetMapping("finishReceiveSum")
public ResultData finishReceiveSum(@ModelAttribute WxFinanceReceive record, Integer pageNum, Integer pageSize) {
@@ -671,6 +655,24 @@ public class WxFinanceController extends BaseController {
return new ResultData(page);
}
@ApiOperation("交款收付款单列表")
@GetMapping("finishReceiveList")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true),
})
public ResultData finishList(@ModelAttribute WxFinanceReceive record, Integer pageNum, Integer pageSize) {
if (null == record.getFinishId()) {
return new ResultData(Result.ERROR,"finishId参数不能为空");
}
record.updateTenantInfo(getTenantInfo());
record.setSortColumns("status asc,create_time asc");
PageInfo<WxFinanceReceiveVo> page = wxFinanceService.receiveVoListAsPage(record, pageNum, pageSize);
return new ResultData(page);
}
@ApiOperation("结账")
@PostMapping("receiveFinish")
public ResultData receiveFinish(@RequestBody WxFinanceFinish record) {


+ 1
- 0
mallinkAdmin/src/main/resources/db/migration/V202410000000001.sql Ver arquivo

@@ -0,0 +1 @@
ALTER TABLE wx_finance_finish DROP COLUMN NAME;

+ 77
- 4
mallinkService/src/main/java/com/iformall/domain/po/WxFinanceFinish.java Ver arquivo

@@ -64,14 +64,87 @@ public class WxFinanceFinish extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "remark", name = "remark")
private String backRemark;
@io.swagger.annotations.ApiModelProperty(value = "startDate", name = "startDate")
@io.swagger.annotations.ApiModelProperty(value = "交款开始日期", name = "startDate")
private Date startDate;
@io.swagger.annotations.ApiModelProperty(value = "endDate", name = "endDate")
@io.swagger.annotations.ApiModelProperty(value = "交款结束日期", name = "endDate")
private Date endDate;
@io.swagger.annotations.ApiModelProperty(value = "name", name = "name")
private String name;
@io.swagger.annotations.ApiModelProperty(value = "审核时间", name = "auditTime")
private Date auditTime;
@io.swagger.annotations.ApiModelProperty(value="审核人",name="auditBy")
private Long auditBy;
@io.swagger.annotations.ApiModelProperty(value="审核人姓名",name="auditByName")
private String auditByName;
@io.swagger.annotations.ApiModelProperty(value="楼栋",name="buildings")
private String buildings;
@TableField(exist = false)
private List<Long> buildindIds;
public List<Long> getBuildindIds() {
if (StringUtils.isNotBlank(buildings)) {
List<Long> bids = new ArrayList<Long>();
String[] bs = buildings.split(",");
if (null != bs && bs.length > 0 ) {
for (int i = 0 ; i < bs.length ; i ++) {
String _bs = bs[i];
if (StringUtils.isNotBlank(_bs)) {
bids.add(Long.parseLong(_bs));
}
}
}
buildindIds = bids;
return buildindIds;
}
return null;
}
@io.swagger.annotations.ApiModelProperty(value="科目",name="fees")
private String fees;
@TableField(exist = false)
private List<Long> feesIds;
public List<Long> getFeesIds() {
if (StringUtils.isNotBlank(fees)) {
List<Long> bids = new ArrayList<Long>();
String[] bs = fees.split(",");
if (null != bs && bs.length > 0 ) {
for (int i = 0 ; i < bs.length ; i ++) {
String _bs = bs[i];
if (StringUtils.isNotBlank(_bs)) {
bids.add(Long.parseLong(_bs));
}
}
}
feesIds = bids;
return feesIds;
}
return null;
}
@io.swagger.annotations.ApiModelProperty(value="支付方式",name="payways")
private String payways;
@TableField(exist = false)
private List<Long> paywaysIds;
public List<Long> getPaywaysIds() {
if (StringUtils.isNotBlank(payways)) {
List<Long> bids = new ArrayList<Long>();
String[] bs = payways.split(",");
if (null != bs && bs.length > 0 ) {
for (int i = 0 ; i < bs.length ; i ++) {
String _bs = bs[i];
if (StringUtils.isNotBlank(_bs)) {
bids.add(Long.parseLong(_bs));
}
}
}
paywaysIds = bids;
return paywaysIds;
}
return null;
}
@TableField(exist = false)
private List<Long> receiveIds;


+ 28
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java Ver arquivo

@@ -1476,7 +1476,7 @@ public class WxFinanceServiceImpl implements WxFinanceService {
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class})
@Override
public void redSetoffReceive(WxFinanceReceive record, MallUserInfo user) {
invalidReceive(record, user , true);
//invalidReceive(record, user , true);
copyRedSetOffReceive(record);
}
@@ -1496,6 +1496,8 @@ public class WxFinanceServiceImpl implements WxFinanceService {
}
record.setStatus(EnumFinanceReceiveStatus.RED_SETOFF.getCode());
record.setParentId(oldRecordId);
record.setCreateTime(new Date());
record.setUpdateTime(new Date());
wxFinanceReceiveMapper.insert(record);
WxFinanceReceiveBill rbq = new WxFinanceReceiveBill();
@@ -1514,9 +1516,34 @@ public class WxFinanceServiceImpl implements WxFinanceService {
rb.setPay("-"+rb.getPay());
}
rb.setReceiveId(record.getId());
rb.setCreateTime(new Date());
rb.setUpdateTime(new Date());
wxFinanceReceiveBillMapper.insert(rb);
}
}
//复制支付方式
WxFinanceReceivePayway rpq = new WxFinanceReceivePayway();
rpq.updateTenantInfo(record);
rpq.setReceiveId(record.getId());
rpq.setUpdateTime(new Date());
List<WxFinanceReceivePayway> plist = wxFinanceReceivePaywayMapper.findList(rpq);
if (null != plist ) {
for (int i = 0 ; i < plist.size() ; i++ ) {
WxFinanceReceivePayway rb = plist.get(i);
rb.setId(idWorker.nextId());
if (StringUtils.isNotBlank(rb.getReceive())) {
rb.setReceive("-"+rb.getReceive());
}
if (StringUtils.isNotBlank(rb.getPay())) {
rb.setPay("-"+rb.getPay());
}
rb.setReceiveId(record.getId());
rb.setCreateTime(new Date());
rb.setUpdateTime(new Date());
wxFinanceReceivePaywayMapper.insert(rb);
}
}
}
@Override


+ 7
- 5
mallinkService/src/main/resources/mapper/WxFinanceFinishMapper.xml Ver arquivo

@@ -16,12 +16,17 @@
<result column="back_remark" jdbcType="VARCHAR" property="backRemark"/>
<result column="start_date" jdbcType="TIMESTAMP" property="startDate"/>
<result column="end_date" jdbcType="TIMESTAMP" property="endDate"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime"/>
<result column="audit_by" jdbcType="BIGINT" property="auditBy"/>
<result column="audit_by_name" jdbcType="VARCHAR" property="auditByName"/>
<result column="buildings" jdbcType="VARCHAR" property="buildings"/>
<result column="fees" jdbcType="VARCHAR" property="fees"/>
<result column="payways" jdbcType="VARCHAR" property="payways"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`create_by`,`create_by_name`,`update_by`,`update_by_name`,
`status`,`remark`,`back_remark`,`start_date`,`end_date`,`name`
`status`,`remark`,`back_remark`,`start_date`,`end_date`,`audit_time`,`audit_by`,`audit_by_name`,`buildings,`fees`,`payways`
</sql>

<sql id="dynamicWhereConditions">
@@ -34,9 +39,6 @@
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != status ">and `status` = #{status}</if>
<if test=" null != name and ''!=name">
and `name` like concat('%', #{name},'%')
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


Carregando…
Cancelar
Salvar