| rsf-admin/src/i18n/core/chineseMessages.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| rsf-admin/src/i18n/en.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| rsf-admin/src/i18n/zh.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| rsf-admin/src/page/ResourceContent.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| rsf-admin/src/page/basicInfo/basContainer/BasContainerList.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| rsf-admin/src/page/basicInfo/basStation/BasStationCreate.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| rsf-admin/src/page/basicInfo/matnrGroup/MatnrGroupList.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| rsf-server/src/main/java/com/vincent/rsf/server/common/exception/GlobalExceptionHandler.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/BasStation.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/MatnrGroupServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
rsf-admin/src/i18n/core/chineseMessages.js
@@ -96,7 +96,8 @@ delete_title: "删除 %{name} #%{id}", details: "Details", error: "A client error occurred and your request couldn't be completed.", delete_success: '删除成功!', delete_fail: '删除失败!', invalid_form: "表单无效 请检查是否有错误!", loading: "Please wait", no: "No", rsf-admin/src/i18n/en.js
@@ -158,6 +158,7 @@ warehouse: 'Warehouse', warehouseAreas: 'WarehouseAreas', loc: 'Loc', locItem: 'LocItem', locType: 'LocType', locArea: 'locArea', locAreaMat: 'Logic Areas', rsf-admin/src/i18n/zh.js
@@ -159,6 +159,7 @@ warehouse: '仓库', warehouseAreas: '库区', loc: '库位', locItem: '库存明细', locType: '库位类型(废)', locArea: '逻辑分区(废)', locAreaMat: '逻辑分区(废)', rsf-admin/src/page/ResourceContent.js
@@ -64,6 +64,7 @@ import inStatisticItem from './statistics/inStockItem'; import statisticCount from './statistics/stockStatisticNum'; import preparation from "./orders/preparation"; // import locItem from "./basicInfo/locItem"; const ResourceContent = (node) => { switch (node.component) { @@ -187,6 +188,8 @@ return statisticCount; case "preparation": return preparation; // case "locItem": // return locItem; default: return { list: ListGuesser, rsf-admin/src/page/basicInfo/basContainer/BasContainerList.jsx
@@ -112,7 +112,7 @@ <TopToolbar> <InitButton setOpen={setOpen} /> <FilterButton /> <MyCreateButton onClick={() => { setCreateDialog(true) }} /> {/* <MyCreateButton onClick={() => { setCreateDialog(true) }} /> */} <SelectColumnsButton preferenceKey='basContainer' /> <MyExportButton /> </TopToolbar> rsf-admin/src/page/basicInfo/basStation/BasStationCreate.jsx
@@ -39,7 +39,7 @@ const translate = useTranslate(); const notify = useNotify(); const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_station_type')) || []; const handleClose = (event, reason) => { if (reason !== "backdropClick") { setOpen(false); @@ -97,6 +97,16 @@ /> </Grid> <Grid item xs={6} display="flex" gap={1}> <AutocompleteInput choices={dicts} optionText="label" label="table.field.basStation.type" source="type" optionValue="value" parse={v => v} validate={[required()]} /> </Grid> <Grid item xs={6} display="flex" gap={1}> <SelectInput label="table.field.basStation.inAble" source="inAble" rsf-admin/src/page/basicInfo/matnrGroup/MatnrGroupList.jsx
@@ -197,15 +197,16 @@ deleteOne( RESOURCE, { id: node.id }, { onSuccess: () => { handleRefresh(); notify('Department deleted successfully', { type: 'info', messageArgs: { _: 'Department deleted successfully' } }); }, onError: (error) => { notify(`Error: ${error.message}`, { type: 'warning', messageArgs: { _: `Error: ${error.message}` } }); }, } { onSuccess: () => { handleRefresh(); const msg = translate('ra.message.delete_success'); notify(msg, { type: 'success', messageArgs: { _: msg } }); }, onError: (error) => { notify(`Error: ${error.message}`, { type: 'warning', messageArgs: { _: `Error: ${error.message}` } }); }, } ); } }; @@ -354,4 +355,4 @@ ); } export default MatnrGroupList; export default MatnrGroupList; rsf-server/src/main/java/com/vincent/rsf/server/common/exception/GlobalExceptionHandler.java
@@ -6,6 +6,7 @@ import com.vincent.rsf.server.common.utils.CommonUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.dao.DuplicateKeyException; import org.springframework.security.access.AccessDeniedException; import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.bind.annotation.ControllerAdvice; @@ -13,6 +14,8 @@ import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletResponse; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * 全局异常处理器 @@ -54,6 +57,28 @@ return R.error(e.getMessage()); } @ResponseBody @ExceptionHandler(DuplicateKeyException.class) public R duplicateKeyExceptionHandler(DuplicateKeyException e, HttpServletResponse response) { CommonUtil.addCrossHeaders(response); String msg = e.getMessage(); String out = "唯一索引冲突"; try { Pattern p = Pattern.compile("Duplicate entry '(.+?)' for key '(.+?)'"); Matcher m = p.matcher(msg); if (m.find()) { String value = m.group(1); String key = m.group(2); if ("idx_code".equalsIgnoreCase(key)) { out = "编码已存在:" + value; } else { out = "唯一索引[" + key + "]值已存在:" + value; } } } catch (Exception ignore) {} return R.error(out); } @ResponseBody @ExceptionHandler(Throwable.class) rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/BasStation.java
@@ -14,7 +14,6 @@ import com.vincent.rsf.server.system.service.DictTypeService; import org.springframework.format.annotation.DateTimeFormat; import java.text.SimpleDateFormat; import java.util.Date; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -24,7 +23,6 @@ import com.vincent.rsf.server.system.service.UserService; import com.vincent.rsf.server.system.entity.User; import java.io.Serializable; import java.util.Date; import java.util.stream.Collectors; @Data @@ -36,14 +34,14 @@ /** * id */ @ApiModelProperty(value= "id") @ApiModelProperty(value = "id") @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 站点名称 */ @ApiModelProperty(value= "站点名称") @ApiModelProperty(value = "站点名称") private String stationName; @ApiModelProperty("站点类型: {0:光电, 1:无光电}") @@ -52,113 +50,113 @@ /** * 可入 */ @ApiModelProperty(value= "可入") @ApiModelProperty(value = "可入") private Integer inAble = 0; /** * 可出 */ @ApiModelProperty(value= "可出") @ApiModelProperty(value = "可出") private Integer outAble = 0; /** * 状态 */ @ApiModelProperty(value= "状态") @ApiModelProperty(value = "状态") private String useStatus; /** * 所属库区id */ @ApiModelProperty(value= "所属库区id") @ApiModelProperty(value = "所属库区id") private Long area; /** * 是否可跨区 */ @ApiModelProperty(value= "是否可跨区") @ApiModelProperty(value = "是否可跨区") private Integer isCrossZone = 0; /** * 可跨区区域id */ @ApiModelProperty(value= "可跨区区域id") @ApiModelProperty(value = "可跨区区域id") private String crossZoneArea; /** * 是否wcs站点 */ @ApiModelProperty(value= "是否wcs站点") @ApiModelProperty(value = "是否wcs站点") private Integer isWcs = 0; /** * wcs站点信息 */ @ApiModelProperty(value= "wcs站点信息") @ApiModelProperty(value = "wcs站点信息") private String wcsData; /** * 容器类型 */ @ApiModelProperty(value= "容器类型") @ApiModelProperty(value = "容器类型") private String containerType; /** * 条码 */ @ApiModelProperty(value= "条码") @ApiModelProperty(value = "条码") @TableField(updateStrategy = FieldStrategy.IGNORED) private String barcode; /** * 是否自动调拨 */ @ApiModelProperty(value= "是否自动调拨") @ApiModelProperty(value = "是否自动调拨") private Integer autoTransfer; /** * 备注 */ @ApiModelProperty(value= "备注") @ApiModelProperty(value = "备注") private String memo; @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") @ApiModelProperty(value = "是否删除 1: 是 0: 否 ") @TableLogic private Integer deleted; /** * 创建人 */ @ApiModelProperty(value= "创建人") @ApiModelProperty(value = "创建人") private Long createBy; /** * 创建时间 */ @ApiModelProperty(value= "创建时间") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "创建时间") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; /** * 更新人 */ @ApiModelProperty(value= "更新人") @ApiModelProperty(value = "更新人") private Long updateBy; /** * 更新时间 */ @ApiModelProperty(value= "更新时间") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "更新时间") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date updateTime; @ApiModelProperty(value= "状态") @ApiModelProperty(value = "状态") private Integer status; /** * 所属机构 */ @ApiModelProperty(value= "租户") @ApiModelProperty(value = "租户") private Long tenantId; @TableField(exist = false) @@ -167,15 +165,17 @@ @TableField(exist = false) private List<Long> containerTypes; public BasStation() {} public BasStation() { } public String getType$() { if (this.type == null) return null; if (this.type == null) return null; return StationTypeEnum.getStationDesc(this.type); } public List<Long> getContainerTypes$(){ if (Cools.isEmpty(this.containerType)){ public List<Long> getContainerTypes$() { if (Cools.isEmpty(this.containerType)) { return new ArrayList<>(); } DictDataService service = SpringUtils.getBean(DictDataService.class); @@ -184,57 +184,74 @@ List<Long> longs1 = JSONObject.parseArray(parse.toString(), Long.class); List<DictData> dictData = service.list(new LambdaQueryWrapper<DictData>() .eq(DictData::getDictTypeCode, "sys_container_type") .in(DictData::getValue, longs1) ); .in(DictData::getValue, longs1)); List<Long> longs = dictData.stream().map(DictData::getId).collect(Collectors.toList()); return longs; } public String getCreateTime$(){ if (Cools.isEmpty(this.createTime)){ public String getCreateTime$() { if (Cools.isEmpty(this.createTime)) { return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); } public String getUpdateTime$(){ if (Cools.isEmpty(this.updateTime)){ public String getUpdateTime$() { if (Cools.isEmpty(this.updateTime)) { return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); } public String getUseStatus$(){ if (Cools.isEmpty(this.useStatus)){ public String getUseStatus$() { if (Cools.isEmpty(this.useStatus)) { return ""; } DictDataService service = SpringUtils.getBean(DictDataService.class); DictData dictData = service.getOne(new LambdaQueryWrapper<DictData>() .eq(DictData::getDictTypeCode, "sys_sta_use_stas") .eq(DictData::getValue, this.useStatus) ); if (!Cools.isEmpty(dictData)){ .eq(DictData::getValue, this.useStatus)); if (!Cools.isEmpty(dictData)) { return String.valueOf(dictData.getLabel()); } return ""; } public String getCreateBy$() { UserService service = SpringUtils.getBean(UserService.class); User user = service.getById(this.createBy); if (!Cools.isEmpty(user)) { return String.valueOf(user.getNickname()); } return null; } public String getUpdateBy$() { UserService service = SpringUtils.getBean(UserService.class); User user = service.getById(this.updateBy); if (!Cools.isEmpty(user)) { return String.valueOf(user.getNickname()); } return null; } public String getArea$(){ if (null == this.area){ return null; } public String getArea$() { if (null == this.area) { return null; } WarehouseAreasService service = SpringUtils.getBean(WarehouseAreasService.class); WarehouseAreas warehouseAreas = service.getById(this.area); if (!Cools.isEmpty(warehouseAreas)){ if (!Cools.isEmpty(warehouseAreas)) { return String.valueOf(warehouseAreas.getName()); } return null; } public Boolean getStatusBool(){ if (null == this.status){ return null; } switch (this.status){ public Boolean getStatusBool() { if (null == this.status) { return null; } switch (this.status) { case 1: return true; case 0: rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/MatnrGroupServiceImpl.java
@@ -13,7 +13,7 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -35,7 +35,7 @@ .like(MatnrGroup::getName, map.get("condition")) .orderByAsc(MatnrGroup::getCode)); List<Long> collect = groups.stream().map(MatnrGroup::getId).collect(Collectors.toList()); List<MatnrGroup> list = this.list(new LambdaQueryWrapper<MatnrGroup>().in(MatnrGroup::getId, collect)); List<MatnrGroup> list = this.list(new LambdaQueryWrapper<MatnrGroup>().in(!collect.isEmpty(), MatnrGroup::getId, collect)); matnrs.addAll(list); if (matnrs.isEmpty()) { return new ArrayList<>();