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:
+2
@@ -256,6 +256,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderBodyRespVO> getOrderBody(Long orderId) {
|
||||
// 判断生产单是否删除
|
||||
@@ -509,6 +510,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// 业务员是否存在
|
||||
private void validateSalesmanOrderNoExists(String salesman, Long organId) {
|
||||
if (adminUserApi.validateUser(salesman, organId).getData() == null) {
|
||||
|
||||
+4
-3
@@ -46,15 +46,15 @@
|
||||
<select id="selectPartAll"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.orderParts.vo.PartGoodsRespVO">
|
||||
SELECT DISTINCT
|
||||
a.id,
|
||||
-- a.id,
|
||||
a.name,
|
||||
a.brand,
|
||||
a.model,
|
||||
a.spec,
|
||||
a.unit,
|
||||
a.price,
|
||||
-- a.price,
|
||||
a.remark,
|
||||
b.num
|
||||
SUM(b.num) AS num
|
||||
FROM
|
||||
order_parts a
|
||||
LEFT JOIN
|
||||
@@ -63,6 +63,7 @@
|
||||
b.order_id = #{orderId}
|
||||
AND b.organ_id = #{organId}
|
||||
AND a.deleted = #{deleted}
|
||||
GROUP BY a.name, a.brand, a.model, a.spec, a.unit, a.remark
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
BIN
Binary file not shown.
+6
-6
@@ -33,7 +33,7 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Tag(name = "管理后台 - 板材信息表 plate")
|
||||
@Tag(name = "管理后台 - 板材库管理")
|
||||
@RestController
|
||||
@RequestMapping("/manage/plate")
|
||||
@Validated
|
||||
@@ -43,7 +43,7 @@ public class PlateController {
|
||||
private PlateService plateService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建板材信息表 plate_{N}")
|
||||
@Operation(summary = "创建板材信息")
|
||||
// @PreAuthorize("@ss.hasPermission('manage:plate:create')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:create','base:plate:create')")
|
||||
public CommonResult<Long> createPlate(@Valid @RequestBody PlateSaveReqVO createReqVO) {
|
||||
@@ -51,7 +51,7 @@ public class PlateController {
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新板材信息表 plate_{N}")
|
||||
@Operation(summary = "更新板材信息")
|
||||
// @PreAuthorize("@ss.hasPermission('manage:plate:update')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:update','base:plate:update')")
|
||||
public CommonResult<Boolean> updatePlate(@Valid @RequestBody PlateSaveReqVO updateReqVO) {
|
||||
@@ -60,7 +60,7 @@ public class PlateController {
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除板材信息表 plate_{N}")
|
||||
@Operation(summary = "删除板材信息")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "编号", required = true),
|
||||
@Parameter(name = "organId", description = "板材所属组织ID")
|
||||
@@ -74,7 +74,7 @@ public class PlateController {
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得板材信息表 plate_{N}")
|
||||
@Operation(summary = "获得板材信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
// @PreAuthorize("@ss.hasPermission('manage:plate:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:query','base:plate:query')")
|
||||
@@ -84,7 +84,7 @@ public class PlateController {
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得板材信息表 plate_{N}分页")
|
||||
@Operation(summary = "获得板材信息分页")
|
||||
// @PreAuthorize("@ss.hasPermission('manage:plate:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:query','base:plate:query')")
|
||||
public CommonResult<PageResult<PlateRespVO>> getPlatePage(@Valid PlatePageReqVO pageReqVO) {
|
||||
|
||||
-1
@@ -37,7 +37,6 @@ public class PlateImportExcelVO {
|
||||
private String color;
|
||||
|
||||
@ExcelProperty("纹理")
|
||||
@NotEmpty(message = "纹路不能为空,填 有 无")
|
||||
private String texture;
|
||||
|
||||
@ExcelProperty("宽度")
|
||||
|
||||
-1
@@ -30,7 +30,6 @@ public class PlateSaveReqVO {
|
||||
private String color;
|
||||
|
||||
@Schema(description = "纹理", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "纹理路不能为空")
|
||||
private Boolean texture;
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
+7
-1
@@ -3,6 +3,7 @@ package com.cf.imes.module.manage.service.plate;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.cf.imes.framework.common.exception.util.ServiceExceptionUtil;
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.organ.core.aop.OrganIgnore;
|
||||
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
|
||||
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlateImportExcelVO;
|
||||
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlateImportRespVO;
|
||||
@@ -43,6 +44,7 @@ public class PlateServiceImpl implements PlateService {
|
||||
private OrganApi organApi;
|
||||
|
||||
@Override
|
||||
@OrganIgnore
|
||||
public Long createPlate(PlateSaveReqVO createReqVO) {
|
||||
PlateDO plate = BeanUtils.toBean(createReqVO, PlateDO.class);
|
||||
if (createReqVO.getOrganId() != null && createReqVO.getOrganId() != 0 ){
|
||||
@@ -62,6 +64,7 @@ public class PlateServiceImpl implements PlateService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@OrganIgnore
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updatePlate(PlateSaveReqVO updateReqVO) {
|
||||
// 更新 判断是否有组织id
|
||||
@@ -77,6 +80,7 @@ public class PlateServiceImpl implements PlateService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@OrganIgnore
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deletePlate(Long id,Long organId) {
|
||||
if (organId == null || organId == 0){
|
||||
@@ -105,6 +109,7 @@ public class PlateServiceImpl implements PlateService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@OrganIgnore
|
||||
public PageResult<PlateDO> getPlatePage(PlatePageReqVO pageReqVO) {
|
||||
if (pageReqVO.getOrganId() == null || pageReqVO.getOrganId() == 0){
|
||||
pageReqVO.setOrganId(OrganContextHolder.getOrganId());
|
||||
@@ -114,9 +119,10 @@ public class PlateServiceImpl implements PlateService {
|
||||
|
||||
|
||||
@Override
|
||||
@OrganIgnore
|
||||
@Transactional(rollbackFor = Exception.class) // 添加事务,异常则回滚所有导入
|
||||
public PlateImportRespVO importPlateList(List<PlateImportExcelVO> importPlates, boolean isUpdateSupport , Long organId) {
|
||||
System.out.println(" importPlates " + importPlates);
|
||||
// System.out.println(" importPlates " + importPlates);
|
||||
// if (CollUtil.isEmpty(importPlates)) {
|
||||
// throw ServiceExceptionUtil.exception(ErrorCodeConstants.PLATE_IMPORT_LIST_IS_EMPTY);
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user