|
@@ -79,12 +79,11 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
PayFeeMapper payFeeMapper;
|
|
|
|
|
|
@Autowired
|
|
|
- PayFeeService payFeeService;
|
|
|
+ PayFeeService payFeeService;
|
|
|
@Autowired
|
|
|
private MeasurementInstanceMapper measurementInstanceMapper;
|
|
|
|
|
|
|
|
|
-
|
|
|
public void insert(PayMessagesendrecordDto payMessagesendrecordDto) {
|
|
|
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
@@ -99,12 +98,12 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
payMessagesendrecordMapper.insert(payMessagesendrecordDto);
|
|
|
}
|
|
|
|
|
|
- public Pagination<PayMessagesendrecordDto> findList(PayMessagesendrecordDto payMessagesendrecordDto,int pageNum,int pageSize) {
|
|
|
+ public Pagination<PayMessagesendrecordDto> findList(PayMessagesendrecordDto payMessagesendrecordDto, int pageNum, int pageSize) {
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
//分页
|
|
|
- PageHelper.startPage(pageNum,pageSize);
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
//站点为空则加入用户站点查询
|
|
|
- if( loginUser !=null){
|
|
|
+ if (loginUser != null) {
|
|
|
//站点权限
|
|
|
|
|
|
}
|
|
@@ -112,7 +111,8 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
List<PayMessagesendrecordDto> list = payMessagesendrecordMapper.findList(payMessagesendrecordDto);
|
|
|
return new Pagination<>(list);
|
|
|
}
|
|
|
- public List<PayMessagesendrecordDto> findListByClossingaccount(PayMessagesendrecordDto payMessagesendrecordDto, Integer siteId, Integer customerId ) {
|
|
|
+
|
|
|
+ public List<PayMessagesendrecordDto> findListByClossingaccount(PayMessagesendrecordDto payMessagesendrecordDto, Integer siteId, Integer customerId) {
|
|
|
|
|
|
//站点权限
|
|
|
payMessagesendrecordDto.setSiteId(BigInteger.valueOf(siteId));
|
|
@@ -120,8 +120,8 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
payMessagesendrecordDto.setCustomerId(BigInteger.valueOf(customerId));
|
|
|
|
|
|
//获取最新账期
|
|
|
- BaseClosingAccountInfoDto baseClosingAccountInfoDto=baseClosingAccountInfoMapper.getLastClosingAccount(siteId,customerId);
|
|
|
- if(baseClosingAccountInfoDto == null){
|
|
|
+ BaseClosingAccountInfoDto baseClosingAccountInfoDto = baseClosingAccountInfoMapper.getLastClosingAccount(siteId, customerId);
|
|
|
+ if (baseClosingAccountInfoDto == null) {
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
payMessagesendrecordDto.setYear(baseClosingAccountInfoDto.getYear());
|
|
@@ -137,69 +137,69 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
|
|
|
//获取最新账期
|
|
|
List<MeasurementInstance> history = measurementInstanceMapper.findHistory(null, loginUser.getCompanyId(), loginUser.getDepartmentId());
|
|
|
- MeasurementInstance measurementInstance=new MeasurementInstance();
|
|
|
- if(!CollectionUtils.isEmpty(history)){
|
|
|
- measurementInstance=history.get(0);
|
|
|
+ MeasurementInstance measurementInstance = new MeasurementInstance();
|
|
|
+ if (!CollectionUtils.isEmpty(history)) {
|
|
|
+ measurementInstance = history.get(0);
|
|
|
}
|
|
|
Date billingPeriod = measurementInstance.getBillingPeriod();
|
|
|
- Integer year=null;
|
|
|
- Integer month=null;
|
|
|
- if(billingPeriod!=null){
|
|
|
- year= DateUtil.getYear(billingPeriod);
|
|
|
- month=DateUtil.getMonth(billingPeriod);
|
|
|
+ Integer year = null;
|
|
|
+ Integer month = null;
|
|
|
+ if (billingPeriod != null) {
|
|
|
+ year = DateUtil.getYear(billingPeriod);
|
|
|
+ month = DateUtil.getMonth(billingPeriod);
|
|
|
}
|
|
|
//分页
|
|
|
- PageHelper.startPage(pageNum,pageSize);
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
//获取数据
|
|
|
- List<PayDebtMessageDto> list = payMessagesendrecordMapper.findDebtList( year,month, condition, beginDebtFee, endDebtFee, accountIds,loginUser.getTenantId(),loginUser.getUserCondition());
|
|
|
+ List<PayDebtMessageDto> list = payMessagesendrecordMapper.findDebtList(year, month, condition, beginDebtFee, endDebtFee, accountIds, loginUser.getTenantId(), loginUser.getUserCondition());
|
|
|
|
|
|
return new Pagination<>(list);
|
|
|
}
|
|
|
|
|
|
- public void export(String condition , BigDecimal beginDebtFee, BigDecimal endDebtFee, HttpServletResponse httpServletResponse){
|
|
|
+ public void export(String condition, BigDecimal beginDebtFee, BigDecimal endDebtFee, HttpServletResponse httpServletResponse) {
|
|
|
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
- Integer siteId=null;
|
|
|
- Integer customerId=null;
|
|
|
- List<ProgramItem> programItems=null;
|
|
|
- if( loginUser !=null){
|
|
|
+ Integer siteId = null;
|
|
|
+ Integer customerId = null;
|
|
|
+ List<ProgramItem> programItems = null;
|
|
|
+ if (loginUser != null) {
|
|
|
//站点权限
|
|
|
- siteId=loginUser.getSiteId();
|
|
|
+ siteId = loginUser.getSiteId();
|
|
|
//客户权限
|
|
|
- customerId=loginUser.getCustomerId();
|
|
|
+ customerId = loginUser.getCustomerId();
|
|
|
//数据权限
|
|
|
- programItems=UserUtil.getCurrentSiteProgramItems(loginUser);
|
|
|
+ programItems = UserUtil.getCurrentSiteProgramItems(loginUser);
|
|
|
}
|
|
|
//获取最新账期
|
|
|
- BaseClosingAccountInfoDto baseClosingAccountInfoDto=baseClosingAccountInfoMapper.getLastClosingAccount(loginUser.getSiteId(),loginUser.getCustomerId());
|
|
|
+ BaseClosingAccountInfoDto baseClosingAccountInfoDto = baseClosingAccountInfoMapper.getLastClosingAccount(loginUser.getSiteId(), loginUser.getCustomerId());
|
|
|
//获取数据
|
|
|
- List<PayDebtMessageDto> list =new ArrayList();
|
|
|
- if(baseClosingAccountInfoDto != null){
|
|
|
- list = payMessagesendrecordMapper.findDebtList( baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(), condition, beginDebtFee, endDebtFee, null,loginUser.getTenantId(),loginUser.getUserCondition());
|
|
|
+ List<PayDebtMessageDto> list = new ArrayList();
|
|
|
+ if (baseClosingAccountInfoDto != null) {
|
|
|
+ list = payMessagesendrecordMapper.findDebtList(baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), condition, beginDebtFee, endDebtFee, null, loginUser.getTenantId(), loginUser.getUserCondition());
|
|
|
}
|
|
|
String title = "客户欠费记录";
|
|
|
|
|
|
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
String[] rowsName = new String[]{"序号", "客户编号", "客户名称", "手机号", "本期水量(吨)", "本期欠费(元)",
|
|
|
- "历史欠费(元)", "本期违约金(元)", "历史违约金(元)", "欠费总额(元)", "累积催缴","最近一次催缴时间"};
|
|
|
+ "历史欠费(元)", "本期违约金(元)", "历史违约金(元)", "欠费总额(元)", "累积催缴", "最近一次催缴时间"};
|
|
|
List<Object[]> dataList = newArrayList();
|
|
|
Object[] objs = null;
|
|
|
int i = 0;
|
|
|
- for(PayDebtMessageDto payDebtMessageDto :list){
|
|
|
+ for (PayDebtMessageDto payDebtMessageDto : list) {
|
|
|
objs = new Object[rowsName.length];
|
|
|
objs[0] = ++i;
|
|
|
- objs[1]=payDebtMessageDto.getAccountnumber();
|
|
|
- objs[2]=payDebtMessageDto.getAccountname();
|
|
|
- objs[3]=payDebtMessageDto.getMobilephone();
|
|
|
- objs[4]=payDebtMessageDto.getPayamount();
|
|
|
- objs[5]=payDebtMessageDto.getWaterfee();
|
|
|
- objs[6]=payDebtMessageDto.getHistorywaterfee();
|
|
|
- objs[7]=payDebtMessageDto.getPenaltyfee();
|
|
|
- objs[8]=payDebtMessageDto.getHistorypenaltyfee();
|
|
|
- objs[9]=payDebtMessageDto.getCountfee();
|
|
|
- objs[10]=payDebtMessageDto.getSendNum();
|
|
|
- if(payDebtMessageDto.getLastSendTime() != null){
|
|
|
- objs[11]=df.format(payDebtMessageDto.getLastSendTime());
|
|
|
+ objs[1] = payDebtMessageDto.getAccountnumber();
|
|
|
+ objs[2] = payDebtMessageDto.getAccountname();
|
|
|
+ objs[3] = payDebtMessageDto.getMobilephone();
|
|
|
+ objs[4] = payDebtMessageDto.getPayamount();
|
|
|
+ objs[5] = payDebtMessageDto.getWaterfee();
|
|
|
+ objs[6] = payDebtMessageDto.getHistorywaterfee();
|
|
|
+ objs[7] = payDebtMessageDto.getPenaltyfee();
|
|
|
+ objs[8] = payDebtMessageDto.getHistorypenaltyfee();
|
|
|
+ objs[9] = payDebtMessageDto.getCountfee();
|
|
|
+ objs[10] = payDebtMessageDto.getSendNum();
|
|
|
+ if (payDebtMessageDto.getLastSendTime() != null) {
|
|
|
+ objs[11] = df.format(payDebtMessageDto.getLastSendTime());
|
|
|
}
|
|
|
dataList.add(objs);
|
|
|
}
|
|
@@ -212,6 +212,7 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
|
|
|
|
|
|
}
|
|
|
+
|
|
|
/*
|
|
|
* @Description: 手动推送短信
|
|
|
*
|
|
@@ -222,48 +223,48 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
* @return: 返回成功推送数量,负数为推送异常,0为全部推送失败
|
|
|
*
|
|
|
*/
|
|
|
- public AjaxMessage<String> sendMessageByUser(String condition, BigDecimal beginDebtFee, BigDecimal endDebtFee, List<BigInteger> accountIds){
|
|
|
+ public AjaxMessage<String> sendMessageByUser(String condition, BigDecimal beginDebtFee, BigDecimal endDebtFee, List<BigInteger> accountIds) {
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
- Integer siteId=null;
|
|
|
- Integer customerId=null;
|
|
|
- List<ProgramItem> programItems=null;
|
|
|
- if( loginUser !=null){
|
|
|
+ Integer siteId = null;
|
|
|
+ Integer customerId = null;
|
|
|
+ List<ProgramItem> programItems = null;
|
|
|
+ if (loginUser != null) {
|
|
|
//站点权限
|
|
|
- siteId=loginUser.getSiteId();
|
|
|
+ siteId = loginUser.getSiteId();
|
|
|
//客户权限
|
|
|
- customerId=loginUser.getCustomerId();
|
|
|
+ customerId = loginUser.getCustomerId();
|
|
|
//数据权限
|
|
|
- programItems=UserUtil.getCurrentSiteProgramItems(loginUser);
|
|
|
+ programItems = UserUtil.getCurrentSiteProgramItems(loginUser);
|
|
|
}
|
|
|
|
|
|
//获取短信模板
|
|
|
- PayMessageTemplateDto templateList= payMessagetemplateMapper.get(loginUser.getTenantId(),0,null);
|
|
|
- if(templateList == null){
|
|
|
+ PayMessageTemplateDto templateList = payMessagetemplateMapper.get(loginUser.getTenantId(), 0, null);
|
|
|
+ if (templateList == null) {
|
|
|
//获取短信模板失败,没查询到有效模板
|
|
|
throw new ServiceException(ResultStatus.MESSAGE_TEMPLATE_FAILED);
|
|
|
}
|
|
|
- if (!templateList.checkMessage()){
|
|
|
+ if (!templateList.checkMessage()) {
|
|
|
//短信配置信息有空值
|
|
|
throw new ServiceException(ResultStatus.MESSAGE_CONFIGURATION_ISEMPTY);
|
|
|
}
|
|
|
|
|
|
|
|
|
//获取最新账期
|
|
|
- BaseClosingAccountInfoDto baseClosingAccountInfoDto=baseClosingAccountInfoMapper.getLastClosingAccount(loginUser.getSiteId(),loginUser.getCustomerId());
|
|
|
- if(baseClosingAccountInfoDto == null){
|
|
|
+ BaseClosingAccountInfoDto baseClosingAccountInfoDto = baseClosingAccountInfoMapper.getLastClosingAccount(loginUser.getSiteId(), loginUser.getCustomerId());
|
|
|
+ if (baseClosingAccountInfoDto == null) {
|
|
|
throw new ServiceException(ResultStatus.ClOSING_ACCCOUNT_NOT_EXIT);
|
|
|
}
|
|
|
//获取数据
|
|
|
- List<PayDebtMessageDto> debtList = payMessagesendrecordMapper.findDebtList( baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(), condition, beginDebtFee, endDebtFee, accountIds,loginUser.getTenantId(),loginUser.getUserCondition());
|
|
|
- if(debtList.size()==0){
|
|
|
+ List<PayDebtMessageDto> debtList = payMessagesendrecordMapper.findDebtList(baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), condition, beginDebtFee, endDebtFee, accountIds, loginUser.getTenantId(), loginUser.getUserCondition());
|
|
|
+ if (debtList.size() == 0) {
|
|
|
//获取欠费信息失败
|
|
|
throw new ServiceException(ResultStatus.MESSAGE_DEBTFEE_FAILED);
|
|
|
}
|
|
|
- Integer successNmu=0;
|
|
|
- for(PayDebtMessageDto payDebtMessageDto: debtList){
|
|
|
- successNmu = successNmu+ sendMessageInfo(0, BigInteger.valueOf(siteId), BigInteger.valueOf(customerId) , templateList, baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(), payDebtMessageDto);
|
|
|
+ Integer successNmu = 0;
|
|
|
+ for (PayDebtMessageDto payDebtMessageDto : debtList) {
|
|
|
+ successNmu = successNmu + sendMessageInfo(0, BigInteger.valueOf(siteId), BigInteger.valueOf(customerId), templateList, baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), payDebtMessageDto);
|
|
|
}
|
|
|
- return new AjaxMessage<>(ResultStatus.OK,"推送成功"+successNmu+"条");
|
|
|
+ return new AjaxMessage<>(ResultStatus.OK, "推送成功" + successNmu + "条");
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -275,40 +276,40 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
* @return:
|
|
|
*
|
|
|
*/
|
|
|
- public void sendMessageAuto(Integer siteId, Integer customerId){
|
|
|
+ public void sendMessageAuto(Integer siteId, Integer customerId) {
|
|
|
PayMessageTemplateDto payMessageTemplateDto = new PayMessageTemplateDto();
|
|
|
payMessageTemplateDto.setSiteId(BigInteger.valueOf(siteId));
|
|
|
payMessageTemplateDto.setCustomerId(BigInteger.valueOf(customerId));
|
|
|
payMessageTemplateDto.setSendType(0);
|
|
|
|
|
|
//获取短信模板
|
|
|
- PayMessageTemplateDto templateList= payMessagetemplateMapper.get("",0,1);
|
|
|
- if(templateList == null){
|
|
|
+ PayMessageTemplateDto templateList = payMessagetemplateMapper.get("", 0, 1);
|
|
|
+ if (templateList == null) {
|
|
|
//获取短信模板失败,没查询到有效模板
|
|
|
throw new ServiceException(ResultStatus.MESSAGE_TEMPLATE_FAILED);
|
|
|
}
|
|
|
|
|
|
if (!templateList.checkMessage()
|
|
|
- || StringUtils.isBlank( templateList.getDays())
|
|
|
- || StringUtils.isBlank( templateList.getSendTime())
|
|
|
- ){
|
|
|
+ || StringUtils.isBlank(templateList.getDays())
|
|
|
+ || StringUtils.isBlank(templateList.getSendTime())
|
|
|
+ ) {
|
|
|
//短信配置信息有空值
|
|
|
throw new ServiceException(ResultStatus.MESSAGE_CONFIGURATION_ISEMPTY);
|
|
|
}
|
|
|
//获取最新账期
|
|
|
- BaseClosingAccountInfoDto baseClosingAccountInfoDto=baseClosingAccountInfoMapper.getLastClosingAccount(siteId,customerId);
|
|
|
- if(baseClosingAccountInfoDto == null){
|
|
|
+ BaseClosingAccountInfoDto baseClosingAccountInfoDto = baseClosingAccountInfoMapper.getLastClosingAccount(siteId, customerId);
|
|
|
+ if (baseClosingAccountInfoDto == null) {
|
|
|
throw new ServiceException(ResultStatus.ClOSING_ACCCOUNT_NOT_EXIT);
|
|
|
}
|
|
|
//获取数据
|
|
|
- List<PayDebtMessageDto> debtList = payMessagesendrecordMapper.findDebtList( baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(), null, null, null, null,null,null);
|
|
|
- if(debtList.size()==0){
|
|
|
+ List<PayDebtMessageDto> debtList = payMessagesendrecordMapper.findDebtList(baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), null, null, null, null, null, null);
|
|
|
+ if (debtList.size() == 0) {
|
|
|
//获取欠费信息失败
|
|
|
throw new ServiceException(ResultStatus.MESSAGE_DEBTFEE_FAILED);
|
|
|
}
|
|
|
|
|
|
- for(PayDebtMessageDto payDebtMessageDto: debtList){
|
|
|
- sendMessageInfo(0, BigInteger.valueOf(siteId), BigInteger.valueOf(customerId) , templateList, baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(), payDebtMessageDto);
|
|
|
+ for (PayDebtMessageDto payDebtMessageDto : debtList) {
|
|
|
+ sendMessageInfo(0, BigInteger.valueOf(siteId), BigInteger.valueOf(customerId), templateList, baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), payDebtMessageDto);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -325,31 +326,31 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
* @return:
|
|
|
*
|
|
|
*/
|
|
|
- private Integer sendMessageInfo(int type , BigInteger siteId, BigInteger customerId, PayMessageTemplateDto templates, Integer year,Integer month, PayDebtMessageDto payDebtMessageDto) {
|
|
|
+ private Integer sendMessageInfo(int type, BigInteger siteId, BigInteger customerId, PayMessageTemplateDto templates, Integer year, Integer month, PayDebtMessageDto payDebtMessageDto) {
|
|
|
String template;
|
|
|
//违约金
|
|
|
BigDecimal Penaltyfee = payDebtMessageDto.getPenaltyfee().add(payDebtMessageDto.getHistorypenaltyfee());
|
|
|
- if(Penaltyfee.compareTo(BigDecimal.ZERO) == 1){
|
|
|
+ if (Penaltyfee.compareTo(BigDecimal.ZERO) == 1) {
|
|
|
//有违约金
|
|
|
- template=templates.getTemplate2();
|
|
|
- }else{
|
|
|
+ template = templates.getTemplate2();
|
|
|
+ } else {
|
|
|
//无违约金
|
|
|
- template=templates.getTemplate1();
|
|
|
+ template = templates.getTemplate1();
|
|
|
}
|
|
|
//拼接短信内容
|
|
|
- StringBuilder address= new StringBuilder(payDebtMessageDto.getAddress());
|
|
|
- if(address.length()>6){
|
|
|
- address.replace(0,address.length()-5,"*****");
|
|
|
- }else{
|
|
|
- address.replace(0,address.length()/2,"*****");
|
|
|
- }
|
|
|
- String message= template.replace("{accountname}",new StringBuilder(payDebtMessageDto.getAccountname()).replace(0,1,"*"))
|
|
|
- .replace("{accountnumber}",payDebtMessageDto.getAccountnumber())
|
|
|
- .replace("{address}",address.toString())
|
|
|
- .replace("{debtFee}",payDebtMessageDto.getWaterfee().add(payDebtMessageDto.getHistorywaterfee()).toString())
|
|
|
- .replace("{penaltyFee}",payDebtMessageDto.getPenaltyfee().add(payDebtMessageDto.getHistorypenaltyfee()).toString());
|
|
|
+ StringBuilder address = new StringBuilder(payDebtMessageDto.getAddress());
|
|
|
+ if (address.length() > 6) {
|
|
|
+ address.replace(0, address.length() - 5, "*****");
|
|
|
+ } else {
|
|
|
+ address.replace(0, address.length() / 2, "*****");
|
|
|
+ }
|
|
|
+ String message = template.replace("{accountname}", new StringBuilder(payDebtMessageDto.getAccountname()).replace(0, 1, "*"))
|
|
|
+ .replace("{accountnumber}", payDebtMessageDto.getAccountnumber())
|
|
|
+ .replace("{address}", address.toString())
|
|
|
+ .replace("{debtFee}", payDebtMessageDto.getWaterfee().add(payDebtMessageDto.getHistorywaterfee()).toString())
|
|
|
+ .replace("{penaltyFee}", payDebtMessageDto.getPenaltyfee().add(payDebtMessageDto.getHistorypenaltyfee()).toString());
|
|
|
//生成推送记录
|
|
|
- PayMessagesendrecordDto payMessagesendrecordDto=new PayMessagesendrecordDto();
|
|
|
+ PayMessagesendrecordDto payMessagesendrecordDto = new PayMessagesendrecordDto();
|
|
|
payMessagesendrecordDto.setAccountId(payDebtMessageDto.getAccountId());
|
|
|
payMessagesendrecordDto.setAccountname(payDebtMessageDto.getAccountname());
|
|
|
payMessagesendrecordDto.setAccountnumber(payDebtMessageDto.getAccountnumber());
|
|
@@ -371,15 +372,15 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
//
|
|
|
//短信推送:1成功 0失败
|
|
|
int result = SMSClient.sendMsg(sendReq);
|
|
|
- if(result == 1){
|
|
|
+ if (result == 1) {
|
|
|
payMessagesendrecordDto.setState("成功");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
payMessagesendrecordDto.setState("失败");
|
|
|
}
|
|
|
//保存推送记录
|
|
|
- if(type ==1){//手动推送有用户
|
|
|
- this.insert(payMessagesendrecordDto);
|
|
|
- }else{//自动推送无用户
|
|
|
+ if (type == 1) {//手动推送有用户
|
|
|
+ this.insert(payMessagesendrecordDto);
|
|
|
+ } else {//自动推送无用户
|
|
|
payMessagesendrecordDto.setCreateBy(templates.getUpdateBy());
|
|
|
payMessagesendrecordDto.setCreateDate(LocalDateTime.now());
|
|
|
payMessagesendrecordDto.setUpdateBy(templates.getUpdateBy());
|
|
@@ -393,8 +394,8 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void afterPropertiesSet() {
|
|
|
- QuartzEntity entity3 = new QuartzEntity();
|
|
|
+ public void afterPropertiesSet() {
|
|
|
+ /* QuartzEntity entity3 = new QuartzEntity();
|
|
|
entity3.setJobGroup("巡检开户开阀操作");
|
|
|
entity3.setJobName("OpenAccountValveInspectionSyncByJob" );
|
|
|
entity3.setDescription("OpenAccountValveInspectionSyncByJob" );
|
|
@@ -406,33 +407,34 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
|
|
|
if(!exists3) {
|
|
|
jobAndTriggerService.save(entity3);
|
|
|
}
|
|
|
+*/
|
|
|
|
|
|
|
|
|
-
|
|
|
- QuartzEntity entity4 = new QuartzEntity();
|
|
|
+ /* QuartzEntity entity4 = new QuartzEntity();
|
|
|
entity4.setJobGroup("巡检阀门操作有效期");
|
|
|
entity4.setJobName("DeviceValveSyncByJob" );
|
|
|
entity4.setDescription("DeviceValveSyncByJob" );
|
|
|
// modify by pengdi ,判断定时任务是否存在,不存在才进行新增
|
|
|
- boolean exists4 = jobAndTriggerService.isExists(entity4);
|
|
|
- if(!exists4) {
|
|
|
- log.info("巡检阀门操作有效期:" + "0 */30 * * * ?");
|
|
|
- entity4.setCronExpression("0 */30 * * * ?");
|
|
|
- entity4.setJobClassName(DeviceValveCommondSync.class.getName());
|
|
|
- jobAndTriggerService.save(entity4);
|
|
|
- }
|
|
|
+ boolean exists4 = jobAndTriggerService.isExists(entity4);*/
|
|
|
+ // if(!exists4) {
|
|
|
+ //log.info("巡检阀门操作有效期:" + "0 */30 * * * ?");
|
|
|
+ // entity4.setCronExpression("0 */30 * * * ?");
|
|
|
+ // entity4.setJobClassName(DeviceValveCommondSync.class.getName());
|
|
|
+ // jobAndTriggerService.save(entity4);
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
- //获取需要自动推送的模板
|
|
|
+ /*//获取需要自动推送的模板
|
|
|
PayMessageTemplateDto payMessageTemplateDto =new PayMessageTemplateDto();
|
|
|
payMessageTemplateDto.setOperationType(1);
|
|
|
payMessageTemplateDto.setSendType(0);
|
|
|
List<PayMessageTemplateDto> PayMessageTemplateDtos= payMessagetemplateService.getAllMessageTemplate(payMessageTemplateDto);
|
|
|
//循环添加定时任务
|
|
|
- for(PayMessageTemplateDto payMessageTemplate :PayMessageTemplateDtos){
|
|
|
- saveQrtzTask(payMessageTemplate);
|
|
|
- }
|
|
|
+ /* for(PayMessageTemplateDto payMessageTemplate :PayMessageTemplateDtos){
|
|
|
+ //saveQrtzTask(payMessageTemplate);
|
|
|
+ }*/
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/*
|