【update】高压系统BPM推送新增标识字段
This commit is contained in:
parent
6059df2995
commit
ffb57c836e
|
@ -27,6 +27,7 @@
|
|||
dao层
|
||||
### service
|
||||
登录、订单、行程等service方法和实现类
|
||||
#### BPMOrderDomainService 超标推送
|
||||
### value_object
|
||||
实体类,有部分只创建了个类
|
||||
## infrastructure
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.chint.domain.service;
|
|||
import com.chint.application.commands.BPMAuditCommand;
|
||||
import com.chint.domain.aggregates.order.Leg;
|
||||
import com.chint.domain.aggregates.order.OrderDetail;
|
||||
import com.chint.domain.aggregates.order.RouteCustomExtensionField;
|
||||
import com.chint.domain.aggregates.order.RouteOrder;
|
||||
import com.chint.domain.aggregates.system.ProcessInitiationControl;
|
||||
import com.chint.domain.aggregates.user.User;
|
||||
|
@ -12,6 +13,7 @@ import com.chint.infrastructure.constant.CommonMessageConstant;
|
|||
import com.chint.infrastructure.repository.jdbc.JdbcLegRepository;
|
||||
import com.chint.infrastructure.repository.jdbc.JdbcOrderDetailRepository;
|
||||
import com.chint.infrastructure.repository.jdbc.JdbcProcessInitiationControlRepository;
|
||||
import com.chint.infrastructure.repository.jdbc.JdbcRouteCustomExtensionFieldRepository;
|
||||
import com.chint.infrastructure.util.DelayDispatch;
|
||||
import com.chint.interfaces.rest.bpm.BPMParamFactory;
|
||||
import com.chint.interfaces.rest.bpm.BPMRequest;
|
||||
|
@ -83,6 +85,9 @@ public class BPMOrderDomainService {
|
|||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
|
||||
@Autowired
|
||||
private JdbcRouteCustomExtensionFieldRepository jdbcRouteCustomExtensionFieldRepository;
|
||||
|
||||
//超标
|
||||
@Transactional
|
||||
public void toBpmAuditETA(BPMAuditCommand command) {
|
||||
|
@ -144,6 +149,15 @@ public class BPMOrderDomainService {
|
|||
if (StringUtils.isNotBlank(command.getReason())) {
|
||||
exceedStandardDto.setReason(command.getReason());
|
||||
}
|
||||
//加入高压系统标识
|
||||
String filterFieldName="S_sysCode";
|
||||
String filterFileValue="GYBPM";
|
||||
List<RouteCustomExtensionField> list = jdbcRouteCustomExtensionFieldRepository.findByRouteId(routeOrder.getRouteId())
|
||||
.stream().filter(s -> s.getFieldName().equals(filterFieldName) && s.getFieldValue().equals(filterFileValue)).toList();
|
||||
if (!list.isEmpty()) {
|
||||
exceedStandardDto.setFieldName(filterFieldName);
|
||||
exceedStandardDto.setFieldValue(filterFileValue);
|
||||
}
|
||||
boolean success=bpmRequest.exceedStandard(exceedStandardDto, sysCode, employeeNo, accountCompany).getSuccess();
|
||||
DelayDispatch.attemptToSend(() -> success,
|
||||
0);
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
package com.chint.infrastructure.repository.jdbc;
|
||||
|
||||
import com.chint.domain.aggregates.order.RouteCustomExtensionField;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface JdbcRouteCustomExtensionFieldRepository extends CrudRepository<RouteCustomExtensionField, Long> {
|
||||
|
||||
List<RouteCustomExtensionField> findByRouteId(Long routeId);
|
||||
}
|
|
@ -26,5 +26,7 @@ public class ExceedStandardDto {
|
|||
private String Occupant; //入住人 是否必填:否 当订单类型=酒店超标 时需提供
|
||||
private Integer days; //入住天数 是否必填:否 当订单类型=酒店超标 时需提供
|
||||
private BigDecimal ExcessAmountDay; //超标金额(元/天) 是否必填:否 当订单类型=酒店超标 时需提供
|
||||
private String fieldName; //系统名
|
||||
private String fieldValue; //系统标识
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package com.chint;
|
||||
|
||||
import com.chint.domain.aggregates.order.OrderDetail;
|
||||
import com.chint.domain.aggregates.order.RouteCustomExtensionField;
|
||||
import com.chint.infrastructure.repository.jdbc.JdbcOrderDetailRepository;
|
||||
import com.chint.infrastructure.repository.jdbc.JdbcRouteCustomExtensionFieldRepository;
|
||||
import com.chint.infrastructure.util.PageResult;
|
||||
import com.chint.manage.entity.OrderDownloadRecord;
|
||||
import com.chint.manage.entity.OrderExceedStandard;
|
||||
|
@ -20,6 +22,7 @@ import org.springframework.data.domain.Page;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@SpringBootTest
|
||||
public class ManageTest {
|
||||
|
@ -32,6 +35,19 @@ public class ManageTest {
|
|||
@Autowired
|
||||
private JdbcConsumptionDetailRepositoryImpl jdbcConsumptionDetailRepository;
|
||||
|
||||
@Autowired
|
||||
private JdbcRouteCustomExtensionFieldRepository jdbcRouteCustomExtensionFieldRepository;
|
||||
|
||||
@Test
|
||||
void route(){
|
||||
List<RouteCustomExtensionField> list = jdbcRouteCustomExtensionFieldRepository.findByRouteId(11804L)
|
||||
.stream().filter(s -> s.getFieldName().equals("S_sysCode") && s.getFieldValue().equals("GYBPM")).toList();
|
||||
if (!list.isEmpty()) {
|
||||
System.out.println(111);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void recordAdd(){
|
||||
|
|
Loading…
Reference in New Issue