1.添加单据类型接口代码

2.添加第三方产品导入导出实体类
master
x_z 2 years ago
parent 461c42ed70
commit 2826e138c0

@ -6,12 +6,13 @@ import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.entity.basic.BasicBusTypePreEntity; import com.glxp.api.entity.basic.BasicBusTypePreEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.req.basic.FilterBusTypeChangeRequest; import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
import com.glxp.api.req.basic.FilterBusTypePreRequest; import com.glxp.api.req.basic.FilterBusTypePreRequest;
import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.auth.InvWarehouseService; import com.glxp.api.service.auth.InvWarehouseService;
import com.glxp.api.service.basic.IBasicBusTypePreService; import com.glxp.api.service.basic.IBasicBusTypePreService;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -32,11 +33,20 @@ public class BasicBusTypePreController {
@Resource @Resource
private IBasicBusTypePreService basicBusTypePreService; private IBasicBusTypePreService basicBusTypePreService;
@Resource @Resource
private IBasicBussinessTypeService basicBussinessTypeService;
@Resource
private InvWarehouseService invWarehouseService; private InvWarehouseService invWarehouseService;
/**
*
*
* @param filterBusTypePreRequest
* @return
*/
@GetMapping("/spms/bussinessChangeType/filter") @GetMapping("/spms/bussinessChangeType/filter")
public BaseResponse filterBussinessType(FilterBusTypePreRequest bussinessTypeFilterRequest) { public BaseResponse filterBussinessType(FilterBusTypePreRequest filterBusTypePreRequest) {
//查询扫码单据类型
BasicBussinessTypeEntity basicBussinessType = basicBussinessTypeService.findByAction(filterBusTypePreRequest.getAction());
return ResultVOUtils.success(null); return ResultVOUtils.success(null);
} }
@ -46,15 +56,18 @@ public class BasicBusTypePreController {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
List<BasicBusTypePreEntity> bussinessTypeEntities = basicBusTypePreService.filterAll(busTypeChangeFilterRequest); List<BasicBusTypePreEntity> basicBusTypePreEntities = basicBusTypePreService.filterAll(busTypeChangeFilterRequest);
PageInfo<BasicBusTypePreEntity> pageInfo; PageInfo<BasicBusTypePreEntity> pageInfo = new PageInfo<>(basicBusTypePreEntities);
pageInfo = new PageInfo<>(bussinessTypeEntities); return ResultVOUtils.page(pageInfo);
PageSimpleResponse<BasicBusTypePreEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(bussinessTypeEntities);
return ResultVOUtils.success(pageSimpleResponse);
} }
/**
* ID
*
* @param basicBusTypePreEntity
* @param bindingResult
* @return
*/
@PostMapping("/spms/bussinessChangeType/remove") @PostMapping("/spms/bussinessChangeType/remove")
public BaseResponse removeBussinessType(@RequestBody BasicBusTypePreEntity basicBusTypePreEntity, BindingResult bindingResult) { public BaseResponse removeBussinessType(@RequestBody BasicBusTypePreEntity basicBusTypePreEntity, BindingResult bindingResult) {
@ -70,6 +83,13 @@ public class BasicBusTypePreController {
return ResultVOUtils.success("删除成功"); return ResultVOUtils.success("删除成功");
} }
/**
* ID
*
* @param deleteRequest
* @param bindingResult
* @return
*/
@PostMapping("/spms/bussinessChangeType/delete") @PostMapping("/spms/bussinessChangeType/delete")
public BaseResponse deleteBussinessType(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) { public BaseResponse deleteBussinessType(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -80,40 +100,52 @@ public class BasicBusTypePreController {
return ResultVOUtils.success("删除成功"); return ResultVOUtils.success("删除成功");
} }
/**
*
*
* @param basicBusTypePreEntity
* @param bindingResult
* @return
*/
@PostMapping("/spms/bussinessChangeType/update") @PostMapping("/spms/bussinessChangeType/update")
public BaseResponse updateBussinessType(@RequestBody BasicBusTypePreEntity basicBusTypePreEntity, BindingResult bindingResult) { public BaseResponse updateBussinessType(@RequestBody BasicBusTypePreEntity basicBusTypePreEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
/*if (basicBusTypePreEntity != null) { if (basicBusTypePreEntity != null) {
bussinessChangeTypeService.updateBusChangeType(basicBusTypePreEntity); basicBusTypePreService.updateBusChangeType(basicBusTypePreEntity);
BussinessLocalTypeEntity bussinessLocalTypeEntity = bussinessLocalTypeService.findByAction(basicBusTypePreEntity.getAction());
bussinessLocalTypeEntity.setUpdateTime(new Date());
bussinessLocalTypeService.updateBusLocalType(bussinessLocalTypeEntity);
} else { } else {
ResultVOUtils.error(999, "参数错误"); ResultVOUtils.error(999, "参数错误");
}*/ }
return ResultVOUtils.success("更新成功"); return ResultVOUtils.success("更新成功");
} }
/**
*
*
* @param basicBusTypePreEntity
* @param bindingResult
* @return
*/
@PostMapping("/spms/bussinessChangeType/insert") @PostMapping("/spms/bussinessChangeType/insert")
public BaseResponse insertBussinessType(@RequestBody BasicBusTypePreEntity basicBusTypePreEntity, BindingResult bindingResult) { public BaseResponse insertBussinessType(@RequestBody BasicBusTypePreEntity basicBusTypePreEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
/*if (basicBusTypePreEntity != null) { if (basicBusTypePreEntity != null) {
if (StrUtil.isNotEmpty(basicBusTypePreEntity.getDefaultSubInv())) { //TODO 补充补单单据类型仓库信息
InvWarehouseEntity byInvSubByCode = invWarehouseService.findByInvSubByCode(basicBusTypePreEntity.getDefaultSubInv()); //if (StrUtil.isNotEmpty(basicBusTypePreEntity.getDefaultSubInv())) {
basicBusTypePreEntity.setDefaultInv(invSubWarehouseEntity.getParentId()); // InvWarehouseEntity byInvSubByCode = invWarehouseService.findByInvSubByCode(basicBusTypePreEntity.getDefaultSubInv());
} // basicBusTypePreEntity.setDefaultInv(invSubWarehouseEntity.getParentId());
if (StrUtil.isNotEmpty(basicBusTypePreEntity.getLocSubInv())) { //}
InvSubWarehouseEntity invSubWarehouseEntity = invSubWarehouseService.findByInvSubByCode(basicBusTypePreEntity.getLocSubInv()); //if (StrUtil.isNotEmpty(basicBusTypePreEntity.getLocSubInv())) {
basicBusTypePreEntity.setLocInv(invSubWarehouseEntity.getParentId()); // InvSubWarehouseEntity invSubWarehouseEntity = invSubWarehouseService.findByInvSubByCode(basicBusTypePreEntity.getLocSubInv());
} // basicBusTypePreEntity.setLocInv(invSubWarehouseEntity.getParentId());
basicBusTypePreService.insertBusChangeTypee(basicBusTypePreEntity); //}
basicBusTypePreService.insertBusChangeType(basicBusTypePreEntity);
} else { } else {
ResultVOUtils.error(999, "参数错误"); ResultVOUtils.error(999, "参数错误");
}*/ }
return ResultVOUtils.success("添加成功"); return ResultVOUtils.success("添加成功");
} }

@ -2,12 +2,16 @@ package com.glxp.api.dao.basic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.basic.BasicBusTypePreEntity; import com.glxp.api.entity.basic.BasicBusTypePreEntity;
import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* *
*/ */
@Mapper @Mapper
public interface BasicBusTypePreDao extends BaseMapper<BasicBusTypePreEntity> { public interface BasicBusTypePreDao extends BaseMapper<BasicBusTypePreEntity> {
List<BasicBusTypePreEntity> selectList(FilterBusTypeChangeRequest busTypeChangeFilterRequest);
} }

@ -0,0 +1,7 @@
package com.glxp.api.dao.basic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.thrsys.ThrProductsExportLogEntity;
public interface ThrProductsExportLogDao extends BaseMapper<ThrProductsExportLogEntity> {
}

@ -0,0 +1,7 @@
package com.glxp.api.dao.basic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.thrsys.ThrProductsImportDetailEntity;
public interface ThrProductsImportDetailDao extends BaseMapper<ThrProductsImportDetailEntity> {
}

@ -5,6 +5,7 @@ import com.glxp.api.entity.thrsys.ThrBusTypeOriginEntity;
import com.glxp.api.req.thrsys.FilterThrBusTypeOriginRequest; import com.glxp.api.req.thrsys.FilterThrBusTypeOriginRequest;
import com.glxp.api.res.thrsys.ThrBusTypeOriginResponse; import com.glxp.api.res.thrsys.ThrBusTypeOriginResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -37,4 +38,12 @@ public interface ThrBusTypeOriginDao extends BaseMapper<ThrBusTypeOriginEntity>
* @return * @return
*/ */
boolean insertBusOriginType(ThrBusTypeOriginEntity thrBusTypeOriginEntity); boolean insertBusOriginType(ThrBusTypeOriginEntity thrBusTypeOriginEntity);
/**
*
*
* @param originAction
* @return
*/
String selectNameByAction(@Param("originAction") String originAction);
} }

@ -0,0 +1,99 @@
package com.glxp.api.entity.thrsys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName(value = "thr_products_export_log")
public class ThrProductsExportLogEntity {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
*
*/
@TableField(value = "genKey")
private String genKey;
/**
* 01
*/
@TableField(value = "`status`")
private Integer status;
/**
*
*/
@TableField(value = "dlCount")
private Integer dlCount;
/**
*
*/
@TableField(value = "filePath")
private String filePath;
/**
* 1.2.
*/
@TableField(value = "`type`")
private Integer type;
/**
*
*/
@TableField(value = "`createUser`")
private String createUser;
/**
*
*/
@TableField(value = "createTime")
private Date createTime;
/**
*
*/
@TableField(value = "updateUser")
private String updateUser;
/**
*
*/
@TableField(value = "updateTime")
private Date updateTime;
/**
*
*/
@TableField(value = "remark")
private String remark;
public static final String COL_ID = "id";
public static final String COL_GENKEY = "genKey";
public static final String COL_STATUS = "status";
public static final String COL_DLCOUNT = "dlCount";
public static final String COL_FILEPATH = "filePath";
public static final String COL_TYPE = "type";
public static final String COL_CREATEUSER = "createUser";
public static final String COL_CREATETIME = "createTime";
public static final String COL_UPDATEUSER = "updateUser";
public static final String COL_UPDATETIME = "updateTime";
public static final String COL_REMARK = "remark";
}

@ -0,0 +1,157 @@
package com.glxp.api.entity.thrsys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;
@Data
@TableName(value = "thr_products_import_detail")
public class ThrProductsImportDetailEntity {
@TableId(value = "id", type = IdType.INPUT)
private Integer id;
@TableField(value = "code")
private String code;
@TableField(value = "`name`")
private String name;
@TableField(value = "measname")
private String measname;
@TableField(value = "spec")
private String spec;
@TableField(value = "registerNo")
private String registerNo;
@TableField(value = "manufactory")
private String manufactory;
@TableField(value = "thirdSysFk")
private String thirdSysFk;
@TableField(value = "cplb")
private String cplb;
@TableField(value = "flbm")
private String flbm;
@TableField(value = "qxlb")
private String qxlb;
@TableField(value = "ybbm")
private String ybbm;
@TableField(value = "sptm")
private String sptm;
@TableField(value = "tyshxydm")
private String tyshxydm;
@TableField(value = "zczbhhzbapzbh")
private String zczbhhzbapzbh;
@TableField(value = "ylqxzcrbarmc")
private String ylqxzcrbarmc;
@TableField(value = "ylqxzcrbarywmc")
private String ylqxzcrbarywmc;
@TableField(value = "cpms")
private String cpms;
@TableField(value = "updateTime")
private Date updateTime;
@TableField(value = "genKeyFk")
private String genKeyFk;
@TableField(value = "supName")
private String supName;
/**
*
*/
@TableField(value = "price")
private String price;
/**
*
*/
@TableField(value = "`createUser`")
private String createUser;
/**
*
*/
@TableField(value = "createTime")
private Date createTime;
/**
*
*/
@TableField(value = "updateUser")
private String updateUser;
/**
*
*/
@TableField(value = "remark")
private String remark;
public static final String COL_ID = "id";
public static final String COL_CODE = "code";
public static final String COL_NAME = "name";
public static final String COL_MEASNAME = "measname";
public static final String COL_SPEC = "spec";
public static final String COL_REGISTERNO = "registerNo";
public static final String COL_MANUFACTORY = "manufactory";
public static final String COL_THIRDSYSFK = "thirdSysFk";
public static final String COL_CPLB = "cplb";
public static final String COL_FLBM = "flbm";
public static final String COL_QXLB = "qxlb";
public static final String COL_YBBM = "ybbm";
public static final String COL_SPTM = "sptm";
public static final String COL_TYSHXYDM = "tyshxydm";
public static final String COL_ZCZBHHZBAPZBH = "zczbhhzbapzbh";
public static final String COL_YLQXZCRBARMC = "ylqxzcrbarmc";
public static final String COL_YLQXZCRBARYWMC = "ylqxzcrbarywmc";
public static final String COL_CPMS = "cpms";
public static final String COL_UPDATETIME = "updateTime";
public static final String COL_GENKEYFK = "genKeyFk";
public static final String COL_SUPNAME = "supName";
public static final String COL_PRICE = "price";
public static final String COL_CREATEUSER = "createUser";
public static final String COL_CREATETIME = "createTime";
public static final String COL_UPDATEUSER = "updateUser";
public static final String COL_REMARK = "remark";
}

@ -2,18 +2,16 @@ package com.glxp.api.http;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.entity.basic.BasicThirdSysEntity;
import com.glxp.api.entity.thrsys.ThrSystemBusApiEntity; import com.glxp.api.entity.thrsys.ThrSystemBusApiEntity;
import com.glxp.api.entity.thrsys.ThrSystemEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity;
import com.alibaba.fastjson.TypeReference; import com.glxp.api.http.req.UdiwmsBusTypeRequest;
import com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest;
import com.glxp.api.req.thrsys.FilterThrProductsRequest; import com.glxp.api.req.thrsys.FilterThrProductsRequest;
import com.glxp.api.req.thrsys.ThrProductsRequest;
import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.thrsys.ThrProductsResponse; import com.glxp.api.res.thrsys.ThrProductsResponse;
import com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.thrsys.ThrSystemService; import com.glxp.api.service.thrsys.ThrSystemService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -138,6 +136,22 @@ public class ErpBasicClient {
//下载第三方系统单据类型 //下载第三方系统单据类型
public BaseResponse<PageSimpleResponse<ThrSystemBusApiEntity>> getBusTypes(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest) { public BaseResponse<PageSimpleResponse<ThrSystemBusApiEntity>> getBusTypes(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest) {
return null; ThrSystemEntity thrSystemEntity = basicThirdSysService.selectByThirdId(filterBasicThirdSysDetailRequest.getThirdSysFk());
String url = thrSystemEntity.getThridUrl() + "/udiwms/erp/getOrderType";
UdiwmsBusTypeRequest udiwmsBusTypeRequest = new UdiwmsBusTypeRequest();
udiwmsBusTypeRequest.setThirdSys(filterBasicThirdSysDetailRequest.getThirdSysFk());
udiwmsBusTypeRequest.setPage(filterBasicThirdSysDetailRequest.getPage());
udiwmsBusTypeRequest.setLimit(filterBasicThirdSysDetailRequest.getLimit());
try {
String response = httpOkClient.uCloudPost(url, udiwmsBusTypeRequest, thrSystemEntity);
log.info(response);
BaseResponse<PageSimpleResponse<ThrSystemBusApiEntity>> udiDlDeviceResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<ThrSystemBusApiEntity>>>() {
});
return udiDlDeviceResponse;
} catch (Exception e) {
log.error("获取单据类型异常", e);
return ResultVOUtils.error(500, "连接第三方系统接口服务出错!");
}
} }
} }

@ -0,0 +1,41 @@
package com.glxp.api.http.req;
import lombok.Data;
/**
*
*/
@Data
public class UdiwmsBusTypeRequest {
/**
* ID
*/
private String id;
/**
*
*/
private String code;
/**
*
*/
private String name;
/**
*
*/
private Integer page;
/**
*
*/
private Integer limit;
/**
*
*/
private String thirdSys;
}

@ -9,9 +9,46 @@ import java.util.List;
* Service * Service
*/ */
public interface IBasicBusTypePreService { public interface IBasicBusTypePreService {
/**
*
*
* @param busTypeChangeFilterRequest
* @return
*/
List<BasicBusTypePreEntity> filterAll(FilterBusTypeChangeRequest busTypeChangeFilterRequest); List<BasicBusTypePreEntity> filterAll(FilterBusTypeChangeRequest busTypeChangeFilterRequest);
/**
* ID
*
* @param id
* @return
*/
boolean deleteById(String id); boolean deleteById(String id);
/**
*
*
* @param action
* @return
*/
boolean deleteByAction(String action); boolean deleteByAction(String action);
/**
*
*
* @param basicBusTypePreEntity
* @return
*/
boolean updateBusChangeType(BasicBusTypePreEntity basicBusTypePreEntity);
/**
*
*
* @param basicBusTypePreEntity
* @return
*/
boolean insertBusChangeType(BasicBusTypePreEntity basicBusTypePreEntity);
} }

@ -1,5 +1,7 @@
package com.glxp.api.service.basic.impl; package com.glxp.api.service.basic.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.basic.BasicBusTypePreDao;
import com.glxp.api.entity.basic.BasicBusTypePreEntity; import com.glxp.api.entity.basic.BasicBusTypePreEntity;
import com.glxp.api.req.basic.FilterBusTypeChangeRequest; import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
import com.glxp.api.service.basic.IBasicBusTypePreService; import com.glxp.api.service.basic.IBasicBusTypePreService;
@ -7,15 +9,23 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class BasicBusTypePreServiceImpl implements IBasicBusTypePreService { public class BasicBusTypePreServiceImpl implements IBasicBusTypePreService {
@Resource
private BasicBusTypePreDao basicBusTypePreDao;
@Override @Override
public List<BasicBusTypePreEntity> filterAll(FilterBusTypeChangeRequest busTypeChangeFilterRequest) { public List<BasicBusTypePreEntity> filterAll(FilterBusTypeChangeRequest busTypeChangeFilterRequest) {
return null; if (null != busTypeChangeFilterRequest.getPage() && null != busTypeChangeFilterRequest.getLimit()) {
PageHelper.offsetPage((busTypeChangeFilterRequest.getPage() - 1) * busTypeChangeFilterRequest.getLimit(), busTypeChangeFilterRequest.getLimit());
}
return basicBusTypePreDao.selectList(busTypeChangeFilterRequest);
} }
@Override @Override
@ -27,4 +37,14 @@ public class BasicBusTypePreServiceImpl implements IBasicBusTypePreService {
public boolean deleteByAction(String action) { public boolean deleteByAction(String action) {
return false; return false;
} }
@Override
public boolean updateBusChangeType(BasicBusTypePreEntity basicBusTypePreEntity) {
return false;
}
@Override
public boolean insertBusChangeType(BasicBusTypePreEntity basicBusTypePreEntity) {
return false;
}
} }

@ -77,6 +77,28 @@ public interface IThrBusTypeOriginService {
*/ */
ThrSystemDetailEntity findSysByAction(String action, String key); ThrSystemDetailEntity findSysByAction(String action, String key);
//ThrBusTypeOriginResponse findByThirdAction /**
*
*
* @param action
* @return
*/
ThrBusTypeOriginResponse findByThirdAction(String action);
/**
*
*
* @param mainAction
* @return
*/
ThrBusTypeOriginResponse findByMainAction(String mainAction);
/**
*
*
* @param originAction
* @return
*/
String findNameByAction(String originAction);
} }

@ -1,5 +1,6 @@
package com.glxp.api.service.thrsys.impl; package com.glxp.api.service.thrsys.impl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.thrsys.ThrBusTypeOriginDao; import com.glxp.api.dao.thrsys.ThrBusTypeOriginDao;
@ -9,7 +10,9 @@ import com.glxp.api.req.thrsys.FilterThrBusTypeOriginRequest;
import com.glxp.api.res.thrsys.ThrBusTypeOriginResponse; import com.glxp.api.res.thrsys.ThrBusTypeOriginResponse;
import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.thrsys.IThrBusTypeOriginService; import com.glxp.api.service.thrsys.IThrBusTypeOriginService;
import com.glxp.api.service.thrsys.ThrSystemDetailService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -27,6 +30,9 @@ public class ThrBusTypeOriginServiceImpl implements IThrBusTypeOriginService {
private CustomerService customerService; private CustomerService customerService;
@Resource @Resource
private ThrBusTypeOriginDao thrBusTypeOriginDao; private ThrBusTypeOriginDao thrBusTypeOriginDao;
@Lazy
@Resource
private ThrSystemDetailService thrSystemDetailService;
@Override @Override
public List<ThrBusTypeOriginEntity> filterEnableList(FilterThrBusTypeOriginRequest filterThrBusTypeOriginRequest) { public List<ThrBusTypeOriginEntity> filterEnableList(FilterThrBusTypeOriginRequest filterThrBusTypeOriginRequest) {
@ -78,14 +84,52 @@ public class ThrBusTypeOriginServiceImpl implements IThrBusTypeOriginService {
@Override @Override
public ThrBusTypeOriginEntity findByAction(String action) { public ThrBusTypeOriginEntity findByAction(String action) {
QueryWrapper<ThrBusTypeOriginEntity> query = new QueryWrapper<>();
query.like("action", action);
List<ThrBusTypeOriginEntity> list = thrBusTypeOriginDao.selectList(query);
if (CollUtil.isNotEmpty(list)) {
return list.get(0);
}
return null; return null;
} }
@Override @Override
public ThrSystemDetailEntity findSysByAction(String action, String key) { public ThrSystemDetailEntity findSysByAction(String action, String key) {
ThrBusTypeOriginEntity thrBusTypeOrigin = findByAction(action);
if (null != thrBusTypeOrigin) {
ThrSystemDetailEntity thrSystemDetailEntity = thrSystemDetailService.selectByKey(key, thrBusTypeOrigin.getThirdSys());
return thrSystemDetailEntity;
}
return null;
}
@Override
public ThrBusTypeOriginResponse findByThirdAction(String action) {
FilterThrBusTypeOriginRequest request = new FilterThrBusTypeOriginRequest();
request.setThirdAction(action);
List<ThrBusTypeOriginResponse> responseList = thrBusTypeOriginDao.filterJoinList(request);
if (CollUtil.isNotEmpty(responseList)) {
return responseList.get(0);
}
return null; return null;
} }
@Override
public ThrBusTypeOriginResponse findByMainAction(String mainAction) {
FilterThrBusTypeOriginRequest request = new FilterThrBusTypeOriginRequest();
request.setMainAction(mainAction);
List<ThrBusTypeOriginResponse> responseList = thrBusTypeOriginDao.filterJoinList(request);
if (CollUtil.isNotEmpty(responseList)) {
return responseList.get(0);
}
return null;
}
@Override
public String findNameByAction(String originAction) {
return thrBusTypeOriginDao.selectNameByAction(originAction);
}
/** /**
* / * /
* *

@ -2,4 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.basic.BasicBusTypePreDao"> <mapper namespace="com.glxp.api.dao.basic.BasicBusTypePreDao">
<select id="selectList" resultType="com.glxp.api.entity.basic.BasicBusTypePreEntity">
</select>
</mapper> </mapper>

@ -74,4 +74,8 @@
#{updateUser}, #{updateUser},
#{createTime}) #{createTime})
</insert> </insert>
<select id="selectNameByAction" resultType="java.lang.String">
select name from thr_bustype_origin where action = #{originAction}
</select>
</mapper> </mapper>

@ -0,0 +1,24 @@
<?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="com.glxp.api.dao.basic.ThrProductsExportLogDao">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.thrsys.ThrProductsExportLogEntity">
<!--@mbg.generated-->
<!--@Table thr_products_export_log-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="genKey" jdbcType="VARCHAR" property="genKey" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="dlCount" jdbcType="INTEGER" property="dlCount" />
<result column="filePath" jdbcType="VARCHAR" property="filePath" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, genKey, `status`, dlCount, filePath, `type`, `createUser`, createTime, updateUser,
updateTime, remark
</sql>
</mapper>

@ -0,0 +1,40 @@
<?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="com.glxp.api.dao.basic.ThrProductsImportDetailDao">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.thrsys.ThrProductsImportDetailEntity">
<!--@mbg.generated-->
<!--@Table thr_products_import_detail-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="measname" jdbcType="VARCHAR" property="measname" />
<result column="spec" jdbcType="LONGVARCHAR" property="spec" />
<result column="registerNo" jdbcType="VARCHAR" property="registerNo" />
<result column="manufactory" jdbcType="VARCHAR" property="manufactory" />
<result column="thirdSysFk" jdbcType="VARCHAR" property="thirdSysFk" />
<result column="cplb" jdbcType="VARCHAR" property="cplb" />
<result column="flbm" jdbcType="VARCHAR" property="flbm" />
<result column="qxlb" jdbcType="VARCHAR" property="qxlb" />
<result column="ybbm" jdbcType="VARCHAR" property="ybbm" />
<result column="sptm" jdbcType="VARCHAR" property="sptm" />
<result column="tyshxydm" jdbcType="VARCHAR" property="tyshxydm" />
<result column="zczbhhzbapzbh" jdbcType="VARCHAR" property="zczbhhzbapzbh" />
<result column="ylqxzcrbarmc" jdbcType="VARCHAR" property="ylqxzcrbarmc" />
<result column="ylqxzcrbarywmc" jdbcType="VARCHAR" property="ylqxzcrbarywmc" />
<result column="cpms" jdbcType="LONGVARCHAR" property="cpms" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
<result column="genKeyFk" jdbcType="VARCHAR" property="genKeyFk" />
<result column="supName" jdbcType="VARCHAR" property="supName" />
<result column="price" jdbcType="VARCHAR" property="price" />
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, code, `name`, measname, spec, registerNo, manufactory, thirdSysFk, cplb, flbm,
qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms, updateTime,
genKeyFk, supName, price, `createUser`, createTime, updateUser, remark
</sql>
</mapper>
Loading…
Cancel
Save