Преглед изворни кода

[审批流][修改][完善]

release_toaliyun_real
luozukai пре 7 година
родитељ
комит
8f7a54fdac
3 измењених фајлова са 27 додато и 30 уклоњено
  1. +2
    -22
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponChannelController.java
  2. +23
    -6
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  3. +2
    -2
      mallinkAdmin/src/main/resources/application-dev.yml

+ 2
- 22
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponChannelController.java Прегледај датотеку

@@ -116,28 +116,8 @@ public class WxCouponChannelController extends BaseController {
logger.debug("[" + getIpAddr() + "] WxCouponChannelController::addbatch");
String[] ids = wxCouponChannelDto.getCouponIds().split(",");
String[] channelId = wxCouponChannelDto.getChannelId().split(",");

if (org.springframework.util.CollectionUtils.isEmpty(wxCouponChannelDto.getFlowParams())) {
ResultData resultData = wxCouponChannelService.addBatch(ids, channelId, getTenantId(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime());
return resultData;
}else{
//走审批
wxCouponChannelDto.getFlowParams().put("ids",wxCouponChannelDto.getCouponIds());
wxCouponChannelDto.getFlowParams().put("channelId",wxCouponChannelDto.getChannelId());
wxCouponChannelDto.getFlowParams().put("tenantId",getTenantId());
wxCouponChannelDto.getFlowParams().put("beginTime",wxCouponChannelDto.getBeginTime());
wxCouponChannelDto.getFlowParams().put("endTime",wxCouponChannelDto.getEndTime());

wxFlowService.start(wxCouponChannelDto.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
//修改coupon applyStatus状态为审核中
for (String id:ids) {
WxCoupon wxCoupon = new WxCoupon();
wxCoupon.setId(Long.parseLong(id));
wxCoupon.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());
wxCouponService.update(wxCoupon);
}
}
return new ResultData();
ResultData resultData = wxCouponChannelService.addBatch(ids, channelId, getTenantId(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime());
return resultData;
}

@ApiOperation("根据id查询接口")


+ 23
- 6
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java Прегледај датотеку

@@ -79,7 +79,16 @@ public class WxCouponController extends BaseController {
@SystemControllerLog(description = "券投放-新增")
public ResultData add(@RequestBody WxCoupon wxCoupon) {
logger.debug("[" + getIpAddr() + "] WxCouponController::add");
return wxCouponService.saveOrUpdate(wxCoupon);

ResultData resultData = wxCouponService.saveOrUpdate(wxCoupon);
//启动投放审批
if(wxCoupon.getFlowParams() !=null && wxCoupon.getFlowParams().size()>0) {
wxCoupon.getFlowParams().put("businessId",wxCoupon.getId());
wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
//修改coupon applyStatus状态为审核中
wxCoupon.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());
}
return resultData;
}

@ApiOperation("根据id更新接口")
@@ -101,11 +110,16 @@ public class WxCouponController extends BaseController {
}
wxCoupon.setTenantId(getTenantId());

//作废走审批
if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())) {
if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) {
wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
return new ResultData();
//启动审批流
if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) {
logger.info("------coupon.update().businessType:"+wxCoupon.getFlowParams().get("businessType"));
wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
//作废审批
if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())) {
wxCoupon.setCancleApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());
}else{
//投放审批
wxCoupon.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());
}
}
return wxCouponService.saveOrUpdate(wxCoupon);
@@ -163,6 +177,9 @@ public class WxCouponController extends BaseController {
// wxCoupon.getFlowParams().put("validType",wxCoupon.getValidType());

wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
wxCoupon.setStockApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());
wxCoupon.setUpdateDate(new Date());
wxCouponService.update(wxCoupon);
}else{
return wxCouponService.updateCouponStockAndEndTime(wxCoupon);
}


+ 2
- 2
mallinkAdmin/src/main/resources/application-dev.yml Прегледај датотеку

@@ -113,8 +113,8 @@ fm:
exception: false
exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com
deploy: 1
open: true
upload_dir: /home/test/server/uploads/
open: false
upload_dir: /tmp/

ueditor:
config: config.json


Loading…
Откажи
Сачувај