mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增机台下拉选项接口
This commit is contained in:
+6
-6
@@ -32,17 +32,17 @@ public class OrderPageReqVOCopy extends PageParam {
|
|||||||
@Schema(description = "状态列表")
|
@Schema(description = "状态列表")
|
||||||
private List<Integer> stateList;
|
private List<Integer> stateList;
|
||||||
@Schema(description = "矩形")
|
@Schema(description = "矩形")
|
||||||
private boolean rectangle;
|
private Boolean rectangle;
|
||||||
@Schema(description = "异形")
|
@Schema(description = "异形")
|
||||||
private boolean specialShaped;
|
private Boolean specialShaped;
|
||||||
@Schema(description = "造型")
|
@Schema(description = "造型")
|
||||||
private boolean sculpt;
|
private Boolean sculpt;
|
||||||
@Schema(description = "有挖穿造型")
|
@Schema(description = "有挖穿造型")
|
||||||
private boolean holeThrough;
|
private Boolean holeThrough;
|
||||||
@Schema(description = "有挖穿孔")
|
@Schema(description = "有挖穿孔")
|
||||||
private boolean burrow;
|
private Boolean burrow;
|
||||||
@Schema(description = "有二维纹路")
|
@Schema(description = "有二维纹路")
|
||||||
private boolean twoDimensionalToolPath;
|
private Boolean twoDimensionalToolPath;
|
||||||
@Schema(description = "开始时间")
|
@Schema(description = "开始时间")
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private Date beginDate;
|
private Date beginDate;
|
||||||
|
|||||||
+3
-3
@@ -249,13 +249,13 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
.isNull("d.order_id")
|
.isNull("d.order_id")
|
||||||
;
|
;
|
||||||
List<Integer> filterTypes = new ArrayList<>();
|
List<Integer> filterTypes = new ArrayList<>();
|
||||||
if (pageReqVO.isHoleThrough()) {
|
if (Objects.nonNull(pageReqVO.getHoleThrough()) && pageReqVO.getHoleThrough()) {
|
||||||
filterTypes.add(1);
|
filterTypes.add(1);
|
||||||
}
|
}
|
||||||
if (pageReqVO.isBurrow()) {
|
if (Objects.nonNull(pageReqVO.getBurrow()) && pageReqVO.getBurrow()) {
|
||||||
filterTypes.add(2);
|
filterTypes.add(2);
|
||||||
}
|
}
|
||||||
if (pageReqVO.isTwoDimensionalToolPath()) {
|
if (Objects.nonNull(pageReqVO.getTwoDimensionalToolPath()) && pageReqVO.getTwoDimensionalToolPath()) {
|
||||||
filterTypes.add(4);
|
filterTypes.add(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -7,8 +7,9 @@
|
|||||||
count(c.id) as num, sum(c.area) as area, p.goods_name, p.color, p.material, p.goods_id
|
count(c.id) as num, sum(c.area) as area, p.goods_name, p.color, p.material, p.goods_id
|
||||||
from `order` a
|
from `order` a
|
||||||
left join order_plate c ON a.id = c.order_id and c.is_cancel = 0
|
left join order_plate c ON a.id = c.order_id and c.is_cancel = 0
|
||||||
left join plate p on c.goods_id = p.goods_id
|
left join order_goods p on c.goods_id = p.goods_id
|
||||||
left join order_item d ON c.order_id = d.order_id
|
left join order_item d ON c.order_id = d.order_id
|
||||||
|
left join order_plan_item e on d.id = e.item_id
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
group by orderId, p.id
|
group by orderId, p.id
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
+8
-1
@@ -1,16 +1,17 @@
|
|||||||
package com.cf.imes.module.system.controller.admin.machine;
|
package com.cf.imes.module.system.controller.admin.machine;
|
||||||
|
|
||||||
|
import com.cf.imes.framework.common.enums.CommonStatusEnum;
|
||||||
import com.cf.imes.framework.es.core.valid.CreateGroup;
|
import com.cf.imes.framework.es.core.valid.CreateGroup;
|
||||||
import com.cf.imes.framework.es.core.valid.UpdateGroup;
|
import com.cf.imes.framework.es.core.valid.UpdateGroup;
|
||||||
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
||||||
import com.cf.imes.module.system.controller.admin.machine.vo.*;
|
import com.cf.imes.module.system.controller.admin.machine.vo.*;
|
||||||
|
import com.cf.imes.module.system.dal.dataobject.dept.DeptDO;
|
||||||
import com.cf.imes.module.system.dal.dataobject.machine.MachineDO;
|
import com.cf.imes.module.system.dal.dataobject.machine.MachineDO;
|
||||||
import com.cf.imes.module.system.service.machine.MachineService;
|
import com.cf.imes.module.system.service.machine.MachineService;
|
||||||
import com.cf.imes.module.system.service.machine.MachineTemplateService;
|
import com.cf.imes.module.system.service.machine.MachineTemplateService;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -125,5 +126,11 @@ public class MachineController {
|
|||||||
return success(machineService.getMachineTree(organId));
|
return success(machineService.getMachineTree(organId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = {"/list-all-simple", "/simple-list"})
|
||||||
|
@Operation(summary = "获取机台精简信息列表", description = "主要用于前端的下拉选项")
|
||||||
|
public CommonResult<List<MachineSimpleRespVO>> getSimpleDeptList() {
|
||||||
|
List<MachineSimpleRespVO> list = machineService.simpleList();
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.cf.imes.module.system.controller.admin.machine.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Beal
|
||||||
|
*/
|
||||||
|
public class MachineSimpleRespVO {
|
||||||
|
@Schema(description = "机台id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "机台名称")
|
||||||
|
private String name;
|
||||||
|
}
|
||||||
+2
@@ -80,4 +80,6 @@ public interface MachineService {
|
|||||||
OrganMachineResp organMachineByOrganId(Long organId);
|
OrganMachineResp organMachineByOrganId(Long organId);
|
||||||
|
|
||||||
PageResult<MachineDO> page(MachinePageReqVO pageParam);
|
PageResult<MachineDO> page(MachinePageReqVO pageParam);
|
||||||
|
|
||||||
|
List<MachineSimpleRespVO> simpleList();
|
||||||
}
|
}
|
||||||
+8
@@ -290,6 +290,14 @@ public class MachineServiceImpl implements MachineService {
|
|||||||
return machineMapper.selectPage(pageParam, new ArrayList<>());
|
return machineMapper.selectPage(pageParam, new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MachineSimpleRespVO> simpleList() {
|
||||||
|
List<MachineDO> machineDOS = machineMapper.selectList(new LambdaQueryWrapperX<MachineDO>()
|
||||||
|
.select(MachineDO::getId, MachineDO::getName)
|
||||||
|
);
|
||||||
|
return BeanUtils.toBean(machineDOS, MachineSimpleRespVO.class);
|
||||||
|
}
|
||||||
|
|
||||||
private void validateExists(Long id) {
|
private void validateExists(Long id) {
|
||||||
if (machineMapper.selectById(id) == null) {
|
if (machineMapper.selectById(id) == null) {
|
||||||
throw exception(MACHINE_NOT_EXISTS);
|
throw exception(MACHINE_NOT_EXISTS);
|
||||||
|
|||||||
Reference in New Issue
Block a user