1、更新活动选择场站列表中包含地区代码的错误;
2、更新运维模块自动执行措施的优化内容
This commit is contained in:
parent
d9bead72cf
commit
eaefe08580
@ -124,5 +124,7 @@ public class XhpcWorkOrderDomain implements Serializable {
|
|||||||
|
|
||||||
private List<XhpcWorkOrderImageDomain> replyImgList;
|
private List<XhpcWorkOrderImageDomain> replyImgList;
|
||||||
|
|
||||||
|
private Integer measure;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
@ -5,6 +5,7 @@ import com.xhpc.activity.domain.XhpcActivityTemplateDomain;
|
|||||||
import com.xhpc.activity.mapper.XhpcActivityDiscountMapper;
|
import com.xhpc.activity.mapper.XhpcActivityDiscountMapper;
|
||||||
import com.xhpc.activity.mapper.XhpcActivityTemplateMapper;
|
import com.xhpc.activity.mapper.XhpcActivityTemplateMapper;
|
||||||
import com.xhpc.activity.service.XhpcActivityDiscountService;
|
import com.xhpc.activity.service.XhpcActivityDiscountService;
|
||||||
|
import com.xhpc.activity.utils.AreaCodeUtil;
|
||||||
import com.xhpc.common.core.exception.CustomException;
|
import com.xhpc.common.core.exception.CustomException;
|
||||||
import com.xhpc.common.core.utils.StringUtils;
|
import com.xhpc.common.core.utils.StringUtils;
|
||||||
import com.xhpc.common.core.web.service.BaseService;
|
import com.xhpc.common.core.web.service.BaseService;
|
||||||
@ -55,13 +56,17 @@ public class XhpcActivityDiscountServiceImpl extends BaseService implements Xhpc
|
|||||||
if(templateDomain == null){
|
if(templateDomain == null){
|
||||||
throw new CustomException("折扣模版不存在");
|
throw new CustomException("折扣模版不存在");
|
||||||
}
|
}
|
||||||
|
domain.setStationList(AreaCodeUtil.removeAreaCode(domain.getStationList()));
|
||||||
discountMapper.insert(domain);
|
discountMapper.insert(domain);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean updateDomain(XhpcActivityDiscountDomain domain){
|
public boolean updateDomain(XhpcActivityDiscountDomain domain){
|
||||||
|
domain.setStationList(AreaCodeUtil.removeAreaCode(domain.getStationList()));
|
||||||
return discountMapper.updateByPrimaryKey(domain) > 0;
|
return discountMapper.updateByPrimaryKey(domain) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.xhpc.activity.domain.XhpcActivityInternetDomain;
|
|||||||
import com.xhpc.activity.mapper.XhpcActivityFormulaMapper;
|
import com.xhpc.activity.mapper.XhpcActivityFormulaMapper;
|
||||||
import com.xhpc.activity.mapper.XhpcActivityInternetMapper;
|
import com.xhpc.activity.mapper.XhpcActivityInternetMapper;
|
||||||
import com.xhpc.activity.service.XhpcActivityInternetService;
|
import com.xhpc.activity.service.XhpcActivityInternetService;
|
||||||
|
import com.xhpc.activity.utils.AreaCodeUtil;
|
||||||
import com.xhpc.common.core.exception.CustomException;
|
import com.xhpc.common.core.exception.CustomException;
|
||||||
import com.xhpc.common.core.utils.StringUtils;
|
import com.xhpc.common.core.utils.StringUtils;
|
||||||
import com.xhpc.common.util.DateUtil;
|
import com.xhpc.common.util.DateUtil;
|
||||||
@ -54,6 +55,7 @@ public class XhpcActivityInternetServiceImpl implements XhpcActivityInternetServ
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean insertDomain(XhpcActivityInternetDomain domain) {
|
public boolean insertDomain(XhpcActivityInternetDomain domain) {
|
||||||
|
domain.setStationList(AreaCodeUtil.removeAreaCode(domain.getStationList()));
|
||||||
internetMapper.insert(domain);
|
internetMapper.insert(domain);
|
||||||
|
|
||||||
List<XhpcActivityFormulaDomain> formulaDomainList = getFormulaFullList(domain);
|
List<XhpcActivityFormulaDomain> formulaDomainList = getFormulaFullList(domain);
|
||||||
@ -64,6 +66,7 @@ public class XhpcActivityInternetServiceImpl implements XhpcActivityInternetServ
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean updateDomain(XhpcActivityInternetDomain domain) {
|
public boolean updateDomain(XhpcActivityInternetDomain domain) {
|
||||||
|
domain.setStationList(AreaCodeUtil.removeAreaCode(domain.getStationList()));
|
||||||
internetMapper.updateByPrimaryKey(domain);
|
internetMapper.updateByPrimaryKey(domain);
|
||||||
formulaMapper.deleteByActivityId(domain.getActivityId());
|
formulaMapper.deleteByActivityId(domain.getActivityId());
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,7 @@ package com.xhpc.activity.task;
|
|||||||
|
|
||||||
|
|
||||||
import com.xhpc.activity.domain.XhpcWorkOrderDomain;
|
import com.xhpc.activity.domain.XhpcWorkOrderDomain;
|
||||||
import com.xhpc.activity.domain.XhpcWorkTypeDictDomain;
|
|
||||||
import com.xhpc.activity.mapper.XhpcWorkOrderMapper;
|
import com.xhpc.activity.mapper.XhpcWorkOrderMapper;
|
||||||
import com.xhpc.activity.mapper.XhpcWorkTypeDictMapper;
|
|
||||||
import com.xhpc.common.api.PowerPileService;
|
import com.xhpc.common.api.PowerPileService;
|
||||||
import com.xhpc.common.core.domain.R;
|
import com.xhpc.common.core.domain.R;
|
||||||
import com.xhpc.common.core.utils.StringUtils;
|
import com.xhpc.common.core.utils.StringUtils;
|
||||||
@ -26,9 +24,6 @@ public class AutoProcessOrderTask {
|
|||||||
@Resource
|
@Resource
|
||||||
XhpcWorkOrderMapper workOrderMapper;
|
XhpcWorkOrderMapper workOrderMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
XhpcWorkTypeDictMapper typeDictMapper;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
PowerPileService powerPileService;
|
PowerPileService powerPileService;
|
||||||
|
|
||||||
@ -41,10 +36,9 @@ public class AutoProcessOrderTask {
|
|||||||
if (StringUtils.isEmpty(pileNo) || pileNo.length() < 14) continue;
|
if (StringUtils.isEmpty(pileNo) || pileNo.length() < 14) continue;
|
||||||
pileNo = pileNo.substring(0, 14);
|
pileNo = pileNo.substring(0, 14);
|
||||||
|
|
||||||
XhpcWorkTypeDictDomain typeDictDomain = typeDictMapper.selectByPrimaryKey(orderDomain.getType());
|
|
||||||
String processStr = "";
|
String processStr = "";
|
||||||
R r = null;
|
R r = null;
|
||||||
switch (typeDictDomain.getMeasure()) {
|
switch (orderDomain.getMeasure()) {
|
||||||
case 1: // 自动升级
|
case 1: // 自动升级
|
||||||
r = powerPileService.pileSoftwareUpgrade(pileNo);
|
r = powerPileService.pileSoftwareUpgrade(pileNo);
|
||||||
processStr = "自动升级指令";
|
processStr = "自动升级指令";
|
||||||
|
|||||||
@ -10,6 +10,9 @@ import com.xhpc.common.core.utils.bean.BeanUtils;
|
|||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -17,6 +20,8 @@ import java.util.List;
|
|||||||
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/clearing/order")
|
||||||
public class SyncHistoryOrderTask {
|
public class SyncHistoryOrderTask {
|
||||||
|
|
||||||
|
|
||||||
@ -32,6 +37,7 @@ public class SyncHistoryOrderTask {
|
|||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 0 0/1 * * ?")
|
@Scheduled(cron = "0 0 0/1 * * ?")
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@GetMapping("/syncTask")
|
||||||
void ExpiredTenantStatusTask() {
|
void ExpiredTenantStatusTask() {
|
||||||
System.out.println(" ============== 自动同步订单到清分 开始 ==========================");
|
System.out.println(" ============== 自动同步订单到清分 开始 ==========================");
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.xhpc.activity.utils;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
|
||||||
|
public class AreaCodeUtil {
|
||||||
|
|
||||||
|
public static String removeAreaCode(String stationIds){
|
||||||
|
String shen = "Shen";
|
||||||
|
String shi = "Shi";
|
||||||
|
String qu = "Qu";
|
||||||
|
String[] stationList = stationIds.split(",");
|
||||||
|
StringBuilder newIds = new StringBuilder();
|
||||||
|
for(String stationId: stationList){
|
||||||
|
if(!stationId.contains(shen) && !stationId.contains(shi) && !stationId.contains(qu)){
|
||||||
|
newIds.append(stationId).append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return StrUtil.sub(newIds.toString(),0, -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -306,7 +306,7 @@
|
|||||||
|
|
||||||
<select id="selectByAutoRun" resultType="com.xhpc.activity.domain.XhpcWorkOrderDomain">
|
<select id="selectByAutoRun" resultType="com.xhpc.activity.domain.XhpcWorkOrderDomain">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />, d.measure
|
||||||
from xhpc_work_order o
|
from xhpc_work_order o
|
||||||
inner join xhpc_work_type_dict d on o.type=d.work_type_id
|
inner join xhpc_work_type_dict d on o.type=d.work_type_id
|
||||||
where o.del_flag=0 and o.status=1 and d.auto_run=1
|
where o.del_flag=0 and o.status=1 and d.auto_run=1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user