Compare commits

...

3 Commits

  1. 59
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/controller/InterfaceBackController.java
  2. 4
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/package-info.java
  3. 57
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/IInterfaceBackService.java
  4. 57
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/dao/InterfaceBack.java
  5. 11
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/dao/mapper/InterfaceBackMapper.java
  6. 5
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/dao/mapper/InterfaceBackMapper.xml
  7. 87
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/impl/InterfaceBackServiceImpl.java
  8. 2
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/rest/InterfacebackController.java
  9. 2
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/rest/TransportationbaseController.java
  10. 68
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/controller/TransportationBaseController.java
  11. 4
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/package-info.java
  12. 62
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/ITransportationBaseService.java
  13. 47
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/dao/TransportationBase.java
  14. 12
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/dao/mapper/TransportationBase.xml
  15. 15
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/dao/mapper/TransportationBaseMapper.java
  16. 163
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/dto/TransportationBaseDto.java
  17. 105
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/impl/TransportationBaseServiceImpl.java
  18. 14
      lms/nladmin-system/src/main/java/org/nl/wms/pda/common/SelectVo.java
  19. 4
      lms/nladmin-system/src/main/java/org/nl/wms/pda/common/package-info.java
  20. 19
      lms/nladmin-ui/src/views/wms/basedata/master/class/index.vue
  21. 17
      lms/nladmin-ui/src/views/wms/basedata/master/interfaceback/index.vue
  22. 15
      lms/nladmin-ui/src/views/wms/basedata/master/transport/index.vue

59
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/controller/InterfaceBackController.java

@ -0,0 +1,59 @@
package org.nl.wms.basedata.master.interfaceback.controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.query.PageQuery;
import org.nl.modules.logging.annotation.Log;
import org.nl.wms.basedata.master.interfaceback.service.IInterfaceBackService;
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* @Author: lyd
* @Date: 2024/10/15
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/interfaceback")
@Slf4j
public class InterfaceBackController {
@Autowired
private IInterfaceBackService interfaceBackService;
@GetMapping
@Log("查询接口回传设置")
//@SaCheckPermission("@el.check('interfaceback:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
return new ResponseEntity<>(TableDataInfo.build(interfaceBackService.queryAll(whereJson, page)), HttpStatus.OK);
}
@PostMapping
@Log("新增接口回传设置")
//@SaCheckPermission("@el.check('interfaceback:add')")
public ResponseEntity<Object> create(@Validated @RequestBody InterfaceBack dto) {
interfaceBackService.create(dto);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PutMapping
@Log("修改接口回传设置")
//@SaCheckPermission("@el.check('interfaceback:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody InterfaceBack dto) {
interfaceBackService.update(dto);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除接口回传设置")
//@SaCheckPermission("@el.check('interfaceback:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
interfaceBackService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
}

4
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/package-info.java

@ -0,0 +1,4 @@
/**
* 接口回传
*/
package org.nl.wms.basedata.master.interfaceback;

57
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/IInterfaceBackService.java

@ -0,0 +1,57 @@
package org.nl.wms.basedata.master.interfaceback.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.common.domain.query.PageQuery;
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack;
import org.nl.wms.basedata.master.service.dto.InterfacebackDto;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Map;
/**
* 接口回传
* @Author: lyd
* @Date: 2024/10/15
*/
public interface IInterfaceBackService extends IService<InterfaceBack> {
/**
* 查询数据分页
*
* @param whereJson 条件
* @param page 分页参数
* @return Map<String, Object>
*/
IPage<InterfaceBack> queryAll(Map whereJson, PageQuery page);
/**
* 根据编码查询
*
* @param code code
* @return Interfaceback
*/
InterfaceBack findByCode(String code);
/**
* 创建
*
* @param dto /
*/
void create(InterfaceBack dto);
/**
* 编辑
*
* @param dto /
*/
void update(InterfaceBack dto);
/**
* 多选删除
*
* @param ids /
*/
void deleteAll(String[] ids);
}

57
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/dao/InterfaceBack.java

@ -0,0 +1,57 @@
package org.nl.wms.basedata.master.interfaceback.service.dao;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* @Author: lyd
* @Date: 2024/10/15
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("md_pb_interfaceback")
public class InterfaceBack {
/** 标识 */
/**
* 防止精度丢失
*/
@TableId
private String interface_id;
/**
* 类型
*/
private String interface_type;
/**
* 接口名称
*/
private String interface_name;
/**
* 接口描述
*/
private String remark;
/**
* 是否回传
*/
private String is_back;
/**
* 业务说明
*/
private String business_comment;
/**
* 业务说明
*/
private String product_area;
@TableField(exist = false)
private String[] product_areas;
}

11
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/dao/mapper/InterfaceBackMapper.java

@ -0,0 +1,11 @@
package org.nl.wms.basedata.master.interfaceback.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack;
/**
* @Author: lyd
* @Date: 2024/10/15
*/
public interface InterfaceBackMapper extends BaseMapper<InterfaceBack> {
}

5
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/dao/mapper/InterfaceBackMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper">
</mapper>

87
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/impl/InterfaceBackServiceImpl.java

@ -0,0 +1,87 @@
package org.nl.wms.basedata.master.interfaceback.service.impl;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.nl.common.domain.query.PageQuery;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.wms.basedata.master.interfaceback.service.IInterfaceBackService;
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack;
import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper;
import org.nl.wms.basedata.master.service.dto.InterfacebackDto;
import org.nl.wms.basedata.master.standard.service.dao.ClassStandard;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @Author: lyd
* @Date: 2024/10/15
*/
@Service
public class InterfaceBackServiceImpl extends ServiceImpl<InterfaceBackMapper, InterfaceBack> implements IInterfaceBackService {
@Autowired
private InterfaceBackMapper interfaceBackMapper;
@Override
public IPage<InterfaceBack> queryAll(Map whereJson, PageQuery page) {
String interface_name = MapUtil.getStr(whereJson, "interface_name");
LambdaQueryWrapper<InterfaceBack> lam = new QueryWrapper<InterfaceBack>().lambda();
lam.like(ObjectUtil.isNotEmpty(interface_name), InterfaceBack::getInterface_name, interface_name);
IPage<InterfaceBack> pages = new Page<>(page.getPage() + 1, page.getSize());
interfaceBackMapper.selectPage(pages, lam);
pages.getRecords().forEach(ib -> {
if (ObjectUtil.isEmpty(ib.getProduct_area())) {
return;
}
String product_area = (ib.getProduct_area().replace("[", "").replace("]", "")).replaceAll("\\\"", "");
ib.setProduct_areas(product_area.split(","));
});
return pages;
}
@Override
public InterfaceBack findByCode(String code) {
LambdaQueryWrapper<InterfaceBack> lam = new LambdaQueryWrapper<>();
lam.eq(InterfaceBack::getInterface_name, code);
InterfaceBack one = getOne(lam);
if (ObjectUtil.isNotEmpty(one.getProduct_area())) {
String product_area = (one.getProduct_area().replace("[", "").replace("]", "")).replaceAll("\\\"", "");
one.setProduct_areas(product_area.split(","));
}
return one;
}
@Override
public void create(InterfaceBack dto) {
dto.setInterface_id(IdUtil.getSnowflake(1, 1).nextIdStr());
String result = Arrays.toString(dto.getProduct_areas());
result = result.replaceAll(" ", "");
dto.setProduct_area(result);
interfaceBackMapper.insert(dto);
}
@Override
public void update(InterfaceBack dto) {
InterfaceBack entity = this.getById(dto.getInterface_id());
if (entity == null) {
throw new BadRequestException("被删除或无权限,操作失败!");
}
String result = Arrays.toString(dto.getProduct_areas());
result = result.replaceAll(" ", "");
dto.setProduct_area(result);
interfaceBackMapper.updateById(dto);
}
@Override
public void deleteAll(String[] ids) {
removeByIds(Arrays.asList(ids));
}
}

2
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/rest/InterfacebackController.java

@ -21,7 +21,7 @@ import java.util.Map;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/api/interfaceback") @RequestMapping("/api/interfaceback2")
@Slf4j @Slf4j
public class InterfacebackController { public class InterfacebackController {

2
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/rest/TransportationbaseController.java

@ -21,7 +21,7 @@ import java.util.Map;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/api/transportationbase") @RequestMapping("/api/transportationbase2")
@Slf4j @Slf4j
public class TransportationbaseController { public class TransportationbaseController {

68
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/controller/TransportationBaseController.java

@ -0,0 +1,68 @@
package org.nl.wms.basedata.master.transport.controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.query.PageQuery;
import org.nl.modules.logging.annotation.Log;
import org.nl.wms.basedata.master.transport.service.ITransportationBaseService;
import org.nl.wms.basedata.master.transport.service.dao.TransportationBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 运输公司信息管理
* @Author: lyd
* @Date: 2024/10/15
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/transportationbase")
@Slf4j
public class TransportationBaseController {
@Autowired
private ITransportationBaseService transportationbaseService;
@GetMapping
@Log(value = "查询运输公司基本信息", isAddLogTable = false
)
//@SaCheckPermission("@el.check('transportationbase:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
return new ResponseEntity<>(TableDataInfo.build(transportationbaseService.queryAll(whereJson, page)), HttpStatus.OK);
}
@PostMapping
@Log("新增运输公司基本信息")
//@SaCheckPermission("@el.check('transportationbase:add')")
public ResponseEntity<Object> create(@Validated @RequestBody TransportationBase dto) {
transportationbaseService.create(dto);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PutMapping
@Log("修改运输公司基本信息")
//@SaCheckPermission("@el.check('transportationbase:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody TransportationBase dto) {
transportationbaseService.update(dto);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除运输公司基本信息")
//@SaCheckPermission("@el.check('transportationbase:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
transportationbaseService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log(value = "运输公司基本信息下拉框", isAddLogTable = false)
@PostMapping("/getTransporta")
public ResponseEntity<Object> getTransporta() {
return new ResponseEntity<>(transportationbaseService.getTransporta(), HttpStatus.OK);
}
}

4
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/package-info.java

@ -0,0 +1,4 @@
/**
* 运输公司基本信息相关
*/
package org.nl.wms.basedata.master.transport;

62
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/ITransportationBaseService.java

@ -0,0 +1,62 @@
package org.nl.wms.basedata.master.transport.service;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.common.domain.query.PageQuery;
import org.nl.wms.basedata.master.service.dto.TransportationbaseDto;
import org.nl.wms.basedata.master.transport.service.dao.TransportationBase;
import org.nl.wms.pda.common.SelectVo;
import java.util.List;
import java.util.Map;
/**
* @Author: lyd
* @Date: 2024/10/15
*/
public interface ITransportationBaseService extends IService<TransportationBase> {
/**
* 查询数据分页
*
* @param whereJson 条件
* @param page 分页参数
* @return TransportationBase
*/
IPage<TransportationBase> queryAll(Map whereJson, PageQuery page);
/**
* 根据编码查询
* <p>必须唯一否则报错</p>
* @param code code
* @return Transportationbase
*/
TransportationBase findByCode(String code);
/**
* 创建
*
* @param dto /
*/
void create(TransportationBase dto);
/**
* 编辑
*
* @param dto /
*/
void update(TransportationBase dto);
/**
* 多选删除
*
* @param ids /
*/
void deleteAll(String[] ids);
/**
* 获取下拉框
*/
List<SelectVo> getTransporta();
}

47
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/dao/TransportationBase.java

@ -0,0 +1,47 @@
package org.nl.wms.basedata.master.transport.service.dao;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @Author: lyd
* @Date: 2024/10/15
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("md_cs_transportationbase")
public class TransportationBase {
@TableId
private String cust_id;
private String cust_code;
private String cust_name;
private String cust_simple_name;
private String country;
private String state;
private String city;
private String faxnumber;
private String webSite;
private String jurid_name;
private String tax_no;
private String register_no;
private String manage_lice_no;
private String busi_char_name;
private String area_id;
private String zip_code;
private String corp_tele_no;
private String corp_address;
private String create_id;
private String create_name;
private String create_time;
private String update_id;
private String update_name;
private String update_time;
private Boolean is_used_time;
private Boolean is_used;
private Boolean is_delete;
private String ext_id;
private String remark;
}

12
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/dao/mapper/TransportationBase.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.nl.wms.basedata.master.transport.service.dao.mapper.TransportationBaseMapper">
<select id="getTransportSelects" resultType="org.nl.wms.pda.common.SelectVo">
SELECT cust_code AS `value`,
cust_name AS label
FROM MD_CS_TransportationBase
WHERE is_delete = '0'
AND is_used = '1'
</select>
</mapper>

15
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/dao/mapper/TransportationBaseMapper.java

@ -0,0 +1,15 @@
package org.nl.wms.basedata.master.transport.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.wms.basedata.master.transport.service.dao.TransportationBase;
import org.nl.wms.pda.common.SelectVo;
import java.util.List;
/**
* @Author: lyd
* @Date: 2024/10/15
*/
public interface TransportationBaseMapper extends BaseMapper<TransportationBase> {
List<SelectVo> getTransportSelects();
}

163
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/dto/TransportationBaseDto.java

@ -0,0 +1,163 @@
package org.nl.wms.basedata.master.transport.service.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import java.io.Serializable;
/**
* @author Liuxy
* @description /
* @date 2022-11-10
**/
@Data
public class TransportationBaseDto implements Serializable {
/** 物流公司标识 */
/**
* 防止精度丢失
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long cust_id;
/**
* 物流公司编码
*/
private String cust_code;
/**
* 物流公司名称
*/
private String cust_name;
/**
* 物流公司简称
*/
private String cust_simple_name;
/**
* 国家
*/
private String country;
/**
* 省份
*/
private String state;
/**
* 城市
*/
private String city;
/**
* 传真
*/
private String faxnumber;
/**
* 邮箱
*/
private String webSite;
/**
* 法人代表
*/
private String jurid_name;
/**
* 税务登记号
*/
private String tax_no;
/**
* 工商注册号
*/
private String register_no;
/**
* 经营许可证号
*/
private String manage_lice_no;
/**
* 营业执照
*/
private String busi_char_name;
/**
* 行政区划
*/
private Long area_id;
/**
* 邮政编码
*/
private String zip_code;
/**
* 公司电话
*/
private String corp_tele_no;
/**
* 公司地址
*/
private String corp_address;
/**
* 创建人
*/
private String create_id;
/**
* 创建人姓名
*/
private String create_name;
/**
* 创建时间
*/
private String create_time;
/**
* 修改人
*/
private String update_optid;
/**
* 修改人姓名
*/
private String update_optname;
/**
* 修改时间
*/
private String update_time;
/**
* 启用时间
*/
private String is_used_time;
/**
* 是否启用
*/
private String is_used;
/**
* 是否删除
*/
private String is_delete;
/**
* 外部标识
*/
private String ext_id;
/**
* 备注
*/
private String remark;
}

105
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/transport/service/impl/TransportationBaseServiceImpl.java

@ -0,0 +1,105 @@
package org.nl.wms.basedata.master.transport.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.utils.SecurityUtils;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.wms.basedata.master.service.dto.TransportationbaseDto;
import org.nl.wms.basedata.master.transport.service.ITransportationBaseService;
import org.nl.wms.basedata.master.transport.service.dao.TransportationBase;
import org.nl.wms.basedata.master.transport.service.dao.mapper.TransportationBaseMapper;
import org.nl.wms.pda.common.SelectVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @Author: lyd
* @Date: 2024/10/15
*/
@Service
public class TransportationBaseServiceImpl extends ServiceImpl<TransportationBaseMapper, TransportationBase> implements ITransportationBaseService {
@Autowired
private TransportationBaseMapper transportationBaseMapper;
@Override
public IPage<TransportationBase> queryAll(Map whereJson, PageQuery page) {
String custCode = MapUtil.getStr(whereJson, "cust_code");
String custName = MapUtil.getStr(whereJson, "cust_name");
String isUsed = MapUtil.getStr(whereJson, "is_used");
LambdaQueryWrapper<TransportationBase> lam = new QueryWrapper<TransportationBase>().lambda();
lam.like(ObjectUtil.isNotEmpty(custCode), TransportationBase::getCust_code, custCode)
.like(ObjectUtil.isNotEmpty(custName), TransportationBase::getCust_name, custName)
.eq(ObjectUtil.isNotEmpty(isUsed), TransportationBase::getIs_used, "1".equals(isUsed));
IPage<TransportationBase> pages = new Page<>(page.getPage() + 1, page.getSize());
transportationBaseMapper.selectPage(pages, lam);
return pages;
}
@Override
public TransportationBase findByCode(String code) {
LambdaQueryWrapper<TransportationBase> lam = new QueryWrapper<TransportationBase>().lambda();
lam.eq(TransportationBase::getCust_code, code);
return getOne(lam);
}
@Override
public void create(TransportationBase dto) {
TransportationBase oneTran = findByCode(dto.getCust_code());
if (ObjectUtil.isNotEmpty(oneTran)) {
throw new BadRequestException("此编码已存在");
}
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
dto.setCust_id(IdUtil.getSnowflake(1, 1).nextIdStr());
dto.setCreate_id(currentUserId);
dto.setCreate_name(nickName);
dto.setUpdate_id(currentUserId);
dto.setUpdate_name(nickName);
dto.setUpdate_time(now);
dto.setCreate_time(now);
transportationBaseMapper.insert(dto);
}
@Override
public void update(TransportationBase dto) {
TransportationBase oneTran = getById(dto.getCust_id());
if (oneTran == null) {
throw new BadRequestException("被删除或无权限,操作失败!");
}
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_id(currentUserId);
dto.setUpdate_name(nickName);
transportationBaseMapper.updateById(dto);
}
@Override
public void deleteAll(String[] ids) {
this.removeByIds(Arrays.asList(ids));
}
@Override
public List<SelectVo> getTransporta() {
return transportationBaseMapper.getTransportSelects();
}
}

14
lms/nladmin-system/src/main/java/org/nl/wms/pda/common/SelectVo.java

@ -0,0 +1,14 @@
package org.nl.wms.pda.common;
import lombok.Data;
/**
* 手持下拉框实体
* @Author: lyd
* @Date: 2024/10/15
*/
@Data
public class SelectVo {
private String value;
private String label;
}

4
lms/nladmin-system/src/main/java/org/nl/wms/pda/common/package-info.java

@ -0,0 +1,4 @@
/**
* 手持通用类
*/
package org.nl.wms.pda.common;

19
lms/nladmin-ui/src/views/wms/basedata/master/class/index.vue

@ -20,13 +20,14 @@
size="mini" size="mini"
class="filter-item" class="filter-item"
style="width: 185px;" style="width: 185px;"
@change="hand"> @change="hand"
>
<el-option <el-option
v-for="item in classNames" v-for="item in classNames"
:key="item.value" :key="item.class_id"
:label="item.label" :label="item.class_name"
:value="item.value"> :value="item.class_code"
</el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<rrOperation :crud="crud" /> <rrOperation :crud="crud" />
@ -102,7 +103,7 @@
<el-table-column prop="class_desc" label="分类简要描述" /> <el-table-column prop="class_desc" label="分类简要描述" />
<el-table-column prop="update_name" label="修改人" /> <el-table-column prop="update_name" label="修改人" />
<el-table-column prop="update_time" label="修改时间" /> <el-table-column prop="update_time" label="修改时间" />
<el-table-column prop="is_modify" :formatter="modifyFormat" label="是否可修改" /> <el-table-column prop="is_modify" label="是否可修改" />
<el-table-column <el-table-column
v-permission="['admin','Classstandard:edit','Classstandard:del']" v-permission="['admin','Classstandard:edit','Classstandard:del']"
label="操作" label="操作"
@ -185,7 +186,11 @@ export default {
return { return {
classes: [], classes: [],
classNames: [], classNames: [],
permission: {}, permission: {
add: ['admin', 'Classstandard:add'],
edit: ['admin', 'Classstandard:edit'],
del: ['admin', 'Classstandard:del']
},
rules: { rules: {
class_id: [ class_id: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }

17
lms/nladmin-ui/src/views/wms/basedata/master/interfaceback/index.vue

@ -71,7 +71,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="回传区域"> <el-form-item label="回传区域">
<el-select <el-select
v-model="form.product_area" v-model="form.product_areas"
clearable clearable
multiple multiple
size="mini" size="mini"
@ -91,7 +91,7 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="业务说明"> <el-form-item label="业务说明">
<el-input type="textarea" :rows="2" v-model="form.business_comment" style="width: 550px;" /> <el-input v-model="form.business_comment" type="textarea" :rows="2" style="width: 550px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -105,10 +105,10 @@
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column prop="interface_type" label="回传类型" :formatter="formatType" :min-width="flexWidth('interface_type',crud.data,'回传类型')" /> <el-table-column prop="interface_type" label="回传类型" :formatter="formatType" :min-width="flexWidth('interface_type',crud.data,'回传类型')" />
<el-table-column prop="interface_name" label="接口名称" :min-width="flexWidth('interface_name',crud.data,'接口名称')"/> <el-table-column prop="interface_name" label="接口名称" :min-width="flexWidth('interface_name',crud.data,'接口名称')" />
<el-table-column prop="is_back" label="是否回传" :formatter="formatBack" :min-width="flexWidth('is_back',crud.data,'是否回传')"/> <el-table-column prop="is_back" label="是否回传" :formatter="formatBack" :min-width="flexWidth('is_back',crud.data,'是否回传')" />
<el-table-column prop="remark" label="接口描述" :min-width="flexWidth('remark',crud.data,'接口描述')"/> <el-table-column prop="remark" label="接口描述" :min-width="flexWidth('remark',crud.data,'接口描述')" />
<el-table-column prop="business_comment" label="业务说明" :min-width="flexWidth('business_comment',crud.data,'业务说明')"/> <el-table-column prop="business_comment" label="业务说明" :min-width="flexWidth('business_comment',crud.data,'业务说明')" />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right"> <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<udOperation <udOperation
@ -139,7 +139,8 @@ const defaultForm = {
remark: null, remark: null,
is_back: null, is_back: null,
business_comment: null, business_comment: null,
product_area: null product_area: null,
product_areas: null
} }
export default { export default {
name: 'Interfaceback', name: 'Interfaceback',
@ -176,7 +177,7 @@ export default {
is_back: [ is_back: [
{ required: true, message: '是否回传不能为空', trigger: 'blur' } { required: true, message: '是否回传不能为空', trigger: 'blur' }
] ]
} } }}
}, },
methods: { methods: {
// false // false

15
lms/nladmin-ui/src/views/wms/basedata/master/transport/index.vue

@ -181,8 +181,8 @@
v-model="scope.row.is_used" v-model="scope.row.is_used"
active-color="#409EFF" active-color="#409EFF"
inactive-color="#F56C6C" inactive-color="#F56C6C"
active-value="1" :active-value="true"
inactive-value="0" :inactive-value="false"
@change="changeEnabled(scope.row, scope.row.is_used)" @change="changeEnabled(scope.row, scope.row.is_used)"
/> />
</template> </template>
@ -206,7 +206,7 @@
<el-table-column prop="update_optname" width="120px" label="修改人姓名" :min-width="flexWidth('update_optname',crud.data,'修改人姓名')" /> <el-table-column prop="update_optname" width="120px" label="修改人姓名" :min-width="flexWidth('update_optname',crud.data,'修改人姓名')" />
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" /> <el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" /> <el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right"> <el-table-column v-permission="['admin','Trans:edit','Trans:del']" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<udOperation <udOperation
:data="scope.row" :data="scope.row"
@ -284,6 +284,9 @@ export default {
data() { data() {
return { return {
permission: { permission: {
add: ['admin', 'Trans:add'],
edit: ['admin', 'Trans:edit'],
del: ['admin', 'Trans:del']
}, },
rules: { rules: {
cust_id: [ cust_id: [
@ -304,13 +307,15 @@ export default {
}, },
// //
changeEnabled(data, val) { changeEnabled(data, val) {
this.$confirm('此操作将 "' + this.dict.label.is_used[val] + '" ' + data.unit_name + ', 是否继续?', '提示', { const tipA = val ? '启用' : '停用'
console.log(data)
this.$confirm('此操作将 "' + tipA + '" ' + data.cust_name + ', 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
crudTransportationbase.edit(data).then(res => { crudTransportationbase.edit(data).then(res => {
this.crud.notify(this.dict.label.is_used[val] + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify(tipA + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => { }).catch(() => {
if (data.is_used === '0') { if (data.is_used === '0') {
data.is_used = '1' data.is_used = '1'

Loading…
Cancel
Save