Commit 05b67aaa by 李小惠

修改接口返回code吗,修改记账接口bug

parent 42445e73
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.
......@@ -66,7 +66,7 @@ public class LogSummaryDto implements Serializable {
/**
* 出入库类型:0出库/1入库
*/
private Integer outInState;
private String outInState;
private Integer number;
......@@ -101,6 +101,9 @@ public class LogSummaryDto implements Serializable {
private String createUser;
private BigDecimal price;
private Integer count;
private String orderCode;
}
......@@ -25,5 +25,6 @@ public class QueryEquipmentTypeReq {
* 是否需要添加组织机构返回
*/
private Boolean flag;
private String name;
}
......@@ -17,7 +17,7 @@ public enum CabinetBoxExceptionEnum implements IExceptionEnum {
*/
CABINETBOX_IS_EXISTS(CommonConstant.DEFAULT_USER_ERROR_CODE,"箱子已经存在,箱门id重复"),
BOXS_ISNOT_EXISTS(CommonConstant.DEFAULT_USER_ERROR_CODE+ JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 13, "{}"),
BOXS_ISNOT_EXISTS(CommonConstant.DEFAULT_CORE_ERROR_CODE, "{}"),
;
/**
......
......@@ -27,7 +27,7 @@ public enum CabinetExceptionEnum implements IExceptionEnum {
/**
* 单警柜不存在
*/
CABINET_ISNOT_EXISTS(CommonConstant.DEFAULT_USER_ERROR_CODE,"单警柜不存在"),
CABINET_ISNOT_EXISTS(CommonConstant.DEFAULT_CORE_ERROR_CODE,"单警柜不存在"),
/**
* 传入参数错误
......@@ -37,7 +37,7 @@ public enum CabinetExceptionEnum implements IExceptionEnum {
/**
* 箱门id不存在
*/
CABINETBOX_ISNOT_EXISTS(CommonConstant.DEFAULT_USER_ERROR_CODE,"箱门id不存在"),
CABINETBOX_ISNOT_EXISTS(CommonConstant.DEFAULT_CORE_ERROR_CODE,"箱门id不存在"),
;
......
......@@ -23,7 +23,7 @@ public enum CompanyExceptionEnum implements IExceptionEnum {
/**
* 应用不存在
*/
COMPANY_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "企业不存在"),;
COMPANY_NOT_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE , "企业不存在"),;
/**
* 错误编码
*/
......
......@@ -13,11 +13,11 @@ public enum DestoryUnitExceptionEnum implements IExceptionEnum {
/**
* 销毁、报废收物单位不存在
*/
DESTORYUNIT_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"销毁、报废收物单位不存在"),
DESTORYUNIT_NOT_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE,"销毁、报废收物单位不存在"),
/**
* 销毁、报废收物单位已存在
*/
DESTORYUNIT_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"销毁、报废收物单位已存在"),;
DESTORYUNIT_IS_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE,"销毁、报废收物单位已存在"),;
/**
* 错误编码
*/
......
......@@ -14,17 +14,17 @@ public enum EquipmentExceptionEnum implements IExceptionEnum {
/**
* 装备类别不存在
*/
EQUIPMENT_TYPE_NOT_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "装备或类别不存在"),
EQUIPMENT_TYPE_NOT_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE , "装备或类别不存在"),
/**
* 有多关联装备,无法删除
*/
EQUIPMENT_CHILDREN_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 13, "有多关联装备,无法删除"),
EQUIPMENT_CHILDREN_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE , "有多关联装备,无法删除"),
/**
* 装备不存在
*/
SUPPLIER_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 13, "{}"),
SUPPLIER_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE , "{}"),
/**
* 装备名称重复
......
......@@ -9,7 +9,7 @@ import lombok.Getter;
public enum ManufacturerExceptionEnum implements IExceptionEnum {
MANUTACTURER_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"生产厂商已经存在"),
MANUFACTURER_NOT_CHOOSE(CommonConstant.DEFAULT_USER_ERROR_CODE,"删除时未选中需要删除的生产厂商"),
MANUFACTURER_ISNOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"生产厂商为空或者不存在")
MANUFACTURER_ISNOT_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE,"生产厂商为空或者不存在")
;
/**
......
......@@ -6,13 +6,13 @@ import lombok.Getter;
@Getter
public enum OrderExceptionEnum implements IExceptionEnum {
ORDER_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"单据不存在"),
ORDER_NOT_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE,"单据不存在"),
ERROR_COMMOAND(CommonConstant.DEFAULT_USER_ERROR_CODE,"操作有误,无法既删除又修改"),
ORDER_CAN_NOT_UPDATE(CommonConstant.DEFAULT_USER_ERROR_CODE,"进行中的单据或已完成的单据无法修改"),
ORDERDETAIL_ISNOT_NULL(CommonConstant.DEFAULT_USER_ERROR_CODE,"记账子单据不能为空"),
ORDERDETAIL_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"子单据不存在"),
ORDERDETAIL_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE,"子单据不一致,操作失败"),
ROLE_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE,"审核组织机构用户配置异常!请检查日志"),
ORDERDETAIL_ERROR(CommonConstant.DEFAULT_CORE_ERROR_CODE,"子单据不一致,操作失败"),
ROLE_ERROR(CommonConstant.DEFAULT_CORE_ERROR_CODE,"审核组织机构用户配置异常!请检查日志"),
ORDER_CREATE_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE,"单子创建失败"),
ORDER_NUM_IS_NULL(CommonConstant.DEFAULT_USER_ERROR_CODE,"记账数量为空或0,请确认记账数量"),
ORDER_DEL_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE,"单子删除失败,只能删除待提交的单据")
......
......@@ -11,7 +11,7 @@ public enum OrgExceptionEnum implements IExceptionEnum {
/**
* 装备不存在
*/
ORG_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 13, "{}");
ORG_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE, "{}");
/**
......
......@@ -21,7 +21,7 @@ public enum PolicemanExceptionEnum implements IExceptionEnum {
/**
* 警员不存在
*/
POLICEMAN_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE,"警员不存在"),
POLICEMAN_NOT_EXIST(CommonConstant.DEFAULT_CORE_ERROR_CODE,"警员不存在"),
/**
* 警员编号已经存在,警员编号重复
......
......@@ -14,7 +14,7 @@ public enum PolicemanFingerExceptionEnum implements IExceptionEnum {
/**
* 警员指纹不存在
*/
POLICEMAN_FINGER_NOTEXISTS(CommonConstant.DEFAULT_USER_ERROR_CODE,"警员指纹不存在"),
POLICEMAN_FINGER_NOTEXISTS(CommonConstant.DEFAULT_CORE_ERROR_CODE,"警员指纹不存在"),
;
......
......@@ -10,7 +10,7 @@ public enum ShelfExceptionEnum implements IExceptionEnum {
/**
* 货架信息不存在
*/
SHELF_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "货架信息不存在"),
SHELF_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE , "货架信息不存在"),
;
......
......@@ -10,12 +10,12 @@ public enum SupplierExceptionEnum implements IExceptionEnum {
/**
* 供应商信息不存在
*/
SUPPLIER_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "供应商信息不存在"),
SUPPLIER_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE , "供应商信息不存在"),
/**
* 产品信息不存在
*/
PRODUCT_SKU_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 13, "号型不存在"),
PRODUCT_SKU_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE , "号型不存在"),
/**
* 厂商名称已存在
......
......@@ -10,7 +10,7 @@ public enum TriggerExceptionEnum implements IExceptionEnum {
/**
*
*/
TRIGGER_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "触发器不存在"),
TRIGGER_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE , "触发器不存在"),
/**
*
*/
......
......@@ -10,7 +10,7 @@ public enum WarehouseAreaExceptionEnum implements IExceptionEnum {
/**
* 仓库地区信息不存在
*/
WAREHOUSEAREA_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "地区信息不存在"),
WAREHOUSEAREA_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE , "地区信息不存在"),
/**
* 区域已存在
*/
......
......@@ -10,9 +10,9 @@ public enum WarehouseExceptionEnum implements IExceptionEnum {
/**
* 仓库信息不存在
*/
WAREHOUSE_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "仓库信息不存在"),
WAREHOUSE_IS_LOCKED(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "仓库锁库中,记账失败"),
WAREHOUSE_NAME_IS_EXIET(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "仓库名称已存在,请勿提交重复名称"),
WAREHOUSE_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE , "仓库信息不存在"),
WAREHOUSE_IS_LOCKED(CommonConstant.DEFAULT_USER_ERROR_CODE , "仓库锁库中,记账失败"),
WAREHOUSE_NAME_IS_EXIET(CommonConstant.DEFAULT_USER_ERROR_CODE , "仓库名称已存在,请勿提交重复名称"),
;
......
......@@ -67,10 +67,15 @@ public class OutAndInboundController {
@PostMapping(path = "/RecordSumByOrderId",name = "出入库单据查询展示(整个单子的记录)#enable")
@ApiOperation("出入库单据查询展示(整个单子的记录)")
public ApiRes<PageResult<LogSummaryDto>> RecordSumByOrderId (LogSummaryReq req){
public ApiRes<PageResult<LogSummaryDto>> RecordSumByOrderId (@RequestBody LogSummaryReq req){
return ApiRes.success(logSummaryService.RecordSumByOrderId(req));
}
@PostMapping(path = "/RecordSumByOrderIdCount",name = "出入库单据查询展示(整个单子的记录)#enable")
@ApiOperation("出入库单据查询展示(整个单子的记录)")
public ApiRes<LogSummaryDto> RecordSumByOrderIdCount (@RequestBody LogSummaryReq req){
return ApiRes.success(logSummaryService.RecordSumByOrderIdCount(req));
}
//装备出入库记录(根据条件查询)
......
package com.junmp.jyzb.controller;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.junmp.jyzb.api.bean.dto.UploadPolicePhotoDto;
import com.junmp.jyzb.api.bean.query.DbAccessReq;
import com.junmp.jyzb.api.bean.query.InAndOutRecordReq.PurchaseEqsReq;
import com.junmp.jyzb.api.bean.query.LogSummaryReq;
import com.junmp.jyzb.api.bean.query.OrderMainReq;
import com.junmp.jyzb.api.bean.query.PolicemanReq;
import com.junmp.jyzb.api.bean.req.UploadPolicePhotoReq;
......@@ -19,10 +21,7 @@ import com.junmp.jyzb.cache.OutInRecordRedisCache;
import com.junmp.jyzb.entity.Inventory;
import com.junmp.jyzb.entity.Policeman;
import com.junmp.jyzb.entity.PubOrg;
import com.junmp.jyzb.service.InventoryService;
import com.junmp.jyzb.service.PolicemanService;
import com.junmp.jyzb.service.PubOrgService;
import com.junmp.jyzb.service.PublicService;
import com.junmp.jyzb.service.*;
import com.junmp.jyzb.utils.DateTimeUtil;
import com.junmp.jyzb.utils.FileUtil;
import com.junmp.v2.common.bean.request.ValidationApi;
......@@ -102,6 +101,9 @@ public class PublicController {
private InventoryService inventoryService;
@Resource
private OrderMainService orderMainService;
@Resource
private OutInRecordRedisCache outInRecordRedisCache;
private final static String DB_URL_TEMPLATE = "jdbc:mysql://{}:{}/{}?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true";
......@@ -167,28 +169,22 @@ public class PublicController {
}
@PostMapping("/bbb")
public ApiRes<Boolean> bbb(@RequestBody PurchaseEqsReq eqsReq){
List<Inventory> collect1=new ArrayList<>();
Inventory inventory = new Inventory();
inventory.setEpc(eqsReq.getEpc());
inventory.setTypeId(eqsReq.getTypeId());
inventory.setSizeId(eqsReq.getSizeId());
inventory.setMaintenancePeriod(eqsReq.getMaintenancePeriod());
inventory.setWarrantyPeriod(eqsReq.getWarrantyPeriod());
inventory.setProperty(eqsReq.getProperty());
inventory.setLocationId(eqsReq.getLocationId());
inventory.setSupplierId(eqsReq.getSupplierId());
inventory.setPrice(eqsReq.getPrice());
// BeanPlusUtil.copyProperties(eqsReq, inventory);
inventory.setId(UUID.randomUUID().toString());
inventory.setCreateTime(DateTimeUtil.getCurrentDateTime());
inventory.setState("normal");
inventory.setBussinessState("normal");
inventory.setLocationState("in");
inventory.setLocationType(0);
// inventory.setOrgId(order.getOrgId());
collect1.add(inventory);
inventoryService.saveBatch(collect1);
public ApiRes<Boolean> bbb(@RequestBody OrderMainReq req){
List<LogSummaryReq> logList=new ArrayList<>();
List<Object> dataByTimestampRange = outInRecordRedisCache.getDataByTimestampRange(req.getId());
redisCache.remove("orderMainId:"+req.getId());
if (CollectionUtil.isNotEmpty(dataByTimestampRange)){
List<LogSummaryReq> collect1 = dataByTimestampRange.stream().map(obj -> (LogSummaryReq) obj).collect(Collectors.toList());
logList.addAll(collect1);
}
if (CollectionUtil.isNotEmpty(logList)){
orderMainService.addLogs(logList, req.getBussinessType());
}
return ApiRes.success(true);
}
......
......@@ -178,29 +178,32 @@ import static com.junmp.junmpProcess.common.CommonConstants.*;
//如果业务单是调拨单,那么该单子需要让双方都能发物单位和收物单位的仓管员和审核员都能看见
// (前提是发起单据的那一方只有发起人或者经办人和审批人员可见,同级人员不可见)
//获取申请人判断是调拨单的哪一方发起的
String agentId = busForm.getAgentId();
Long angentOrgId = sysUserOrgService.getOne(new LambdaQueryWrapper<SysUserOrg>()
.eq(SysUserOrg::getUserId, agentId)).getOrgId();
Long orgId=(busForm.getStartOrgId() == angentOrgId?busForm.getEndOrgId():busForm.getStartOrgId());
//将单子信息指定给另一方的仓管员和审核员可见
//获取组织机构下的所有仓管员和审核员id
String roleList="(1663372320355389441,1528003832557232130)";
List<UserListDTO> userList=orgUserMapper.QueryUserByRoleIdAndOrg(roleList,orgId.toString());
List<String> assigneeList=new ArrayList<>();
if (userList.size()>0)//判断有没有启动的当前单据,并且下一审核人信息不为空,有启动的单据则把审核人信息加入
{
for (UserListDTO userId :userList)
if (busForm.getBussinessType().equals("allocate")){
String agentId = busForm.getAgentId();
Long angentOrgId = sysUserOrgService.getOne(new LambdaQueryWrapper<SysUserOrg>()
.eq(SysUserOrg::getUserId, agentId)).getOrgId();
Long orgId=(busForm.getStartOrgId() == angentOrgId?busForm.getEndOrgId():busForm.getStartOrgId());
//将单子信息指定给另一方的仓管员和审核员可见
//获取组织机构下的所有仓管员和审核员id
String roleList="(1663372320355389441,1528003832557232130)";
List<UserListDTO> userList=orgUserMapper.QueryUserByRoleIdAndOrg(roleList,"("+orgId.toString()+")");
List<String> assigneeList=new ArrayList<>();
if (userList.size()>0)//判断有没有启动的当前单据,并且下一审核人信息不为空,有启动的单据则把审核人信息加入
{
assigneeList.add(userId.getUserID());
}
String assigneeString = String.join(",", assigneeList);
if (ObjectUtil.isNull(busForm.getHistoryAssign())){
busForm.setHistoryAssign(assigneeString);
}else {
busForm.setHistoryAssign(busForm.getHistoryAssign()+","+assigneeString);
for (UserListDTO userId :userList)
{
assigneeList.add(userId.getUserID());
}
String assigneeString = String.join(",", assigneeList);
if (ObjectUtil.isNull(busForm.getHistoryAssign())){
busForm.setHistoryAssign(assigneeString);
}else {
busForm.setHistoryAssign(busForm.getHistoryAssign()+","+assigneeString);
}
}
}
busFormService.updateById(busForm);
} else
if (Type.equals("reassignment")){//调岗申请单
......
......@@ -34,8 +34,7 @@ public interface LogSummaryMapper extends BaseMapper<LogSummary> {
@Param("pageNo")Long pageNo,
@Param("pageSize")Long pageSize);
int RecordSumByOrderIdSum(@Param("req") LogSummaryReq req);
LogSummaryDto RecordSumByOrderIdSum(@Param("req") LogSummaryReq req);
}
......
......@@ -49,7 +49,6 @@ public interface InventorySummaryService extends IService<InventorySummary> {
List<InventorySummary> GetEquipmentSummaryDetail(InventorySumReq req);
void setWarrantyInventoryAction();
void setDestoryGroupAction();
......
......@@ -28,4 +28,6 @@ public interface LogSummaryService extends IService<LogSummary> {
LogSummary ShowInOutRecordsByItemsCount(LogSummaryReq req);
PageResult<LogSummaryDto> RecordSumByOrderId(LogSummaryReq req);
LogSummaryDto RecordSumByOrderIdCount(LogSummaryReq req);
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.junmp.jyzb.api.bean.dto.OrderDto;
import com.junmp.jyzb.api.bean.dto.OrderMainDto;
import com.junmp.jyzb.api.bean.dto.ProcessOrderDto;
import com.junmp.jyzb.api.bean.query.LogSummaryReq;
import com.junmp.jyzb.api.bean.query.OrderMainReq;
import com.junmp.jyzb.api.bean.query.OrderUploadReq;
import com.junmp.jyzb.api.bean.query.QueryOrderLogReq;
......@@ -58,4 +59,5 @@ public interface OrderMainService extends IService<OrderMain> {
//快速创建入库单(快速移库内容)
// boolean addQuickOrder(OrderMain existOrder);
boolean addLogs(List<LogSummaryReq> list,String bussinessType);
}
......@@ -82,7 +82,8 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
public List<EquipmentTypeDto> getEquipmentList(QueryEquipmentTypeReq req) {
List<EquipmentType> list = list(new LambdaQueryWrapper<EquipmentType>()
.eq(EquipmentType::getType,req.getType())
.eq(ObjectUtil.isNotNull(req.getParentId()),EquipmentType::getParentId,req.getParentId()));
.eq(ObjectUtil.isNotNull(req.getParentId()),EquipmentType::getParentId,req.getParentId())
.like(ObjectUtil.isNotNull(req.getName()),EquipmentType::getName,req.getName()));
List<EquipmentTypeDto> collect = list.stream().map(equipmentType -> {
EquipmentTypeDto org = new EquipmentTypeDto();
BeanPlusUtil.copyProperties(equipmentType, org);
......@@ -525,6 +526,7 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
// 添加id字段不等于"00000000-0000-0000-0000-000000000000"的判断
wrapper.ne(EquipmentType::getId, "00000000-0000-0000-0000-000000000000");
wrapper.eq(ObjectUtil.isNotEmpty(req.getType()), EquipmentType::getType,req.getType() );
wrapper.like(ObjectUtil.isNotEmpty(req.getName()), EquipmentType::getName,req.getName() );
wrapper.orderByDesc(EquipmentType::getCreateTime);
return wrapper;
......
......@@ -519,13 +519,8 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
return wrapper;
}
//执行过质保期装备存储过程
@Override
public void setWarrantyInventoryAction() {
inventorySummaryMapper.setWarrantyInventoryAction();
System.out.println("111 = " + 111);
}
//执行过质保期装备存储过程
//执行销毁装备存储过程
@Override
public void setDestoryGroupAction() {
inventorySummaryMapper.setDestoryGroupAction();
......@@ -535,6 +530,7 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
//执行过质保期装备存储过程
@Override
public void setWarrantyGroupAction() {
inventorySummaryMapper.setWarrantyInventoryAction();
inventorySummaryMapper.setWarrantyGroupAction();
System.out.println("111 = " + 333);
......
package com.junmp.jyzb.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -27,6 +28,7 @@ import com.junmp.v2.db.api.page.PageResult;
import com.junmp.v2.file.api.bean.req.SysFileInfoReq;
import com.junmp.v2.file.api.bean.res.SysFileInfoResp;
import com.junmp.v2.file.biz.service.SysFileInfoService;
import javafx.scene.input.DataFormat;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -36,6 +38,7 @@ import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Year;
import java.util.*;
import java.util.stream.Collectors;
......@@ -140,14 +143,46 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm
//根据条件查询出入库记录(整个单子的汇总记录)
@Override
public PageResult<LogSummaryDto> RecordSumByOrderId(LogSummaryReq req) {
if (ObjectUtil.isNotNull(req.getColumn()) && !req.getColumn().trim().isEmpty() &&
(req.getOrder().equalsIgnoreCase("asc")|| req.getOrder().equalsIgnoreCase("desc")) &&
ObjectUtil.isNotNull(req.getOrder()) && !req.getOrder().trim().isEmpty()) {
//修改字段,和数据库字段进行统一
req.setColumn(req.getColumn().replaceAll("[A-Z]", "_$0").toLowerCase());
req.setOrder(req.getOrder().toLowerCase());
}
Page<LogSummaryDto> page = PageFactory.getDefaultPage(req.getPageNo(), req.getPageSize());
Calendar calendarBegin = DateUtil.parseByPatterns(DateUtil.endOfYear(DateTimeUtil.getCurrentDateTime()).toString(), "yyyy-MM-dd hh:mm:ss");
Date time = calendarBegin.getTime();
Calendar calendarEnd = DateUtil.parseByPatterns(DateUtil.beginOfYear(DateTimeUtil.getCurrentDateTime()).toString(), "yyyy-MM-dd hh:mm:ss");
Date time1 = calendarEnd.getTime();
req.setStartTime(DateTimeUtil.TimeDateToString(time));
req.setEndTime(DateTimeUtil.TimeDateToString(time1));
List<LogSummaryDto> logSummaryList=logSummaryMapper.RecordSumByOrderId(req,(req.getPageNo()-1)*req.getPageSize(), req.getPageSize());
int size=logSummaryMapper.RecordSumByOrderIdSum(req);
page.setTotal(size);
LogSummaryDto dto=logSummaryMapper.RecordSumByOrderIdSum(req);
page.setTotal(dto.getCount());
page.setRecords(logSummaryList);
return PageResultFactory.createPageResult(page);
}
@Override
public LogSummaryDto RecordSumByOrderIdCount(LogSummaryReq req) {
if (ObjectUtil.isNotNull(req.getColumn()) && !req.getColumn().trim().isEmpty() &&
(req.getOrder().equalsIgnoreCase("asc")|| req.getOrder().equalsIgnoreCase("desc")) &&
ObjectUtil.isNotNull(req.getOrder()) && !req.getOrder().trim().isEmpty()) {
//修改字段,和数据库字段进行统一
req.setColumn(req.getColumn().replaceAll("[A-Z]", "_$0").toLowerCase());
req.setOrder(req.getOrder().toLowerCase());
}
Calendar calendarBegin = DateUtil.parseByPatterns(DateUtil.endOfYear(DateTimeUtil.getCurrentDateTime()).toString(), "yyyy-MM-dd hh:mm:ss");
Date time = calendarBegin.getTime();
Calendar calendarEnd = DateUtil.parseByPatterns(DateUtil.beginOfYear(DateTimeUtil.getCurrentDateTime()).toString(), "yyyy-MM-dd hh:mm:ss");
Date time1 = calendarEnd.getTime();
req.setStartTime(DateTimeUtil.TimeDateToString(time));
req.setEndTime(DateTimeUtil.TimeDateToString(time1));
LogSummaryDto dto=logSummaryMapper.RecordSumByOrderIdSum(req);
return dto;
}
//本地主机返回出入库结果
@Transactional(rollbackFor = Exception.class)
......
......@@ -595,9 +595,17 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
}
private BusForm setState1(String orderType,Long orgId,String bussinessCode){
BusForm busform = busFormService.list(new LambdaQueryWrapper<BusForm>()
.eq(BusForm::getOrgId, orgId)
.in(BusForm::getBussinessCode, bussinessCode)).get(0);
BusForm busform = new BusForm();
if (bussinessCode.substring(0,2).equals("DB") && orderType.equals("in")){
busform = busFormService.list(new LambdaQueryWrapper<BusForm>()
.eq(BusForm::getEndOrgId, orgId)
.in(BusForm::getBussinessCode, bussinessCode)).get(0);
}else {
busform = busFormService.list(new LambdaQueryWrapper<BusForm>()
.eq(BusForm::getOrgId, orgId)
.in(BusForm::getBussinessCode, bussinessCode)).get(0);
}
busform.setOrderCurrentState(busform.getOrderLastState());
if (orderType.equals("in")){
switch (busform.getOrderCurrentState()){
......@@ -923,7 +931,6 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
List<Inventory> updateInvList=new ArrayList<>();
//遍历子单
for (UpdateOrderDetailReq uploadDetailReq : reqList) {
OrderDetail orderDetail = new OrderDetail();
......@@ -1081,7 +1088,6 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
}
}
//入库添加虚拟装备
if (CollectionUtil.isNotEmpty(addInvList)){
inventoryService.saveBatch(addInvList);
......@@ -1208,8 +1214,8 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
}
//将redis中的出入库记录一起存入数据库表中(根据orderMainId获取数据)
//开始时间戳为2000年1月1日 00:00:00
List<Object> dataByTimestampRange = outInRecordRedisCache.getDataByTimestampRange("orderMainId:"+orderMain.getId());
redisCache.remove(orderMain.getId());
List<Object> dataByTimestampRange = outInRecordRedisCache.getDataByTimestampRange(orderMain.getId());
//取了之后再进行将东西添加到出入库记录
//将人工记账的数据一起存入logList;
List<String> keys = new ArrayList<>(logMap.keySet());
......@@ -1229,7 +1235,8 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
logList.addAll(collect1);
}
if (CollectionUtil.isNotEmpty(logList)){
addLogs(logList);
addLogs(logList,req.getBussinessType());
redisCache.remove("orderMainId:"+orderMain.getId());
}
//添加日志
//更新主单据
......@@ -1260,7 +1267,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
return logSummaryReq;
}
private boolean addLogs(List<LogSummaryReq> list){
public boolean addLogs(List<LogSummaryReq> list,String bussinessType){
//添加一个列表logSummary,添加一个logDetail列表,添加一个orderLog列表
// List<LogSummary> logSummaryList=new ArrayList<>();
List<LogDetail> logDetailList=new ArrayList<>();
......@@ -1285,6 +1292,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
BeanPlusUtil.copyProperties(ld,logDetail);
logDetail.setSummaryId(logSummary.getId());
logDetail.setCreateTime(DateTimeUtil.getCurrentDateTime());
logDetail.setBussinessType(bussinessType);
logDetailList.add(logDetail);
}
}
......@@ -1426,8 +1434,10 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
Object[] criteria=new Object[]{orgId,value.getWarehouseId(),value.getTypeId(),value.getSizeId(),value.getPrice(),value.getProperty()};
searchCriteria.add(criteria);
}
//如果不选仓库直接是0记账那么默认直接记账结束
if(CollectionUtil.isEmpty(searchCriteria)){
return true;
}
//库存信息
List<InventorySummary> inventorySummaryList = inventorySummaryMapper.selectSum(searchCriteria);
List<InventorySummary> addList=new ArrayList<>();
......@@ -1457,12 +1467,11 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
is.setOutboundNumber(0);
is.setStockNumber(is.getStockNumber()+upReq.getModifyQuantity()-is.getOutboundNumber());
is.setNumber(is.getNumber()+upReq.getModifyQuantity()-is.getOutboundNumber());
is.setUseNumber(Math.max((ObjectUtil.isNull(is.getUseNumber())?0:is.getUseNumber())-upReq.getModifyQuantity(),0));
}else {
is.setOutboundNumber(is.getOutboundNumber()-upReq.getModifyQuantity());
is.setStockNumber(is.getStockNumber()+upReq.getModifyQuantity());
is.setUseNumber(Math.max((ObjectUtil.isNull(is.getUseNumber())?0:is.getUseNumber())-upReq.getModifyQuantity(),0));
}
is.setUseNumber(Math.max((ObjectUtil.isNull(is.getUseNumber())?0:is.getUseNumber())-upReq.getModifyQuantity(),0));
is.setPrice(is.getPrice().add(BigDecimal.valueOf(upReq.getModifyQuantity()).multiply(new BigDecimal(upReq.getPrice()))) );
break;
case "repair":
......@@ -1471,12 +1480,11 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
is.setOutboundNumber(0);
is.setStockNumber(is.getStockNumber()+upReq.getModifyQuantity()-is.getOutboundNumber());
is.setNumber(is.getNumber()+upReq.getModifyQuantity()-is.getOutboundNumber());
is.setFixNumber(Math.max((ObjectUtil.isNull(is.getFixNumber())?0:is.getFixNumber())-upReq.getModifyQuantity(),0));
}else {
is.setOutboundNumber(is.getOutboundNumber()-upReq.getModifyQuantity());
is.setStockNumber(is.getStockNumber()+upReq.getModifyQuantity());
is.setFixNumber(Math.max((ObjectUtil.isNull(is.getFixNumber())?0:is.getFixNumber())-upReq.getModifyQuantity(),0));
}
is.setFixNumber(Math.max((ObjectUtil.isNull(is.getFixNumber())?0:is.getFixNumber())-upReq.getModifyQuantity(),0));
is.setPrice(is.getPrice().add(BigDecimal.valueOf(upReq.getModifyQuantity()).multiply(new BigDecimal(upReq.getPrice()))) );
break;
}
......@@ -1499,7 +1507,6 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
case "use":
is.setOutboundNumber(is.getOutboundNumber()+upReq.getModifyQuantity());
is.setStockNumber(Math.max(is.getStockNumber() - upReq.getModifyQuantity(), 0));
is.setPrice(is.getPrice().subtract(BigDecimal.valueOf(upReq.getModifyQuantity()).multiply(new BigDecimal(upReq.getPrice()))) );
if (ObjectUtil.isNull(is.getUseCount())){
is.setUseCount(0);
}
......@@ -1512,7 +1519,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
case "repair":
is.setOutboundNumber(is.getOutboundNumber()+upReq.getModifyQuantity());
is.setStockNumber(Math.max(is.getStockNumber() - upReq.getModifyQuantity(), 0));
is.setPrice(is.getPrice().subtract(BigDecimal.valueOf(upReq.getModifyQuantity()).multiply(new BigDecimal(upReq.getPrice()))) );
if (ObjectUtil.isNull(is.getFixCount())){
is.setFixCount(0);
}
......@@ -1525,7 +1532,6 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
case "other":
is.setOutboundNumber(is.getOutboundNumber()+upReq.getModifyQuantity());
is.setStockNumber(Math.max(is.getStockNumber() - upReq.getModifyQuantity(), 0));
is.setPrice(is.getPrice().subtract(BigDecimal.valueOf(upReq.getModifyQuantity()).multiply(new BigDecimal(upReq.getPrice()))) );
break;
}
......
......@@ -1275,8 +1275,10 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
**/
@Override
public Policeman SearchFaceInfo(PolicemanReq req) {
Policeman policeman = PoliceExist(req.getId());
// Policeman policeman = PoliceExist(req.getId());
Policeman policeman = getById(req.getId());
return policeman;
}
......
package com.junmp.jyzb.task;
import com.junmp.jyzb.service.InventorySummaryService;
import com.junmp.jyzb.service.PublicService;
import com.junmp.v2.job.api.JobAction;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Slf4j
@Component
public class WarrantyInventoryAction implements JobAction{
@Resource
private InventorySummaryService inventorySummaryService;
@Override
public void action() {
inventorySummaryService.setWarrantyInventoryAction();
}
}
......@@ -648,7 +648,7 @@
(SELECT org_id,size_id,type_id,location_id,epc,location_name FROM `base_warehouse_inventory` wi
where org_id=#{req.orgId} and type_id=#{req.typeId}
and size_id=#{req.sizeId}
and location_state="in"
and location_state="in" and location_type=0
<if test="req.locationName != null and req.locationName != ''">
and location_name like CONCAT('%', req.locationName, '%')
</if>
......@@ -657,7 +657,7 @@
select epc,warranty_period,production_date,price
FROM base_inventory bi where org_id_int=#{req.orgId}
and type_id=#{req.typeId} and size_id=#{req.sizeId}
and location_state="in")as b on a.epc=b.epc
and location_state="in" and location_type=0)as b on a.epc=b.epc
) as t group by location_id,price,warranty_period,production_date
having 1=1
<if test="req.price != null and req.price!= ''">
......@@ -679,6 +679,7 @@
</select>
<select id="getEqsInfo" resultType="com.junmp.jyzb.entity.Inventory">
SELECT wi.id as inventoryId,wi.type_id,wi.size_id,wi.shelf_id,wi.shelf_location, wi.epc,wi.org_id,wi.location_state,
wi.type_name,wi.org_name,wi.size_name,wi.location_name,
wi.location_type,wi.location_id,i.id ,i.price,i.state,i.bussiness_state,
i.production_date,i.warranty_period,i.maintenance_period, i.term_state
FROM base_warehouse_inventory wi
......
......@@ -128,171 +128,110 @@
) as a
</select>
<select id="RecordSumByOrderId" resultType="com.junmp.jyzb.api.bean.dto.LogSummaryDto">
select t.* from (
(SELECT
t.bussiness_type AS bussiness_type,
t.order_code AS order_code,
t.out_in_state AS out_in_state,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.type_name, '' ))) AS equipment_list,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.device_type, '' ))) AS device_type,
GROUP_CONCAT( DISTINCT COALESCE (NULLIF( t.user_name, '' ))) AS user_name,
sum(t.number) AS number
FROM
(
SELECT
ld.bussiness_type,
ld.out_in_state,
ld.type_name,
a.* ,
count(*) as number
FROM
base_log_detail ld
JOIN (
SELECT
ls.id AS summary_id,
ls.order_code,
ls.order_main_id,
ls.location_name,
ls.user_name,
ls.device_type
FROM
base_log_summary ls
where ls.order_main_id is not null or ls.order_main_id !=''
) AS a ON a.summary_id = ld.summary_id
GROUP BY ld.bussiness_type,ld.out_in_state,
ld.type_name,a.order_code,a.summary_id,a.order_main_id,
a.location_name,
a.user_name,
a.device_type
) AS t
GROUP BY t.bussiness_type,t.order_code,t.out_in_state
)
ls.order_code,
ls.order_main_id,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( ls.device_type, '' ))) AS device_type,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( ls.user_name, '' ))) AS user_name,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( ls.equipment_list, '' ))) AS equipment_list,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( ls.location_name, '' ))) AS location_name,
ls.bussiness_type,
ls.out_in_state,
sum(number) as number
FROM
base_log_summary ls
where ls.order_main_id is not null or ls.order_main_id !='' and ls.org_id=#{req.orgId}
and ls.create_time>#{req.startTime} and ls.create_time &lt; #{req.endTime} and ls.location_type=0
GROUP BY ls.order_main_id,ls.order_code,ls.bussiness_type,ls.out_in_state)
union all (
SELECT
t.bussiness_type AS bussiness_type,
t.order_code AS order_code,
t.out_in_state AS out_in_state,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.type_name, '' ))) AS equipment_list,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.device_type, '' ))) AS device_type,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.user_name, '' ))) AS user_name,
sum(t.number) AS number
FROM
(
SELECT
ld.bussiness_type,
ld.out_in_state,
ld.type_name,
a.* ,
count(*) as number
FROM
base_log_detail ld
JOIN (
SELECT
ls.id AS summary_id,
ls.order_code,
ls.order_main_id,
ls.location_name,
ls.user_name,
ls.device_type
FROM
base_log_summary ls
where ls.order_main_id is null or ls.order_main_id =''
) AS a ON a.summary_id = ld.summary_id
GROUP BY ld.bussiness_type,ld.out_in_state,
ld.type_name,a.order_code,a.summary_id,a.order_main_id,
a.location_name,
a.user_name,
a.device_type
) AS t
GROUP BY t.bussiness_type,t.order_code,t.out_in_state,t.summary_id
)
SELECT
ls.order_code,
ls.order_main_id,
device_type,
user_name,
equipment_list,
location_name,
ls.bussiness_type,
ls.out_in_state,
number
FROM
base_log_summary ls
where ls.order_main_id is null or ls.order_main_id ='' and ls.org_id=#{req.orgId}
and ls.create_time>#{req.startTime} and ls.create_time &lt; #{req.endTime} and ls.location_type=0
)) as t
having 1=1
<if test="req.outInState != null and req.outInState != ''">
and t.out_in_state =#{req.outInState}
</if>
<if test="req.bussinessType != null and req.bussinessType != ''">
and t.bussiness_type =#{req.bussinessType}
</if>
<if test="req.locationName != null and req.locationName != ''">
and t.location_name =#{req.locationName}
</if>
<if test="req.typeName != null and req.typeName != ''">
and t.equipment_list =#{req.equipmentList}
</if>
<if test="req.userName != null and req.userName != ''">
and t.user_name =#{req.userName}
</if>
<if test="req.column != 'create_time' and req.column != null and req.column != '' and req.order != null and req.order != '' ">
order by ${req.column} ${req.order}
</if>
<if test="pageNo != null and pageNo != '' and pageSize != null and pageSize != '' ">
limit #{pageNo},#{pageSize}
</if>
</select>
<select id="RecordSumByOrderIdSum" resultType="java.lang.Integer">
select count(*) from (
(SELECT
t.bussiness_type AS bussiness_type,
t.order_code AS order_code,
t.out_in_state AS out_in_state,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.type_name, '' ))) AS equipment_list,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.device_type, '' ))) AS device_type,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.user_name, '' ))) AS user_name,
sum(t.number) AS number
FROM
(
SELECT
ld.bussiness_type,
ld.out_in_state,
ld.type_name,
a.* ,
count(*) as number
FROM
base_log_detail ld
JOIN (
SELECT
ls.id AS summary_id,
ls.order_code,
ls.order_main_id,
ls.location_name,
ls.user_name,
ls.device_type
FROM
base_log_summary ls
where ls.order_main_id is not null or ls.order_main_id !=''
) AS a ON a.summary_id = ld.summary_id
GROUP BY ld.bussiness_type,ld.out_in_state,
ld.type_name,a.order_code,a.summary_id,a.order_main_id,
a.location_name,
a.user_name,
a.device_type
) AS t
GROUP BY t.bussiness_type,t.order_code,t.out_in_state
)
union all (
SELECT
t.bussiness_type AS bussiness_type,
t.order_code AS order_code,
t.out_in_state AS out_in_state,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.type_name, '' ))) AS equipment_list,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.device_type, '' ))) AS device_type,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( t.user_name, '' ))) AS user_name,
sum(t.number) AS number
FROM
(
SELECT
ld.bussiness_type,
ld.out_in_state,
ld.type_name,
a.* ,
count(*) as number
FROM
base_log_detail ld
JOIN (
SELECT
ls.id AS summary_id,
ls.order_code,
ls.order_main_id,
ls.location_name,
ls.user_name,
ls.device_type
FROM
base_log_summary ls
where ls.order_main_id is null or ls.order_main_id =''
) AS a ON a.summary_id = ld.summary_id
GROUP BY ld.bussiness_type,ld.out_in_state,
ld.type_name,a.order_code,a.summary_id,a.order_main_id,
a.location_name,
a.user_name,
a.device_type
) AS t
GROUP BY t.bussiness_type,t.order_code,t.out_in_state,t.summary_id
)
) as aaa
<select id="RecordSumByOrderIdSum" resultType="com.junmp.jyzb.api.bean.dto.LogSummaryDto">
select sum(number) as number,count(*) as count FROM (
select t.* FROM(
(SELECT
ls.order_code,
ls.order_main_id,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( ls.device_type, '' ))) AS device_type,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( ls.user_name, '' ))) AS user_name,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( ls.equipment_list, '' ))) AS equipment_list,
GROUP_CONCAT(DISTINCT COALESCE (NULLIF( ls.location_name, '' ))) AS location_name,
ls.bussiness_type,
sum(number) as number
FROM
base_log_summary ls
where ls.order_main_id is not null or ls.order_main_id !='' and ls.org_id=#{req.orgId}
and ls.create_time>#{req.startTime} and ls.create_time &lt; #{req.endTime} and ls.location_type=0
GROUP BY ls.order_main_id,ls.order_code,ls.bussiness_type)
union all (
SELECT
ls.order_code,
ls.order_main_id,
device_type,
user_name,
equipment_list,
location_name,
ls.bussiness_type,
number
FROM
base_log_summary ls
where ls.order_main_id is null or ls.order_main_id ='' and ls.org_id=#{req.orgId}
and ls.create_time>#{req.startTime} and ls.create_time &lt; #{req.endTime} and ls.location_type=0
)) as t
having 1=1
<if test="req.outInState != null and req.outInState != ''">
and t.out_in_state =#{req.outInState}
</if>
<if test="req.bussinessType != null and req.bussinessType != ''">
and t.bussiness_type =#{req.bussinessType}
</if>
<if test="req.locationName != null and req.locationName != ''">
and t.location_name =#{req.locationName}
</if>
<if test="req.typeName != null and req.typeName != ''">
and t.equipment_list =#{req.equipmentList}
</if>
<if test="req.userName != null and req.userName != ''">
and t.user_name =#{req.userName}
</if>
) as a
</select>
......
......@@ -42,7 +42,7 @@ spring:
redis:
#host: 192.168.3.188
host: 192.168.3.121
host: 192.168.3.188
port: 6379
database: 1
password:
......
......@@ -182,10 +182,11 @@ public class SysFormServiceImpl extends ServiceImpl<ProcessTemplatesMapper, Proc
{
Map<String, Object> params = br.getParams();
LambdaQueryWrapper<ProcessTemplates> wrapper = new LambdaQueryWrapper<ProcessTemplates>();
wrapper.like(ObjectUtil.isNotEmpty(params.get("formName")),ProcessTemplates::getFormName,params.get("formName"));
wrapper.and(q -> q.eq(ProcessTemplates::getOrgId, params.get("orgId"))
.like(ObjectUtil.isNotEmpty(params.get("formName")),ProcessTemplates::getFormName,params.get("formName"))
.or()
.isNull(ProcessTemplates::getOrgId));
wrapper.orderByDesc(ProcessTemplates::getUpdated);
TemplateGroupMapper templateGroupMapper = SpringContextHolder.getBean(TemplateGroupMapper.class);
Page<ProcessTemplates> allformAndGroups =this.page(PageFactory.getDefaultPage(br.getPageNo(),br.getPageSize()),wrapper);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论