Merge branch 'refs/heads/dev' into test
This commit is contained in:
@@ -1,46 +0,0 @@
|
|||||||
package com.zt.plat.module.contractorder.enums.contract;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 合同审核结果
|
|
||||||
*/
|
|
||||||
public enum AuditResultEnum {
|
|
||||||
/**
|
|
||||||
* 合同状态-草稿
|
|
||||||
*/
|
|
||||||
PASS("通过","PASS", null),
|
|
||||||
/**
|
|
||||||
* 合同状态-正在审核
|
|
||||||
*/
|
|
||||||
REJECT("驳回","REJECT",null);
|
|
||||||
|
|
||||||
AuditResultEnum(String label, String code, String remark) {
|
|
||||||
this.label = label;
|
|
||||||
this.code = code;
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 标签
|
|
||||||
*/
|
|
||||||
private final String label;
|
|
||||||
/**
|
|
||||||
* 编码
|
|
||||||
*/
|
|
||||||
private final String code;
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private final String remark;
|
|
||||||
|
|
||||||
public String getLabel() {
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
package com.zt.plat.module.contractorder.enums.contract;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 合同状态枚举
|
|
||||||
*/
|
|
||||||
public enum ContractStatusEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 合同状态-草稿
|
|
||||||
*/
|
|
||||||
DRAFT("草稿","DRAFT","可以删除"),
|
|
||||||
/**
|
|
||||||
* 合同状态-正在审核
|
|
||||||
*/
|
|
||||||
UNDER_REVIEW("正在审核","UNDER_REVIEW","不允许任何操作"),
|
|
||||||
/**
|
|
||||||
* 合同状态-执行中
|
|
||||||
*/
|
|
||||||
IN_PROGRESS("执行中","IN_PROGRESS","可以终止、归档"),
|
|
||||||
/**
|
|
||||||
* 合同状态-已驳回
|
|
||||||
*/
|
|
||||||
REJECTED("已驳回","REJECTED","可以删除"),
|
|
||||||
/**
|
|
||||||
* 合同状态-已终止
|
|
||||||
*/
|
|
||||||
TERMINATED("已终止","TERMINATED","只允许归档"),
|
|
||||||
/**
|
|
||||||
* 合同状态-已归档
|
|
||||||
*/
|
|
||||||
ARCHIVED("已归档","ARCHIVED","不允许任何操作"),
|
|
||||||
/**
|
|
||||||
* 合同状态-已删除
|
|
||||||
*/
|
|
||||||
DELETED("已删除","DELETED","不允许任何操作");
|
|
||||||
|
|
||||||
ContractStatusEnum(String label, String code, String remark) {
|
|
||||||
this.label = label;
|
|
||||||
this.code = code;
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典标签
|
|
||||||
*/
|
|
||||||
private final String label;
|
|
||||||
/**
|
|
||||||
* 字典编码
|
|
||||||
*/
|
|
||||||
private final String code;
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private final String remark;
|
|
||||||
|
|
||||||
public String getLabel() {
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
package com.zt.plat.module.contractorder.enums.contract;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 合同类型枚举
|
|
||||||
*/
|
|
||||||
public enum ContractTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 采购
|
|
||||||
*/
|
|
||||||
PRCH("采购","PRCH",null),
|
|
||||||
/**
|
|
||||||
* 销售
|
|
||||||
*/
|
|
||||||
SALE("销售","SALE",null),
|
|
||||||
/**
|
|
||||||
* 委托加工
|
|
||||||
*/
|
|
||||||
ENTT("委托加工","ENTT",null),
|
|
||||||
/**
|
|
||||||
* 来料加工
|
|
||||||
*/
|
|
||||||
MKE("来料加工","MKE",null);
|
|
||||||
|
|
||||||
ContractTypeEnum(String label, String code, String remark) {
|
|
||||||
this.label = label;
|
|
||||||
this.code = code;
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典标签
|
|
||||||
*/
|
|
||||||
private final String label;
|
|
||||||
/**
|
|
||||||
* 字典编码
|
|
||||||
*/
|
|
||||||
private final String code;
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private final String remark;
|
|
||||||
|
|
||||||
public String getLabel() {
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.zt.plat.module.contractorder.enums.contract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典枚举
|
||||||
|
*/
|
||||||
|
public enum DictEnum {
|
||||||
|
|
||||||
|
/** ERP收支方向 */
|
||||||
|
// 支出
|
||||||
|
ERP_RCV_DLVY_EXPENSES("支出","2","对应采购"),
|
||||||
|
// 收入
|
||||||
|
ERP_RCV_DLVY_INCOME("收入","1","对应销售"),
|
||||||
|
/** ERP是否 */
|
||||||
|
// 是
|
||||||
|
ERP_CTRT_YN_YES("是","1",null),
|
||||||
|
// 否
|
||||||
|
ERP_CTRT_YN_NO("否","0",null),
|
||||||
|
/** 合同状态 */
|
||||||
|
// 草稿
|
||||||
|
BSE_CTRT_STS_DRAFT("草稿","DRAFT","可以删除"),
|
||||||
|
// 正在审核
|
||||||
|
BSE_CTRT_STS_UNDER_REVIEW("正在审核","UNDER_REVIEW","不允许任何操作"),
|
||||||
|
// 已驳回
|
||||||
|
BSE_CTRT_STS_REJECTED("已驳回","REJECTED","可以删除"),
|
||||||
|
// 待推送
|
||||||
|
BSE_CTRT_STS_WAIT_PUSH("待推送","WAIT_PUSH",null),
|
||||||
|
// 推送失败
|
||||||
|
BSE_CTRT_STS_PUSH_ERROR("推送失败","PUSH_ERROR",null),
|
||||||
|
// 执行中
|
||||||
|
BSE_CTRT_STS_IN_PROGRESS("执行中","IN_PROGRESS","可以终止、归档"),
|
||||||
|
// 已删除
|
||||||
|
BSE_CTRT_STS_DELETED("已删除","DELETED","不允许任何操作"),
|
||||||
|
// 已归档
|
||||||
|
BSE_CTRT_STS_ARCHIVED("已归档","ARCHIVED","不允许任何操作"),
|
||||||
|
// 已完结
|
||||||
|
BSE_CTRT_STS_TERMINATED("已完结","TERMINATED","只允许归档"),
|
||||||
|
// 待审核
|
||||||
|
BSE_CTRT_STS_WAIT_AUDIT("待审核","WAIT_AUDIT",null),
|
||||||
|
// 已作废
|
||||||
|
BSE_CTRT_STS_VOID("已作废","VOID",null);
|
||||||
|
|
||||||
|
|
||||||
|
DictEnum(String label, String code, String remark) {
|
||||||
|
this.label = label;
|
||||||
|
this.code = code;
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典标签
|
||||||
|
*/
|
||||||
|
private final String label;
|
||||||
|
/**
|
||||||
|
* 字典编码
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private final String remark;
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
package com.zt.plat.module.contractorder.enums.contract;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ERP是否枚举
|
|
||||||
*/
|
|
||||||
public enum ErpCtrtYesNoEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是
|
|
||||||
*/
|
|
||||||
YES("是","1",null),
|
|
||||||
/**
|
|
||||||
* 否
|
|
||||||
*/
|
|
||||||
NO("否","0",null);
|
|
||||||
|
|
||||||
ErpCtrtYesNoEnum(String label, String code, String remark) {
|
|
||||||
this.label = label;
|
|
||||||
this.code = code;
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典标签
|
|
||||||
*/
|
|
||||||
private final String label;
|
|
||||||
/**
|
|
||||||
* 字典编码
|
|
||||||
*/
|
|
||||||
private final String code;
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private final String remark;
|
|
||||||
|
|
||||||
public String getLabel() {
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -148,6 +148,7 @@ public class ContractController implements BusinessControllerMarker {
|
|||||||
@PostMapping("/submit/erp")
|
@PostMapping("/submit/erp")
|
||||||
@Operation(summary = "提交ERP")
|
@Operation(summary = "提交ERP")
|
||||||
@PreAuthorize("@ss.hasPermission('base:contract:erp')")
|
@PreAuthorize("@ss.hasPermission('base:contract:erp')")
|
||||||
public void submitErp() {
|
public void submitErp(@RequestBody List<Long> ids) {
|
||||||
|
contractService.submitErp(ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,4 +94,12 @@ public interface ContractService {
|
|||||||
* @return 结算条款数据
|
* @return 结算条款数据
|
||||||
*/
|
*/
|
||||||
List<ContractFormulaRespDTO> getFormulasByPaperNumber(String contractPaperNumber);
|
List<ContractFormulaRespDTO> getFormulasByPaperNumber(String contractPaperNumber);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交ERP
|
||||||
|
*
|
||||||
|
* @param ids 合同ID集合
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void submitErp(List<Long> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -56,8 +56,8 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
|||||||
// 插入
|
// 插入
|
||||||
ErpWarehouseDO warehouse = BeanUtils.toBean(createReqVO, ErpWarehouseDO.class);
|
ErpWarehouseDO warehouse = BeanUtils.toBean(createReqVO, ErpWarehouseDO.class);
|
||||||
// 库位编码自动生成,格式 KW-0001,依次新增
|
// 库位编码自动生成,格式 KW-0001,依次新增
|
||||||
String maxCode = erpWarehouseMapper.selectMaxCode();
|
if (warehouse.getNumber() == null) {
|
||||||
if (warehouse.getNumber() == null){
|
String maxCode = erpWarehouseMapper.selectMaxCode();
|
||||||
if (maxCode == null) {
|
if (maxCode == null) {
|
||||||
warehouse.setNumber("KW-0001");
|
warehouse.setNumber("KW-0001");
|
||||||
} else {
|
} else {
|
||||||
@@ -81,9 +81,9 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
|||||||
validateErpWarehouseExists(updateReqVO.getId());
|
validateErpWarehouseExists(updateReqVO.getId());
|
||||||
// 更新
|
// 更新
|
||||||
ErpWarehouseDO updateObj = BeanUtils.toBean(updateReqVO, ErpWarehouseDO.class);
|
ErpWarehouseDO updateObj = BeanUtils.toBean(updateReqVO, ErpWarehouseDO.class);
|
||||||
if (updateObj.getType().equals("SPLY")&&updateObj.getIsEnable().equals("0")){
|
if (updateObj.getType().equals("SPLY") && updateObj.getIsEnable().equals("0")) {
|
||||||
erpWarehouseMapper.updateById(updateObj);
|
erpWarehouseMapper.updateById(updateObj);
|
||||||
}else {
|
} else {
|
||||||
throw exception(ERP_WAREHOUSE_NOT_ALLOW_UPDATE);
|
throw exception(ERP_WAREHOUSE_NOT_ALLOW_UPDATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
|||||||
@Override
|
@Override
|
||||||
public void enableWarehouseList(List<ErpWarehouseSaveReqVO> saveReqVOS) {
|
public void enableWarehouseList(List<ErpWarehouseSaveReqVO> saveReqVOS) {
|
||||||
List<ErpWarehouseDO> updateObj = BeanUtils.toBean(saveReqVOS, ErpWarehouseDO.class);
|
List<ErpWarehouseDO> updateObj = BeanUtils.toBean(saveReqVOS, ErpWarehouseDO.class);
|
||||||
List<BatchResult> count = erpWarehouseMapper.updateById(updateObj);
|
List<BatchResult> count = erpWarehouseMapper.updateById(updateObj);
|
||||||
if (CollUtil.isEmpty(count)) {
|
if (CollUtil.isEmpty(count)) {
|
||||||
throw exception(ERP_WAREHOUSE_NOT_EXISTS);
|
throw exception(ERP_WAREHOUSE_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
@@ -203,7 +203,7 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
|||||||
}
|
}
|
||||||
dataArrayALL.addAll(dataArray);
|
dataArrayALL.addAll(dataArray);
|
||||||
}
|
}
|
||||||
if (dataArrayALL.isEmpty()){
|
if (dataArrayALL.isEmpty()) {
|
||||||
throw exception(ERP_WAREHOUSE_NOT_EXISTS);
|
throw exception(ERP_WAREHOUSE_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
|||||||
Map<String, Long> deleteNumbers = new HashMap<>();
|
Map<String, Long> deleteNumbers = new HashMap<>();
|
||||||
for (String number : numbers.keySet()) {
|
for (String number : numbers.keySet()) {
|
||||||
if (!dataArrayNumbers.contains(number)) {
|
if (!dataArrayNumbers.contains(number)) {
|
||||||
deleteNumbers.put(number,numbers.get(number));
|
deleteNumbers.put(number, numbers.get(number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
|||||||
);
|
);
|
||||||
Map<String, Long> numberIdMap = insertedRecords.stream()
|
Map<String, Long> numberIdMap = insertedRecords.stream()
|
||||||
.collect(Collectors.toMap(asset -> asset.getFactoryNumber() + "-" + asset.getNumber(), ErpWarehouseDO::getId));
|
.collect(Collectors.toMap(asset -> asset.getFactoryNumber() + "-" + asset.getNumber(), ErpWarehouseDO::getId));
|
||||||
myRedisConfig.addRedisCacheMap(result.key,numberIdMap);
|
myRedisConfig.addRedisCacheMap(result.key, numberIdMap);
|
||||||
}
|
}
|
||||||
if (!result.toUpdate.isEmpty()) {
|
if (!result.toUpdate.isEmpty()) {
|
||||||
erpWarehouseMapper.updateBatch(result.toUpdate);
|
erpWarehouseMapper.updateBatch(result.toUpdate);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
and f.NUM like concat('%', #{number}, '%')
|
and f.NUM like concat('%', #{number}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="erpCompanyNumber != null">
|
<if test="erpCompanyNumber != null">
|
||||||
and f.CPN_ID = like concat('%', #{erpCompanyNumber}, '%')
|
and f.CPN_ID like concat('%', #{erpCompanyNumber}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="erpCompanyName != null">
|
<if test="erpCompanyName != null">
|
||||||
and c.NAME like concat('%', #{erpCompanyName}, '%')
|
and c.NAME like concat('%', #{erpCompanyName}, '%')
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user