Bläddra i källkod

fix

release_toaliyun_real
winter 1 år sedan
förälder
incheckning
4ed1744f13
12 ändrade filer med 74 tillägg och 22 borttagningar
  1. +12
    -6
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java
  2. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java
  3. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxFinanceReceive.java
  4. +2
    -1
      mallinkService/src/main/java/com/iformall/enums/EnumFinanceReceiveStatus.java
  5. +3
    -1
      mallinkService/src/main/java/com/iformall/enums/EnumFlowKey.java
  6. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxFinanceReceiveMapper.java
  7. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxFinanceService.java
  8. +3
    -2
      mallinkService/src/main/java/com/iformall/service/WxFlowService.java
  9. +13
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java
  10. +25
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  11. +8
    -0
      mallinkService/src/main/resources/mapper/WxFinanceReceiveMapper.xml
  12. +1
    -1
      mallinkTTAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java

+ 12
- 6
mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java Visa fil

@@ -8,6 +8,7 @@ import com.iformall.common.ResultData;
import com.iformall.common.SysConfigConstant;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.dto.FinanceSetOffDTO;
import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.SysConfig;
import com.iformall.domain.po.WxAllBill;
import com.iformall.domain.po.WxBillPayWay;
@@ -26,6 +27,7 @@ import com.iformall.enums.EnumContractOperationType;
import com.iformall.enums.EnumFinanceCashierType;
import com.iformall.enums.EnumFinanceFinishStatus;
import com.iformall.enums.EnumFinanceReceiveStatus;
import com.iformall.enums.EnumFlowContractType;
import com.iformall.enums.EnumFlowKey;
import com.iformall.enums.EnumRentShopType;
import com.iformall.enums.EnumYesOrNo;
@@ -448,17 +450,21 @@ public class WxFinanceController extends BaseController {
if (StringUtils.isNotBlank(record.getRemark())) {
receive.setRemark(record.getRemark());
}
MallUserInfo user = getUser();
WxFlowModel wxFlowModel = new WxFlowModel();
wxFlowModel.setFlowType(EnumFlowKey.NEW_RENT_CONTRACT.getCode());
wxFlowModel.setFlowType(EnumFlowKey.FINANCE_RED.getCode());
wxFlowModel.updateTenantInfo(receive);
List<WxFlowModel> flows = wxFlowService.getModelBybusiness(wxFlowModel);
if (null != flows && flows.size() > 0) {
//return true;
Map<String,Object> map = new HashMap<String,Object>();
map.put("businessType", EnumFlowKey.FINANCE_RED.getCode());
map.put("remark", record.getRemark());
map.put("businessId", String.valueOf(record.getId()));
record.setFlowParams(map);
wxFlowService.start(record.getFlowParams(), user.getId(), user.getName(), receive);
}else {
wxFinanceService.redSetoffReceive(receive, user);
}
wxFinanceService.redSetoffReceive(receive, getUser());
return new ResultData();
}


+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java Visa fil

@@ -181,7 +181,7 @@ public class WxFlowAbleController extends BaseController {
@SystemControllerLog(description = "工作流-撤回")
public ResultData setBack(@RequestBody Map<String, Object> params) {
MallUserInfo user = getUser();
return wxFlowService.setBack(params,user.getId(),user.getName());
return wxFlowService.setBack(params,user.getId(),user.getName(),user);
}




+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxFinanceReceive.java Visa fil

@@ -16,6 +16,7 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
*/
@TableName(value = "wx_finance_receive")
@@ -184,5 +185,7 @@ public class WxFinanceReceive extends TenantEntity {
private Integer finishStatus;
@TableField(exist = false)
private Long finishId;
@TableField(exist = false)
private Map<String, Object> flowParams;

}

+ 2
- 1
mallinkService/src/main/java/com/iformall/enums/EnumFinanceReceiveStatus.java Visa fil

@@ -11,7 +11,8 @@ public enum EnumFinanceReceiveStatus {
NORMAL(1,"正常"),
INVALID(2,"作废"),
RED_SETOFF(3, "红冲"),
AUDITING(4,"红冲审核中")
AUDITING(4,"红冲审核中"),
AUDITING_REJECT(5,"红冲拒绝"),
;

public static EnumFinanceReceiveStatus getEnum(Integer code) {


+ 3
- 1
mallinkService/src/main/java/com/iformall/enums/EnumFlowKey.java Visa fil

@@ -41,7 +41,9 @@ public enum EnumFlowKey {
CASH_OUT(23,"商户提现审批"),

CARD_ORDER_REFUND(31,"消费卡退款审批")
CARD_ORDER_REFUND(31,"消费卡退款审批"),
FINANCE_RED(40,"收付款单红冲审核")
;

public static EnumFlowKey getEnum(Integer code) {


+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxFinanceReceiveMapper.java Visa fil

@@ -27,5 +27,7 @@ public interface WxFinanceReceiveMapper extends CommonMapper<WxFinanceReceive, L
List<WxFinanceReceivePayway> getReceivePayWaySum(WxFinanceReceive record);
void updatePrint(WxFinanceReceive record);
void updateStatus(WxFinanceReceive record);

}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxFinanceService.java Visa fil

@@ -43,6 +43,7 @@ public interface WxFinanceService {
void redSetoffReceive(WxFinanceReceive record,MallUserInfo user);
List<WxFinanceReceiveBill> getReceiveBills(WxFinanceReceiveBill record);
void updateReceivePrint(WxFinanceReceive record);
void updateReceiveStatus(WxFinanceReceive record);
//预收款
List<WxAllBill> calcuetSetOff(FinanceSetOffDTO dto,MallUserInfo user);
FinanceBillSetoffSum getBillSetoffSum(WxFinanceReceive record);


+ 3
- 2
mallinkService/src/main/java/com/iformall/service/WxFlowService.java Visa fil

@@ -2,6 +2,7 @@ package com.iformall.service;

import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData;
import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxFlowConfig;
import com.iformall.domain.po.WxFlowModel;
import com.iformall.domain.po.WxFlowRecord;
@@ -30,7 +31,7 @@ public interface WxFlowService {
* @param mapInfo
* @param applyStatus
*/
void updateBusinessStatus(Map<String, Object> mapInfo,Integer applyStatus);
void updateBusinessStatus(TenantEntity tenantEntity,MallUserInfo starterInfo,Map<String, Object> mapInfo,Integer applyStatus);

ResultData getTaskStatusList(String businessId,TenantEntity tenantEntity);

@@ -76,7 +77,7 @@ public interface WxFlowService {
* @param params
* @return
*/
ResultData setBack(Map<String, Object> params,Long userId,String userName);
ResultData setBack(Map<String, Object> params,Long userId,String userName,TenantEntity tenantEntity);

/**
* 我的申请列表


+ 13
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java Visa fil

@@ -1216,8 +1216,10 @@ public class WxFinanceServiceImpl implements WxFinanceService {
//主收款单作废
record.setStatus(EnumFinanceReceiveStatus.INVALID.getCode());
record.setUpdateTime(new Date());
record.setUpdateBy(user.getId());
record.setUpdateByName(user.getName());
if (null != user) {
record.setUpdateBy(user.getId());
record.setUpdateByName(user.getName());
}
wxFinanceReceiveMapper.updateById(record);
//关联的账单删除
WxFinanceReceiveBill bdel = new WxFinanceReceiveBill();
@@ -1265,8 +1267,10 @@ public class WxFinanceServiceImpl implements WxFinanceService {
}
advance.setUseMoney(advanceUserMoney.subtract(new BigDecimal(rs.getSetoff())).toPlainString());
record.setUpdateTime(new Date());
record.setUpdateBy(user.getId());
record.setUpdateByName(user.getName());
if (null != user) {
record.setUpdateBy(user.getId());
record.setUpdateByName(user.getName());
}
wxAllBillService.saveOrUpdate(advance, user);
}
}
@@ -1349,6 +1353,11 @@ public class WxFinanceServiceImpl implements WxFinanceService {
wxFinanceReceiveMapper.updatePrint(record);
}
@Override
public void updateReceiveStatus(WxFinanceReceive record) {
wxFinanceReceiveMapper.updateStatus(record);
}
@Override
public void redSetoffReceive(WxFinanceReceive record, MallUserInfo user) {
invalidReceive(record, user , true);


+ 25
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Visa fil

@@ -40,6 +40,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
@@ -100,6 +101,9 @@ public class WxFlowServiceImpl implements WxFlowService {
RedisTemplate<String, PageInfo<WxCouponChannelVo>> cdRedisTemplate;
@Autowired
private WxCashOutService wxCashOutService;
@Lazy
@Autowired
WxFinanceService wxFinanceService;

@Override
public void wxFlowConfigInit(String tenantId) {
@@ -164,7 +168,7 @@ public class WxFlowServiceImpl implements WxFlowService {
* @param applyStatus
*/
@Override
public void updateBusinessStatus(Map<String, Object> mapInfo,Integer applyStatus){
public void updateBusinessStatus(TenantEntity tenantEntity,MallUserInfo starterInfo,Map<String, Object> mapInfo,Integer applyStatus){
String businessId = mapInfo.get("businessId").toString();
Integer flowType = getIngeter(mapInfo.get("flowType"));
List<Map<String,Object>> variables = (List)mapInfo.get("variables");
@@ -502,6 +506,21 @@ public class WxFlowServiceImpl implements WxFlowService {
String remark = (String)mapInfo.get("remark");
wxRefundOrderService.refundCardOrderFail(RefundOrder,null,remark);
}
}else if(EnumFlowKey.FINANCE_RED.getCode().equals(flowType)){
WxFinanceReceive receive = wxFinanceService.getReceiveById(tenantEntity, Long.parseLong(businessId));
// 审批完成
if (EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) {
wxFinanceService.redSetoffReceive(receive, starterInfo);
}else if (EnumRentContractAppStatus.SETBACK.getCode().intValue() == applyStatus.intValue()) {
}else if(EnumRentContractAppStatus.REJECT.getCode().intValue() == applyStatus.intValue()){
String remark = (String)mapInfo.get("remark");
receive.setStatus(EnumFinanceReceiveStatus.AUDITING_REJECT.getCode());
receive.setRemark(StringUtils.trimToEmpty(receive.getRemark())+";"+remark);
wxFinanceService.updateReceiveStatus(receive);
}else if(EnumRentContractAppStatus.APPLYING.getCode().intValue() == applyStatus.intValue()){
receive.setStatus(EnumFinanceReceiveStatus.AUDITING.getCode());
wxFinanceService.updateReceiveStatus(receive);
}
}
}

@@ -608,7 +627,7 @@ public class WxFlowServiceImpl implements WxFlowService {
logger.debug("流程启动,流程id:{}",processInstance.getId());

params.put("flowType",flowType);
updateBusinessStatus(params,EnumRentContractAppStatus.APPLYING.getCode());
updateBusinessStatus(tenantEntity,starterInfo,params,EnumRentContractAppStatus.APPLYING.getCode());

// 保存wx_flow_record表审批记录
WxFlowRecord wxFlowRecord = new WxFlowRecord();
@@ -1238,7 +1257,7 @@ public class WxFlowServiceImpl implements WxFlowService {
return isEndAndSendMsg(mapInfo,taskKey,processInstanceId,tenantEntity,userName);
}
}else{
updateBusinessStatus(mapInfo,EnumRentContractAppStatus.FINISH.getCode());
updateBusinessStatus(tenantEntity,null,mapInfo,EnumRentContractAppStatus.FINISH.getCode());

// 给发起人发送审批通过消息
msgReplaceMap = new HashedMap();
@@ -1372,7 +1391,7 @@ public class WxFlowServiceImpl implements WxFlowService {

// 修改合同审核状态为驳回
params.putAll(mapInfo);
updateBusinessStatus(params,EnumRentContractAppStatus.REJECT.getCode());
updateBusinessStatus(tenantEntity,null,params,EnumRentContractAppStatus.REJECT.getCode());

//保存wx_flow_record表审批记录
WxFlowRecord wxFlowRecord = new WxFlowRecord();
@@ -1462,7 +1481,7 @@ public class WxFlowServiceImpl implements WxFlowService {

@Override
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class})
public ResultData setBack(Map<String, Object> params,Long userId,String userName) {
public ResultData setBack(Map<String, Object> params,Long userId,String userName,TenantEntity tenantEntity) {
String processInstanceId = (String)params.get("processInstanceId");
String remark = (String)params.get("remark");

@@ -1485,7 +1504,7 @@ public class WxFlowServiceImpl implements WxFlowService {

// 修改合同审核状态为撤回
params.putAll(mapInfo);
updateBusinessStatus(params,EnumRentContractAppStatus.SETBACK.getCode());
updateBusinessStatus(tenantEntity,null,params,EnumRentContractAppStatus.SETBACK.getCode());

//保存wx_flow_record表审批记录
WxFlowRecord wxFlowRecord = new WxFlowRecord();


+ 8
- 0
mallinkService/src/main/resources/mapper/WxFinanceReceiveMapper.xml Visa fil

@@ -131,6 +131,14 @@
<update id="updatePrint" parameterType="com.iformall.domain.po.WxFinanceReceive">
update wx_finance_receive set is_print = 1 where id = #{id} and tenant_id = #{tenantId}
</update>
<update id="updateStatus" parameterType="com.iformall.domain.po.WxFinanceReceive">
update wx_finance_receive set status = #{status}
<if test=" null != remark and '' != remark">
,`remark` = #{remark}
</if>
where id = #{id} and tenant_id = #{tenantId}
</update>

</mapper>


+ 1
- 1
mallinkTTAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java Visa fil

@@ -181,7 +181,7 @@ public class WxFlowAbleController extends BaseController {
@SystemControllerLog(description = "工作流-撤回")
public ResultData setBack(@RequestBody Map<String, Object> params) {
MallUserInfo user = getUser();
return wxFlowService.setBack(params,user.getId(),user.getName());
return wxFlowService.setBack(params,user.getId(),user.getName(),user);
}




Laddar…
Avbryt
Spara