委外加工单初始化

pull/451/head
starrysky 2019-08-17 14:42:19 +08:00
parent 15311a828e
commit ee08bb85bd
17 changed files with 723 additions and 2 deletions

View File

@ -0,0 +1,63 @@
package me.zhengjie.modules.wms.outSourceProductSheet.domain;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import java.sql.Timestamp;
import java.io.Serializable;
/**
* @author jie
* @date 2019-08-17
*/
@Entity
@Data
@Table(name="s_out_source_process_sheet")
public class OutSourceProcessSheet implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
// 状态
@Column(name = "status")
private Integer status;
// 创建时间
@Column(name = "create_time")
private Timestamp createTime;
// 更新时间
@Column(name = "update_time")
private Timestamp updateTime;
// 委外加工公司名称
@Column(name = "out_source_company_name")
private String outSourceCompanyName;
// 委外加工公司编号
@Column(name = "out_source_company_code")
private String outSourceCompanyCode;
// 委外负责人id
@Column(name = "out_source_admin_id")
private Integer outSourceAdminId;
// 委外负责人姓名
@Column(name = "out_source_admin_name")
private String outSourceAdminName;
// 联系方式
@Column(name = "contact_way")
private String contactWay;
// 委外加工单单据编号
@Column(name = "out_source_process_sheet_code")
private String outSourceProcessSheetCode;
public void copy(OutSourceProcessSheet source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}
}

View File

@ -0,0 +1,80 @@
package me.zhengjie.modules.wms.outSourceProductSheet.domain;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import java.sql.Timestamp;
import java.io.Serializable;
/**
* @author jie
* @date 2019-08-17
*/
@Entity
@Data
@Table(name="s_out_source_process_sheet_product")
public class OutSourceProcessSheetProduct implements Serializable {
// 主键
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
// 状态
@Column(name = "status")
private Integer status;
// 创建时间
@Column(name = "create_time")
private Timestamp createTime;
// 更新时间
@Column(name = "update_time")
private Timestamp updateTime;
// 所属委外加工单
@Column(name = "out_source_process_sheet_id")
private Long outSourceProcessSheetId;
// 产品主键
@Column(name = "product_id",nullable = false)
private Long productId;
// 产品名称
@Column(name = "product_name",nullable = false)
private String productName;
// 产品编号
@Column(name = "product_code",nullable = false)
private String productCode;
// 所属订单
@Column(name = "customer_order_id")
private Long customerOrderId;
// 委外产品数量
@Column(name = "product_number")
private Integer productNumber;
// 交付日期
@Column(name = "deliver_date")
private String deliverDate;
// 备注
@Column(name = "remark")
private String remark;
// 制单人主键
@Column(name = "make_people_id")
private Long makePeopleId;
// 制单人姓名
@Column(name = "make_people_name")
private String makePeopleName;
public void copy(OutSourceProcessSheetProduct source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}
}

View File

@ -0,0 +1,12 @@
package me.zhengjie.modules.wms.outSourceProductSheet.repository;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheetProduct;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @author jie
* @date 2019-08-17
*/
public interface OutSourceProcessSheetProductRepository extends JpaRepository<OutSourceProcessSheetProduct, Long>, JpaSpecificationExecutor {
}

View File

@ -0,0 +1,12 @@
package me.zhengjie.modules.wms.outSourceProductSheet.repository;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheet;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @author jie
* @date 2019-08-17
*/
public interface OutSourceProcessSheetRepository extends JpaRepository<OutSourceProcessSheet, Long>, JpaSpecificationExecutor {
}

View File

@ -0,0 +1,61 @@
package me.zhengjie.modules.wms.outSourceProductSheet.rest;
import me.zhengjie.aop.log.Log;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheet;
import me.zhengjie.modules.wms.outSourceProductSheet.service.OutSourceProcessSheetService;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
/**
* @author jie
* @date 2019-08-17
*/
@Api(tags = "SOutSourceProcessSheet管理")
@RestController
@RequestMapping("api")
public class OutSourceProcessSheetController {
@Autowired
private OutSourceProcessSheetService outSourceProcessSheetService;
@Log("查询SOutSourceProcessSheet")
@ApiOperation(value = "查询SOutSourceProcessSheet")
@GetMapping(value = "/sOutSourceProcessSheet")
@PreAuthorize("hasAnyRole('ADMIN','SOUTSOURCEPROCESSSHEET_ALL','SOUTSOURCEPROCESSSHEET_SELECT')")
public ResponseEntity getSOutSourceProcessSheets(OutSourceProcessSheetQueryCriteria criteria, Pageable pageable){
return new ResponseEntity(outSourceProcessSheetService.queryAll(criteria,pageable),HttpStatus.OK);
}
@Log("新增SOutSourceProcessSheet")
@ApiOperation(value = "新增SOutSourceProcessSheet")
@PostMapping(value = "/sOutSourceProcessSheet")
@PreAuthorize("hasAnyRole('ADMIN','SOUTSOURCEPROCESSSHEET_ALL','SOUTSOURCEPROCESSSHEET_CREATE')")
public ResponseEntity create(@Validated @RequestBody OutSourceProcessSheet resources){
return new ResponseEntity(outSourceProcessSheetService.create(resources),HttpStatus.CREATED);
}
@Log("修改SOutSourceProcessSheet")
@ApiOperation(value = "修改SOutSourceProcessSheet")
@PutMapping(value = "/sOutSourceProcessSheet")
@PreAuthorize("hasAnyRole('ADMIN','SOUTSOURCEPROCESSSHEET_ALL','SOUTSOURCEPROCESSSHEET_EDIT')")
public ResponseEntity update(@Validated @RequestBody OutSourceProcessSheet resources){
outSourceProcessSheetService.update(resources);
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
@Log("删除SOutSourceProcessSheet")
@ApiOperation(value = "删除SOutSourceProcessSheet")
@DeleteMapping(value = "/sOutSourceProcessSheet/{id}")
@PreAuthorize("hasAnyRole('ADMIN','SOUTSOURCEPROCESSSHEET_ALL','SOUTSOURCEPROCESSSHEET_DELETE')")
public ResponseEntity delete(@PathVariable Long id){
outSourceProcessSheetService.delete(id);
return new ResponseEntity(HttpStatus.OK);
}
}

View File

@ -0,0 +1,61 @@
package me.zhengjie.modules.wms.outSourceProductSheet.rest;
import me.zhengjie.aop.log.Log;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheetProduct;
import me.zhengjie.modules.wms.outSourceProductSheet.service.OutSourceProcessSheetProductService;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetProductQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
/**
* @author jie
* @date 2019-08-17
*/
@Api(tags = "SOutSourceProcessSheetProduct管理")
@RestController
@RequestMapping("api")
public class OutSourceProcessSheetProductController {
@Autowired
private OutSourceProcessSheetProductService outSourceProcessSheetProductService;
@Log("查询SOutSourceProcessSheetProduct")
@ApiOperation(value = "查询SOutSourceProcessSheetProduct")
@GetMapping(value = "/sOutSourceProcessSheetProduct")
@PreAuthorize("hasAnyRole('ADMIN','SOUTSOURCEPROCESSSHEETPRODUCT_ALL','SOUTSOURCEPROCESSSHEETPRODUCT_SELECT')")
public ResponseEntity getSOutSourceProcessSheetProducts(OutSourceProcessSheetProductQueryCriteria criteria, Pageable pageable){
return new ResponseEntity(outSourceProcessSheetProductService.queryAll(criteria,pageable),HttpStatus.OK);
}
@Log("新增SOutSourceProcessSheetProduct")
@ApiOperation(value = "新增SOutSourceProcessSheetProduct")
@PostMapping(value = "/sOutSourceProcessSheetProduct")
@PreAuthorize("hasAnyRole('ADMIN','SOUTSOURCEPROCESSSHEETPRODUCT_ALL','SOUTSOURCEPROCESSSHEETPRODUCT_CREATE')")
public ResponseEntity create(@Validated @RequestBody OutSourceProcessSheetProduct resources){
return new ResponseEntity(outSourceProcessSheetProductService.create(resources),HttpStatus.CREATED);
}
@Log("修改SOutSourceProcessSheetProduct")
@ApiOperation(value = "修改SOutSourceProcessSheetProduct")
@PutMapping(value = "/sOutSourceProcessSheetProduct")
@PreAuthorize("hasAnyRole('ADMIN','SOUTSOURCEPROCESSSHEETPRODUCT_ALL','SOUTSOURCEPROCESSSHEETPRODUCT_EDIT')")
public ResponseEntity update(@Validated @RequestBody OutSourceProcessSheetProduct resources){
outSourceProcessSheetProductService.update(resources);
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
@Log("删除SOutSourceProcessSheetProduct")
@ApiOperation(value = "删除SOutSourceProcessSheetProduct")
@DeleteMapping(value = "/sOutSourceProcessSheetProduct/{id}")
@PreAuthorize("hasAnyRole('ADMIN','SOUTSOURCEPROCESSSHEETPRODUCT_ALL','SOUTSOURCEPROCESSSHEETPRODUCT_DELETE')")
public ResponseEntity delete(@PathVariable Long id){
outSourceProcessSheetProductService.delete(id);
return new ResponseEntity(HttpStatus.OK);
}
}

View File

@ -0,0 +1,64 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheetProduct;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetProductDTO;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetProductQueryCriteria;
//import org.springframework.cache.annotation.CacheConfig;
//import org.springframework.cache.annotation.CacheEvict;
//import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Pageable;
/**
* @author jie
* @date 2019-08-17
*/
//@CacheConfig(cacheNames = "sOutSourceProcessSheetProduct")
public interface OutSourceProcessSheetProductService {
/**
* queryAll
* @param criteria
* @param pageable
* @return
*/
//@Cacheable(keyGenerator = "keyGenerator")
Object queryAll(OutSourceProcessSheetProductQueryCriteria criteria, Pageable pageable);
/**
* queryAll
* @param criteria
* @return
*/
//@Cacheable(keyGenerator = "keyGenerator")
public Object queryAll(OutSourceProcessSheetProductQueryCriteria criteria);
/**
* findById
* @param id
* @return
*/
//@Cacheable(key = "#p0")
OutSourceProcessSheetProductDTO findById(Long id);
/**
* create
* @param resources
* @return
*/
//@CacheEvict(allEntries = true)
OutSourceProcessSheetProductDTO create(OutSourceProcessSheetProduct resources);
/**
* update
* @param resources
*/
//@CacheEvict(allEntries = true)
void update(OutSourceProcessSheetProduct resources);
/**
* delete
* @param id
*/
//@CacheEvict(allEntries = true)
void delete(Long id);
}

View File

@ -0,0 +1,64 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheet;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetDTO;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetQueryCriteria;
//import org.springframework.cache.annotation.CacheConfig;
//import org.springframework.cache.annotation.CacheEvict;
//import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Pageable;
/**
* @author jie
* @date 2019-08-17
*/
//@CacheConfig(cacheNames = "sOutSourceProcessSheet")
public interface OutSourceProcessSheetService {
/**
* queryAll
* @param criteria
* @param pageable
* @return
*/
//@Cacheable(keyGenerator = "keyGenerator")
Object queryAll(OutSourceProcessSheetQueryCriteria criteria, Pageable pageable);
/**
* queryAll
* @param criteria
* @return
*/
//@Cacheable(keyGenerator = "keyGenerator")
public Object queryAll(OutSourceProcessSheetQueryCriteria criteria);
/**
* findById
* @param id
* @return
*/
//@Cacheable(key = "#p0")
OutSourceProcessSheetDTO findById(Long id);
/**
* create
* @param resources
* @return
*/
//@CacheEvict(allEntries = true)
OutSourceProcessSheetDTO create(OutSourceProcessSheet resources);
/**
* update
* @param resources
*/
//@CacheEvict(allEntries = true)
void update(OutSourceProcessSheet resources);
/**
* delete
* @param id
*/
//@CacheEvict(allEntries = true)
void delete(Long id);
}

View File

@ -0,0 +1,43 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service.dto;
import lombok.Data;
import java.sql.Timestamp;
import java.io.Serializable;
/**
* @author jie
* @date 2019-08-17
*/
@Data
public class OutSourceProcessSheetDTO implements Serializable {
private Long id;
// 状态
private Integer status;
// 创建时间
private Timestamp createTime;
// 更新时间
private Timestamp updateTime;
// 委外加工公司名称
private String outSourceCompanyName;
// 委外加工公司编号
private String outSourceCompanyCode;
// 委外负责人id
private Integer outSourceAdminId;
// 委外负责人姓名
private String outSourceAdminName;
// 联系方式
private String contactWay;
// 委外加工单单据编号
private String outSourceProcessSheetCode;
}

View File

@ -0,0 +1,56 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service.dto;
import lombok.Data;
import java.sql.Timestamp;
import java.io.Serializable;
/**
* @author jie
* @date 2019-08-17
*/
@Data
public class OutSourceProcessSheetProductDTO implements Serializable {
// 主键
private Long id;
// 状态
private Integer status;
// 创建时间
private Timestamp createTime;
// 更新时间
private Timestamp updateTime;
// 所属委外加工单
private Long outSourceProcessSheetId;
// 产品主键
private Long productId;
// 产品名称
private String productName;
// 产品编号
private String productCode;
// 所属订单
private Long customerOrderId;
// 委外产品数量
private Integer productNumber;
// 交付日期
private String deliverDate;
// 备注
private String remark;
// 制单人主键
private Long makePeopleId;
// 制单人姓名
private String makePeopleName;
}

View File

@ -0,0 +1,13 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service.dto;
import lombok.Data;
import java.sql.Timestamp;
import me.zhengjie.annotation.Query;
/**
* @author jie
* @date 2019-08-17
*/
@Data
public class OutSourceProcessSheetProductQueryCriteria {
}

View File

@ -0,0 +1,13 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service.dto;
import lombok.Data;
import java.sql.Timestamp;
import me.zhengjie.annotation.Query;
/**
* @author jie
* @date 2019-08-17
*/
@Data
public class OutSourceProcessSheetQueryCriteria {
}

View File

@ -0,0 +1,73 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service.impl;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheetProduct;
import me.zhengjie.utils.ValidationUtil;
import me.zhengjie.modules.wms.outSourceProductSheet.repository.OutSourceProcessSheetProductRepository;
import me.zhengjie.modules.wms.outSourceProductSheet.service.OutSourceProcessSheetProductService;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetProductDTO;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetProductQueryCriteria;
import me.zhengjie.modules.wms.outSourceProductSheet.service.mapper.OutSourceProcessSheetProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Optional;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.QueryHelp;
/**
* @author jie
* @date 2019-08-17
*/
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class OutSourceProcessSheetProductServiceImpl implements OutSourceProcessSheetProductService {
@Autowired
private OutSourceProcessSheetProductRepository outSourceProcessSheetProductRepository;
@Autowired
private OutSourceProcessSheetProductMapper outSourceProcessSheetProductMapper;
@Override
public Object queryAll(OutSourceProcessSheetProductQueryCriteria criteria, Pageable pageable){
Page<OutSourceProcessSheetProduct> page = outSourceProcessSheetProductRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
return PageUtil.toPage(page.map(outSourceProcessSheetProductMapper::toDto));
}
@Override
public Object queryAll(OutSourceProcessSheetProductQueryCriteria criteria){
return outSourceProcessSheetProductMapper.toDto(outSourceProcessSheetProductRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
}
@Override
public OutSourceProcessSheetProductDTO findById(Long id) {
Optional<OutSourceProcessSheetProduct> sOutSourceProcessSheetProduct = outSourceProcessSheetProductRepository.findById(id);
ValidationUtil.isNull(sOutSourceProcessSheetProduct,"SOutSourceProcessSheetProduct","id",id);
return outSourceProcessSheetProductMapper.toDto(sOutSourceProcessSheetProduct.get());
}
@Override
@Transactional(rollbackFor = Exception.class)
public OutSourceProcessSheetProductDTO create(OutSourceProcessSheetProduct resources) {
return outSourceProcessSheetProductMapper.toDto(outSourceProcessSheetProductRepository.save(resources));
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(OutSourceProcessSheetProduct resources) {
Optional<OutSourceProcessSheetProduct> optionalSOutSourceProcessSheetProduct = outSourceProcessSheetProductRepository.findById(resources.getId());
ValidationUtil.isNull( optionalSOutSourceProcessSheetProduct,"SOutSourceProcessSheetProduct","id",resources.getId());
OutSourceProcessSheetProduct outSourceProcessSheetProduct = optionalSOutSourceProcessSheetProduct.get();
outSourceProcessSheetProduct.copy(resources);
outSourceProcessSheetProductRepository.save(outSourceProcessSheetProduct);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(Long id) {
outSourceProcessSheetProductRepository.deleteById(id);
}
}

View File

@ -0,0 +1,73 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service.impl;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheet;
import me.zhengjie.utils.ValidationUtil;
import me.zhengjie.modules.wms.outSourceProductSheet.repository.OutSourceProcessSheetRepository;
import me.zhengjie.modules.wms.outSourceProductSheet.service.OutSourceProcessSheetService;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetDTO;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetQueryCriteria;
import me.zhengjie.modules.wms.outSourceProductSheet.service.mapper.OutSourceProcessSheetMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Optional;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.QueryHelp;
/**
* @author jie
* @date 2019-08-17
*/
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class OutSourceProcessSheetServiceImpl implements OutSourceProcessSheetService {
@Autowired
private OutSourceProcessSheetRepository outSourceProcessSheetRepository;
@Autowired
private OutSourceProcessSheetMapper outSourceProcessSheetMapper;
@Override
public Object queryAll(OutSourceProcessSheetQueryCriteria criteria, Pageable pageable){
Page<OutSourceProcessSheet> page = outSourceProcessSheetRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
return PageUtil.toPage(page.map(outSourceProcessSheetMapper::toDto));
}
@Override
public Object queryAll(OutSourceProcessSheetQueryCriteria criteria){
return outSourceProcessSheetMapper.toDto(outSourceProcessSheetRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
}
@Override
public OutSourceProcessSheetDTO findById(Long id) {
Optional<OutSourceProcessSheet> sOutSourceProcessSheet = outSourceProcessSheetRepository.findById(id);
ValidationUtil.isNull(sOutSourceProcessSheet,"SOutSourceProcessSheet","id",id);
return outSourceProcessSheetMapper.toDto(sOutSourceProcessSheet.get());
}
@Override
@Transactional(rollbackFor = Exception.class)
public OutSourceProcessSheetDTO create(OutSourceProcessSheet resources) {
return outSourceProcessSheetMapper.toDto(outSourceProcessSheetRepository.save(resources));
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(OutSourceProcessSheet resources) {
Optional<OutSourceProcessSheet> optionalSOutSourceProcessSheet = outSourceProcessSheetRepository.findById(resources.getId());
ValidationUtil.isNull( optionalSOutSourceProcessSheet,"SOutSourceProcessSheet","id",resources.getId());
OutSourceProcessSheet outSourceProcessSheet = optionalSOutSourceProcessSheet.get();
outSourceProcessSheet.copy(resources);
outSourceProcessSheetRepository.save(outSourceProcessSheet);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(Long id) {
outSourceProcessSheetRepository.deleteById(id);
}
}

View File

@ -0,0 +1,16 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service.mapper;
import me.zhengjie.mapper.EntityMapper;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheet;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetDTO;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
/**
* @author jie
* @date 2019-08-17
*/
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface OutSourceProcessSheetMapper extends EntityMapper<OutSourceProcessSheetDTO, OutSourceProcessSheet> {
}

View File

@ -0,0 +1,16 @@
package me.zhengjie.modules.wms.outSourceProductSheet.service.mapper;
import me.zhengjie.mapper.EntityMapper;
import me.zhengjie.modules.wms.outSourceProductSheet.domain.OutSourceProcessSheetProduct;
import me.zhengjie.modules.wms.outSourceProductSheet.service.dto.OutSourceProcessSheetProductDTO;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
/**
* @author jie
* @date 2019-08-17
*/
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface OutSourceProcessSheetProductMapper extends EntityMapper<OutSourceProcessSheetProductDTO, OutSourceProcessSheetProduct> {
}

View File

@ -3,9 +3,10 @@ server:
spring:
profiles:
active: prod
active: dev
jackson:
time-zone: GMT+8
time-zon
e: GMT+8
data:
redis:
repositories: