mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 05:42:06 +08:00
添加小板查询更改,柜体删除逻辑更改,修改开料状态逻辑更改
This commit is contained in:
+40
-1
@@ -26,10 +26,12 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
import static com.cf.imes.framework.common.util.json.JsonUtils.*;
|
||||
import static com.cf.imes.framework.common.util.json.JsonUtils.parseArray;
|
||||
import static com.cf.imes.framework.common.util.json.JsonUtils.unzipString;
|
||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
@@ -82,6 +84,43 @@ public class SystemConfigApiImpl implements SystemConfigApi {
|
||||
return success(BeanUtils.toBean(systemConfigDOS,SystemConfigRespDTO.class));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public CommonResult<Integer> getProcessSizeByIds(List<Long> processIds) {
|
||||
|
||||
List<SystemConfigDO> systemConfigDOS = systemConfigMapper.selectList(new LambdaQueryWrapperX<SystemConfigDO>()
|
||||
.eq(SystemConfigDO::getOrganId, OrganContextHolder.getOrganId())
|
||||
.in(SystemConfigDO::getId, processIds)
|
||||
.select(SystemConfigDO::getId,SystemConfigDO::getSetting));
|
||||
|
||||
if(CollUtil.isEmpty(systemConfigDOS)){
|
||||
throw exception(PLAN_PROCESS_CONFIG_ALL_IS_NULL);
|
||||
}
|
||||
|
||||
AtomicReference<Integer> processSize = new AtomicReference<>(0);
|
||||
|
||||
systemConfigDOS.forEach(f->{
|
||||
|
||||
try {
|
||||
|
||||
List<ProcessSchemeConfig> processSchemeConfigs = parseArray(f.getSetting(), ProcessSchemeConfig.class);
|
||||
processSize.updateAndGet(v -> v + processSchemeConfigs.size());
|
||||
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
throw exception(SYSTEM_PROCESS_SCHEME_CONFIG_FIELD_ERROR);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if(processSize.get() == 0){
|
||||
throw exception(PLAN_PROCESS_CONFIG_ALL_IS_NULL);
|
||||
}
|
||||
|
||||
return success(processSize.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<SystemConfigRespDTO> getDefaultProcessConfig() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user