代码备份
parent
a3256cda2a
commit
07d04c4101
@ -0,0 +1,12 @@
|
||||
package com.glxp.api.admin.config;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
@Configuration
|
||||
public class WebSocketConfig {
|
||||
@Bean
|
||||
public ServerEndpointExporter serverEndpointExporter() {
|
||||
return new ServerEndpointExporter();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.glxp.api.admin.controller.basic;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.admin.entity.basic.BasicThirdSysEntity;
|
||||
import com.glxp.api.admin.req.basic.FilterBasicThirdSysRequest;
|
||||
import com.glxp.api.admin.res.PageSimpleResponse;
|
||||
import com.glxp.api.admin.service.basic.BasicThirdSysService;
|
||||
import com.glxp.api.common.enums.ResultEnum;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
public class BasicThirdSysController {
|
||||
|
||||
|
||||
@Resource
|
||||
private BasicThirdSysService basicThirdSysService;
|
||||
|
||||
|
||||
@GetMapping("/udiwms/basic/thirdsys/filter")
|
||||
public BaseResponse filterBasicUnitMaintain(FilterBasicThirdSysRequest filterBasicThirdSysRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<BasicThirdSysEntity> basicThirdSysEntities;
|
||||
basicThirdSysEntities = basicThirdSysService.filterBasicThiSys(filterBasicThirdSysRequest);
|
||||
PageInfo<BasicThirdSysEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(basicThirdSysEntities);
|
||||
PageSimpleResponse<BasicThirdSysEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(basicThirdSysEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
@PostMapping("/udiwms/basic/thirdsys/update")
|
||||
public BaseResponse save(@RequestBody @Valid BasicThirdSysEntity basicThirdSysEntity,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
if (basicThirdSysEntity != null) {
|
||||
basicThirdSysService.updateBasicThiSys(basicThirdSysEntity);
|
||||
} else {
|
||||
ResultVOUtils.error(999, "参数错误");
|
||||
}
|
||||
return ResultVOUtils.success("更新成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.glxp.api.admin.controller.thrsys;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.admin.entity.inventory.StockPrintEntity;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrCorpEntity;
|
||||
import com.glxp.api.admin.req.basic.FilterStockprintRequest;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrCorpRequest;
|
||||
import com.glxp.api.admin.req.thrsys.PostThrCorpRequest;
|
||||
import com.glxp.api.admin.res.PageSimpleResponse;
|
||||
import com.glxp.api.admin.res.basic.ErpUnitsResponse;
|
||||
import com.glxp.api.admin.res.inout.WarehouseResponse;
|
||||
import com.glxp.api.admin.service.thrsys.ThrCorpService;
|
||||
import com.glxp.api.common.enums.ResultEnum;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
public class ThrCorpsController {
|
||||
|
||||
@Resource
|
||||
private ThrCorpService thrCorpService;
|
||||
|
||||
@GetMapping("/udiwms/thrsys/getCorps")
|
||||
public BaseResponse getCorps(FilterThrCorpRequest filterThrCorpRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<ThrCorpEntity> thrCorpEntities
|
||||
= thrCorpService.filterThrCorps(filterThrCorpRequest);
|
||||
PageInfo<ThrCorpEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(thrCorpEntities);
|
||||
PageSimpleResponse<ThrCorpEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(thrCorpEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
@PostMapping("/udiwms/thrsys/postCorps")
|
||||
public BaseResponse postCorps(PostThrCorpRequest postThrCorpRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<ThrCorpEntity> thrCorpEntities;
|
||||
List<ErpUnitsResponse> erpUnitsResponses = postThrCorpRequest.getCorps();
|
||||
if (erpUnitsResponses != null && erpUnitsResponses.size() > 0) {
|
||||
|
||||
|
||||
thrCorpEntities = erpUnitsResponses.stream().map(
|
||||
item -> {
|
||||
ThrCorpEntity thrCorpEntity = new ThrCorpEntity();
|
||||
BeanUtils.copyProperties(item, thrCorpEntity);
|
||||
thrCorpEntity.setThirdSysFk(postThrCorpRequest.getThirdSys());
|
||||
return thrCorpEntity;
|
||||
}
|
||||
).collect(Collectors.toList());
|
||||
thrCorpService.insertThrCorpss(thrCorpEntities);
|
||||
return ResultVOUtils.success("往来单位上传成功!");
|
||||
|
||||
}
|
||||
|
||||
return ResultVOUtils.error(500, "上传数据为空");
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.glxp.api.admin.controller.thrsys;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrInvProductsRequest;
|
||||
import com.glxp.api.admin.req.thrsys.PostThrCorpRequest;
|
||||
import com.glxp.api.admin.req.thrsys.PostThrInvProductsRequest;
|
||||
import com.glxp.api.admin.res.PageSimpleResponse;
|
||||
import com.glxp.api.admin.res.basic.ErpUnitsResponse;
|
||||
import com.glxp.api.admin.res.inventory.ErpOnHandResponse;
|
||||
import com.glxp.api.admin.service.thrsys.ThrInvProductsService;
|
||||
import com.glxp.api.common.enums.ResultEnum;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
public class ThrInvProductsController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ThrInvProductsService thrInvProductsService;
|
||||
|
||||
@GetMapping("/udiwms/thrsys/getInvProducts")
|
||||
public BaseResponse getCorps(FilterThrInvProductsRequest filterThrInvProductsRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<ThrInvProductsEntity> thrInvProductsEntities
|
||||
= thrInvProductsService.filterThrInvProductss(filterThrInvProductsRequest);
|
||||
PageInfo<ThrInvProductsEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(thrInvProductsEntities);
|
||||
PageSimpleResponse<ThrInvProductsEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(thrInvProductsEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
@PostMapping("/udiwms/thrsys/postInvProducts")
|
||||
public BaseResponse postInvProducts(PostThrInvProductsRequest postThrInvProductsRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<ThrInvProductsEntity> thrInvProductsEntities;
|
||||
List<ErpOnHandResponse> erpOnHandResponses = postThrInvProductsRequest.getDatas();
|
||||
if (erpOnHandResponses != null && erpOnHandResponses.size() > 0) {
|
||||
|
||||
thrInvProductsEntities = erpOnHandResponses.stream().map(
|
||||
item -> {
|
||||
ThrInvProductsEntity thrInvProductsEntity = new ThrInvProductsEntity();
|
||||
BeanUtils.copyProperties(item, thrInvProductsEntity);
|
||||
thrInvProductsEntity.setThirdSysFk(postThrInvProductsRequest.getThirdSys());
|
||||
return thrInvProductsEntity;
|
||||
}
|
||||
).collect(Collectors.toList());
|
||||
thrInvProductsService.insertThrInvProducts(thrInvProductsEntities);
|
||||
return ResultVOUtils.success("往来单位上传成功!");
|
||||
|
||||
}
|
||||
|
||||
return ResultVOUtils.error(500, "上传数据为空");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package com.glxp.api.admin.controller.thrsys;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrOrderDetailEntity;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrOrderEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrOrderDetailRequest;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrOrderRequest;
|
||||
import com.glxp.api.admin.req.thrsys.PostThrOrderRequest;
|
||||
import com.glxp.api.admin.res.PageSimpleResponse;
|
||||
import com.glxp.api.admin.res.inout.ErpOrderResponse;
|
||||
import com.glxp.api.admin.service.thrsys.ThrOrderDetailService;
|
||||
import com.glxp.api.admin.service.thrsys.ThrOrderService;
|
||||
import com.glxp.api.common.enums.ResultEnum;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
public class ThrOrderController {
|
||||
@Resource
|
||||
private ThrOrderService thrOrderService;
|
||||
@Resource
|
||||
private ThrOrderDetailService thrOrderDetailService;
|
||||
|
||||
@GetMapping("/udiwms/thrsys/getOrders")
|
||||
public BaseResponse getOrders(FilterThrOrderRequest filterThrOrderRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<ThrOrderEntity> thrOrderEntities
|
||||
= thrOrderService.filterThrOrder(filterThrOrderRequest);
|
||||
PageInfo<ThrOrderEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(thrOrderEntities);
|
||||
PageSimpleResponse<ThrOrderEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(thrOrderEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/udiwms/thrsys/getOrderDetails")
|
||||
public BaseResponse getOrderDetails(FilterThrOrderDetailRequest filterThrOrderDetailRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<ThrOrderDetailEntity> thrOrderDetailEntities
|
||||
= thrOrderDetailService.filterThrOrderDetailDetail(filterThrOrderDetailRequest);
|
||||
PageInfo<ThrOrderDetailEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(thrOrderDetailEntities);
|
||||
PageSimpleResponse<ThrOrderDetailEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(thrOrderDetailEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/udiwms/thrsys/postOrderDetail")
|
||||
public BaseResponse postOrderDetail(PostThrOrderRequest postThrOrderRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<ThrOrderEntity> thrOrderEntities;
|
||||
List<ErpOrderResponse> erpOrderResponses = postThrOrderRequest.getDatas();
|
||||
if (erpOrderResponses != null && erpOrderResponses.size() > 0) {
|
||||
|
||||
thrOrderEntities = erpOrderResponses.stream().map(
|
||||
item -> {
|
||||
ThrOrderEntity thrOrderEntity = new ThrOrderEntity();
|
||||
BeanUtils.copyProperties(item, thrOrderEntity);
|
||||
thrOrderEntity.setThirdSysFk(postThrOrderRequest.getThirdSys());
|
||||
thrOrderService.insertThrOrder(thrOrderEntity);
|
||||
thrOrderEntity = thrOrderService.findByUnique(thrOrderEntity.getBillNo(), thrOrderEntity.getThirdSysFk());
|
||||
List<ErpOrderResponse.SubErpOrder> subErpOrders = item.getSubErpOrders();
|
||||
if (subErpOrders != null && subErpOrders.size() > 0) {
|
||||
List<ThrOrderDetailEntity> thrOrderDetailEntities;
|
||||
ThrOrderEntity finalThrOrderEntity = thrOrderEntity;
|
||||
thrOrderDetailEntities = subErpOrders.stream().map(subItem ->
|
||||
{
|
||||
ThrOrderDetailEntity thrOrderDetailEntity = new ThrOrderDetailEntity();
|
||||
BeanUtils.copyProperties(subItem, finalThrOrderEntity);
|
||||
thrOrderDetailEntity.setOrderIdFk(finalThrOrderEntity.getId() + "");
|
||||
thrOrderDetailEntity.setThirdSysFk(finalThrOrderEntity.getThirdSysFk());
|
||||
return thrOrderDetailEntity;
|
||||
}).collect(Collectors.toList());
|
||||
thrOrderDetailService.insertThrOrderDetails(thrOrderDetailEntities);
|
||||
}
|
||||
return thrOrderEntity;
|
||||
}
|
||||
).collect(Collectors.toList());
|
||||
thrOrderService.insertThrOrders(thrOrderEntities);
|
||||
return ResultVOUtils.success("单据上传成功!");
|
||||
}
|
||||
|
||||
return ResultVOUtils.error(500, "上传数据为空");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.glxp.api.admin.controller.thrsys;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
|
||||
import com.glxp.api.admin.req.thrsys.PostThrProductsRequest;
|
||||
import com.glxp.api.admin.res.PageSimpleResponse;
|
||||
import com.glxp.api.admin.res.basic.ErpProductsResponse;
|
||||
import com.glxp.api.admin.service.thrsys.ThrProductsService;
|
||||
import com.glxp.api.common.enums.ResultEnum;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
public class ThrProductsController {
|
||||
|
||||
@Resource
|
||||
private ThrProductsService thrProductsService;
|
||||
|
||||
@GetMapping("/udiwms/thrsys/getThrProducts")
|
||||
public BaseResponse getThrProducts(FilterThrProductsRequest filterThrProductsRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<ThrProductsEntity> thrCorpEntities
|
||||
= thrProductsService.filterThrProductsRequest(filterThrProductsRequest);
|
||||
PageInfo<ThrProductsEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(thrCorpEntities);
|
||||
PageSimpleResponse<ThrProductsEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(thrCorpEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
@PostMapping("/udiwms/thrsys/postThrProducts")
|
||||
public BaseResponse postThrProducts(PostThrProductsRequest postThrProductsRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
List<ThrProductsEntity> thrProductsEntities;
|
||||
List<ErpProductsResponse> erpProductsResponses = postThrProductsRequest.getDatas();
|
||||
if (erpProductsResponses != null && erpProductsResponses.size() > 0) {
|
||||
thrProductsEntities = erpProductsResponses.stream().map(
|
||||
item -> {
|
||||
ThrProductsEntity thrProductsEntity = new ThrProductsEntity();
|
||||
BeanUtils.copyProperties(item, thrProductsEntity);
|
||||
thrProductsEntity.setThirdSysFk(postThrProductsRequest.getThirdSys());
|
||||
return thrProductsEntity;
|
||||
}
|
||||
).collect(Collectors.toList());
|
||||
thrProductsService.insertThrProductss(thrProductsEntities);
|
||||
return ResultVOUtils.success("产品信息上传成功!");
|
||||
|
||||
}
|
||||
|
||||
return ResultVOUtils.error(500, "上传数据为空");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.glxp.api.admin.dao.basic;
|
||||
|
||||
import com.glxp.api.admin.entity.basic.BasicThirdSysEntity;
|
||||
import com.glxp.api.admin.req.basic.FilterBasicThirdSysRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasicThirdSysDao {
|
||||
|
||||
boolean updateBasicThiSys(BasicThirdSysEntity basicThirdSysEntity);
|
||||
|
||||
BasicThirdSysEntity selectByThirdId(@Param("thirdId") String thirdId);
|
||||
|
||||
List<BasicThirdSysEntity> filterBasicThiSys(FilterBasicThirdSysRequest filterBasicThirdSysRequest);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.glxp.api.admin.dao.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrCorpEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrCorpRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ThrCorpDao {
|
||||
|
||||
List<ThrCorpEntity> filterThrCorps(FilterThrCorpRequest filterThrCorpRequest);
|
||||
|
||||
boolean insertThrCorps(ThrCorpEntity thrCorpEntity);
|
||||
|
||||
boolean insertThrCorpss(@Param("thrCorpEntitys") List<ThrCorpEntity> thrCorpEntitys);
|
||||
|
||||
boolean updateThrCorps(ThrCorpEntity thrCorpEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.glxp.api.admin.dao.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrInvProductsRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ThrInvProductsDao {
|
||||
|
||||
List<ThrInvProductsEntity> filterThrInvProductss(FilterThrInvProductsRequest filterThrInvProductsRequest);
|
||||
|
||||
boolean insertThrInvProduct(ThrInvProductsEntity thrInvProductsEntity);
|
||||
|
||||
boolean insertThrInvProducts(@Param("thrInvProductsEntities") List<ThrInvProductsEntity> thrInvProductsEntities);
|
||||
|
||||
boolean updateThrInvProducts(ThrInvProductsEntity thrInvProductsEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.glxp.api.admin.dao.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrOrderEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrOrderRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ThrOrderDao {
|
||||
|
||||
List<ThrOrderEntity> filterThrOrder(FilterThrOrderRequest filterThrOrderRequest);
|
||||
|
||||
boolean insertThrOrder(ThrOrderEntity thrCorpEntity);
|
||||
|
||||
boolean insertThrOrders(@Param("thrOrderEntities") List<ThrOrderEntity> thrOrderEntities);
|
||||
|
||||
boolean updateThrOrder(ThrOrderEntity thrOrderEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.glxp.api.admin.dao.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrOrderDetailEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrOrderDetailRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ThrOrderDetailDao {
|
||||
|
||||
List<ThrOrderDetailEntity> filterThrOrderDetailDetail(FilterThrOrderDetailRequest filterThrOrderDetailRequest);
|
||||
|
||||
boolean insertThrOrderDetail(ThrOrderDetailEntity thrOrderDetailEntity);
|
||||
|
||||
boolean insertThrOrderDetails(@Param("thrOrderDetailEntities") List<ThrOrderDetailEntity> thrOrderDetailEntities);
|
||||
|
||||
boolean updateThrOrderDetail(ThrOrderDetailEntity thrOrderDetailEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.glxp.api.admin.dao.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ThrProductsDao {
|
||||
|
||||
|
||||
List<ThrProductsEntity> filterThrProductsRequest(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
boolean insertThrProducts(ThrProductsEntity thrProductsEntity);
|
||||
|
||||
boolean insertThrProductss(@Param("thrProductsEntities") List<ThrProductsEntity> thrProductsEntities);
|
||||
|
||||
boolean updateThrProducts(ThrProductsEntity thrProductsEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.glxp.api.admin.entity.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BasicThirdSysEntity {
|
||||
private String id;
|
||||
private String thirdId;
|
||||
private String thirdName;
|
||||
private String piQueryUrl;
|
||||
private Boolean piQueryEnabled;
|
||||
private String orderQueryUrl;
|
||||
private Boolean orderQueryEnabled;
|
||||
private String orderAddUrl;
|
||||
private Boolean orderAddEnabled;
|
||||
private String orderDeleteUrl;
|
||||
private Boolean orderDeleteEnabled;
|
||||
private String orderModifyUrl;
|
||||
private Boolean orderModifyEnabled;
|
||||
private String invPiUrl;
|
||||
private Boolean invPiEnabled;
|
||||
private String corpUrl;
|
||||
private Boolean corpEnabled;
|
||||
private Boolean enabled;
|
||||
private String remark;
|
||||
private String thirdSysFk;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.glxp.api.admin.entity.info;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WebSocketEntity {
|
||||
private String type;
|
||||
private String data;
|
||||
|
||||
public WebSocketEntity(String type, String data) {
|
||||
this.type = type;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.glxp.api.admin.entity.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ThrCorpEntity {
|
||||
|
||||
private Integer id;
|
||||
private String unitId;
|
||||
private String name;
|
||||
private String spell;
|
||||
private String addr;
|
||||
private String creditNo;
|
||||
private String contact;
|
||||
private String mobile;
|
||||
private String thirdSysFk;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.glxp.api.admin.entity.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ThrInvProductsEntity {
|
||||
|
||||
private Integer id;
|
||||
private String inventoryCode;
|
||||
private String inventoryName;
|
||||
private String spec;
|
||||
private String count;
|
||||
private String batchNo;
|
||||
private String warehouseName;
|
||||
private String warehouseCode;
|
||||
private String registerCertNo;
|
||||
private String manufacturingDate;
|
||||
private String expirationDate;
|
||||
private String thirdSysFk;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.glxp.api.admin.entity.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ThrOrderDetailEntity {
|
||||
private Integer id;
|
||||
private String productId;
|
||||
private String productName;
|
||||
private String spec;
|
||||
private String batchNo;
|
||||
private String expireDate;
|
||||
private String productDate;
|
||||
private String count;
|
||||
private String reCount;
|
||||
private String orderIdFk;
|
||||
private String thirdSysFk;
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.glxp.api.admin.entity.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ThrOrderEntity {
|
||||
|
||||
private Integer id;
|
||||
private String billNo;
|
||||
private String billdate;
|
||||
private String corpId;
|
||||
private String corpName;
|
||||
private String billType;
|
||||
private String billFlag;
|
||||
private String thirdSysFk;
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.glxp.api.admin.entity.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ThrProductsEntity {
|
||||
private Integer id;
|
||||
private String code;
|
||||
private String name;
|
||||
private String measname;
|
||||
private String spec;
|
||||
private String registerNo;
|
||||
private String manufactory;
|
||||
private String thirdSysFk;
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.glxp.api.admin.req.basic;
|
||||
|
||||
import com.glxp.api.admin.res.basic.ErpUnitsResponse;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CombineSingleUnitRequest {
|
||||
private String key;
|
||||
private String thirdSys;
|
||||
private ErpUnitsResponse erpUnitsResponse;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.glxp.api.admin.req.basic;
|
||||
|
||||
import com.glxp.api.admin.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterBasicThirdSysRequest extends ListPageRequest {
|
||||
|
||||
private String thirdId;
|
||||
private String thirdName;
|
||||
private Boolean enabled;
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.glxp.api.admin.req.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PostThirdSysPiRequest {
|
||||
private String thirdSys;
|
||||
private List<PostSmpUdiInfoRequest> datas;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.glxp.api.admin.req.thrsys;
|
||||
|
||||
import com.glxp.api.admin.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterThrCorpRequest extends ListPageRequest {
|
||||
private String thirdSysFk;
|
||||
private String unitId;
|
||||
private String name;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.glxp.api.admin.req.thrsys;
|
||||
|
||||
import com.glxp.api.admin.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterThrInvProductsRequest extends ListPageRequest {
|
||||
|
||||
private String inventoryCode;
|
||||
private String inventoryName;
|
||||
private String thirdSysFk;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.glxp.api.admin.req.thrsys;
|
||||
|
||||
import com.glxp.api.admin.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class FilterThrOrderDetailRequest extends ListPageRequest {
|
||||
|
||||
private String orderIdFk;
|
||||
private String thirdSysFk;
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.glxp.api.admin.req.thrsys;
|
||||
|
||||
import com.glxp.api.admin.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterThrOrderRequest extends ListPageRequest {
|
||||
|
||||
private String billNo;
|
||||
private String thirdSysFk;
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.glxp.api.admin.req.thrsys;
|
||||
|
||||
import com.glxp.api.admin.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterThrProductsRequest extends ListPageRequest {
|
||||
private String name;
|
||||
private String thirdSysFk;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.glxp.api.admin.req.thrsys;
|
||||
|
||||
import com.glxp.api.admin.res.basic.ErpUnitsResponse;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PostThrCorpRequest {
|
||||
private String thirdSys;
|
||||
private List<ErpUnitsResponse> corps;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.glxp.api.admin.req.thrsys;
|
||||
|
||||
import com.glxp.api.admin.res.inventory.ErpOnHandResponse;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PostThrInvProductsRequest {
|
||||
|
||||
private String thirdSys;
|
||||
private List<ErpOnHandResponse> datas;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.glxp.api.admin.req.thrsys;
|
||||
|
||||
import com.glxp.api.admin.res.inout.ErpOrderResponse;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PostThrOrderRequest {
|
||||
|
||||
private String thirdSys;
|
||||
private List<ErpOrderResponse> datas;
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.glxp.api.admin.req.thrsys;
|
||||
|
||||
import com.glxp.api.admin.res.basic.ErpProductsResponse;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PostThrProductsRequest {
|
||||
|
||||
private String thirdSys;
|
||||
List<ErpProductsResponse> datas;
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.glxp.api.admin.res.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BasicProductThirdSysResponse {
|
||||
private String sysName;
|
||||
private String thirdName;
|
||||
private String thirdId;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.glxp.api.admin.res.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BussinessTypResponse {
|
||||
|
||||
private Integer id;
|
||||
private String action;
|
||||
private String name;
|
||||
private Boolean enable;
|
||||
private String remark;
|
||||
private String mainAction;
|
||||
private String thirdSysFk;
|
||||
private String thirdId;
|
||||
private String thirdName;
|
||||
private String piQueryUrl;
|
||||
private Boolean piQueryEnabled;
|
||||
private String orderQueryUrl;
|
||||
private Boolean orderQueryEnabled;
|
||||
private String orderAddUrl;
|
||||
private Boolean orderAddEnabled;
|
||||
private String orderDeleteUrl;
|
||||
private Boolean orderDeleteEnabled;
|
||||
private String orderModifyUrl;
|
||||
private Boolean orderModifyEnabled;
|
||||
private String invPiUrl;
|
||||
private Boolean invPiEnabled;
|
||||
private String corpUrl;
|
||||
private Boolean corpEnabled;
|
||||
private Boolean enabled;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.glxp.api.admin.service.basic;
|
||||
|
||||
import com.glxp.api.admin.entity.basic.BasicThirdSysEntity;
|
||||
import com.glxp.api.admin.req.basic.FilterBasicThirdSysRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasicThirdSysService {
|
||||
|
||||
|
||||
boolean updateBasicThiSys(BasicThirdSysEntity basicThirdSysEntity);
|
||||
|
||||
BasicThirdSysEntity selectByThirdId(String thirdId);
|
||||
|
||||
List<BasicThirdSysEntity> filterBasicThiSys(FilterBasicThirdSysRequest filterBasicThirdSysRequest);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.glxp.api.admin.service.basic.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.admin.dao.basic.BasicThirdSysDao;
|
||||
import com.glxp.api.admin.entity.basic.BasicThirdSysEntity;
|
||||
import com.glxp.api.admin.req.basic.FilterBasicThirdSysRequest;
|
||||
import com.glxp.api.admin.service.basic.BasicThirdSysService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BasicThirdSysServiceImpl implements BasicThirdSysService {
|
||||
|
||||
@Resource
|
||||
BasicThirdSysDao basicThirdSysDao;
|
||||
|
||||
@Override
|
||||
public boolean updateBasicThiSys(BasicThirdSysEntity basicThirdSysEntity) {
|
||||
return basicThirdSysDao.updateBasicThiSys(basicThirdSysEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BasicThirdSysEntity selectByThirdId(String thirdId) {
|
||||
return basicThirdSysDao.selectByThirdId(thirdId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasicThirdSysEntity> filterBasicThiSys(FilterBasicThirdSysRequest filterBasicThirdSysRequest) {
|
||||
if (filterBasicThirdSysRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
if (filterBasicThirdSysRequest.getPage() != null) {
|
||||
int offset = (filterBasicThirdSysRequest.getPage() - 1) * filterBasicThirdSysRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterBasicThirdSysRequest.getLimit());
|
||||
}
|
||||
List<BasicThirdSysEntity> data = basicThirdSysDao.filterBasicThiSys(filterBasicThirdSysRequest);
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.glxp.api.admin.service.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrCorpEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrCorpRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ThrCorpService {
|
||||
|
||||
List<ThrCorpEntity> filterThrCorps(FilterThrCorpRequest filterThrCorpRequest);
|
||||
|
||||
boolean insertThrCorps(ThrCorpEntity thrCorpEntity);
|
||||
|
||||
boolean insertThrCorpss(List<ThrCorpEntity> thrCorpEntitys);
|
||||
|
||||
boolean updateThrCorps(ThrCorpEntity thrCorpEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.glxp.api.admin.service.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrInvProductsRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ThrInvProductsService {
|
||||
|
||||
List<ThrInvProductsEntity> filterThrInvProductss(FilterThrInvProductsRequest filterThrInvProductsRequest);
|
||||
|
||||
boolean insertThrInvProduct(ThrInvProductsEntity thrInvProductsEntity);
|
||||
|
||||
boolean insertThrInvProducts(List<ThrInvProductsEntity> thrInvProductsEntities);
|
||||
|
||||
boolean updateThrInvProducts(ThrInvProductsEntity thrInvProductsEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.glxp.api.admin.service.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrOrderDetailEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrOrderDetailRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ThrOrderDetailService {
|
||||
|
||||
|
||||
List<ThrOrderDetailEntity> filterThrOrderDetailDetail(FilterThrOrderDetailRequest filterThrOrderDetailRequest);
|
||||
|
||||
boolean insertThrOrderDetail(ThrOrderDetailEntity thrOrderDetailEntity);
|
||||
|
||||
boolean insertThrOrderDetails(List<ThrOrderDetailEntity> thrOrderDetailEntities);
|
||||
|
||||
boolean updateThrOrderDetail(ThrOrderDetailEntity thrOrderDetailEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.glxp.api.admin.service.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrOrderEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrOrderRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ThrOrderService {
|
||||
|
||||
List<ThrOrderEntity> filterThrOrder(FilterThrOrderRequest filterThrOrderRequest);
|
||||
|
||||
ThrOrderEntity findByUnique(String billNo, String thirdSysFk);
|
||||
|
||||
boolean insertThrOrder(ThrOrderEntity thrCorpEntity);
|
||||
|
||||
boolean insertThrOrders(List<ThrOrderEntity> thrOrderEntities);
|
||||
|
||||
boolean updateThrOrder(ThrOrderEntity thrOrderEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.glxp.api.admin.service.thrsys;
|
||||
|
||||
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ThrProductsService {
|
||||
|
||||
|
||||
List<ThrProductsEntity> filterThrProductsRequest(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
boolean insertThrProducts(ThrProductsEntity thrProductsEntity);
|
||||
|
||||
boolean insertThrProductss(List<ThrProductsEntity> thrProductsEntities);
|
||||
|
||||
boolean updateThrProducts(ThrProductsEntity thrProductsEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.glxp.api.admin.service.thrsys.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.admin.dao.thrsys.ThrCorpDao;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrCorpEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrCorpRequest;
|
||||
import com.glxp.api.admin.service.thrsys.ThrCorpService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ThrCorpServiceImpl implements ThrCorpService {
|
||||
|
||||
@Resource
|
||||
private ThrCorpDao thrCorpDao;
|
||||
|
||||
@Override
|
||||
public List<ThrCorpEntity> filterThrCorps(FilterThrCorpRequest filterThrCorpRequest) {
|
||||
if (filterThrCorpRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterThrCorpRequest.getPage() != null) {
|
||||
int offset = (filterThrCorpRequest.getPage() - 1) * filterThrCorpRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterThrCorpRequest.getLimit());
|
||||
}
|
||||
List<ThrCorpEntity> data = thrCorpDao.filterThrCorps(filterThrCorpRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrCorps(ThrCorpEntity thrCorpEntity) {
|
||||
return thrCorpDao.insertThrCorps(thrCorpEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrCorpss(List<ThrCorpEntity> thrCorpEntitys) {
|
||||
return thrCorpDao.insertThrCorpss(thrCorpEntitys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateThrCorps(ThrCorpEntity thrCorpEntity) {
|
||||
return thrCorpDao.updateThrCorps(thrCorpEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return thrCorpDao.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.glxp.api.admin.service.thrsys.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.admin.dao.thrsys.ThrCorpDao;
|
||||
import com.glxp.api.admin.dao.thrsys.ThrInvProductsDao;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrCorpEntity;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrInvProductsRequest;
|
||||
import com.glxp.api.admin.service.thrsys.ThrInvProductsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ThrInvProductsServiceImpl implements ThrInvProductsService {
|
||||
|
||||
@Resource
|
||||
private ThrInvProductsDao thrInvProductsDao;
|
||||
|
||||
@Override
|
||||
public List<ThrInvProductsEntity> filterThrInvProductss(FilterThrInvProductsRequest filterThrInvProductsRequest) {
|
||||
if (filterThrInvProductsRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterThrInvProductsRequest.getPage() != null) {
|
||||
int offset = (filterThrInvProductsRequest.getPage() - 1) * filterThrInvProductsRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterThrInvProductsRequest.getLimit());
|
||||
}
|
||||
List<ThrInvProductsEntity> data = thrInvProductsDao.filterThrInvProductss(filterThrInvProductsRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrInvProduct(ThrInvProductsEntity thrInvProductsEntity) {
|
||||
return thrInvProductsDao.insertThrInvProduct(thrInvProductsEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrInvProducts(List<ThrInvProductsEntity> thrInvProductsEntities) {
|
||||
return thrInvProductsDao.insertThrInvProducts(thrInvProductsEntities);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateThrInvProducts(ThrInvProductsEntity thrInvProductsEntity) {
|
||||
return thrInvProductsDao.updateThrInvProducts(thrInvProductsEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return thrInvProductsDao.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.glxp.api.admin.service.thrsys.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.admin.dao.thrsys.ThrOrderDetailDao;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrOrderDetailEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrOrderDetailRequest;
|
||||
import com.glxp.api.admin.service.thrsys.ThrOrderDetailService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ThrOrderDetailServiceImpl implements ThrOrderDetailService {
|
||||
|
||||
@Resource
|
||||
ThrOrderDetailDao thrOrderDetailDao;
|
||||
|
||||
@Override
|
||||
public List<ThrOrderDetailEntity> filterThrOrderDetailDetail(FilterThrOrderDetailRequest filterThrOrderDetailRequest) {
|
||||
if (filterThrOrderDetailRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterThrOrderDetailRequest.getPage() != null) {
|
||||
int offset = (filterThrOrderDetailRequest.getPage() - 1) * filterThrOrderDetailRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterThrOrderDetailRequest.getLimit());
|
||||
}
|
||||
List<ThrOrderDetailEntity> data = thrOrderDetailDao.filterThrOrderDetailDetail(filterThrOrderDetailRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrOrderDetail(ThrOrderDetailEntity thrOrderDetailEntity) {
|
||||
return thrOrderDetailDao.insertThrOrderDetail(thrOrderDetailEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrOrderDetails(List<ThrOrderDetailEntity> thrOrderDetailEntities) {
|
||||
return thrOrderDetailDao.insertThrOrderDetails(thrOrderDetailEntities);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateThrOrderDetail(ThrOrderDetailEntity thrOrderDetailEntity) {
|
||||
return thrOrderDetailDao.updateThrOrderDetail(thrOrderDetailEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return thrOrderDetailDao.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.glxp.api.admin.service.thrsys.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.admin.dao.thrsys.ThrOrderDao;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrOrderEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrOrderRequest;
|
||||
import com.glxp.api.admin.service.thrsys.ThrOrderService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ThrOrderServiceImpl implements ThrOrderService {
|
||||
@Resource
|
||||
private ThrOrderDao thrOrderDao;
|
||||
|
||||
@Override
|
||||
public List<ThrOrderEntity> filterThrOrder(FilterThrOrderRequest filterThrOrderRequest) {
|
||||
if (filterThrOrderRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterThrOrderRequest.getPage() != null) {
|
||||
int offset = (filterThrOrderRequest.getPage() - 1) * filterThrOrderRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterThrOrderRequest.getLimit());
|
||||
}
|
||||
List<ThrOrderEntity> data = thrOrderDao.filterThrOrder(filterThrOrderRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThrOrderEntity findByUnique(String billNo, String thirdSysFk) {
|
||||
FilterThrOrderRequest filterThrOrderRequest = new FilterThrOrderRequest();
|
||||
filterThrOrderRequest.setBillNo(billNo);
|
||||
filterThrOrderRequest.setThirdSysFk(thirdSysFk);
|
||||
List<ThrOrderEntity> thrOrderEntities = filterThrOrder(filterThrOrderRequest);
|
||||
if (thrOrderEntities != null && thrOrderEntities.size() > 0) {
|
||||
return thrOrderEntities.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrOrder(ThrOrderEntity thrCorpEntity) {
|
||||
return thrOrderDao.insertThrOrder(thrCorpEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrOrders(List<ThrOrderEntity> thrOrderEntities) {
|
||||
return thrOrderDao.insertThrOrders(thrOrderEntities);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateThrOrder(ThrOrderEntity thrOrderEntity) {
|
||||
return thrOrderDao.updateThrOrder(thrOrderEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return thrOrderDao.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.glxp.api.admin.service.thrsys.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.admin.dao.thrsys.ThrProductsDao;
|
||||
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
|
||||
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
|
||||
import com.glxp.api.admin.service.thrsys.ThrProductsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ThrProductsServiceImpl implements ThrProductsService {
|
||||
|
||||
|
||||
@Resource
|
||||
ThrProductsDao thrProductsDao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<ThrProductsEntity> filterThrProductsRequest(FilterThrProductsRequest filterThrProductsRequest) {
|
||||
if (filterThrProductsRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterThrProductsRequest.getPage() != null) {
|
||||
int offset = (filterThrProductsRequest.getPage() - 1) * filterThrProductsRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterThrProductsRequest.getLimit());
|
||||
}
|
||||
List<ThrProductsEntity> data = thrProductsDao.filterThrProductsRequest(filterThrProductsRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrProducts(ThrProductsEntity thrProductsEntity) {
|
||||
return thrProductsDao.insertThrProducts(thrProductsEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrProductss(List<ThrProductsEntity> thrProductsEntities) {
|
||||
return thrProductsDao.insertThrProductss(thrProductsEntities);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateThrProducts(ThrProductsEntity thrProductsEntity) {
|
||||
return thrProductsDao.updateThrProducts(thrProductsEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return thrProductsDao.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
<?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.admin.dao.basic.BasicThirdSysDao">
|
||||
|
||||
<update id="updateBasicThiSys" parameterType="com.glxp.api.admin.entity.basic.BasicThirdSysEntity">
|
||||
UPDATE basic_third_sys
|
||||
<set>
|
||||
<if test="thirdId != null">thirdId=#{thirdId},</if>
|
||||
<if test="thirdName != null">thirdName=#{thirdName},</if>
|
||||
<if test="piQueryUrl != null">piQueryUrl=#{piQueryUrl},</if>
|
||||
<if test="piQueryEnabled != null">piQueryEnabled=#{piQueryEnabled},</if>
|
||||
<if test="orderQueryUrl != null">orderQueryUrl=#{orderQueryUrl},</if>
|
||||
<if test="orderQueryEnabled != null">orderQueryEnabled=#{orderQueryEnabled},</if>
|
||||
<if test="orderAddUrl != null">orderAddUrl=#{orderAddUrl},</if>
|
||||
<if test="orderAddEnabled != null">orderAddEnabled=#{orderAddEnabled},</if>
|
||||
<if test="orderDeleteUrl != null">orderDeleteUrl=#{orderDeleteUrl},</if>
|
||||
<if test="orderDeleteEnabled != null">orderDeleteEnabled=#{orderDeleteEnabled},</if>
|
||||
<if test="orderModifyUrl != null">orderModifyUrl=#{orderModifyUrl},</if>
|
||||
<if test="orderModifyEnabled != null">orderModifyEnabled=#{orderModifyEnabled},</if>
|
||||
<if test="invPiUrl != null">invPiUrl=#{invPiUrl},</if>
|
||||
<if test="invPiEnabled != null">invPiEnabled=#{invPiEnabled},</if>
|
||||
<if test="corpUrl != null">corpUrl=#{corpUrl},</if>
|
||||
<if test="corpEnabled != null">corpEnabled=#{corpEnabled},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
<if test="enabled != null">enabled=#{enabled},</if>
|
||||
</set>
|
||||
WHERE id=#{id}
|
||||
</update>
|
||||
|
||||
<select id="filterBasicThiSys" parameterType="com.glxp.api.admin.req.basic.FilterBasicThirdSysRequest"
|
||||
resultType="com.glxp.api.admin.entity.basic.BasicThirdSysEntity">
|
||||
SELECT * FROM basic_third_sys
|
||||
<where>
|
||||
<if test="thirdId != '' and thirdId != null">
|
||||
AND thirdId = #{thirdId}
|
||||
</if>
|
||||
<if test="thirdName != '' and thirdName != null">
|
||||
AND thirdName = #{thirdName}
|
||||
</if>
|
||||
<if test="enabled != '' and enabled != null">
|
||||
AND enabled = #{enabled}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="selectByThirdId" parameterType="Map" resultType="com.glxp.api.admin.entity.basic.BasicThirdSysEntity">
|
||||
select * FROM basic_third_sys WHERE thirdId = #{thirdId}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,86 @@
|
||||
<?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.admin.dao.thrsys.ThrCorpDao">
|
||||
|
||||
<select id="filterThrCorps" parameterType="com.glxp.api.admin.req.thrsys.FilterThrCorpRequest"
|
||||
resultType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
|
||||
SELECT * FROM thr_corp
|
||||
<where>
|
||||
<if test="unitId != '' and unitId != null">
|
||||
AND unitId = #{unitId}
|
||||
</if>
|
||||
<if test="name != '' and name != null">
|
||||
AND name = #{name}
|
||||
</if>
|
||||
<if test="thirdSysFk != '' and thirdSysFk != null">
|
||||
AND thirdSysFk = #{thirdSysFk}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertThrCorps" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
|
||||
replace INTO thr_corp
|
||||
(
|
||||
unitId,name,spell,addr,creditNo,
|
||||
contact,mobile,thirdSysFk
|
||||
)
|
||||
values
|
||||
(
|
||||
#{unitId},
|
||||
#{name},
|
||||
#{spell},
|
||||
#{addr},
|
||||
#{creditNo},
|
||||
#{contact},
|
||||
#{mobile},
|
||||
#{thirdSysFk}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertThrCorpss" keyProperty="id" parameterType="java.util.List">
|
||||
replace INTO thr_corp
|
||||
(
|
||||
unitId,name,spell,addr,creditNo,
|
||||
contact,mobile,thirdSysFk
|
||||
)
|
||||
values
|
||||
|
||||
<foreach collection="thrCorpEntitys" item="item" index="index"
|
||||
separator=",">
|
||||
(
|
||||
#{item.unitId},
|
||||
#{item.name},
|
||||
#{item.spell},
|
||||
#{item.addr},
|
||||
#{item.creditNo},
|
||||
#{item.contact},
|
||||
#{item.mobile},
|
||||
#{item.thirdSysFk}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE FROM thr_corp WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="updateThrCorps" parameterType="com.glxp.api.admin.entity.thrsys.ThrCorpEntity">
|
||||
UPDATE thr_corp
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="unitId != null">unitId=#{unitId},</if>
|
||||
<if test="name != null">name=#{name},</if>
|
||||
<if test="spell != null">spell=#{spell},</if>
|
||||
<if test="addr != null">addr=#{addr},</if>
|
||||
<if test="creditNo != null">creditNo=#{creditNo},</if>
|
||||
<if test="contact != null">contact=#{contact},</if>
|
||||
<if test="mobile != null">mobile=#{mobile},</if>
|
||||
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,83 @@
|
||||
<?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.admin.dao.thrsys.ThrInvProductsDao">
|
||||
|
||||
<select id="filterThrInvProductss" parameterType="com.glxp.api.admin.req.thrsys.FilterThrInvProductsRequest"
|
||||
resultType="com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity">
|
||||
SELECT * FROM thr_inv_products
|
||||
<where>
|
||||
<if test="inventoryCode != '' and inventoryCode != null">
|
||||
AND inventoryCode = #{inventoryCode}
|
||||
</if>
|
||||
<if test="inventoryName != '' and inventoryName != null">
|
||||
AND inventoryName = #{inventoryName}
|
||||
</if>
|
||||
<if test="thirdSysFk != '' and thirdSysFk != null">
|
||||
AND thirdSysFk = #{thirdSysFk}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertThrInvProduct" keyProperty="id"
|
||||
parameterType="com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity">
|
||||
replace INTO thr_inv_products
|
||||
(
|
||||
inventoryCode,inventoryName,count,spec,
|
||||
warehouseName,warehouseCode,registerCertNo,manufacturingDate,
|
||||
expirationDate,thirdSysFk
|
||||
)
|
||||
values
|
||||
(
|
||||
#{inventoryCode}, #{inventoryName}, #{count}, #{spec},
|
||||
#{warehouseName}, #{warehouseCode}, #{registerCertNo}, #{manufacturingDate},
|
||||
#{expirationDate},
|
||||
#{thirdSysFk}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertThrInvProducts" keyProperty="id" parameterType="java.util.List">
|
||||
replace INTO thr_inv_products
|
||||
(
|
||||
inventoryCode,inventoryName,count,spec,
|
||||
warehouseName,warehouseCode,registerCertNo,manufacturingDate,
|
||||
expirationDate,thirdSysFk
|
||||
)
|
||||
values
|
||||
|
||||
<foreach collection="thrInvProductsEntities" item="item" index="index"
|
||||
separator=",">
|
||||
(
|
||||
#{item.inventoryCode}, #{item.inventoryName}, #{item.count}, #{item.spec},
|
||||
#{item.warehouseName}, #{item.warehouseCode}, #{item.registerCertNo},
|
||||
#{item.manufacturingDate}, #{item.expirationDate},
|
||||
#{item.thirdSysFk}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE FROM thr_inv_products WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="updateThrInvProducts" parameterType="com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity">
|
||||
UPDATE thr_inv_products
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="inventoryCode != null">inventoryCode=#{inventoryCode},</if>
|
||||
<if test="inventoryName != null">inventoryName=#{inventoryName},</if>
|
||||
<if test="spec != null">spec=#{spec},</if>
|
||||
<if test="count != null">count=#{count},</if>
|
||||
<if test="batchNo != null">batchNo=#{batchNo},</if>
|
||||
<if test="warehouseName != null">warehouseName=#{warehouseName},</if>
|
||||
<if test="warehouseCode != null">warehouseCode=#{warehouseCode},</if>
|
||||
<if test="registerCertNo != null">registerCertNo=#{registerCertNo},</if>
|
||||
<if test="manufacturingDate != null">manufacturingDate=#{manufacturingDate},</if>
|
||||
<if test="expirationDate != null">expirationDate=#{expirationDate},</if>
|
||||
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,81 @@
|
||||
<?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.admin.dao.thrsys.ThrOrderDao">
|
||||
|
||||
<select id="filterThrOrder" parameterType="com.glxp.api.admin.req.thrsys.FilterThrOrderRequest"
|
||||
resultType="com.glxp.api.admin.entity.thrsys.ThrOrderEntity">
|
||||
SELECT * FROM thr_order
|
||||
<where>
|
||||
<if test="unitId != '' and unitId != null">
|
||||
AND unitId = #{unitId}
|
||||
</if>
|
||||
<if test="name != '' and name != null">
|
||||
AND name = #{name}
|
||||
</if>
|
||||
<if test="thirdSysFk != '' and thirdSysFk != null">
|
||||
AND thirdSysFk = #{thirdSysFk}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertThrOrder" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrOrderEntity">
|
||||
replace INTO thr_order
|
||||
(
|
||||
billNo,billdate,corpId,corpName,billType,billFlag,thirdSysFk
|
||||
)
|
||||
values
|
||||
(
|
||||
#{billNo},
|
||||
#{billdate},
|
||||
#{corpId},
|
||||
#{corpName},
|
||||
#{billType},
|
||||
#{billFlag},
|
||||
#{thirdSysFk}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertThrOrders" keyProperty="id" parameterType="java.util.List">
|
||||
replace INTO thr_order
|
||||
(
|
||||
billNo,billdate,corpId,corpName,billType,billFlag,thirdSysFk
|
||||
)
|
||||
values
|
||||
|
||||
<foreach collection="thrOrderEntities" item="item" index="index"
|
||||
separator=",">
|
||||
(
|
||||
#{item.billNo},
|
||||
#{item.billdate},
|
||||
#{item.corpId},
|
||||
#{item.corpName},
|
||||
#{item.billType},
|
||||
#{item.billFlag},
|
||||
#{item.thirdSysFk}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE FROM thr_order WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="updateThrOrder" parameterType="com.glxp.api.admin.entity.thrsys.ThrOrderEntity">
|
||||
UPDATE thr_order
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="billNo != null">billNo=#{billNo},</if>
|
||||
<if test="billdate != null">billdate=#{billdate},</if>
|
||||
<if test="corpId != null">corpId=#{corpId},</if>
|
||||
<if test="corpName != null">corpName=#{corpName},</if>
|
||||
<if test="billType != null">billType=#{billType},</if>
|
||||
<if test="billFlag != null">billFlag=#{billFlag},</if>
|
||||
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,74 @@
|
||||
<?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.admin.dao.thrsys.ThrOrderDetailDao">
|
||||
|
||||
<select id="filterThrOrderDetailDetail" parameterType="com.glxp.api.admin.req.thrsys.FilterThrOrderDetailRequest"
|
||||
resultType="com.glxp.api.admin.entity.thrsys.ThrOrderDetailEntity">
|
||||
SELECT * FROM thr_order_detail
|
||||
<where>
|
||||
<if test="orderIdFk != '' and orderIdFk != null">
|
||||
AND orderIdFk = #{orderIdFk}
|
||||
</if>
|
||||
<if test="thirdSysFk != '' and thirdSysFk != null">
|
||||
AND thirdSysFk = #{thirdSysFk}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertThrOrderDetail" keyProperty="id"
|
||||
parameterType="com.glxp.api.admin.entity.thrsys.ThrOrderDetailEntity">
|
||||
replace INTO thr_order_detail
|
||||
(
|
||||
productId,productName,spec,batchNo,expireDate,
|
||||
productDate,count,reCount,orderIdFk,thirdSysFk
|
||||
)
|
||||
values
|
||||
(
|
||||
#{productId},#{productName},#{spec},#{batchNo},#{expireDate},
|
||||
#{productDate},#{count},#{reCount},#{orderIdFk},#{thirdSysFk}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertThrOrderDetails" keyProperty="id" parameterType="java.util.List">
|
||||
replace INTO thr_order_detail
|
||||
(
|
||||
productId,productName,spec,batchNo,expireDate,
|
||||
productDate,count,reCount,orderIdFk,thirdSysFk
|
||||
)
|
||||
values
|
||||
|
||||
<foreach collection="thrOrderDetailEntities" item="item" index="index"
|
||||
separator=",">
|
||||
(
|
||||
#{item.productId},#{item.productName},#{item.spec},#{item.batchNo},#{item.expireDate},
|
||||
#{item.productDate},#{item.count},#{item.reCount},#{item.orderIdFk},#{item.thirdSysFk}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE FROM thr_order_detail WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="updateThrOrderDetail" parameterType="com.glxp.api.admin.entity.thrsys.ThrOrderDetailEntity">
|
||||
UPDATE thr_order_detail
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="productId != null">productId=#{productId},</if>
|
||||
<if test="productName != null">productName=#{productName},</if>
|
||||
<if test="spec != null">spec=#{spec},</if>
|
||||
<if test="batchNo != null">batchNo=#{batchNo},</if>
|
||||
<if test="expireDate != null">expireDate=#{expireDate},</if>
|
||||
<if test="productDate != null">productDate=#{productDate},</if>
|
||||
<if test="count != null">count=#{count},</if>
|
||||
<if test="reCount != null">reCount=#{reCount},</if>
|
||||
<if test="orderIdFk != null">orderIdFk=#{orderIdFk},</if>
|
||||
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,78 @@
|
||||
<?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.admin.dao.thrsys.ThrProductsDao">
|
||||
|
||||
<select id="filterThrProductsRequest" parameterType="com.glxp.api.admin.req.thrsys.FilterThrProductsRequest"
|
||||
resultType="com.glxp.api.admin.entity.thrsys.ThrProductsEntity">
|
||||
SELECT * FROM thr_products
|
||||
<where>
|
||||
<if test="name != '' and name != null">
|
||||
AND name = #{name}
|
||||
</if>
|
||||
<if test="thirdSysFk != '' and thirdSysFk != null">
|
||||
AND thirdSysFk = #{thirdSysFk}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertThrProducts" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrProductsEntity">
|
||||
replace INTO thr_products
|
||||
(
|
||||
code,name,measname,spec,registerNo,manufactory,thirdSysFk
|
||||
)
|
||||
values
|
||||
(
|
||||
#{code},
|
||||
#{name},
|
||||
#{measname},
|
||||
#{spec},
|
||||
#{registerNo},
|
||||
#{manufactory},
|
||||
#{thirdSysFk}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertThrOrders" keyProperty="id" parameterType="java.util.List">
|
||||
replace INTO thr_products
|
||||
(
|
||||
code,name,measname,spec,registerNo,manufactory,thirdSysFk
|
||||
)
|
||||
values
|
||||
|
||||
<foreach collection="thrProductsEntities" item="item" index="index"
|
||||
separator=",">
|
||||
(
|
||||
#{item.code},
|
||||
#{item.name},
|
||||
#{item.measname},
|
||||
#{item.spec},
|
||||
#{item.registerNo},
|
||||
#{item.manufactory},
|
||||
#{item.thirdSysFk}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE FROM thr_products WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="updateThrOrder" parameterType="com.glxp.api.admin.entity.thrsys.ThrProductsEntity">
|
||||
UPDATE thr_products
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="code != null">code=#{code},</if>
|
||||
<if test="name != null">name=#{name},</if>
|
||||
<if test="measname != null">measname=#{measname},</if>
|
||||
<if test="spec != null">spec=#{spec},</if>
|
||||
<if test="registerNo != null">registerNo=#{registerNo},</if>
|
||||
<if test="manufactory != null">manufactory=#{manufactory},</if>
|
||||
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue