添加小板查询更改,柜体删除逻辑更改,修改开料状态逻辑更改

This commit is contained in:
liuzhaotian
2025-01-16 12:32:40 +08:00
parent 1cede97b42
commit 87c4a3ecce
11 changed files with 183 additions and 122 deletions
@@ -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() {