diff --git a/src/main/java/com/glxp/api/controller/basic/BasicBusTypePreController.java b/src/main/java/com/glxp/api/controller/basic/BasicBusTypePreController.java index 32df870a..37aa3cfa 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicBusTypePreController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicBusTypePreController.java @@ -11,4 +11,5 @@ import org.springframework.web.bind.annotation.RestController; public class BasicBusTypePreController { + } diff --git a/src/main/java/com/glxp/api/req/basic/FilterBusTypeChangeRequest.java b/src/main/java/com/glxp/api/req/basic/FilterBusTypeChangeRequest.java new file mode 100644 index 00000000..02dff6c8 --- /dev/null +++ b/src/main/java/com/glxp/api/req/basic/FilterBusTypeChangeRequest.java @@ -0,0 +1,37 @@ +package com.glxp.api.req.basic; + +import com.glxp.api.req.ListPageRequest; +import lombok.Data; + +/** + * 单据流转设置接口查询参数 + */ +@Data +public class FilterBusTypeChangeRequest extends ListPageRequest { + + /** + * 原单据类型代码 + */ + private String originAction; + + /** + * 是否启用: 0:启用;1:禁用 + */ + private Boolean enable; + + /** + * 原单据类型名称 + */ + private String originName; + + /** + * 1:领用单据类型;2.产品申购类型;3.采购计划单据类型 + */ + private Integer type; + + /** + * 更新时间 + */ + private String lastUpdateTime; + +} diff --git a/src/main/java/com/glxp/api/req/basic/FilterBusTypePreRequest.java b/src/main/java/com/glxp/api/req/basic/FilterBusTypePreRequest.java new file mode 100644 index 00000000..eb62f18c --- /dev/null +++ b/src/main/java/com/glxp/api/req/basic/FilterBusTypePreRequest.java @@ -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 { + + + +} diff --git a/src/main/java/com/glxp/api/req/thrsys/FilterThrBusTypeOriginRequest.java b/src/main/java/com/glxp/api/req/thrsys/FilterThrBusTypeOriginRequest.java new file mode 100644 index 00000000..408932dc --- /dev/null +++ b/src/main/java/com/glxp/api/req/thrsys/FilterThrBusTypeOriginRequest.java @@ -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; + +} diff --git a/src/main/java/com/glxp/api/res/basic/BasicBusTypeChangeResponse.java b/src/main/java/com/glxp/api/res/basic/BasicBusTypeChangeResponse.java new file mode 100644 index 00000000..6d5e9525 --- /dev/null +++ b/src/main/java/com/glxp/api/res/basic/BasicBusTypeChangeResponse.java @@ -0,0 +1,10 @@ +package com.glxp.api.res.basic; + +import lombok.Data; + +/** + * 单据流转设置接口响应VO + */ +@Data +public class BasicBusTypeChangeResponse { +} diff --git a/src/main/java/com/glxp/api/res/basic/BasicBusTypePreResponse.java b/src/main/java/com/glxp/api/res/basic/BasicBusTypePreResponse.java new file mode 100644 index 00000000..789de33a --- /dev/null +++ b/src/main/java/com/glxp/api/res/basic/BasicBusTypePreResponse.java @@ -0,0 +1,11 @@ +package com.glxp.api.res.basic; + +import lombok.Data; + +/** + * 补单设置接口响应VO + */ +@Data +public class BasicBusTypePreResponse { + +} diff --git a/src/main/java/com/glxp/api/res/basic/BasicBussinessTypeResponse.java b/src/main/java/com/glxp/api/res/basic/BasicBussinessTypeResponse.java index df60f3ea..c945afd7 100644 --- a/src/main/java/com/glxp/api/res/basic/BasicBussinessTypeResponse.java +++ b/src/main/java/com/glxp/api/res/basic/BasicBussinessTypeResponse.java @@ -7,4 +7,100 @@ import lombok.Data; */ @Data public class BasicBussinessTypeResponse { + + 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 Boolean enabled; + + /** + * 是否根据业务单据类型校验 + */ + private Boolean checkEnable; + + /** + * 是否预入库 + */ + private Boolean advanceType; + private Boolean changeEnable; + private Boolean genUnit; + private String defaultUnit; + private Boolean spUse; + private Boolean secCheckEnable; + private boolean checkUdims; + private boolean checkPdaEd; + private boolean checkPdaUn; + private boolean checkPc; + private boolean checkWebNew; + private boolean checkChange; + private boolean secCheckUdims; + private boolean secCheckPdaEd; + private boolean secCheckPdaUn; + private boolean secCheckPc; + private boolean secCheckWebNew; + private boolean secCheckChange; + private int corpType; + private String storageCode; + + /** + * 补单类型 + */ + private String supplementOrderType; + + /** + * 启用默认补单 + */ + private boolean enableSupplementOrder; + + + private boolean checkBalacne; + private boolean secCheckBalacne; + private boolean useDyCount; + + private boolean expireTip; + + private String prefix; + private String localPrefix; + private boolean preIn; + private boolean outTospms; + private boolean ullageFill; + private boolean scanPreIn; + private boolean vailInv; + + private boolean entrutSpms; + + private boolean codeFillCheck; + private String defaultSubInv; + private String defaultInv; + + /** + * 订单详情展示方式:0:根据批次号展示,1:根据条码展示 + */ + private int orderVisibleType; + + /** + * 是否全量补单 + */ + private boolean supplementAll; + private boolean checkCopy; + private boolean secCheckCopy; + + /** + * 判断多选框是否勾选 + */ + private boolean checkSelect; + + private boolean checkSp; + + /** + * 自助平台同步 + */ + private boolean secCheckSp; + } diff --git a/src/main/java/com/glxp/api/res/thrsys/ThrBusTypeOriginResponse.java b/src/main/java/com/glxp/api/res/thrsys/ThrBusTypeOriginResponse.java new file mode 100644 index 00000000..8cc56fc9 --- /dev/null +++ b/src/main/java/com/glxp/api/res/thrsys/ThrBusTypeOriginResponse.java @@ -0,0 +1,10 @@ +package com.glxp.api.res.thrsys; + +import lombok.Data; + +/** + * 第三方单据类型接口响应VO + */ +@Data +public class ThrBusTypeOriginResponse { +} diff --git a/src/main/java/com/glxp/api/service/basic/IBasicBusTypeChangeService.java b/src/main/java/com/glxp/api/service/basic/IBasicBusTypeChangeService.java index d3e1c914..50c02319 100644 --- a/src/main/java/com/glxp/api/service/basic/IBasicBusTypeChangeService.java +++ b/src/main/java/com/glxp/api/service/basic/IBasicBusTypeChangeService.java @@ -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 filterList(FilterBusTypeChangeRequest filterBusTypeChangeRequest); + + /** + * 新增单据流转设置 + * + * @param basicBusTypeChangeEntity + * @return + */ + int insert(BasicBusTypeChangeEntity basicBusTypeChangeEntity); + } diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypeChangeServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypeChangeServiceImpl.java index 6e026289..dd350211 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypeChangeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicBusTypeChangeServiceImpl.java @@ -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 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); + } + } }