Commit ddf521a6 by 赵剑炜

Merge branch 'develop' of http://gitlab.sothing.top/843502640/jyzb_platformV2 into develop-zhaojw

parents 18c8fd33 144f961f
package com.junmp.jyzb.api.bean.query.InAndOutRecordReq;
import lombok.Data;
import java.util.Date;
@Data
public class CabinetLogsRecordReq {
private Long orgId;
private String orgName;
private String serialNum;
private String boxNum;
private String policeId;
private String policeName;
private String picUrl;
private Date createTime;
private String equipmentList;
}
......@@ -36,9 +36,10 @@ public class TemperatureRedisCache extends AbstractRedisCache<Object> {
}
public List<Object> getDataByTimestampRange(String warehouseId, long startTimestamp, long endTimestamp) {
String key = warehouseId;
//根据
// Set<Object> dataInRange = getRedisTemplate().opsForZSet().rangeByScore(key, startTimestamp, endTimestamp);
Set<Object> dataInRange= getRedisTemplate().opsForZSet ().reverseRange(key, startTimestamp, endTimestamp);
boolean exists = getRedisTemplate().hasKey(key);
Long size = getRedisTemplate().opsForZSet().size(key);
Set<Object> dataInRange = getRedisTemplate().opsForZSet().rangeByScore(key, startTimestamp, endTimestamp);
// Set<Object> dataInRange1= getRedisTemplate().opsForZSet ().reverseRange(key, startTimestamp, endTimestamp);
return new ArrayList<>(dataInRange);
}
}
......@@ -212,11 +212,6 @@ public class InventorySummary implements Serializable {
@TableField(value = "agent_broken_num")
private Integer agentBrokenNum;
/**
* 审核中的销毁数量
*/
@TableField(value = "agent_destruction_num")
private Integer agentDestructionNum;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.junmp.jyzb.entity.Temp;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.jetbrains.annotations.NotNull;
import org.springframework.context.annotation.Configuration;
import java.io.Serializable;
......@@ -11,7 +12,7 @@ import java.util.Date;
@Data
@Configuration
@NoArgsConstructor
public class HumidityAndtemperature implements Serializable {
public class HumidityAndtemperature implements Serializable{
//湿度
private Double humidity;
//温度
......@@ -25,4 +26,5 @@ public class HumidityAndtemperature implements Serializable {
private String deviceName;
//上报时间
private Long createTime;
}
......@@ -2,13 +2,19 @@ package com.junmp.jyzb.listener;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.junmp.junmpProcess.dto.UserListDTO;
import com.junmp.junmpProcess.dto.json.*;
import com.junmp.junmpProcess.entity.ProcessTemplates;
import com.junmp.junmpProcess.exception.WorkFlowException;
import com.junmp.junmpProcess.mapper.OrgUserMapper;
import com.junmp.junmpProcess.service.IFlowInstanceService;
import com.junmp.junmpProcess.service.Repository.ProcessTemplateService;
import com.junmp.junmpProcess.vo.TaskDetailVO;
import com.junmp.jyzb.cache.MsgRedisCache;
import com.junmp.jyzb.entity.*;
import com.junmp.jyzb.service.*;
......@@ -23,6 +29,7 @@ import org.flowable.engine.*;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.engine.runtime.ProcessInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
......@@ -63,6 +70,7 @@ public class CounterSignListener implements ExecutionListener {
private BussinessInventoryService bussinessInventoryService;
@Resource
private RuntimeService runtimeService;
@Override
public void notify(DelegateExecution execution) {
String currentActivityId = execution.getCurrentActivityId();
......@@ -333,4 +341,6 @@ public class CounterSignListener implements ExecutionListener {
}
}
}
package com.junmp.jyzb.rabbitmq;
import com.alibaba.fastjson.JSON;
import com.junmp.jyzb.api.bean.query.InAndOutRecordReq.OutInLogsReq;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;
import java.io.IOException;
/**
* 单警柜上报出入库记录监听消息队列
*/
@Component
public class OutInLogsByCabinetReceiver {
@RabbitListener(queues = "CabinetLogsRecord")//监听队列名
private void a(String msg, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag){
try {
System.out.println("msg = " + msg);
// 手动确认消息
channel.basicAck(deliveryTag, false);
OutInLogsReq req = JSON.parseObject(msg, OutInLogsReq.class);
//将消息进行消费
// Boolean result = logSummaryService.processInventoryRecords(req);
} catch (Exception e) {
// 处理消息过程中发生异常,拒绝消息并将其重新放回队列ms
try {
channel.basicNack(deliveryTag, false, true);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
}
}
......@@ -13,6 +13,9 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.io.IOException;
/**
* 本地主机上报出入记录监听消息队列
*/
@Component
public class OutInLogsReceiver {
......
......@@ -100,9 +100,7 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl
if (req.getBussinessType().equals("remove") && ObjectUtil.isNotEmpty(req.getProcessDefinitionId())){
Boolean aBoolean = addOrRevokeAgentBrokenNum(req,true);
}
if (req.getBussinessType().equals("destruction") && ObjectUtil.isNotEmpty(req.getProcessDefinitionId())){
Boolean aBoolean= addOrRevokeAgentDestructionNum(req,true);
}
BusForm busForm1=null;
if (ObjectUtil.isNotNull(req.getId()) && !req.getId().trim().isEmpty()){
......@@ -297,37 +295,7 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl
}
public boolean addOrRevokeAgentDestructionNum(UpdateBusFormReq req,boolean flag){
List<BussinessOrderDetialReq> list = JSON.parseArray(req.getDetailList(), BussinessOrderDetialReq.class);
List<Object[]> searchItem=new ArrayList<>();
for (BussinessOrderDetialReq detialReq:list) {
//我先去数据库查询summary表中的数据
Object[] item=new Object[]{req.getOrgId(),detialReq.getLocationId(),detialReq.getTypeId(),detialReq.getSizeId(),detialReq.getPrice()};
searchItem.add(item);
}
List<InventorySummary> inventorySummaryList = inventorySummaryMapper.selectSumByItems(searchItem);
String msg="";
for (BussinessOrderDetialReq detialReq:list) {
for (InventorySummary is:inventorySummaryList) {
if (detialReq.getLocationId().equals(is.getLocationId()) && detialReq.getTypeId().equals(is.getTypeId())
&& detialReq.getSizeId().equals(is.getSizeId()) && detialReq.getPrice().compareTo(is.getUnitPrice())==0){
is.setNumber(is.getNumber()-detialReq.getPlanNum()<0?0:is.getNumber()-detialReq.getPlanNum());
msg=msg+"装备:" +detialReq.getTypeName()+"号型:"+detialReq.getSizeName()+"已存在审核最大可报废数量;";
}
break;
}
}
if (!msg.trim().isEmpty()){
throw new JYZBAppException(InventoryExceptionEnum.EQUIPMENT_NOT_EXIST, msg);
}
return inventorySummaryService.updateBatchById(inventorySummaryList);
}
@Override
public Object showOrderByBusOrderId(QueryBusFormReq req) {
......
......@@ -240,9 +240,9 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm
LogSummary logSummary = saveLogSummary(logreq);
String string="";
if (logSummary.getOutInState().equals("in")){
string=string+logSummary.getLocationName()+":入库【"+logSummary.getEquipmentList()+"】,数量:"+logSummary.getNumber()+"/";
string=string+logSummary.getLocationName()+":入库【"+logSummary.getEquipmentList()+"】,数量:"+logSummary.getNumber()+"\n";
}else {
string=string+logSummary.getLocationName()+":出库【"+logSummary.getEquipmentList()+"】,数量:"+logSummary.getNumber()+"/";
string=string+logSummary.getLocationName()+":出库【"+logSummary.getEquipmentList()+"】,数量:"+logSummary.getNumber()+"\n";
}
logSummaryService.save(logSummary);
Map<String, String> map = setState(logreq.getOutInState(), logreq.getBussinessType());
......
......@@ -13,9 +13,12 @@ import com.junmp.junmpProcess.dto.StartProcessInstanceDTO;
import com.junmp.junmpProcess.service.IFlowInstanceService;
import com.junmp.jyzb.api.bean.dto.*;
import com.junmp.jyzb.api.bean.query.*;
import com.junmp.jyzb.api.bean.req.UpdateBusFormReq;
import com.junmp.jyzb.api.bean.req.UpdateOrderDetailReq;
import com.junmp.jyzb.api.bean.req.UpdateOrderReq;
import com.junmp.jyzb.api.bean.vo.InOrderInfo;
import com.junmp.jyzb.api.exception.JYZBAppException;
import com.junmp.jyzb.api.exception.enums.InventoryExceptionEnum;
import com.junmp.jyzb.api.exception.enums.OrderExceptionEnum;
import com.junmp.jyzb.cache.MsgRedisCache;
import com.junmp.jyzb.entity.*;
......@@ -139,6 +142,10 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
@Transactional(rollbackFor = Exception.class)
@Override
public List<String> AddOrder(UpdateOrderReq req) {
//判断该单子是否是销毁出库单,如果是,则直接查询然后相应的库存进行修改,如果库存不足的情况下直接抛出异常提示
if (req.getBussinessType().equals("destruction") && ObjectUtil.isNotEmpty(req.getProcessDefinitionId())){
Boolean aBoolean= addOrRevokeAgentDestructionNum(req,true);
}
//修改单据使用次数状态,判断数据库是否有该单据,如果有,那么就判断当前单号是否一致,如果不一致,修改单据使用次数
Long orgId=0L;
OrderMain one =null ;
......@@ -222,7 +229,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
}
}
//添加日志记录
s=s+listReq.getWarehouseName()+"【"+listReq.getTypeName()+"--"+listReq.getSizeName()+"】预计数量:"+listReq.getPlanNum()+"/";
s=s+listReq.getWarehouseName()+"【"+listReq.getTypeName()+"--"+listReq.getSizeName()+"】预计数量:"+listReq.getPlanNum()+"\n";
detailList.add(detail);
Object[] item=new Object[]{req.getStartOrgId(),listReq.getWarehouseId(),listReq.getTypeId(),listReq.getSizeId(),listReq.getPrice()};
searchItem.add(item);
......@@ -314,6 +321,47 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
return list;
}
public boolean addOrRevokeAgentDestructionNum(UpdateOrderReq req, boolean flag){
List<UpdateOrderDetailReq> list = req.getDetailList();
List<Object[]> searchItem=new ArrayList<>();
for (UpdateOrderDetailReq detialReq:list) {
//我先去数据库查询summary表中的数据
Object[] item=new Object[]{req.getStartOrgId(),detialReq.getWarehouseId(),detialReq.getTypeId(),detialReq.getSizeId(),detialReq.getPrice()};
searchItem.add(item);
}
List<InventorySummary> inventorySummaryList = inventorySummaryMapper.selectSumByItems(searchItem);
String msg="";
for (UpdateOrderDetailReq detialReq:list) {
for (InventorySummary is:inventorySummaryList) {
if (detialReq.getWarehouseId().equals(is.getLocationId()) && detialReq.getTypeId().equals(is.getTypeId())
&& detialReq.getSizeId().equals(is.getSizeId()) && detialReq.getPrice().compareTo(is.getUnitPrice())==0){
if (ObjectUtil.isNull(is.getDestructionNumber())){
is.setDestructionNumber(0);
}
if (is.getNumber()-detialReq.getPlanNum()<0){
// is.setDestructionNumber(is.getDestructionNumber()+is.getNumber());
// is.setNumber(0);
msg=msg+"装备:" +detialReq.getTypeName()+"号型:"+detialReq.getSizeName()+"装备销毁数小于库存数,库存数为:"+is.getNumber()+"\n";
}else {
is.setDestructionNumber(is.getDestructionNumber()+detialReq.getPlanNum());
is.setNumber(is.getNumber() - detialReq.getPlanNum());
}
}
break;
}
}
if (!msg.trim().isEmpty()){
throw new JYZBAppException(InventoryExceptionEnum.EQUIPMENT_NOT_EXIST, msg);
}
return inventorySummaryService.updateBatchById(inventorySummaryList);
}
public StartProcessInstanceDTO setParams(StartProcessInstanceDTO startProcessInstanceDTO,UpdateOrderReq req,OrderMain order){
//业务单走审核流
......@@ -819,7 +867,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
if (uploadDetailReq.getModifyQuantity() >= 0 ){
//记账内容
s = s+uploadDetailReq.getTypeName()+"【"+
uploadDetailReq.getSizeName()+"】,单价:"+uploadDetailReq.getPrice()+",数量实入:"+uploadDetailReq.getActualNum()+",记账:"+uploadDetailReq.getModifyQuantity()+"/";
uploadDetailReq.getSizeName()+"】,单价:"+uploadDetailReq.getPrice()+",数量实入:"+uploadDetailReq.getActualNum()+",记账:"+uploadDetailReq.getModifyQuantity()+"\n";
// AccountingDto accountingDto = new AccountingDto();
// BeanPlusUtil.copyProperties(uploadDetailReq,accountingDto);
......
......@@ -883,7 +883,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
if(ObjectUtil.isNotNull(reqEquipments)){
for (PoliceEquipment equipment:reqEquipments) {
stringBuilder.append(equipment.getTypeName()+"【"+equipment.getSizeName()+"】,数量为:"+equipment.getNum()+"/");
stringBuilder.append(equipment.getTypeName()+"【"+equipment.getSizeName()+"】,数量为:"+equipment.getNum()+"\n");
inventoryQuantity+=equipment.getNum();
actualQuantity+=equipment.getNum();
}
......@@ -926,7 +926,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
&& policeEquipment.getTypeId().equals(one.getTypeId())){
Object[] item=new Object[]{policeEquipment.getOrgId(),policeEquipment.getLocationId(),policeEquipment.getTypeId(),policeEquipment.getSizeId(),policeEquipment.getPrice(),one.getNum()};
searchItem.add(item);
stringBuilder.append(policeEquipment.getTypeName()+"【"+policeEquipment.getSizeName()+"】,原数量:"+policeEquipment.getNum()+",取走:"+one.getNum()+",剩余:"+(policeEquipment.getNum()-one.getNum())+"/");
stringBuilder.append(policeEquipment.getTypeName()+"【"+policeEquipment.getSizeName()+"】,原数量:"+policeEquipment.getNum()+",取走:"+one.getNum()+",剩余:"+(policeEquipment.getNum()-one.getNum())+"\n");
inventoryQuantity+=policeEquipment.getNum();
actualQuantity+=one.getNum();
policeEquipment.setNum(one.getNum());
......
......@@ -175,6 +175,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateHumidityAndtemperature(HumidityAndtemperature req) {
Date date = new Date(req.getCreateTime());
//查询数据库仓库id取到仓库名称
Warehouse warehouse = getById(req.getWarehouseId());
//将数据放入redis
......@@ -191,10 +192,10 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
public List<HumidityAndtemperature> showHumidityAndtemperature(WarehouseReq req) {
String date="2023-12-01 00:00:00";
Long startTimeStamp = DateTimeUtil.TimeStringToLong(date);
long endTimeStamp = DateTimeUtil.getCurrentDateTime().getTime();
Long endTimeStamp = DateTimeUtil.getCurrentDateTime().toInstant().toEpochMilli();
List<Object> dataByTimestampRange = temperatureRedisCache.getDataByTimestampRange(req.getId(), startTimeStamp, endTimeStamp);
List<HumidityAndtemperature> collect = dataByTimestampRange.stream()
.map(obj -> (HumidityAndtemperature) obj) // 将 YourObjectClass 替换为实际的对象类型
.map(obj -> (HumidityAndtemperature) obj)
.collect(Collectors.toList());
return collect;
}
......
......@@ -28,7 +28,7 @@ public class BusinessUtil {
List<T> collect1=new ArrayList<>();
if (num!=0){
//判断整数是什么,就在第几页进行补
if(pageNo-1==integer){
if(pageNo-1==integer ){
for (int i = 0; i < 10-num; i++) {
try {
// 通过传递的 Class 对象创建泛型对象实例
......@@ -40,8 +40,8 @@ public class BusinessUtil {
}
}
}else {
//判断总长度是否大于0,如果大于0则不处理,如果等于0,直接插10条数据
if (size>0){
if (size>0 && integer!=1 ){
for (int i = 0; i < 10; i++) {
try {
// 通过传递的 Class 对象创建泛型对象实例
......
......@@ -137,137 +137,134 @@
<select id="getTotalNumberAndPrice" resultType="com.junmp.jyzb.entity.InventorySummary">
select sum(number) as number,sum(price)as price,
sum(stock_number)as stockNumber,sum(stock_number * unit_price) as stockNumberPrice,
sum(outbound_number)as outboundNumber,sum(outbound_number * unit_price) as outboundNumberPrice,
sum(destruction_number)as destructionNumber,sum(destruction_number * unit_price) as destructionNumberPrice,
sum(expire_number)as expireNumber,sum(expire_number * unit_price) as expireNumberPrice,
sum(broken_number)as brokenNumber,sum(broken_number * unit_price) as brokenNumberPrice
select sum(is.number) as number,sum(is.price)as price,
sum(is.stock_number)as stockNumber,sum(is.stock_number * unit_price) as stockNumberPrice,
sum(is.outbound_number)as outboundNumber,sum(is.outbound_number * unit_price) as outboundNumberPrice,
sum(is.destruction_number)as destructionNumber,sum(is.destruction_number * unit_price) as destructionNumberPrice,
sum(is.expire_number)as expireNumber,sum(is.expire_number * unit_price) as expireNumberPrice,
sum(is.broken_number)as brokenNumber,sum(is.broken_number * unit_price) as brokenNumberPrice
<if test="req.orgId != null and req.orgId != ''">
,org_id_int as orgId
,is.org_id_int as orgId
</if>
<if test="req.locationId !=null and req.locationId != ''">
,location_id as locationId
,is.location_id as locationId
</if>
<if test="req.locationType != null and req.locationType != ''">
,location_type as locationType
,is.location_type as locationType
</if>
FROM base_inventory_summary where 1=1
<if test="req.sizeNames != null and req.sizeNames.size() >0 ">
and
<foreach collection="req.sizeNames" item="item" open="(" separator="or" close=")">
size_name = #{item}
</foreach>
</if>
<if test="req.typeIds != null and req.typeIds.size()>0 ">
and
FROM base_inventory_summary `is`
join base_equipment_type et on is.type_id=et.id
where 1=1
<if test="req.typeIds !=null and req.typeIds.size()>0">
and (
<foreach collection="req.typeIds" item="item" open="(" separator="or" close=")">
type_id = #{item}
et.id=#{item} or et.parent_ids like CONCAT('%', #{item}, '%')
</foreach>
)
</if>
<if test="req.orgId != null and req.orgId != ''">
and org_id_int=#{req.orgId}
and is.org_id_int=#{req.orgId}
</if>
<if test="req.locationId !=null and req.locationId != ''">
and location_id=#{req.locationId}
and is.location_id=#{req.locationId}
</if>
<if test="req.sizeId != null and req.sizeId != ''">
and size_id=#{req.sizeId}
and is.size_id=#{req.sizeId}
</if>
<if test="req.TypeId != null and req.typeId != ''">
and type_id=#{req.typeId}
and is.type_id=#{req.typeId}
</if>
<if test="req.locationType != null and req.locationType != ''">
and location_type=#{req.locationType}
and is.location_type=#{req.locationType}
</if>
<choose>
<when test="req.number != null and req.number != ''">
<if test="req.number.charAt(0) == '='">
AND number = SUBSTRING(#{req.number}, 2)
AND is.number = SUBSTRING(#{req.number}, 2)
</if>
<if test="req.number.charAt(0) == '&lt;'">
AND number &lt; SUBSTRING(#{req.number}, 2)
AND is.number &lt; SUBSTRING(#{req.number}, 2)
</if>
<if test="req.number.charAt(0) == '&gt;'">
AND number &gt; SUBSTRING(#{req.number}, 2)
AND is.number &gt; SUBSTRING(#{req.number}, 2)
</if>
</when>
</choose>
<choose>
<when test="req.stockNumber != null and req.stockNumber != ''">
<if test="req.stockNumber.charAt(0) == '='">
AND stock_number = SUBSTRING(#{req.stockNumber}, 2)
AND is.stock_number = SUBSTRING(#{req.stockNumber}, 2)
</if>
<if test="req.stockNumber.charAt(0) == '&lt;'">
AND stock_number &lt; SUBSTRING(#{req.stockNumber}, 2)
AND is.stock_number &lt; SUBSTRING(#{req.stockNumber}, 2)
</if>
<if test="req.stockNumber.charAt(0) == '&gt;'">
AND stock_number &gt; SUBSTRING(#{req.stockNumber}, 2)
AND is.stock_number &gt; SUBSTRING(#{req.stockNumber}, 2)
</if>
</when>
</choose>
<choose>
<when test="req.outboundNumber != null and req.outboundNumber != ''">
<if test="req.outboundNumber.charAt(0) == '='">
AND outbound_number = SUBSTRING(#{req.outboundNumber}, 2)
AND is.outbound_number = SUBSTRING(#{req.outboundNumber}, 2)
</if>
<if test="req.outboundNumber.charAt(0) == '&lt;'">
AND outbound_number &lt; SUBSTRING(#{req.outboundNumber}, 2)
AND is.outbound_number &lt; SUBSTRING(#{req.outboundNumber}, 2)
</if>
<if test="req.outboundNumber.charAt(0) == '&gt;'">
AND outbound_number &gt; SUBSTRING(#{req.outboundNumber}, 2)
AND is.outbound_number &gt; SUBSTRING(#{req.outboundNumber}, 2)
</if>
</when>
</choose>
<choose>
<when test="req.expireNumber != null and req.expireNumber != ''">
<if test="req.expireNumber.charAt(0) == '='">
AND expire_number = SUBSTRING(#{req.expireNumber}, 2)
AND is.expire_number = SUBSTRING(#{req.expireNumber}, 2)
</if>
<if test="req.expireNumber.charAt(0) == '&lt;'">
AND expire_number &lt; SUBSTRING(#{req.expireNumber}, 2)
AND is.expire_number &lt; SUBSTRING(#{req.expireNumber}, 2)
</if>
<if test="req.expireNumber.charAt(0) == '&gt;'">
AND expire_number &gt; SUBSTRING(#{req.expireNumber}, 2)
AND is.expire_number &gt; SUBSTRING(#{req.expireNumber}, 2)
</if>
</when>
</choose>
<choose>
<when test="req.brokenNumber != null and req.brokenNumber != ''">
<if test="req.brokenNumber.charAt(0) == '='">
AND broken_number = SUBSTRING(#{req.brokenNumber}, 2)
AND is.broken_number = SUBSTRING(#{req.brokenNumber}, 2)
</if>
<if test="req.brokenNumber.charAt(0) == '&lt;'">
AND broken_number &lt; SUBSTRING(#{req.brokenNumber}, 2)
AND is.broken_number &lt; SUBSTRING(#{req.brokenNumber}, 2)
</if>
<if test="req.brokenNumber.charAt(0) == '&gt;'">
AND broken_number &gt; SUBSTRING(#{req.brokenNumber}, 2)
AND is.broken_number &gt; SUBSTRING(#{req.brokenNumber}, 2)
</if>
</when>
</choose>
<choose>
<when test="req.unitPrice != null and req.unitPrice != ''">
<if test="req.unitPrice.charAt(0) == '='">
AND unit_price = SUBSTRING(#{req.unitPrice}, 2)
AND is.unit_price = SUBSTRING(#{req.unitPrice}, 2)
</if>
<if test="req.unitPrice.charAt(0) == '&lt;'">
AND unit_price &lt; SUBSTRING(#{req.unitPrice}, 2)
AND is.unit_price &lt; SUBSTRING(#{req.unitPrice}, 2)
</if>
<if test="req.unitPrice.charAt(0) == '&gt;'">
AND unit_price &gt; SUBSTRING(#{req.unitPrice}, 2)
AND is.unit_price &gt; SUBSTRING(#{req.unitPrice}, 2)
</if>
</when>
</choose>
<choose>
<when test="req.price != null and req.price != ''">
<if test="req.price.charAt(0) == '='">
AND price = SUBSTRING(#{req.price}, 2)
AND is.price = SUBSTRING(#{req.price}, 2)
</if>
<if test="req.price.charAt(0) == '&lt;'">
AND price &lt; SUBSTRING(#{req.price}, 2)
AND is.price &lt; SUBSTRING(#{req.price}, 2)
</if>
<if test="req.price.charAt(0) == '&gt;'">
AND price &gt; SUBSTRING(#{req.price}, 2)
AND is.price &gt; SUBSTRING(#{req.price}, 2)
</if>
</when>
</choose>
......
......@@ -203,12 +203,15 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
String objJson= redisCache.get(processInstanceId);
redisCache.remove(processInstanceId);
List<MessageSendReq> msgs= JSONObject.parseArray(objJson,MessageSendReq.class);
if (ObjectUtil.isNotNull(msgs)){
msgs.forEach(msg->
{
messageApi.sendMessage(msg);
}
);
}
return new ResponseResult(HttpStatus.SUCCESS, ReturnMsg.PASS,ReturnMsg.PASS);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论