Просмотр исходного кода

[审批][修改][添加作废审批]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
4c5fb1e921
3 измененных файлов: 31 добавлений и 15 удалений
  1. +28
    -7
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  2. +1
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java
  3. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java

+ 28
- 7
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java Просмотреть файл

@@ -174,15 +174,36 @@ public class WxCouponController extends BaseController {
}
wxCoupon.setTenantId(getTenantId());

//启动审批流
if(wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() >0){
List<Map<String,Object>> variables = (List)wxCoupon.getFlowParams().get("variables");
Map<String,Object> map = new HashedMap();
map.put("key","inventory");
map.put("value",wxCoupon.getInventory());
variables.add(map);
map = new HashedMap();
map.put("key","remainInventory");
map.put("value",wxCoupon.getRemainInventory());
variables.add(map);
map = new HashedMap();
map.put("key","type");
map.put("value",wxCoupon.getType());
variables.add(map);
map = new HashedMap();
map.put("key","validEndDate");
map.put("value",wxCoupon.getValidEndDate());
map = new HashedMap();
map.put("key","validStartDate");
map.put("value",wxCoupon.getValidStartDate());
map = new HashedMap();
map.put("key","validType");
map.put("value",wxCoupon.getValidType());
variables.add(map);
map = new HashedMap();
map.put("key","validDays");
map.put("value",wxCoupon.getValidDays());
variables.add(map);
wxCoupon.getFlowParams().put("businessId",wxCoupon.getId());
wxCoupon.getFlowParams().put("inventory",wxCoupon.getInventory());
wxCoupon.getFlowParams().put("remainInventory",wxCoupon.getRemainInventory());
wxCoupon.getFlowParams().put("type",wxCoupon.getType());
wxCoupon.getFlowParams().put("validEndDate",wxCoupon.getValidEndDate());
wxCoupon.getFlowParams().put("validStartDate",wxCoupon.getValidStartDate());
wxCoupon.getFlowParams().put("validType",wxCoupon.getValidType());

wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId());
wxCoupon.setStockApplyStatus(EnumRentContractAppStatus.APPLYING.getCode());
wxCoupon.setUpdateDate(new Date());


+ 1
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java Просмотреть файл

@@ -110,10 +110,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {

@Override
public ResultData addBatch(String[] ids, String[] channelId, String tanantId, Date beginTime, Date endTime) {

List<WxCouponChannelAddVo> errorList = new ArrayList<>();
List<WxCouponChannelAddVo> sucList = new ArrayList<>();

for (String targetIdstr:channelId) {
Integer targetId = Integer.parseInt(targetIdstr);
for (String couponidstr:ids) {
@@ -121,15 +118,13 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
WxCouponChannelAddVo vo = addCouponChannel(couponid,targetId,tanantId,beginTime,endTime);
if(!vo.isSuc()){
errorList.add(vo);
}else{
sucList.add(vo);
}
}
}
if(errorList.size()>0) {
return new ResultData(errorList);
}else {
return new ResultData(sucList);
return new ResultData();
}
}



+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Просмотреть файл

@@ -213,13 +213,13 @@ public class WxFlowServiceImpl implements WxFlowService {
Integer inventory = (Integer) getVariableByKey(variables, "inventory");
Integer remainInventory = (Integer) getVariableByKey(variables, "remainInventory");
Integer type = (Integer) getVariableByKey(variables, "type");
String validDays = (String) getVariableByKey(variables, "validDays");
Integer validDays = (Integer) getVariableByKey(variables, "validDays");
Integer validType = (Integer) getVariableByKey(variables, "validType");

wxCoupon.setInventory(inventory);
wxCoupon.setRemainInventory(remainInventory);
wxCoupon.setType(type);
wxCoupon.setValidDays(Integer.parseInt(validDays));
wxCoupon.setValidDays(validDays);
wxCoupon.setValidType(validType);
wxCouponService.updateCouponStockAndEndTime(wxCoupon);
}else if(EnumFlowKey.NEW_GROUP_UPLINE.getCode().equals(flowType)){


Загрузка…
Отмена
Сохранить