业务单据回退代码copy

purchase
anthonyywj2 3 years ago
parent 19f32be2a0
commit 3306777722

@ -7,6 +7,7 @@ import com.glxp.api.admin.req.basic.BasicDownloadRequest;
import com.glxp.api.admin.req.info.DeleteRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.service.basic.BasicDownloadService;
import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.util.RedisUtil;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
@ -30,6 +31,9 @@ public class SpsSyncDownloadController {
RedisUtil redisUtil;
@Resource
SpGetHttpClient spGetHttp;
@Resource
OrderService orderService;
@GetMapping("/spssync/download/basic/udiinfo/getStatus")
public BaseResponse getStatus(BasicDownloadRequest basicDownloadRequest) {

@ -8,6 +8,7 @@ import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.constant.Constant;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.dao.inout.OrderDao;
import com.glxp.api.admin.entity.auth.AuthAdmin;
import com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity;
import com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity;
@ -94,8 +95,6 @@ public class StockOrderController {
@Resource
InvStockPrintService stockPrintService;
@Resource
CompanyService companyService;
@Resource
BussinessLocalTypeService bussinessLocalTypeService;
@Resource
BasicUnitMaintainService basicUnitMaintainService;
@ -111,6 +110,8 @@ public class StockOrderController {
GennerOrderUtils gennerOrderUtils;
@Resource
private BussinessTypeService bussinessTypeService;
@Resource
private OrderDao orderDao;
@AuthRuleAnnotation("")
@GetMapping("/udiwms/stock/order/error")
@ -678,4 +679,46 @@ public class StockOrderController {
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
return authAdmin.getCustomerId() + "";
}
/**
*
*
* @param billNo
* @return
*/
@AuthRuleAnnotation("")
@GetMapping("/udiwms/stock/order/received/rollback")
public BaseResponse rollbackOrder(String billNo) {
if (StrUtil.isBlank(billNo)) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
OrderEntity orderEntity = orderDao.selectByBillNo(billNo);
if (StrUtil.isNotEmpty(orderEntity.getSupplementNo()) || StrUtil.isNotEmpty(orderEntity.getUllageSupNo())) {
return ResultVOUtils.error(500, "单据已补单,无法撤回!");
}
if (orderEntity.getExportStatus() == ConstantStatus.ORDER_EXPORT_ED) {
return ResultVOUtils.error(500, "单据已同步到内网UDI管理系统无法撤回");
}
boolean result = stockOrderService.rollbackOrder(billNo);
if (result) {
return ResultVOUtils.success();
}
return ResultVOUtils.error(ResultEnum.NOT_NETWORK, "撤回失败");
}
//未验收单据撤回到等待校验
@AuthRuleAnnotation("")
@GetMapping("/udiwms/stock/order/unReceive/rollback")
public BaseResponse rollUnReceivebackOrder(String billNo) {
if (StrUtil.isBlank(billNo)) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean result = stockOrderService.rollbackOrder(billNo);
if (result) {
return ResultVOUtils.success("撤回成功!");
}
return ResultVOUtils.error(ResultEnum.NOT_NETWORK, "撤回失败");
}
}

@ -1,8 +1,11 @@
package com.glxp.api.admin.controller.info;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ReflectUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.dao.schedule.ScheduledDao;
import com.glxp.api.admin.entity.info.ProductRemarkSetEntity;
import com.glxp.api.admin.entity.info.ScheduledEntity;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.req.info.SystemParamConfigRequest;
@ -174,4 +177,34 @@ public class SystemParamConfigController {
return ResultVOUtils.success(systemParamConfigEntity);
}
//获取耗材字典备用字段设置
@AuthRuleAnnotation("")
@GetMapping("/udiwms/sys/config/selectByBasic")
public BaseResponse selectByBasic() {
SystemParamConfigRequest systemParamConfigRequest = new SystemParamConfigRequest();
systemParamConfigRequest.setParamType(2);
systemParamConfigRequest.setParamStatus(1);
List<SystemParamConfigEntity> systemParamConfigEntities = systemParamConfigService.queryPage(systemParamConfigRequest);
ProductRemarkSetEntity productRemarkSetEntity = new ProductRemarkSetEntity();
if (CollUtil.isNotEmpty(systemParamConfigEntities) && systemParamConfigEntities.size() == 8) {
for (int i = 0; i < systemParamConfigEntities.size(); i++) {
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigEntities.get(i);
ReflectUtil.setFieldValue(productRemarkSetEntity, "remarkKey" + (i + 1), systemParamConfigEntity.getParamKey());
if (!systemParamConfigEntity.getParamValue().equals("0")) {
ReflectUtil.setFieldValue(productRemarkSetEntity, "remarkTitle" + (i + 1), systemParamConfigEntity.getParamValue());
ReflectUtil.setFieldValue(productRemarkSetEntity, "remarkEnable" + (i + 1), true);
} else {
ReflectUtil.setFieldValue(productRemarkSetEntity, "remarkEnable" + (i + 1), false);
}
}
}
return ResultVOUtils.success(productRemarkSetEntity);
}
}

@ -1268,11 +1268,11 @@ public class WareHouseController {
if (StrUtil.isBlank(code) || StrUtil.isBlank(userListJson))
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
List<AuthAdmin> userList = JSONUtil.toList(userListJson, AuthAdmin.class);
if (CollUtil.isEmpty(userList)) {
return ResultVOUtils.error(500, "用户列表不能为空");
}
// if (CollUtil.isEmpty(userList)) {
// return ResultVOUtils.error(500, "用户列表不能为空");
// }
warehouseUserService.saveWarehouseUser(code, JSONUtil.toList(userListJson, AuthAdmin.class));
warehouseUserService.saveWarehouseUser(code, userList);
InvSubWarehouseEntity invSubWarehouseEntity =
invSubWarehouseService.findByInvSubByCode(code);
invWarehouseService.updateTime(invSubWarehouseEntity.getParentId(), new Date());

@ -37,10 +37,7 @@ public class InvBusUserController {
@Resource
InvBusUserService invBusUserService;
@Resource
InvSubWarehouseService invSubWarehouseService;
@Resource
InvWarehouseService invWarehouseService;
@Resource
WarehouseBussinessTypeService warehouseBussinessTypeService;
@ -100,13 +97,11 @@ public class InvBusUserController {
invBusUserEntity.setScAction(warehouseBussinessTypeEntity.getAction());
invBusUserService.insertInvBusUser(invBusUserEntity);
});
InvBusUserEntity invBusUserEntity = new InvBusUserEntity();
invBusUserEntity.setSubInvCode(relBusRequset.getSubInvCode());
updateInvTime(invBusUserEntity);
}
InvBusUserEntity invBusUserEntity = new InvBusUserEntity();
invBusUserEntity.setSubInvCode(relBusRequset.getSubInvCode());
updateInvTime(invBusUserEntity);
return ResultVOUtils.success("修改成功!");
}
@ -130,6 +125,7 @@ public class InvBusUserController {
boolean b = invBusUserService.insertInvBusUser(invBusUserEntity);
updateInvTime(invBusUserEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
@ -169,11 +165,15 @@ public class InvBusUserController {
return ResultVOUtils.success();
}
@Resource
InvSubWarehouseService invSubWarehouseService;
@Resource
InvWarehouseService invWarehouseService;
public void updateInvTime(InvBusUserEntity invBusUserEntity) {
InvSubWarehouseEntity invSubWarehouseEntity = invSubWarehouseService.findByInvSubByCode(invBusUserEntity.getSubInvCode());
InvWarehouseEntity pEntity = invWarehouseService.selectByCode(invSubWarehouseEntity.getParentId());
pEntity.setUpdateTime(new Date());
invWarehouseService.updateInvWarehouse(pEntity);
}
}

@ -92,4 +92,12 @@ public interface StockOrderDao {
* @return
*/
String findBillTypeById(String id);
/**
*
*
* @param billNo
* @return
*/
StockOrderEntity selectByBillNo(@Param("billNo") String billNo);
}

@ -65,10 +65,21 @@ public class UdiInfoEntity {
private String spmc;
private String price;
private String cplx;
private String hchzsb;
//产品代理商
private String cpdls;
private String basicPrductRemak1;
private String basicPrductRemak2;
private String basicPrductRemak3;
private String basicPrductRemak4;
private String basicPrductRemak5;
private String basicPrductRemak6;
private String basicPrductRemak7;
private String basicPrductRemak8;
public Integer getId() {
return id;
}

@ -57,4 +57,14 @@ public class StockOrderPrintEntity extends StockOrderDetailEntity {
private String deptName;
private String billRemark;
private String basicPrductRemak1;
private String basicPrductRemak2;
private String basicPrductRemak3;
private String basicPrductRemak4;
private String basicPrductRemak5;
private String basicPrductRemak6;
private String basicPrductRemak7;
private String basicPrductRemak8;
}

@ -0,0 +1,34 @@
package com.glxp.api.admin.entity.info;
import lombok.Data;
@Data
public class ProductRemarkSetEntity {
private String remarkKey1;
private String remarkKey2;
private String remarkKey3;
private String remarkKey4;
private String remarkKey6;
private String remarkKey5;
private String remarkKey7;
private String remarkKey8;
private String remarkTitle1;
private String remarkTitle2;
private String remarkTitle3;
private String remarkTitle4;
private String remarkTitle5;
private String remarkTitle6;
private String remarkTitle7;
private String remarkTitle8;
private boolean remarkEnable1;
private boolean remarkEnable2;
private boolean remarkEnable4;
private boolean remarkEnable3;
private boolean remarkEnable5;
private boolean remarkEnable6;
private boolean remarkEnable7;
private boolean remarkEnable8;
}

@ -14,7 +14,7 @@ public class SystemParamConfigRequest extends ListPageRequest {
private String paramKey;
private String paramValue;
private int paramStatus;
private int paramType;
private Integer paramType;
private String paramExplain;
private String key;
}

@ -71,10 +71,21 @@ public class UdiRelevanceResponse {
private String measname;
private String price;
private String spmc;
private String cplx;
private String hchzsb;
//产品代理商
private String cpdls;
private String basicPrductRemak1;
private String basicPrductRemak2;
private String basicPrductRemak3;
private String basicPrductRemak4;
private String basicPrductRemak5;
private String basicPrductRemak6;
private String basicPrductRemak7;
private String basicPrductRemak8;
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
return 1;

@ -7,6 +7,8 @@ import com.glxp.api.admin.dao.basic.UdiRelevanceDao;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import com.glxp.api.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.httpclient.UdiDlHttpClient;
import com.glxp.api.admin.req.basic.CombineRequest;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
import com.glxp.api.admin.service.thrsys.ThrProductsService;
@ -119,8 +121,6 @@ public class UdiContrastService {
}
@Resource
GennerOrderUtils gennerOrderUtils;
@Resource
@ -129,6 +129,9 @@ public class UdiContrastService {
UdiRelevanceService udiRelevanceService;
@Resource
UdiInfoService udiInfoService;
@Resource
UdiDlHttpClient udiDlHttpClient;
public void createOnlyMainId(String mainId) {
FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest();
@ -170,4 +173,35 @@ public class UdiContrastService {
}
public long createOnlyUuid(CombineRequest combineRequest, String key) {
List<UdiInfoEntity> udiInfoEntities = udiDlHttpClient.getOrUpdateByUuid(key);
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());
udiRelevanceEntity.setManufactory(udiInfoEntities.get(0).getYlqxzcrbarmc());
if (StrUtil.isNotBlank(combineRequest.getSupName())) {
udiRelevanceEntity.setSupName(combineRequest.getSupName());
}
if (StrUtil.isNotBlank(combineRequest.getPrice())) {
udiRelevanceEntity.setPrice(combineRequest.getPrice());
}
long relId = gennerOrderUtils.getRelId();
udiRelevanceEntity.setId(String.valueOf(relId));
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
insertUdiInfos(udiInfoEntities);
return relId;
}
public void insertUdiInfos(List<UdiInfoEntity> udiInfoEntities) {
if (CollUtil.isNotEmpty(udiInfoEntities)) {
UdiInfoEntity udiInfoEntity = udiInfoService.findByUuid(udiInfoEntities.get(0).getUuid());
if (udiInfoEntity == null) {
udiInfoService.insertUdiInfos(UdiInfoUtil.initUdiInfoEntitys(udiInfoEntities));
}
}
}
}

@ -67,4 +67,6 @@ public interface StockOrderService {
* @return
*/
List<StockOrderEntity> filter(StockOrderUploadRequest request);
boolean rollbackOrder(String billNo);
}

@ -7,24 +7,41 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.constant.ConstantType;
import com.glxp.api.admin.dao.basic.BasicThirdSysBusApiDao;
import com.glxp.api.admin.dao.basic.BasicThirdSysDao;
import com.glxp.api.admin.dao.basic.BussinessLocalTypeDao;
import com.glxp.api.admin.dao.business.StockOrderDao;
import com.glxp.api.admin.dao.business.StockOrderDetailDao;
import com.glxp.api.admin.dao.inout.CodesDao;
import com.glxp.api.admin.dao.inout.OrderDao;
import com.glxp.api.admin.dao.inventory.InvPreInProductDao;
import com.glxp.api.admin.dao.inventory.InvPreInProductDetailDao;
import com.glxp.api.admin.dao.inventory.InvProductDao;
import com.glxp.api.admin.dao.inventory.InvProductDetailDao;
import com.glxp.api.admin.entity.basic.BasicThirdSysBusApiEntity;
import com.glxp.api.admin.entity.basic.BasicThirdSysEntity;
import com.glxp.api.admin.entity.basic.BussinessTypeEntity;
import com.glxp.api.admin.entity.business.StockOrderDetailEntity;
import com.glxp.api.admin.entity.business.StockOrderEntity;
import com.glxp.api.admin.entity.business.StockOrderPrintEntity;
import com.glxp.api.admin.entity.inout.OrderEntity;
import com.glxp.api.admin.entity.inventory.InvProductDetailEntity;
import com.glxp.api.admin.entity.inventory.InvProductEntity;
import com.glxp.api.admin.httpclient.req.UdiwmsOrderRequest;
import com.glxp.api.admin.req.basic.FilterBasicThirdSysDetailRequest;
import com.glxp.api.admin.req.business.StockOrderDetailFilterRequest;
import com.glxp.api.admin.req.business.StockOrderFilterRequest;
import com.glxp.api.admin.req.business.StockOrderQueryRequest;
import com.glxp.api.admin.req.business.StockOrderUploadRequest;
import com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest;
import com.glxp.api.admin.req.inventory.FilterInvProductRequest;
import com.glxp.api.admin.res.business.StockOrderDetailEntityVo;
import com.glxp.api.admin.res.business.StockOrderExportResponse;
import com.glxp.api.admin.service.basic.BussinessTypeService;
import com.glxp.api.admin.service.business.StockOrderService;
import com.glxp.api.admin.util.BusTypeCheckUtils;
import com.glxp.api.admin.util.DateUtil;
import com.glxp.api.admin.util.HttpOkClient;
import com.glxp.api.common.res.BaseResponse;
@ -34,10 +51,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@ -49,12 +63,32 @@ public class StockOrderServiceImpl implements StockOrderService {
StockOrderDao stockOrderDao;
@Resource
StockOrderDetailDao stockOrderDetailDao;
@Resource
private InvProductDao invProductDao;
@Resource
private InvProductDetailDao invProductDetailDao;
@Resource
private OrderDao orderDao;
@Resource
private BussinessLocalTypeDao bussinessLocalTypeDao;
@Resource
private InvPreInProductDetailDao invPreInProductDetailDao;
@Resource
private InvPreInProductDao invPreInProductDao;
@Resource
private CodesDao codesDao;
@Resource
private BasicThirdSysBusApiDao thirdSysBusApiDao;
@Resource
private BasicThirdSysDao basicThirdSysDao;
@Resource
private BasicThirdSysBusApiDao basicThirdSysBusApiDao;
@Resource
BussinessTypeService bussinessTypeService;
@Override
public List<StockOrderEntity> listStockOrders(StockOrderQueryRequest stockOrderQueryRequest) {
@ -245,4 +279,208 @@ public class StockOrderServiceImpl implements StockOrderService {
return stockOrderEntityList;
}
@Override
public boolean rollbackOrder(String billNo) {
//查询业务单据
StockOrderEntity stockOrderEntity = stockOrderDao.selectByBillNo(billNo);
//查询扫码单据
OrderEntity orderEntity = orderDao.selectByBillNo(billNo);
BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(orderEntity.getAction());
if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_CHECKED)) {
//回退未验收单据
/*
1.
2.
*/
if (BusTypeCheckUtils.isFirstCheck(bussinessTypeEntity, orderEntity)) {
stockOrderEntity.setOrderIdFk(null);
stockOrderEntity.setStatus(ConstantStatus.SORDER_CHECK);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
orderEntity.setErpFk("");
stockOrderDao.updateById(stockOrderEntity);
orderDao.updateOrder(orderEntity);
} else {
orderEntity.setErpFk("");
stockOrderDao.deleteById(stockOrderEntity.getId());
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
orderDao.updateOrder(orderEntity);
}
} else {
//回退已完成单据
/*
*/
if (isPreInOrder(orderEntity)) {
//查询预验收库库存详情
FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest();
filterInvProductDetailRequest.setOrderIdFk(orderEntity.getId());
List<InvProductDetailEntity> invProductDetailEntities = invPreInProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest);
Map<String, List<InvProductDetailEntity>> invPreInProductDetailMap = invProductDetailEntities
.stream()
.collect(Collectors.groupingBy(InvProductDetailEntity::getProductIdFk));
List<InvProductEntity> invPreInProductList = new ArrayList<>(invPreInProductDetailMap.keySet().size());
for (String productId : invPreInProductDetailMap.keySet()) {
List<InvProductDetailEntity> detailList = invPreInProductDetailMap.get(productId);
FilterInvProductRequest filterInvProductRequest = new FilterInvProductRequest();
filterInvProductRequest.setRelIdFk(productId);
filterInvProductRequest.setSupId(detailList.get(0).getSupId());
filterInvProductRequest.setInvWarehouseCode(detailList.get(0).getInvWarehouseCode());
filterInvProductRequest.setInvStorageCode(detailList.get(0).getInvStorageCode());
if (StrUtil.isBlank(detailList.get(0).getBatchNo())) {
filterInvProductRequest.setBatchNo("empty");
} else {
filterInvProductRequest.setBatchNo(detailList.get(0).getBatchNo());
}
List<InvProductEntity> invProductEntities = invPreInProductDao.filterInvProduct(filterInvProductRequest);
InvProductEntity invProductEntity = invProductEntities.get(0);
detailList.forEach(invProductDetailEntity -> {
calculateInvCount(invProductEntity, invProductDetailEntity);
});
invPreInProductList.add(invProductEntity);
}
//删除库存详情
invPreInProductDetailDao.deleteByOrderId(orderEntity.getId());
//删除码详情
codesDao.deleteByOrderId(orderEntity.getId());
//更新库存
for (InvProductEntity invProductEntity : invPreInProductList) {
//查询库存码详情,如果库存码详情为空,则删除此库存
FilterInvProductDetailRequest detailParams = new FilterInvProductDetailRequest();
detailParams.setBatchNo(invProductEntity.getBatchNo());
detailParams.setInvCodes(Collections.singletonList(invProductEntity.getInvStorageCode()));
detailParams.setProductIdFk(invProductEntity.getRelIdFk());
int count = invPreInProductDetailDao.statCount(detailParams);
if (count == 0) {
//如果库存码详情为空,则删除此库存
invPreInProductDao.deleteById(String.valueOf(invProductEntity.getId()));
} else {
invPreInProductDao.updateInvProduct(invProductEntity);
}
}
} else {
//非预验收单据库存,正常扣减库存
FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest();
filterInvProductDetailRequest.setOrderIdFk(orderEntity.getId());
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest);
List<InvProductEntity> invProductList = new ArrayList<>();
for (InvProductDetailEntity invProductDetailEntity : invProductDetailEntities) {
FilterInvProductRequest filterInvProductRequest = new FilterInvProductRequest();
filterInvProductRequest.setRelIdFk(invProductDetailEntity.getProductIdFk());
filterInvProductRequest.setSupId(invProductDetailEntity.getSupId());
filterInvProductRequest.setInvWarehouseCode(invProductDetailEntity.getInvWarehouseCode());
filterInvProductRequest.setInvStorageCode(invProductDetailEntity.getInvStorageCode());
if (StrUtil.isBlank(invProductDetailEntity.getBatchNo())) {
filterInvProductRequest.setBatchNo("empty");
} else {
filterInvProductRequest.setBatchNo(invProductDetailEntity.getBatchNo());
}
List<InvProductEntity> invProductEntities = invProductDao.filterInvProduct(filterInvProductRequest);
if (CollUtil.isNotEmpty(invProductEntities) && invProductEntities.size() > 0) {
InvProductEntity invProductEntity = invProductEntities.get(0);
calculateInvCount(invProductEntity, invProductDetailEntity);
invProductList.add(invProductEntity);
} else {
return false;
}
}
//删除库存详情
invProductDetailDao.deleteByOrderId(orderEntity.getId());
//更新库存
for (InvProductEntity invProductEntity : invProductList) {
//查询库存码详情,如果库存码详情为空,则删除此库存
FilterInvProductDetailRequest detailParams = new FilterInvProductDetailRequest();
detailParams.setBatchNo(invProductEntity.getBatchNo());
detailParams.setInvCodes(Collections.singletonList(invProductEntity.getInvStorageCode()));
detailParams.setInvWarehouseCode(invProductEntity.getInvWarehouseCode());
detailParams.setSupId(invProductEntity.getSupId());
detailParams.setProductIdFk(invProductEntity.getRelIdFk());
int count = invProductDetailDao.statCount(detailParams);
if (count == 0) {
//如果库存码详情为空,则删除此库存
invProductDao.deleteById(String.valueOf(invProductEntity.getId()));
} else {
invProductDao.updateInvProduct(invProductEntity);
}
}
}
//开始回退单据
//回退逻辑
//1.需要二次验收,则回退到未验收状态
//2.不需要二次验收:
// 1. 需要一次验收:则回退到等待校验状态
// 2. 不需要一次验收:则回退到新增扫码单据状态
if (BusTypeCheckUtils.isSecondCheck(bussinessTypeEntity, orderEntity)) {
stockOrderEntity.setStatus(ConstantStatus.SORDER_CHECKED);
} else {
if (BusTypeCheckUtils.isFirstCheck(bussinessTypeEntity, orderEntity)) {
stockOrderEntity.setOrderIdFk(null);
stockOrderEntity.setStatus(ConstantStatus.SORDER_CHECK);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
orderEntity.setErpFk("");
stockOrderDao.updateById(stockOrderEntity);
orderDao.updateOrder(orderEntity);
} else {
orderEntity.setErpFk("");
stockOrderDao.deleteById(stockOrderEntity.getId());
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
orderDao.updateOrder(orderEntity);
}
}
}
//更新业务单据数据
stockOrderDao.updateById(stockOrderEntity);
return true;
}
/**
*
*
* @param invProductEntity
* @param invProductDetailEntity
*/
private void calculateInvCount(InvProductEntity invProductEntity, InvProductDetailEntity invProductDetailEntity) {
if (ConstantType.TYPE_PUT.equals(invProductDetailEntity.getMainAction())) {
//入库,扣减入库数量
int count = invProductEntity.getInCount() - invProductDetailEntity.getCount();
invProductEntity.setInCount(count);
} else if (ConstantType.TYPE_OUT.equals(invProductDetailEntity.getMainAction())) {
//出库,扣减出库数量
int count = invProductEntity.getOutCount() - invProductDetailEntity.getCount();
invProductEntity.setOutCount(count);
}
}
/**
*
*
* @param orderEntity
* @return
*/
private boolean isPreInOrder(OrderEntity orderEntity) {
Boolean isTrue = bussinessLocalTypeDao.selectPreInByOrderType(orderEntity.getAction());
if (isTrue == null)
return false;
return isTrue;
}
}

@ -18,8 +18,10 @@ public class SystemParamConfigServiceImpl implements SystemParamConfigService {
@Override
public List<SystemParamConfigEntity> queryPage(SystemParamConfigRequest SystemParamConfigRequest) {
int offset = (SystemParamConfigRequest.getPage() - 1) * SystemParamConfigRequest.getLimit();
PageHelper.offsetPage(offset, SystemParamConfigRequest.getLimit());
if (SystemParamConfigRequest.getPage() != null) {
int offset = (SystemParamConfigRequest.getPage() - 1) * SystemParamConfigRequest.getLimit();
PageHelper.offsetPage(offset, SystemParamConfigRequest.getLimit());
}
List<SystemParamConfigEntity> list = systemParamConfigDao.queryPage(SystemParamConfigRequest);
return list;
}

@ -549,6 +549,8 @@ public class OrderServiceImpl implements OrderService {
//删除库存详情
invPreInProductDetailDao.deleteByOrderId(id);
//删除码详情
codesDao.deleteByOrderId(id);
//更新库存
for (InvProductEntity invProductEntity : invPreInProductList) {
//查询库存码详情,如果库存码详情为空,则删除此库存
@ -561,7 +563,7 @@ public class OrderServiceImpl implements OrderService {
//如果库存码详情为空,则删除此库存
invPreInProductDao.deleteById(String.valueOf(invProductEntity.getId()));
} else {
invProductDao.updateInvProduct(invProductEntity);
invPreInProductDao.updateInvProduct(invProductEntity);
}
}
} else {

@ -65,6 +65,8 @@ public class WarehouseUserServiceImpl implements WarehouseUserService {
@Override
public void saveWarehouseUser(String code, List<AuthAdmin> userList) {
//删除旧数据
warehouseUserDao.deleteByCode(code);
if (CollUtil.isNotEmpty(userList)) {
List<WarehouseUserEntity> warehouseUserEntities = new ArrayList<>(userList.size());
userList.forEach(user -> {
@ -74,8 +76,6 @@ public class WarehouseUserServiceImpl implements WarehouseUserService {
warehouseUserEntity.setUserid(user.getId());
warehouseUserEntities.add(warehouseUserEntity);
});
//删除旧数据
warehouseUserDao.deleteByCode(code);
warehouseUserDao.batchInsert(warehouseUserEntities);
}
}

@ -104,11 +104,20 @@ public class InvProductServiceImpl implements InvProductService {
for (String relIdFk : relIdFkSet) {
if (CollUtil.isNotEmpty(batchNoSet)) {
for (String batchNo : batchNoSet) {
List<InvProductResponse> list = data.stream().filter(product -> product.getRelIdFk().equals(relIdFk)).filter(product -> product.getBatchNo().equals(batchNo)).collect(Collectors.toList());
List<InvProductResponse> list =
data.stream().filter(product -> product.getRelIdFk().equals(relIdFk))
.filter(product -> StrUtil.trimToEmpty(product.getBatchNo()).equals(StrUtil.trimToEmpty(batchNo)))
.collect(Collectors.toList());
if (CollUtil.isNotEmpty(list)) {
InvProductResponse invProductResponse = list.get(0);
int inCount = data.stream().filter(product -> product.getRelIdFk().equals(relIdFk)).filter(product -> product.getBatchNo().equals(batchNo)).mapToInt(InvProductResponse::getInCount).sum();
int outCount = data.stream().filter(product -> product.getRelIdFk().equals(relIdFk)).filter(product -> product.getBatchNo().equals(batchNo)).mapToInt(InvProductResponse::getOutCount).sum();
int inCount = data.stream()
.filter(product -> product.getRelIdFk().equals(relIdFk))
.filter(product -> StrUtil.trimToEmpty(product.getBatchNo()).equals(StrUtil.trimToEmpty(batchNo)))
.mapToInt(InvProductResponse::getInCount).sum();
int outCount = data.stream()
.filter(product -> product.getRelIdFk().equals(relIdFk))
.filter(product -> StrUtil.trimToEmpty(product.getBatchNo()).equals(StrUtil.trimToEmpty(batchNo)))
.mapToInt(InvProductResponse::getOutCount).sum();
invProductResponse.setInCount(inCount);
invProductResponse.setOutCount(outCount);
invProductResponse.setReCount(inCount - outCount);

@ -0,0 +1,98 @@
package com.glxp.api.admin.util;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.entity.basic.BussinessTypeEntity;
import com.glxp.api.admin.entity.inout.OrderEntity;
public class BusTypeCheckUtils {
public static boolean isFirstCheck(BussinessTypeEntity bussinessTypeEntity, OrderEntity orderEntity) {
if (bussinessTypeEntity.isCheckEnable()) {
if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDIMS) {
if (bussinessTypeEntity.isCheckUdims()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_WEBNEW) {
if (bussinessTypeEntity.isCheckWebNew()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAED) {
if (bussinessTypeEntity.isCheckPdaEd()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAUN) {
if (bussinessTypeEntity.isCheckPdaUn()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PC) {
if (bussinessTypeEntity.isCheckPc()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_CHANGE) {
if (bussinessTypeEntity.isCheckChange()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PEACE_CHANGE) {
if (bussinessTypeEntity.isCheckBalacne()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_COPY) {
if (bussinessTypeEntity.isCheckCopy()) {
return true;
}
}
}
return false;
}
public static boolean isSecondCheck(BussinessTypeEntity bussinessTypeEntity, OrderEntity orderEntity) {
if (bussinessTypeEntity.isSecCheckEnable()) {
if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDIMS) {
if (bussinessTypeEntity.isSecCheckUdims()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_WEBNEW) {
if (bussinessTypeEntity.isSecCheckWebNew()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAED) {
if (bussinessTypeEntity.isSecCheckPdaEd()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAUN) {
if (bussinessTypeEntity.isSecCheckPdaUn()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PC) {
if (bussinessTypeEntity.isSecCheckPc()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_CHANGE) {
if (bussinessTypeEntity.isSecCheckChange()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PEACE_CHANGE) {
if (bussinessTypeEntity.isSecCheckBalacne()) {
return true;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_COPY) {
if (bussinessTypeEntity.isSecCheckCopy()) {
return true;
}
}
}
return false;
}
}

@ -61,7 +61,7 @@
<insert id="insertAuthAdmin" keyProperty="id" parameterType="com.glxp.api.admin.entity.auth.AuthAdmin">
INSERT INTO
auth_user(userName,passWord,lastLoginIp,lastLoginTime,createTime,userFlag
,employeeName,CustomerId,lastModifyTime,locInvCode,locSubInvCode,dept)
,employeeName,CustomerId,lastModifyTime,locInvCode,locSubInvCode,dept,comments)
values
(#{userName},
<choose>
@ -97,13 +97,13 @@
#{lastModifyTime},
#{locInvCode},
#{locSubInvCode},
#{dept})
#{dept},#{comments})
</insert>
<insert id="replaceAuthAdmin" keyProperty="id" parameterType="com.glxp.api.admin.entity.auth.AuthAdmin">
replace
INTO auth_user(id, userName, passWord, lastLoginIp,
lastLoginTime, createTime, userFlag, lastModifyTime, employeeName,CustomerId,locInvCode,locSubInvCode,dept)
lastLoginTime, createTime, userFlag, lastModifyTime, employeeName,CustomerId,locInvCode,locSubInvCode,dept,comments)
values (
#{id},
#{userName},
@ -117,7 +117,7 @@
#{CustomerId},
#{locInvCode},
#{locSubInvCode},
#{dept}
#{dept},#{comments}
)
</insert>
@ -135,6 +135,7 @@
<if test="locInvCode != null">locInvCode=#{locInvCode},</if>
<if test="locSubInvCode != null">locSubInvCode=#{locSubInvCode},</if>
<if test="dept != null">dept=#{dept},</if>
<if test="comments != null">comments=#{comments},</if>
</set>
WHERE id=#{id}
</update>

@ -47,7 +47,7 @@
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.scbssfbhsxrq,basic_products.cpms,basic_products.originUuid,basic_products.allowNoBatch,
basic_products.allowNoExpire,basic_products.allowNoProduct,basic_products.spmc
basic_products.allowNoExpire,basic_products.allowNoProduct,basic_products.spmc,basic_products.cplx,basic_products.hchzsb
FROM (company_product_relevance
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id)
@ -167,7 +167,11 @@
#{scbssfbhscrq},
#{scbssfbhsxrq},
#{cpms},
#{manufactory},#{originUuid},#{allowNoBatch},#{allowNoExpire},#{allowNoProduct}
#{manufactory},
#{originUuid},
#{allowNoBatch},
#{allowNoExpire},
#{allowNoProduct}
)
</insert>
@ -265,27 +269,36 @@
<if test="allowNoExpire != null">allowNoExpire=#{allowNoExpire},</if>
<if test="allowNoProduct != null">allowNoProduct=#{allowNoProduct},</if>
<if test="cpdls != null">cpdls=#{cpdls},</if>
<if test="basicPrductRemak1 != null">basicPrductRemak1=#{basicPrductRemak1},</if>
<if test="basicPrductRemak2 != null">basicPrductRemak2=#{basicPrductRemak2},</if>
<if test="basicPrductRemak3 != null">basicPrductRemak3=#{basicPrductRemak3},</if>
<if test="basicPrductRemak4 != null">basicPrductRemak4=#{basicPrductRemak4},</if>
<if test="basicPrductRemak5 != null">basicPrductRemak5=#{basicPrductRemak5},</if>
<if test="basicPrductRemak6 != null">basicPrductRemak6=#{basicPrductRemak6},</if>
<if test="basicPrductRemak7 != null">basicPrductRemak7=#{basicPrductRemak7},</if>
<if test="basicPrductRemak8 != null">basicPrductRemak8=#{basicPrductRemak8},</if>
</trim>
WHERE nameCode = #{nameCode}
</update>
<update id="updateUdiInfoByUuid" parameterType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
update basic_products
<trim prefix="set" suffixOverrides=",">
<if test="ggxh != null">ggxh=#{ggxh},</if>
<if test="qxlb != null">qxlb=#{qxlb},</if>
<if test="cplb != null">cplb=#{cplb},</if>
<if test="flbm != null">flbm=#{flbm},</if>
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if>
<if test="ylqxzcrbarywmc != null">ylqxzcrbarywmc=#{ylqxzcrbarywmc},</if>
<if test="tyshxydm != null">tyshxydm=#{tyshxydm},</if>
<if test="zczbhhzbapzbh != null">zczbhhzbapzbh=#{zczbhhzbapzbh},</if>
<if test="cpms != null">cpms=#{cpms},</if>
<if test="measname != null">measname=#{measname},</if>
<if test="allowNoBatch != null">allowNoBatch=#{allowNoBatch},</if>
<if test="allowNoExpire != null">allowNoExpire=#{allowNoExpire},</if>
<if test="allowNoProduct != null">allowNoProduct=#{allowNoProduct},</if>
</trim>
<trim prefix="set" suffixOverrides=",">
<if test="ggxh != null">ggxh=#{ggxh},</if>
<if test="qxlb != null">qxlb=#{qxlb},</if>
<if test="cplb != null">cplb=#{cplb},</if>
<if test="flbm != null">flbm=#{flbm},</if>
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if>
<if test="ylqxzcrbarywmc != null">ylqxzcrbarywmc=#{ylqxzcrbarywmc},</if>
<if test="tyshxydm != null">tyshxydm=#{tyshxydm},</if>
<if test="zczbhhzbapzbh != null">zczbhhzbapzbh=#{zczbhhzbapzbh},</if>
<if test="cpms != null">cpms=#{cpms},</if>
<if test="measname != null">measname=#{measname},</if>
<if test="allowNoBatch != null">allowNoBatch=#{allowNoBatch},</if>
<if test="allowNoExpire != null">allowNoExpire=#{allowNoExpire},</if>
<if test="allowNoProduct != null">allowNoProduct=#{allowNoProduct},</if>
</trim>
where uuid = #{uuid}
</update>
@ -311,7 +324,8 @@
(id, nameCode, packRatio, packLevel, bhxjsl, bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, addType,
deviceRecordKey, cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm, ylqxzcrbarmc, zczbhhzbapzbh,
ylqxzcrbarywmc, sydycpbs, uuid, sjcpbm, versionNumber, diType, ybbm, sptm, manufactory, measname,
productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,originUuid,allowNoBatch,allowNoExpire,allowNoProduct) values
productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,originUuid,allowNoBatch,allowNoExpire,allowNoProduct)
values
<foreach collection="udiInfoEntities" item="item" index="index" separator=",">
(#{item.id},
#{item.nameCode},

@ -30,7 +30,7 @@
thirdSysFk, status, statusInfo, type, sourceType,
printStatus, unitIdFk, customerId, thirdOrderFk, orderIdFk,
totalPrice, locStorageCode, supplementNo, createUser, reviewUser, entrustEnd, auditTime,
updateTime, invWarehouseCode, fromSubInvCode,dept)
updateTime, invWarehouseCode, fromSubInvCode, dept)
values (#{id},
#{billNo},
#{billdate},
@ -45,7 +45,7 @@
#{sourceType},
#{printStatus}, #{unitIdFk}, #{customerId}, #{thirdOrderFk}, #{orderIdFk}, #{totalPrice},
#{locStorageCode}, #{supplementNo}, #{createUser}, #{reviewUser}, #{entrustEnd}, #{auditTime},
#{updateTime}, #{invWarehouseCode}, #{fromSubInvCode},#{dept})
#{updateTime}, #{invWarehouseCode}, #{fromSubInvCode}, #{dept})
</insert>
<update id="updateById" parameterType="com.glxp.api.admin.entity.business.StockOrderEntity">
UPDATE stock_order
@ -106,7 +106,8 @@
<select id="filterListOr" parameterType="com.glxp.api.admin.req.business.StockOrderFilterRequest"
resultType="com.glxp.api.admin.entity.business.StockOrderEntity">
SELECT stock_order.* ,inv_warehouse.name invName, iws.name subInvName ,basic_bustype_local.name billTypeName,iws2.name fromSubInvName,auth_dept.name deptName FROM stock_order
SELECT stock_order.* ,inv_warehouse.name invName, iws.name subInvName ,basic_bustype_local.name
billTypeName,iws2.name fromSubInvName,auth_dept.name deptName FROM stock_order
left join basic_bustype_local on stock_order.billType = basic_bustype_local.action
LEFT JOIN inv_warehouse ON stock_order.locStorageCode = inv_warehouse.`code`
LEFT JOIN inv_warehouse_sub ON stock_order.locStorageCode = inv_warehouse.`code`
@ -284,8 +285,10 @@
stock_order_detail.spec, stock_order_detail.batchNo, stock_order_detail.productDate,
stock_order_detail.expireDate, stock_order_detail.count, stock_order_detail.sweepCount,
stock_order_detail.ylqxzcrbarmc,stock_order_detail.manufactory, stock_order_detail.zczbhhzbapzbh,
stock_order_detail.price,inv_warehouse.name locInv,basic_products.spmc,
basic_products.cpms,basic_udirel.measname,auth_dept.`name` deptName
stock_order_detail.price,inv_warehouse.name locInv,inv_warehouse_sub.name subInv,basic_products.spmc,
basic_products.cpms,basic_udirel.measname,auth_dept.`name` deptName,basic_products.basicPrductRemak1
,basic_products.basicPrductRemak2,basic_products.basicPrductRemak3,basic_products.basicPrductRemak4,basic_products.basicPrductRemak5,basic_products.basicPrductRemak6
,basic_products.basicPrductRemak7,basic_products.basicPrductRemak8
FROM stock_order
INNER JOIN stock_order_detail on stock_order.id = stock_order_detail.orderIdFk
LEFT JOIN inv_warehouse ON stock_order.locStorageCode = inv_warehouse.`code`
@ -327,7 +330,9 @@
spec,io_codes.batchNo,io_codes.produceDate productDate,io_codes.expireDate ,io_codes.serialNo,io_codes.count,
basic_products.ylqxzcrbarmc,basic_udirel.manufactory,basic_udirel.measname,basic_products.zczbhhzbapzbh,
inv_warehouse.name locInv, inv_warehouse_sub.name subInv, basic_products.spmc,
basic_products.cpms,io_codes.nameCode,io_codes.relId
basic_products.cpms,io_codes.nameCode,io_codes.relId,basic_products.basicPrductRemak1
,basic_products.basicPrductRemak2,basic_products.basicPrductRemak3,basic_products.basicPrductRemak4,basic_products.basicPrductRemak5,basic_products.basicPrductRemak6
,basic_products.basicPrductRemak7,basic_products.basicPrductRemak8
from io_codes
INNER JOIN basic_udirel on io_codes.relId = basic_udirel.id
INNER JOIN basic_products on basic_products.uuid = basic_udirel.uuid
@ -343,20 +348,17 @@
</select>
<select id="selectSupplementOrderList" resultType="com.glxp.api.admin.entity.business.StockOrderEntity">
SELECT
billNo, orderIdFk, `status`
FROM
stock_order
WHERE
( supplementNo IS NULL OR supplementNo = '' )
SELECT billNo,
orderIdFk,
`status`
FROM stock_order
WHERE (supplementNo IS NULL OR supplementNo = '')
AND billType IN (
SELECT
localAction
FROM
basic_bussiness_type
WHERE
supplementOrderType IS NOT NULL
OR supplementOrderType != '')
SELECT localAction
FROM basic_bussiness_type
WHERE supplementOrderType IS NOT NULL
OR supplementOrderType
!= '')
</select>
<select id="findById" resultType="com.glxp.api.admin.entity.business.StockOrderEntity">
@ -379,28 +381,36 @@
select id
from stock_order
where billNo in (
select erpFk
from io_order
where erpFk in
(select billNo
from stock_order
where stock_order.billType in (select code from basic_third_sys_bus_api))
and exportStatus = 0
)
select erpFk
from io_order
where erpFk in
(select billNo
from stock_order
where stock_order.billType in (select code from basic_third_sys_bus_api))
and exportStatus = 0
)
</select>
<select id="selectIdByOrderIdFk" resultType="java.lang.Integer">
<select id="selectIdByOrderIdFk" resultType="java.lang.Integer">
select id
from stock_order
where orderIdFk = #{orderIdFk}
</select>
<select id="selectByBillNo" resultType="com.glxp.sale.admin.entity.inout.StockOrderEntity">
select *
from stock_order
where billNo = #{billNo}
</select>
<select id="selectUploadList" resultType="com.glxp.api.admin.entity.business.StockOrderEntity">
select t1.* from stock_order t1 left join io_order t2 on t1.billNo = t2.erpFk
<where>
t2.erpFk is not null
<if test="request.billNo != null and request.billNo != ''">
AND ((t1.billNo like concat('%', #{request.billNo}, '%') and t2.erpFk like concat('%', #{request.billNo}, '%')) or t2.thirdBillNo like concat('%',#{request.billNo},'%'))
AND ((t1.billNo like concat('%', #{request.billNo}, '%') and t2.erpFk like concat('%',
#{request.billNo}, '%')) or t2.thirdBillNo like concat('%',#{request.billNo},'%'))
</if>
<if test="request.submitStatus != null">
AND t2.exportStatus = #{request.submitStatus}
@ -430,6 +440,8 @@
order by t1.billdate desc
</select>
<select id="findBillTypeById" resultType="java.lang.String">
select billType from stock_order where id = #{id}
select billType
from stock_order
where id = #{id}
</select>
</mapper>

@ -5,14 +5,18 @@
<select id="queryPage" parameterType="com.glxp.api.admin.req.info.SystemParamConfigRequest"
resultType="com.glxp.api.admin.entity.info.SystemParamConfigEntity">
SELECT id,paramName,paramKey,paramValue,paramStatus,paramType,paramExplain
SELECT *
FROM sys_param_config
<where>
AND `paramStatus` = #{paramStatus}
<if test="paramName != null and '' != paramName">
AND `paramName` LIKE CONCAT(#{paramName},'%')
</if>
<if test="paramType!=null">
and paramType = #{paramType}
</if>
</where>
order BY id
</select>

@ -261,7 +261,7 @@
<if test="remark2 != null">remark2=#{remark2},</if>
<if test="remark3 != null">remark3=#{remark3},</if>
<if test="price != null">price=#{price},</if>
<if test="remark != null">remark=#{remark},</if>
</trim>
WHERE id = #{id}
</update>

Loading…
Cancel
Save