1.保存代码
parent
023651133f
commit
ff3c880aa3
@ -0,0 +1,14 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
import com.glxp.api.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 补单设置接口查询参数
|
||||
*/
|
||||
@Data
|
||||
public class FilterBusTypePreRequest extends ListPageRequest {
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.glxp.api.req.thrsys;
|
||||
|
||||
import com.glxp.api.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 查询补单设置接口参数
|
||||
*/
|
||||
@Data
|
||||
public class FilterThrBusTypeOriginRequest extends ListPageRequest {
|
||||
|
||||
/**
|
||||
* 单据类型编码
|
||||
*/
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 第三方单据类型编码
|
||||
*/
|
||||
private String thirdAction;
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.glxp.api.res.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 单据流转设置接口响应VO
|
||||
*/
|
||||
@Data
|
||||
public class BasicBusTypeChangeResponse {
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.glxp.api.res.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 补单设置接口响应VO
|
||||
*/
|
||||
@Data
|
||||
public class BasicBusTypePreResponse {
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.glxp.api.res.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 第三方单据类型接口响应VO
|
||||
*/
|
||||
@Data
|
||||
public class ThrBusTypeOriginResponse {
|
||||
}
|
@ -1,7 +1,30 @@
|
||||
package com.glxp.api.service.basic;
|
||||
|
||||
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
|
||||
import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
|
||||
import com.glxp.api.res.basic.BasicBusTypeChangeResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单据转换设置Service
|
||||
*/
|
||||
public interface IBasicBusTypeChangeService {
|
||||
|
||||
/**
|
||||
* 查询单据转换设置列表
|
||||
*
|
||||
* @param filterBusTypeChangeRequest
|
||||
* @return
|
||||
*/
|
||||
List<BasicBusTypeChangeResponse> filterList(FilterBusTypeChangeRequest filterBusTypeChangeRequest);
|
||||
|
||||
/**
|
||||
* 新增单据流转设置
|
||||
*
|
||||
* @param basicBusTypeChangeEntity
|
||||
* @return
|
||||
*/
|
||||
int insert(BasicBusTypeChangeEntity basicBusTypeChangeEntity);
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,48 @@
|
||||
package com.glxp.api.service.basic.impl;
|
||||
|
||||
import com.glxp.api.dao.basic.BasicBusTypeChangeDao;
|
||||
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
|
||||
import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
|
||||
import com.glxp.api.res.basic.BasicBusTypeChangeResponse;
|
||||
import com.glxp.api.service.auth.CustomerService;
|
||||
import com.glxp.api.service.basic.IBasicBusTypeChangeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BasicBusTypeChangeServiceImpl implements IBasicBusTypeChangeService {
|
||||
|
||||
@Resource
|
||||
private CustomerService customerService;
|
||||
@Resource
|
||||
private BasicBusTypeChangeDao basicBusTypeChangeDao;
|
||||
|
||||
@Override
|
||||
public List<BasicBusTypeChangeResponse> filterList(FilterBusTypeChangeRequest filterBusTypeChangeRequest) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(BasicBusTypeChangeEntity basicBusTypeChangeEntity) {
|
||||
setUpdateInfo(basicBusTypeChangeEntity);
|
||||
return basicBusTypeChangeDao.insert(basicBusTypeChangeEntity);
|
||||
}
|
||||
|
||||
private void setUpdateInfo(BasicBusTypeChangeEntity basicBusTypeChangeEntity) {
|
||||
Date now = new Date();
|
||||
String userId = String.valueOf(customerService.getUserBean().getId());
|
||||
basicBusTypeChangeEntity.setUpdateTime(now);
|
||||
basicBusTypeChangeEntity.setUpdateUser(userId);
|
||||
if (null == basicBusTypeChangeEntity.getId()) {
|
||||
basicBusTypeChangeEntity.setCreateTime(now);
|
||||
basicBusTypeChangeEntity.setCreateUser(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue