diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFactoryCategoryController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFactoryCategoryController.java new file mode 100644 index 000000000..364ac363b --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataFactoryCategoryController.java @@ -0,0 +1,69 @@ +package com.logpm.basicdata.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.logpm.basicdata.dto.BasicdataFactoryCategoryDTO; +import com.logpm.basicdata.entity.BasicdataFactoryCategoryEntity; +import com.logpm.basicdata.service.IBasicdataFactoryCategoryService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.common.exception.CustomerException; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +@Slf4j +@RestController +@AllArgsConstructor +@RequestMapping("/factoryCategory") +@Api(value = "工厂物料映射", tags = "工厂物料映射接口") +public class BasicdataFactoryCategoryController extends BladeController { + + private final IBasicdataFactoryCategoryService basicdataFactoryCategoryService; + + + + @ResponseBody + @PostMapping("/pageList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "提货单列表", notes = "传入basicdataFactoryCategoryDTO") + public R pageList(@RequestBody BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO) { + String method = "############pageList: "; + log.info(method+"请求参数{}",basicdataFactoryCategoryDTO); + try{ + + IPage pages = basicdataFactoryCategoryService.pageList(basicdataFactoryCategoryDTO); + return R.data(pages); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error("############sendOrders: 系统异常",e); + return R.fail(500,"############sendOrders: 系统异常"); + } + } + + + @ResponseBody + @PostMapping("/save") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "提货单列表", notes = "传入basicdataFactoryCategoryDTO") + public R save(@RequestBody BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO) { + String method = "############save: "; + log.info(method+"请求参数{}",basicdataFactoryCategoryDTO); + try{ + return basicdataFactoryCategoryService.saveEntity(basicdataFactoryCategoryDTO); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error("############sendOrders: 系统异常",e); + return R.fail(500,"############sendOrders: 系统异常"); + } + } + + + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataFactoryCategoryDTO.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataFactoryCategoryDTO.java new file mode 100644 index 000000000..d3f9abb81 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataFactoryCategoryDTO.java @@ -0,0 +1,12 @@ +package com.logpm.basicdata.dto; + +import com.logpm.basicdata.entity.BasicdataFactoryCategoryEntity; +import lombok.Data; + +@Data +public class BasicdataFactoryCategoryDTO extends BasicdataFactoryCategoryEntity { + + private Integer pageSize; + private Integer pageNum; + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataFactoryCategoryEntityClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataFactoryCategoryEntityClient.java new file mode 100644 index 000000000..3f11d92b5 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataFactoryCategoryEntityClient.java @@ -0,0 +1,20 @@ +package com.logpm.basicdata.feign; + +import com.logpm.basicdata.entity.BasicdataFactoryCategoryEntity; +import com.logpm.basicdata.service.IBasicdataFactoryCategoryService; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +@ApiIgnore() +@RestController +@AllArgsConstructor +public class BasicdataFactoryCategoryEntityClient implements IBasicdataFactoryCategoryClient{ + + private final IBasicdataFactoryCategoryService factoryCategoryService; + + @Override + public BasicdataFactoryCategoryEntity findEntityByAdvanceDetailIds(Integer current, Integer size) { + return null; + } +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.java new file mode 100644 index 000000000..6b5ee7eb3 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.java @@ -0,0 +1,19 @@ +package com.logpm.basicdata.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.basicdata.dto.BasicdataFactoryCategoryDTO; +import com.logpm.basicdata.entity.BasicdataFactoryCategoryEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface BasicdataFactoryCategoryMapper extends BaseMapper { + + + IPage pageList(IPage page,@Param("param") BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO); + + + BasicdataFactoryCategoryEntity findEntityByParam(@Param("param") BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO); + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.xml new file mode 100644 index 000000000..354249236 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataFactoryCategoryMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataFactoryCategoryService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataFactoryCategoryService.java new file mode 100644 index 000000000..fbe02a837 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataFactoryCategoryService.java @@ -0,0 +1,17 @@ +package com.logpm.basicdata.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.basicdata.dto.BasicdataFactoryCategoryDTO; +import com.logpm.basicdata.entity.BasicdataFactoryCategoryEntity; +import com.logpm.basicdata.entity.BasicdataFreightEntity; +import org.springblade.core.mp.base.BaseService; +import org.springblade.core.tool.api.R; + +public interface IBasicdataFactoryCategoryService extends BaseService { + + + IPage pageList(BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO); + + R saveEntity(BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO); + +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataFactoryCategoryServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataFactoryCategoryServiceImpl.java new file mode 100644 index 000000000..2e40ea431 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataFactoryCategoryServiceImpl.java @@ -0,0 +1,49 @@ +package com.logpm.basicdata.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.logpm.basicdata.dto.BasicdataFactoryCategoryDTO; +import com.logpm.basicdata.entity.BasicdataFactoryCategoryEntity; +import com.logpm.basicdata.mapper.BasicdataFactoryCategoryMapper; +import com.logpm.basicdata.service.IBasicdataFactoryCategoryService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.tool.api.R; +import org.springframework.stereotype.Service; + +import java.util.Objects; + +@Slf4j +@Service +@AllArgsConstructor +public class BasicdataFactoryCategoryServiceImpl extends BaseServiceImpl implements IBasicdataFactoryCategoryService { + + + @Override + public IPage pageList(BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO) { + IPage page = new Page<>(); + page.setCurrent(basicdataFactoryCategoryDTO.getPageNum()); + page.setSize(basicdataFactoryCategoryDTO.getPageSize()); + + IPage pageList = baseMapper.pageList(page,basicdataFactoryCategoryDTO); + + return pageList; + } + + @Override + public R saveEntity(BasicdataFactoryCategoryDTO basicdataFactoryCategoryDTO) { + + BasicdataFactoryCategoryEntity basicdataFactoryCategoryEntity = baseMapper.findEntityByParam(basicdataFactoryCategoryDTO); + + if(Objects.isNull(basicdataFactoryCategoryEntity)){ + log.warn("############saveEntity: 已存在该配置"); + return R.fail(405,"已存在该配置"); + } + + save(basicdataFactoryCategoryDTO); + + return R.success("保存成功"); + } + +} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml index 61fad8697..84a453172 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml @@ -42,18 +42,20 @@ diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 43d130b3a..d0374924d 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -1208,6 +1208,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl