bms改造;
This commit is contained in:
+5
-1
@@ -127,7 +127,11 @@
|
||||
<groupId>com.mhd</groupId>
|
||||
<artifactId>mhd-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>2.4.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
+2
@@ -66,4 +66,6 @@ public interface IReservationStockInOrderService extends IService<ReservationSto
|
||||
* @throws Exception 解析异常
|
||||
*/
|
||||
StockInDataDTO parseStockInExcel(MultipartFile file, String sheetName) throws Exception;
|
||||
|
||||
public List<ReservationStockInOrderPO> queryPushBmsList();
|
||||
}
|
||||
+2
@@ -77,4 +77,6 @@ public interface ReservationStockInOrderMapper extends BaseMapper<ReservationSto
|
||||
List<String> generateReserveOrderNumber1(@Param("prefix") String prefix);
|
||||
|
||||
int existsByOrderNumber(@Param("inOrderNumber") String inOrderNumber);
|
||||
|
||||
public List<ReservationStockInOrderPO> queryPushBmsList();
|
||||
}
|
||||
+4
@@ -770,5 +770,9 @@ public class ReservationStockInOrderImpl extends ServiceImpl<ReservationStockInO
|
||||
}
|
||||
}
|
||||
|
||||
public List<ReservationStockInOrderPO> queryPushBmsList() {
|
||||
return stockInOrderMapper.queryPushBmsList();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+23
@@ -18,6 +18,8 @@ import com.mhd.oms.domain.gwLog.repository.mapper.GwLogMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.mapper.ReservationInMaterialDetailMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationMaterialInventory.repository.facade.IReservationMaterialInventoryService;
|
||||
import com.mhd.oms.domain.reservationMaterialInventory.repository.mapper.ReservationMaterialInventoryMapper;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.entity.ReservationStockInOrder;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.mapper.ReservationStockInOrderMapper;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
@@ -76,6 +78,8 @@ public class ReservationStockInOrderApplicationService {
|
||||
private ReservationStockInOrderMapper reservationStockInOrderMapper;
|
||||
@Autowired
|
||||
private ReservationInMaterialDetailMapper reservationInMaterialDetailMapper;
|
||||
@Autowired
|
||||
private IReservationMaterialInventoryService reservationMaterialInventoryService;
|
||||
// @Autowired
|
||||
// private IMaterialBaseInfoService materialBaseInfoService;
|
||||
private static final String PUSH_API_URL = "http://10.102.192.15/nagu-erp-api/transfer/pushData";
|
||||
@@ -2285,4 +2289,23 @@ public class ReservationStockInOrderApplicationService {
|
||||
public String generateReserveOrderNumber1() {
|
||||
return stockInOrderDomainService.generateReserveOrderNumber1();
|
||||
}
|
||||
|
||||
public List<ReservationStockInOrderPO> queryPushBmsList() {
|
||||
return stockInOrderDomainService.queryPushBmsList();
|
||||
}
|
||||
|
||||
public void pushBillingRecord() {
|
||||
|
||||
//reservationMaterialInventoryService
|
||||
// 当天应该推送的数据
|
||||
List<ReservationStockInOrderPO> reservationStockInOrderPOS = stockInOrderDomainService.queryPushBmsList();
|
||||
if (reservationStockInOrderPOS!=null&&reservationStockInOrderPOS.size()>0){
|
||||
for (ReservationStockInOrderPO reservationStockInOrderPO : reservationStockInOrderPOS) {
|
||||
String inOrderNumber = reservationStockInOrderPO.getInOrderNumber();
|
||||
ReservationInMaterialDetail reservationInMaterialDetail = reservationInMaterialDetailMapper.selectOne(new LambdaQueryWrapper<ReservationInMaterialDetail>()
|
||||
.eq(ReservationInMaterialDetail::getInOrderNumber, inOrderNumber)
|
||||
.eq(ReservationInMaterialDetail::getDelFlag, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
@@ -1474,4 +1474,8 @@ public class ReservationStockInOrderDomainService {
|
||||
// 与 generateReserveOrderNumber 收敛为同一套跨表取号逻辑,避免两份实现日后分叉
|
||||
return generateReserveOrderNumber();
|
||||
}
|
||||
|
||||
public List<ReservationStockInOrderPO> queryPushBmsList() {
|
||||
return stockInOrderService.queryPushBmsList();
|
||||
}
|
||||
}
|
||||
+22
@@ -16,6 +16,8 @@ import com.mhd.system.api.domain.InMaterialDetail;
|
||||
import com.mhd.system.api.domain.InMaterialDetailTZPD;
|
||||
import com.mhd.system.api.domain.StockInOrder;
|
||||
import com.mhd.system.api.domain.StockInOrderTZPD;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -299,4 +301,24 @@ public class ReservationStockInOrderApi extends BaseController {
|
||||
return AjaxResult.success(stockInOrderApplicationService.generateReserveOrderNumber1());
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. 简单任务示例(Bean模式)
|
||||
* 这里的 demoJobHandler 必须和调度中心配置一致
|
||||
*/
|
||||
// @XxlJob("pushBillingRecord")
|
||||
public void pushBillingRecord() {
|
||||
// 获取任务参数
|
||||
String param = XxlJobHelper.getJobParam();
|
||||
logger.info("XXL-JOB 开始入库业务单推送bms计费流水,参数:{}", param);
|
||||
|
||||
try {
|
||||
stockInOrderApplicationService.pushBillingRecord();
|
||||
// 设置任务执行结果
|
||||
XxlJobHelper.handleSuccess("入库业务单推送bms计费流水执行成功");
|
||||
} catch (Exception e) {
|
||||
logger.error("XXL-JOB 执行失败", e);
|
||||
XxlJobHelper.handleFail("入库业务单推送bms计费流水执行失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+8
@@ -688,4 +688,12 @@
|
||||
<select id="existsByOrderNumber" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
SELECT COUNT(1) FROM reservation_stock_in_order WHERE in_order_number = #{inOrderNumber}
|
||||
</select>
|
||||
|
||||
<select id="queryPushBmsList" resultMap="StockInOrderResult">
|
||||
SELECT *
|
||||
FROM RESERVATION_STOCK_IN_ORDER
|
||||
WHERE EXTRACT(DAY FROM CREATE_TIME) = EXTRACT(DAY FROM SYSDATE - 1)
|
||||
AND EXTRACT(MONTH FROM CREATE_TIME) >= EXTRACT(MONTH FROM SYSDATE - 1)
|
||||
AND DEL_FLAG = 1
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user