Commit 90fcb3fb by 李小惠

修改记账给出装备接口,修改单据查询审核条件

parent c795ae0b
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -111,7 +111,7 @@ public class InventoryReq extends BaseRequest { ...@@ -111,7 +111,7 @@ public class InventoryReq extends BaseRequest {
/** /**
* 生产日期 * 生产日期
*/ */
private DateTime productionDate; private Date productionDate;
/** /**
* 质保期 * 质保期
...@@ -128,8 +128,9 @@ public class InventoryReq extends BaseRequest { ...@@ -128,8 +128,9 @@ public class InventoryReq extends BaseRequest {
*/ */
private Integer fixCount; private Integer fixCount;
/** /**
* 超期状态 * 超期状态(-1查询全部的物资,包括超期的物资,0是未超期的物资,1为已超期的物资)
*/ */
@NotNull(message = "超期状态不能为空",groups = {export.class})
private Integer termState; private Integer termState;
/** /**
* 位置类型 * 位置类型
...@@ -192,4 +193,7 @@ public class InventoryReq extends BaseRequest { ...@@ -192,4 +193,7 @@ public class InventoryReq extends BaseRequest {
private List<InventoryReq> eqsList; private List<InventoryReq> eqsList;
private String startTime;
private String endTime;
} }
...@@ -132,6 +132,11 @@ public class OrderMainReq extends BaseRequest { ...@@ -132,6 +132,11 @@ public class OrderMainReq extends BaseRequest {
private Integer orderCurrentState; private Integer orderCurrentState;
/**
* 是否可见全部单子(1是,0否)
*/
private Integer isAllVisible;
} }
...@@ -221,4 +221,8 @@ public class QueryBusFormReq extends BaseRequest { ...@@ -221,4 +221,8 @@ public class QueryBusFormReq extends BaseRequest {
* 单据上次状态(forbidden禁止使用,outgoing 仅出库使用,incoming仅入库使用,bothuseing出入库都可以使用一次) * 单据上次状态(forbidden禁止使用,outgoing 仅出库使用,incoming仅入库使用,bothuseing出入库都可以使用一次)
*/ */
private String orderLastState; private String orderLastState;
/**
* 是否可见全部单子(1是,0否)
*/
private Integer isAllVisible;
} }
...@@ -195,5 +195,10 @@ public class UpdateBusFormReq extends BaseRequest { ...@@ -195,5 +195,10 @@ public class UpdateBusFormReq extends BaseRequest {
*/ */
private String orderLastState; private String orderLastState;
/**
* 是否可见全部单子(1是,0否)
*/
private Integer isAllVisible;
} }
package com.junmp.jyzb.api.bean.req; package com.junmp.jyzb.api.bean.req;
import com.junmp.jyzb.api.bean.query.InAndOutRecordReq.DetailJsonReq; import com.junmp.jyzb.api.bean.query.InAndOutRecordReq.DetailJsonReq;
import com.junmp.jyzb.api.bean.query.InventoryReq;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -90,6 +91,9 @@ public class UpdateOrderDetailReq implements Serializable { ...@@ -90,6 +91,9 @@ public class UpdateOrderDetailReq implements Serializable {
private Long orgId; private Long orgId;
private List<DetailJsonReq> childJson; private List<DetailJsonReq> childJson;
//具体epc的值
private List<InventoryReq> inventoryList;
//Epc类型(0固定资产1库存物资非固定资产) //Epc类型(0固定资产1库存物资非固定资产)
private Integer property; private Integer property;
......
...@@ -182,5 +182,10 @@ public class UpdateOrderReq extends BaseRequest implements Serializable { ...@@ -182,5 +182,10 @@ public class UpdateOrderReq extends BaseRequest implements Serializable {
private String eqsJson; private String eqsJson;
private Integer orderCurrentState; private Integer orderCurrentState;
/**
* 是否可见全部单子(1是,0否)
*/
private Integer isAllVisible;
} }
...@@ -41,7 +41,7 @@ public class Warehouse implements Serializable { ...@@ -41,7 +41,7 @@ public class Warehouse implements Serializable {
private String updateUser; private String updateUser;
@TableField("org_id_int") @TableField("org_id_int")
private Long orgId; private Long orgIdInt;
@TableField("is_locked") @TableField("is_locked")
private Integer isLocked; private Integer isLocked;
......
...@@ -44,6 +44,7 @@ import org.springframework.stereotype.Service; ...@@ -44,6 +44,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.management.remote.rmi._RMIConnection_Stub;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
...@@ -234,12 +235,11 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl ...@@ -234,12 +235,11 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl
startProcessInstanceDTO.setTypeOrder("bussinessOrder"); startProcessInstanceDTO.setTypeOrder("bussinessOrder");
startProcessInstanceDTO.setUserId(req.getApplyUserId()); startProcessInstanceDTO.setUserId(req.getApplyUserId());
startProcessInstanceDTO.setBussinessType(req.getBussinessType()); startProcessInstanceDTO.setBussinessType(req.getBussinessType());
//设置领用人
startProcessInstanceDTO.setUserName(ObjectUtil.isNotNull(req.getReturnUser())?req.getReturnUser():null);
//发物单位和收物单位 //发物单位和收物单位
switch (req.getBussinessType()){ switch (req.getBussinessType()){
case "use": case "use":
startProcessInstanceDTO.setStartOrgName(req.getOrgName()); startProcessInstanceDTO.setStartOrgName(req.getOrgName());
startProcessInstanceDTO.setUserName(req.getReturnUser());
break; break;
case "purchase": case "purchase":
startProcessInstanceDTO.setStartOrgName(req.getSupplierName()); startProcessInstanceDTO.setStartOrgName(req.getSupplierName());
...@@ -597,6 +597,11 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl ...@@ -597,6 +597,11 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl
eq.in( BusForm::getExamineState,examineStateList); eq.in( BusForm::getExamineState,examineStateList);
} else if (ObjectUtil.isNotNull(req.getExamineState()) && req.getExamineState().equals("finished")) { } else if (ObjectUtil.isNotNull(req.getExamineState()) && req.getExamineState().equals("finished")) {
eq.eq(ObjectUtil.isNotNull(req.getExamineState() ) && !req.getExamineState().trim().isEmpty(), BusForm::getExamineState, req.getExamineState()); eq.eq(ObjectUtil.isNotNull(req.getExamineState() ) && !req.getExamineState().trim().isEmpty(), BusForm::getExamineState, req.getExamineState());
}else if(ObjectUtil.isNotNull(req.getExamineState()) && req.getExamineState().equals("approved")){
List<String> examineStateList=new ArrayList<>();
examineStateList.add("finished");
examineStateList.add("refuse");
eq.in( BusForm::getExamineState,examineStateList);
} }
//报废、销毁的业务类型 //报废、销毁的业务类型
...@@ -608,16 +613,19 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl ...@@ -608,16 +613,19 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl
}else { }else {
eq.eq(ObjectUtil.isNotNull(req.getBussinessType()) && !req.getBussinessType().trim().isEmpty(), BusForm::getBussinessType, req.getBussinessType()); eq.eq(ObjectUtil.isNotNull(req.getBussinessType()) && !req.getBussinessType().trim().isEmpty(), BusForm::getBussinessType, req.getBussinessType());
} }
//领用人 //判断单子是否全部可见(0不是,1是)
if (ObjectUtil.isNotNull(req.getUserId()) && req.getBussinessType().equals("use")){ if (ObjectUtil.isNotNull(req.getIsAllVisible()) && req.getIsAllVisible()!=0) {
//当前登录人 //领用人
eq.eq(BusForm::getReturnUserId,req.getUserId()); if (ObjectUtil.isNotNull(req.getUserId()) && req.getBussinessType().equals("use")) {
}else { //当前登录人
LoginUser StartUser= LoginContext.getContext().getLoginUser(); eq.eq(BusForm::getReturnUserId, req.getUserId());
//当前登录人 } else {
eq.and(wrapper-> wrapper.eq(BusForm::getAgentId,StartUser.getUserId()) LoginUser StartUser = LoginContext.getContext().getLoginUser();
.or() //当前登录人
.like(BusForm::getHistoryAssign,StartUser.getUserId())); eq.and(wrapper -> wrapper.eq(BusForm::getAgentId, StartUser.getUserId())
.or()
.like(BusForm::getHistoryAssign, StartUser.getUserId()));
}
} }
if (req.getBussinessType().equals("allocate")){ if (req.getBussinessType().equals("allocate")){
if (req.getStartOrgId()!=null){ if (req.getStartOrgId()!=null){
......
...@@ -327,8 +327,8 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory ...@@ -327,8 +327,8 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
List<InventorySummary> inventorySummaryList = inventorySummaryMapper.selectSumByItems(searchItem); List<InventorySummary> inventorySummaryList = inventorySummaryMapper.selectSumByItems(searchItem);
if (inventorySummaryList.size()==1){//等于1表示他修改后的单价的汇总信息没有,需要新增一条 if (inventorySummaryList.size()==1){//等于1表示他修改后的单价的汇总信息没有,需要新增一条
InventorySummary is = inventorySummaryList.get(0); InventorySummary is = inventorySummaryList.get(0);
is.setStockNumber(is.getStockNumber()-size); is.setStockNumber(Math.max(is.getStockNumber()-size,0));
is.setNumber(is.getNumber()-size); is.setNumber(Math.max(is.getNumber()-size,0));
is.setPrice(is.getUnitPrice().multiply(BigDecimal.valueOf(is.getNumber()))); is.setPrice(is.getUnitPrice().multiply(BigDecimal.valueOf(is.getNumber())));
if (is.getNumber()==0 && is.getStockNumber()==0 && is.getOutboundNumber()==0 && is.getDestructionNumber()==0){ if (is.getNumber()==0 && is.getStockNumber()==0 && is.getOutboundNumber()==0 && is.getDestructionNumber()==0){
delList.add(is); delList.add(is);
...@@ -382,16 +382,22 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory ...@@ -382,16 +382,22 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
throw new ServiceException(CabinetExceptionEnum.PARAMETER_ERROR); throw new ServiceException(CabinetExceptionEnum.PARAMETER_ERROR);
}else { }else {
//批量修改个别装备 //批量修改个别装备
// List<Inventory> collect = list.stream().map(inventory -> {
// BeanPlusUtil.copyProperties(req,inventory );
// if (ObjectUtil.isNotNull(req.getShelfColumns()) && !req.getShelfColumns().toString().trim().isEmpty()
// && ObjectUtil.isNotNull(req.getShelfRanges()) && !req.getShelfRanges().toString().trim().isEmpty()
// && ObjectUtil.isNotNull(req.getShelfRows()) && !req.getShelfRows().toString().trim().isEmpty()) {
// inventory.setShelfLocation(req.getShelfRanges() + "/" + req.getShelfColumns() + "/" + req.getShelfRows());
// }
// return inventory;
// }).collect(Collectors.toList());
// List<Inventory> list1 = list(new LambdaQueryWrapper<Inventory>().eq(Inventory::getId, list));
List<Inventory> collect = list.stream().map(inventory -> { List<Inventory> collect = list.stream().map(inventory -> {
BeanPlusUtil.copyProperties(req,inventory ); inventory.setWarrantyPeriod(req.getWarrantyPeriod());
if (ObjectUtil.isNotNull(req.getShelfColumns()) && !req.getShelfColumns().toString().trim().isEmpty() inventory.setMaintenancePeriod(req.getMaintenancePeriod());
&& ObjectUtil.isNotNull(req.getShelfRanges()) && !req.getShelfRanges().toString().trim().isEmpty() inventory.setPrice(req.getPrice());
&& ObjectUtil.isNotNull(req.getShelfRows()) && !req.getShelfRows().toString().trim().isEmpty()) {
inventory.setShelfLocation(req.getShelfRanges() + "/" + req.getShelfColumns() + "/" + req.getShelfRows());
}
return inventory; return inventory;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return updateBatchById(collect); return updateBatchById(collect);
} }
......
...@@ -463,6 +463,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -463,6 +463,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
case "return": case "return":
startProcessInstanceDTO.setStartOrgName(req.getEndOrgName()); startProcessInstanceDTO.setStartOrgName(req.getEndOrgName());
startProcessInstanceDTO.setEndOrgName(req.getEndOrgName()); startProcessInstanceDTO.setEndOrgName(req.getEndOrgName());
startProcessInstanceDTO.setUserName(req.getReturnUser());
case "allocate": case "allocate":
startProcessInstanceDTO.setStartOrgName(req.getStartOrgName()); startProcessInstanceDTO.setStartOrgName(req.getStartOrgName());
startProcessInstanceDTO.setEndOrgName(req.getEndOrgName()); startProcessInstanceDTO.setEndOrgName(req.getEndOrgName());
...@@ -474,10 +475,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -474,10 +475,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
case "use": case "use":
startProcessInstanceDTO.setStartOrgName(req.getStartOrgName()); startProcessInstanceDTO.setStartOrgName(req.getStartOrgName());
startProcessInstanceDTO.setEndOrgName(req.getStartOrgName()); startProcessInstanceDTO.setEndOrgName(req.getStartOrgName());
break; startProcessInstanceDTO.setUserName(req.getReturnUser());
case "return":
startProcessInstanceDTO.setStartOrgName(req.getEndOrgName());
startProcessInstanceDTO.setEndOrgName(req.getEndOrgName());
break; break;
case "allocate": case "allocate":
startProcessInstanceDTO.setStartOrgName(req.getStartOrgName()); startProcessInstanceDTO.setStartOrgName(req.getStartOrgName());
...@@ -992,7 +990,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -992,7 +990,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
//将组织机构下面的所有仓库进行查询 //将组织机构下面的所有仓库进行查询
//判断传递的订单主id是否存在 //判断传递的订单主id是否存在
OrderMain orderMain = orderMainExist(req.getId()); OrderMain orderMain = orderMainExist(req.getId());
List<Warehouse> warehouseList = warehouseService.list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getOrgId, List<Warehouse> warehouseList = warehouseService.list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getOrgIdInt,
orderMain.getOrderType().equals("in") ? orderMain.getEndOrgId() : orderMain.getStartOrgId())); orderMain.getOrderType().equals("in") ? orderMain.getEndOrgId() : orderMain.getStartOrgId()));
Map<String,Warehouse> warehouseMap=new HashMap<>(); Map<String,Warehouse> warehouseMap=new HashMap<>();
warehouseList.forEach(warehouse -> warehouseMap.put(warehouse.getId(), warehouse)); warehouseList.forEach(warehouse -> warehouseMap.put(warehouse.getId(), warehouse));
...@@ -1051,6 +1049,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -1051,6 +1049,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
WarehouseInventory warehouseInventory=new WarehouseInventory(); WarehouseInventory warehouseInventory=new WarehouseInventory();
if (uploadDetailReq.getModifyQuantity() >= 0 ){ if (uploadDetailReq.getModifyQuantity() >= 0 ){
//遍历子单据下面的详细记账信息
for (DetailJsonReq detailJsonReq:JsonList) { for (DetailJsonReq detailJsonReq:JsonList) {
if (!warehouseMap.isEmpty()){ if (!warehouseMap.isEmpty()){
//判断是否有key存在,如果没有直接报错 //判断是否有key存在,如果没有直接报错
......
...@@ -86,8 +86,9 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse> ...@@ -86,8 +86,9 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
Warehouse warehouse = WarehoustExist(req.getId()); Warehouse warehouse = WarehoustExist(req.getId());
WarehouseDto warehouseDto = new WarehouseDto(); WarehouseDto warehouseDto = new WarehouseDto();
BeanPlusUtil.copyProperties(warehouse,warehouseDto); BeanPlusUtil.copyProperties(warehouse,warehouseDto);
warehouseDto.setOrgId(warehouse.getOrgIdInt());
//获取组织机构名称 //获取组织机构名称
PubOrg pubOrg = pubOrgService.PubOrgExist(warehouse.getOrgId()); PubOrg pubOrg = pubOrgService.PubOrgExist(warehouse.getOrgIdInt());
warehouseDto.setOrgName(pubOrg.getOrgName()); warehouseDto.setOrgName(pubOrg.getOrgName());
return warehouseDto; return warehouseDto;
} }
...@@ -138,10 +139,10 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse> ...@@ -138,10 +139,10 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
List<Warehouse> list = new ArrayList<>(); List<Warehouse> list = new ArrayList<>();
if (ObjectUtil.isNull(state) || (state!=1 && state!=0)){ if (ObjectUtil.isNull(state) || (state!=1 && state!=0)){
list = list(new LambdaQueryWrapper<Warehouse>() list = list(new LambdaQueryWrapper<Warehouse>()
.eq(Warehouse::getOrgId, orgId)); .eq(Warehouse::getOrgIdInt, orgId));
}else { }else {
list = list(new LambdaQueryWrapper<Warehouse>() list = list(new LambdaQueryWrapper<Warehouse>()
.eq(Warehouse::getOrgId, orgId) .eq(Warehouse::getOrgIdInt, orgId)
.eq(Warehouse::getState,state)); .eq(Warehouse::getState,state));
} }
...@@ -149,6 +150,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse> ...@@ -149,6 +150,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
WarehouseDto warehouseDto = new WarehouseDto(); WarehouseDto warehouseDto = new WarehouseDto();
BeanPlusUtil.copyProperties(warehouse,warehouseDto); BeanPlusUtil.copyProperties(warehouse,warehouseDto);
warehouseDto.setOrgName(orgName); warehouseDto.setOrgName(orgName);
warehouseDto.setOrgId(warehouse.getOrgIdInt());
warehouseDtoList.add(warehouseDto); warehouseDtoList.add(warehouseDto);
} }
return warehouseDtoList; return warehouseDtoList;
...@@ -170,7 +172,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse> ...@@ -170,7 +172,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
List<Warehouse> allWarehouse = new ArrayList<>(); List<Warehouse> allWarehouse = new ArrayList<>();
LambdaQueryWrapper<Warehouse> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Warehouse> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(Warehouse::getOrgId, allOrgId); queryWrapper.in(Warehouse::getOrgIdInt, allOrgId);
allWarehouse = warehouseMapper.selectList(queryWrapper); allWarehouse = warehouseMapper.selectList(queryWrapper);
return allWarehouse; return allWarehouse;
...@@ -184,7 +186,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse> ...@@ -184,7 +186,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
BeanPlusUtil.copyProperties(req, warehouse); BeanPlusUtil.copyProperties(req, warehouse);
warehouse.setUpdateTime(DateTimeUtil.getCurrentDateTime()); warehouse.setUpdateTime(DateTimeUtil.getCurrentDateTime());
MQDto mqDto = new MQDto(); MQDto mqDto = new MQDto();
mqDto.setApi("warehouseState"); mqDto.setApi("WarehouseState");
mqDto.setWarehouseId(req.getId()); mqDto.setWarehouseId(req.getId());
if (req.getState()==1){ if (req.getState()==1){
mqDto.setMessage("仓库启用"); mqDto.setMessage("仓库启用");
...@@ -194,7 +196,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse> ...@@ -194,7 +196,7 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
mqDto.setWarehouseState(0); mqDto.setWarehouseState(0);
} }
mqDto.setType(10); mqDto.setType(10);
MQ.SendMsg("warehouseMsg",req.getOrgId().toString(),mqDto);//推送至仓库主机 MQ.SendMsg("warehouseMsg",warehouse.getOrgIdInt().toString(),mqDto);//推送至仓库主机
return this.updateById(warehouse); return this.updateById(warehouse);
} }
......
...@@ -46,6 +46,8 @@ public class DateTimeUtil { ...@@ -46,6 +46,8 @@ public class DateTimeUtil {
} }
} }
//String->Long(将string类型的时间转成时间戳) //String->Long(将string类型的时间转成时间戳)
public static Long TimeStringToLong(String time){ public static Long TimeStringToLong(String time){
if (ObjectUtil.isNotNull(time) && !time.trim().isEmpty()){ if (ObjectUtil.isNotNull(time) && !time.trim().isEmpty()){
...@@ -72,4 +74,22 @@ public class DateTimeUtil { ...@@ -72,4 +74,22 @@ public class DateTimeUtil {
} }
} }
//String -> Date(将string类型转成Date)
public static Date TimeStringToDate(String time){
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date parse = null;
try {
parse = format.parse(time);
} catch (ParseException e) {
throw new RuntimeException(e);
}
return parse;
}
//将Date ->String (将Date转成String
public static String TimeDateToString(Date time){
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format1 = format.format(time);
return format1;
}
} }
\ No newline at end of file
...@@ -764,6 +764,9 @@ ...@@ -764,6 +764,9 @@
<if test="req.locationType !='all' and req.locationType != null"> <if test="req.locationType !='all' and req.locationType != null">
and wi.location_type=#{req.locationType} and wi.location_type=#{req.locationType}
</if> </if>
<if test="req.warehouseId != null and req.warehouseId != ''">
and wi.location_id =#{req.warehouseId}
</if>
<if test="req.termState!= -1"> <if test="req.termState!= -1">
and i.term_state=#{req.termState} and i.term_state=#{req.termState}
</if> </if>
...@@ -776,6 +779,12 @@ ...@@ -776,6 +779,12 @@
<if test="req.price !=null and req.price != ''"> <if test="req.price !=null and req.price != ''">
and i.price=#{req.price} and i.price=#{req.price}
</if> </if>
<if test="req.warrantyPeriod != null and req.warrantyPeriod != ''">
and i.warranty_period=#{req.warrantyPeriod}
</if>
<if test="req.maintenancePeriod != null and req.maintenancePeriod != ''">
and i.maintenance_period=#{req.maintenancePeriod}
</if>
ORDER BY wi.type_id,i.size_id ORDER BY wi.type_id,i.size_id
) as a ) as a
...@@ -801,6 +810,9 @@ ...@@ -801,6 +810,9 @@
<if test="req.locationType !='all' and req.locationType != null"> <if test="req.locationType !='all' and req.locationType != null">
and wi.location_type=#{req.locationType} and wi.location_type=#{req.locationType}
</if> </if>
<if test="req.warehouseId != null and req.warehouseId != ''">
and wi.location_id =#{req.warehouseId}
</if>
<if test="req.termState!= -1"> <if test="req.termState!= -1">
and i.term_state=#{req.termState} and i.term_state=#{req.termState}
</if> </if>
...@@ -813,6 +825,13 @@ ...@@ -813,6 +825,13 @@
<if test="req.price !=null and req.price != ''"> <if test="req.price !=null and req.price != ''">
and i.price=#{req.price} and i.price=#{req.price}
</if> </if>
<if test="req.warrantyPeriod != null and req.warrantyPeriod != ''">
and i.warranty_period=#{req.warrantyPeriod}
</if>
<if test="req.maintenancePeriod != null and req.maintenancePeriod != ''">
and i.maintenance_period=#{req.maintenancePeriod}
</if>
ORDER BY wi.type_id,i.size_id ORDER BY wi.type_id,i.size_id
<if test="pageNo != null and pageNo != '' and pageSize != null and pageSize != '' "> <if test="pageNo != null and pageNo != '' and pageSize != null and pageSize != '' ">
limit #{pageNo},#{pageSize} limit #{pageNo},#{pageSize}
......
...@@ -87,13 +87,15 @@ ...@@ -87,13 +87,15 @@
<if test="req.orderCurrentState != null and req.orderCurrentState!=''" > <if test="req.orderCurrentState != null and req.orderCurrentState!=''" >
and order_current_state = 1 and order_current_state = 1
</if> </if>
<if test="req.orderType=='in'"> <if test="req.isAllVisible != null and req.isAllVisible!=0">
and ( end_org_user_id = #{userId} <if test="req.orderType=='in'">
or history_assign like CONCAT('%', #{userId}, '%') or current_assign like CONCAT('%', #{userId}, '%')) and ( end_org_user_id = #{userId}
</if> or history_assign like CONCAT('%', #{userId}, '%') or current_assign like CONCAT('%', #{userId}, '%'))
<if test="req.orderType=='out' or req.orderType=='OUT'"> </if>
and (start_org_user_id = #{userId} <if test="req.orderType=='out' or req.orderType=='OUT'">
or history_assign like CONCAT('%', #{userId}, '%') or current_assign like CONCAT('%', #{userId}, '%')) and (start_org_user_id = #{userId}
or history_assign like CONCAT('%', #{userId}, '%') or current_assign like CONCAT('%', #{userId}, '%'))
</if>
</if> </if>
<if test="req.orderState !=null and req.orderState != ''"> <if test="req.orderState !=null and req.orderState != ''">
...@@ -110,9 +112,12 @@ ...@@ -110,9 +112,12 @@
<if test=" req.examineState=='unaudited'"> <if test=" req.examineState=='unaudited'">
and examine_state in('none','working') and examine_state in('none','working')
</if> </if>
<if test="req.examineState=='finished'"> <if test="req.examineState=='approved'">
and examine_state in('finished','refuse') and examine_state in('finished','refuse')
</if> </if>
<if test="req.examineState=='finished'">
and examine_state = 'finished'
</if>
<if test="req.startTime != null and req.startTime != ''"> <if test="req.startTime != null and req.startTime != ''">
and create_time &gt;= #{req.startTime} and create_time &gt;= #{req.startTime}
</if> </if>
......
...@@ -162,7 +162,7 @@ public class FlowInstanceServiceImpl extends FlowServiceFactory implements IFlow ...@@ -162,7 +162,7 @@ public class FlowInstanceServiceImpl extends FlowServiceFactory implements IFlow
processVariables.put(START_USER_INFO,JSONObject.toJSONString(StartUser)); processVariables.put(START_USER_INFO,JSONObject.toJSONString(StartUser));
processVariables.put(START_USER,StartUser.getRealName()); processVariables.put(START_USER,StartUser.getRealName());
processVariables.put(PROCESS_STATUS,BUSINESS_STATUS_1); processVariables.put(PROCESS_STATUS,BUSINESS_STATUS_1);
//领用人,调岗人 //领用人,调岗人,归还人
if (ObjectUtil.isNotNull(processInstanceDto.getUserName())){ if (ObjectUtil.isNotNull(processInstanceDto.getUserName())){
processVariables.put(USER_NAME,processInstanceDto.getUserName()); processVariables.put(USER_NAME,processInstanceDto.getUserName());
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论