定时任务逻辑修改;
This commit is contained in:
+10
-4
@@ -904,7 +904,9 @@ public class MaterialInventoryApplicationService {
|
|||||||
String inOrderNumber = materialInventoryPO.getInOrderNumber();
|
String inOrderNumber = materialInventoryPO.getInOrderNumber();
|
||||||
Long warehouseId = materialInventoryPO.getWarehouseId();
|
Long warehouseId = materialInventoryPO.getWarehouseId();
|
||||||
Date lastBillingTime = materialInventoryPO.getLastBillingTime();
|
Date lastBillingTime = materialInventoryPO.getLastBillingTime();
|
||||||
if (warehouseId==19) {//干仓计费
|
String warehouseCode = materialInventoryMapper.queryWarehouseCode(warehouseId);
|
||||||
|
if (warehouseCode == null) return;
|
||||||
|
if ("CMD".equals(warehouseCode)) {//干仓计费
|
||||||
Map<String,Object> shipperParameters = materialInventoryDomainService.queryShipperParameters(shipperId,"干仓计费配置");
|
Map<String,Object> shipperParameters = materialInventoryDomainService.queryShipperParameters(shipperId,"干仓计费配置");
|
||||||
//客户未配置干仓计费配置
|
//客户未配置干仓计费配置
|
||||||
if (shipperParameters == null || shipperParameters.size()==0) return;
|
if (shipperParameters == null || shipperParameters.size()==0) return;
|
||||||
@@ -962,7 +964,7 @@ public class MaterialInventoryApplicationService {
|
|||||||
buildBusinessDocument(totalWarehouseRent, materialInventoryPO,"0D01","租金(固定租)",contractManageId,"冻仓");
|
buildBusinessDocument(totalWarehouseRent, materialInventoryPO,"0D01","租金(固定租)",contractManageId,"冻仓");
|
||||||
buildBusinessDocument(fireInsureFee, materialInventoryPO,"0D08","火险保费",contractManageId,"冻仓");
|
buildBusinessDocument(fireInsureFee, materialInventoryPO,"0D08","火险保费",contractManageId,"冻仓");
|
||||||
}
|
}
|
||||||
} else if (warehouseId==20) {//冻仓计费
|
} else if ("CMC".equals(warehouseCode)) {//冻仓计费
|
||||||
Map<String,Object> shipperParameters = materialInventoryDomainService.queryShipperParameters(Long.valueOf(shipperId),"冻仓计费配置");
|
Map<String,Object> shipperParameters = materialInventoryDomainService.queryShipperParameters(Long.valueOf(shipperId),"冻仓计费配置");
|
||||||
if (shipperParameters == null || shipperParameters.size()==0) return;
|
if (shipperParameters == null || shipperParameters.size()==0) return;
|
||||||
Long contractManageId = (Long) shipperParameters.get("contractManageId");
|
Long contractManageId = (Long) shipperParameters.get("contractManageId");
|
||||||
@@ -1022,6 +1024,7 @@ public class MaterialInventoryApplicationService {
|
|||||||
if (materialInventoryPOS==null || materialInventoryPOS.size()==0) return;
|
if (materialInventoryPOS==null || materialInventoryPOS.size()==0) return;
|
||||||
for (MaterialInventoryPO materialInventoryPO : materialInventoryPOS) {
|
for (MaterialInventoryPO materialInventoryPO : materialInventoryPOS) {
|
||||||
String businessChargeType = materialInventoryPO.getBusinessChargeType();
|
String businessChargeType = materialInventoryPO.getBusinessChargeType();
|
||||||
|
//非散租
|
||||||
if (!"散租".equals(businessChargeType)) continue;
|
if (!"散租".equals(businessChargeType)) continue;
|
||||||
Date createTime = materialInventoryPO.getCreateTime();
|
Date createTime = materialInventoryPO.getCreateTime();
|
||||||
Long materialBaseInfoId = materialInventoryPO.getMaterialBaseInfoId();
|
Long materialBaseInfoId = materialInventoryPO.getMaterialBaseInfoId();
|
||||||
@@ -1029,7 +1032,10 @@ public class MaterialInventoryApplicationService {
|
|||||||
String inOrderNumber = materialInventoryPO.getInOrderNumber();
|
String inOrderNumber = materialInventoryPO.getInOrderNumber();
|
||||||
Long warehouseId = materialInventoryPO.getWarehouseId();
|
Long warehouseId = materialInventoryPO.getWarehouseId();
|
||||||
Date lastBillingTime = materialInventoryPO.getLastBillingTime();
|
Date lastBillingTime = materialInventoryPO.getLastBillingTime();
|
||||||
if (warehouseId==19) {//干仓计费
|
String warehouseCode = materialInventoryDomainService.queryWarehouseCode(warehouseId);
|
||||||
|
//仓库代码为空
|
||||||
|
if (warehouseCode==null) continue;
|
||||||
|
if ("CMD".equals(warehouseCode)) {//干仓计费
|
||||||
Map<String,Object> shipperParameters = materialInventoryDomainService.queryShipperParameters(Long.valueOf(shipperId),"干仓计费配置");
|
Map<String,Object> shipperParameters = materialInventoryDomainService.queryShipperParameters(Long.valueOf(shipperId),"干仓计费配置");
|
||||||
//客户未配置干仓计费配置
|
//客户未配置干仓计费配置
|
||||||
if (shipperParameters == null || shipperParameters.size()==0) continue;
|
if (shipperParameters == null || shipperParameters.size()==0) continue;
|
||||||
@@ -1087,7 +1093,7 @@ public class MaterialInventoryApplicationService {
|
|||||||
buildBusinessDocument(totalWarehouseRent, materialInventoryPO,"0D01","租金(固定租)",contractManageId,"干仓");
|
buildBusinessDocument(totalWarehouseRent, materialInventoryPO,"0D01","租金(固定租)",contractManageId,"干仓");
|
||||||
buildBusinessDocument(fireInsureFee, materialInventoryPO,"0D08","火险保费",contractManageId,"干仓");
|
buildBusinessDocument(fireInsureFee, materialInventoryPO,"0D08","火险保费",contractManageId,"干仓");
|
||||||
}
|
}
|
||||||
} else if (warehouseId==20) {//冻仓计费
|
} else if ("CMC".equals(warehouseCode)) {//冻仓计费
|
||||||
Map<String,Object> shipperParameters = materialInventoryDomainService.queryShipperParameters(Long.valueOf(shipperId),"冻仓计费配置");
|
Map<String,Object> shipperParameters = materialInventoryDomainService.queryShipperParameters(Long.valueOf(shipperId),"冻仓计费配置");
|
||||||
if (shipperParameters == null || shipperParameters.size()==0) continue;
|
if (shipperParameters == null || shipperParameters.size()==0) continue;
|
||||||
Long contractManageId = (Long) shipperParameters.get("contractManageId");
|
Long contractManageId = (Long) shipperParameters.get("contractManageId");
|
||||||
|
|||||||
+2
@@ -136,4 +136,6 @@ public interface IMaterialInventoryService extends IService<MaterialInventory>
|
|||||||
public Map<String,Object> queryShipperParameters(Long shipperId,String parametersName);
|
public Map<String,Object> queryShipperParameters(Long shipperId,String parametersName);
|
||||||
|
|
||||||
Map<String, Object> queryMaterialClassify(Long id);
|
Map<String, Object> queryMaterialClassify(Long id);
|
||||||
|
|
||||||
|
String queryWarehouseCode(Long id);
|
||||||
}
|
}
|
||||||
+2
@@ -140,4 +140,6 @@ public interface MaterialInventoryMapper extends BaseMapper<MaterialInventory>
|
|||||||
public Map<String,Object> queryShipperParameters(@Param("shipperId") Long shipperId,@Param("parametersName") String parametersName);
|
public Map<String,Object> queryShipperParameters(@Param("shipperId") Long shipperId,@Param("parametersName") String parametersName);
|
||||||
|
|
||||||
public Map<String, Object> queryMaterialClassify(@Param("id") Long id);
|
public Map<String, Object> queryMaterialClassify(@Param("id") Long id);
|
||||||
|
|
||||||
|
public String queryWarehouseCode(@Param("id") Long id);
|
||||||
}
|
}
|
||||||
+5
@@ -1286,4 +1286,9 @@ public class MaterialInventoryImpl extends ServiceImpl<MaterialInventoryMapper,
|
|||||||
public Map<String, Object> queryMaterialClassify(Long id) {
|
public Map<String, Object> queryMaterialClassify(Long id) {
|
||||||
return materialInventoryMapper.queryMaterialClassify(id);
|
return materialInventoryMapper.queryMaterialClassify(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String queryWarehouseCode(Long id) {
|
||||||
|
return materialInventoryMapper.queryWarehouseCode(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+4
@@ -149,4 +149,8 @@ public class MaterialInventoryDomainService {
|
|||||||
public Map<String,Object> queryMaterialClassify(Long id) {
|
public Map<String,Object> queryMaterialClassify(Long id) {
|
||||||
return materialInventoryService.queryMaterialClassify(id);
|
return materialInventoryService.queryMaterialClassify(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String queryWarehouseCode(Long id) {
|
||||||
|
return materialInventoryService.queryWarehouseCode(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1896,4 +1896,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
1 = 1
|
1 = 1
|
||||||
AND MATERIAL_CLASSIFY_ID = #{id} AND DEL_FLAG = 1
|
AND MATERIAL_CLASSIFY_ID = #{id} AND DEL_FLAG = 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryWarehouseCode" resultType="java.lang.String">
|
||||||
|
SELECT
|
||||||
|
WAREHOUSE_CODE AS "warehouseCode"
|
||||||
|
FROM
|
||||||
|
NGWL_TEST_SYSTEM.WAREHOUSE
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND WAREHOUSE_ID = #{id} AND DEL_FLAG = 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user