Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
2db6477093
@ -107,4 +107,12 @@ public class InvoiceController {
|
||||
List<InvoiceDO> invoice = invoiceService.getOrderYsInvoice(code);
|
||||
return success(invoice);
|
||||
}
|
||||
@GetMapping("/getOrderYfInvoice")
|
||||
@Operation(summary = "根据采购订单获得财务发票")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:invoice:query')")
|
||||
public CommonResult<List<InvoiceDO>> getOrderYfInvoice(@RequestParam("code") String code) {
|
||||
List<InvoiceDO> invoice = invoiceService.getOrderYfInvoice(code);
|
||||
return success(invoice);
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ public class MaterialPlanBoomController {
|
||||
@Operation(summary = "获得物料需求计划加工件明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
|
||||
public CommonResult<PageResult<MaterialPlanBoomRespVO>> getMaterialPlanBoomPage(@Valid MaterialPlanBoomPageReqVO pageReqVO) {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
PageResult<MaterialPlanBoomDO> pageResult = materialPlanBoomService.getMaterialPlanBoomPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialPlanBoomRespVO.class));
|
||||
}
|
||||
|
@ -66,6 +66,10 @@ public class MaterialPlanBoomRespVO extends PageParam {
|
||||
@Schema(description = "材质id")
|
||||
@ExcelProperty("材质id")
|
||||
private Long compositionId;
|
||||
@Schema(description = "工序")
|
||||
@ExcelProperty("工序")
|
||||
private String procedureName;
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -15,11 +16,9 @@ import com.alibaba.excel.annotation.*;
|
||||
public class OrderYfRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20332")
|
||||
@ExcelProperty("主键")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "采购订单编号")
|
||||
@ -27,7 +26,6 @@ public class OrderYfRespVO {
|
||||
private String cgOrderNum;
|
||||
|
||||
@Schema(description = "生成日期")
|
||||
@ExcelProperty("生成日期")
|
||||
private LocalDateTime cgTime;
|
||||
|
||||
@Schema(description = "供应商名称", example = "王五")
|
||||
@ -35,19 +33,23 @@ public class OrderYfRespVO {
|
||||
private String cgGysname;
|
||||
|
||||
@Schema(description = "应付金额")
|
||||
@ExcelProperty("应付金额")
|
||||
@ExcelProperty("应付金额(元)")
|
||||
private BigDecimal cgYf;
|
||||
|
||||
@Schema(description = "已付金额")
|
||||
@ExcelProperty("已付金额")
|
||||
@ExcelProperty("已付金额(元)")
|
||||
private BigDecimal cgYifu;
|
||||
@Schema(description = "已开票金额")
|
||||
@ExcelProperty("已开票金额(元)")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "是否付款完成")
|
||||
@ExcelProperty("是否付款完成")
|
||||
@Schema(description = "付款状态")
|
||||
@ExcelProperty("付款状态")
|
||||
private Integer cgTypee;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String rem;
|
||||
|
||||
|
||||
}
|
@ -1,40 +1,44 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 应付记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class OrderYfSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20332")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "采购订单编号")
|
||||
private String cgOrderNum;
|
||||
|
||||
@Schema(description = "生成日期")
|
||||
private LocalDateTime cgTime;
|
||||
|
||||
@Schema(description = "供应商名称", example = "王五")
|
||||
private String cgGysname;
|
||||
|
||||
@Schema(description = "应付金额")
|
||||
private BigDecimal cgYf;
|
||||
|
||||
@Schema(description = "已付金额")
|
||||
private BigDecimal cgYifu;
|
||||
|
||||
@Schema(description = "是否付款完成")
|
||||
private Integer cgTypee;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String rem;
|
||||
|
||||
}
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyfdetail.OrderYfDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 应付记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class OrderYfSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20332")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "采购订单编号")
|
||||
private String cgOrderNum;
|
||||
|
||||
@Schema(description = "生成日期")
|
||||
private LocalDateTime cgTime;
|
||||
|
||||
@Schema(description = "供应商名称", example = "王五")
|
||||
private String cgGysname;
|
||||
|
||||
@Schema(description = "应付金额")
|
||||
private BigDecimal cgYf;
|
||||
|
||||
@Schema(description = "已付金额")
|
||||
private BigDecimal cgYifu;
|
||||
|
||||
@Schema(description = "是否付款完成")
|
||||
private Integer cgTypee;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String rem;
|
||||
@Schema(description = "收款明细")
|
||||
private List<OrderYfDetailDO> orderYfDetails;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,104 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderyfdetail;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo.OrderYsDetailRespVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
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.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyfdetail.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyfdetail.OrderYfDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.orderyfdetail.OrderYfDetailService;
|
||||
|
||||
@Tag(name = "管理后台 - 应付明细")
|
||||
@RestController
|
||||
@RequestMapping("/heli/order-yf-detail")
|
||||
@Validated
|
||||
public class OrderYfDetailController {
|
||||
|
||||
@Resource
|
||||
private OrderYfDetailService orderYfDetailService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建应付明细")
|
||||
@PreAuthorize("@ss.hasPermission('heli:order-yf-detail:create')")
|
||||
public CommonResult<Integer> createOrderYfDetail(@Valid @RequestBody OrderYfDetailSaveReqVO createReqVO) {
|
||||
return success(orderYfDetailService.createOrderYfDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新应付明细")
|
||||
@PreAuthorize("@ss.hasPermission('heli:order-yf-detail:update')")
|
||||
public CommonResult<Boolean> updateOrderYfDetail(@Valid @RequestBody OrderYfDetailSaveReqVO updateReqVO) {
|
||||
orderYfDetailService.updateOrderYfDetail(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除应付明细")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:order-yf-detail:delete')")
|
||||
public CommonResult<Boolean> deleteOrderYfDetail(@RequestParam("id") Integer id) {
|
||||
orderYfDetailService.deleteOrderYfDetail(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得应付明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:order-yf-detail:query')")
|
||||
public CommonResult<OrderYfDetailRespVO> getOrderYfDetail(@RequestParam("id") Integer id) {
|
||||
OrderYfDetailDO orderYfDetail = orderYfDetailService.getOrderYfDetail(id);
|
||||
return success(BeanUtils.toBean(orderYfDetail, OrderYfDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得应收明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:order-yf-detail:query')")
|
||||
public CommonResult<PageResult<OrderYfDetailRespVO>> getOrderYfDetailPage(@Valid OrderYfDetailPageReqVO pageReqVO) {
|
||||
PageResult<OrderYfDetailDO> pageResult = orderYfDetailService.getOrderYfDetailPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, OrderYfDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出应收明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:order-yf-detail:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportOrderYfDetailExcel(@Valid OrderYfDetailPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<OrderYfDetailDO> list = orderYfDetailService.getOrderYfDetailPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "应收明细.xls", "数据", OrderYfDetailRespVO.class,
|
||||
BeanUtils.toBean(list, OrderYfDetailRespVO.class));
|
||||
}
|
||||
@GetMapping("/getOrderYfDetails")
|
||||
@Operation(summary = "获得应收记录表明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:order-ys-detail:query')")
|
||||
public CommonResult<List<OrderYfDetailRespVO>> getOrderYfDetails(@RequestParam("id") Integer id) {
|
||||
List<OrderYfDetailDO> orderYfDetail = orderYfDetailService.getOrderYfDetails(id);
|
||||
return success(BeanUtils.toBean(orderYfDetail, OrderYfDetailRespVO.class));
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderyfdetail.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 应收明细分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class OrderYfDetailPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "回款金额")
|
||||
private BigDecimal cgYifu;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String rem;
|
||||
|
||||
@Schema(description = "回款日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDate[] paymentDate;
|
||||
|
||||
@Schema(description = "应付id", example = "10874")
|
||||
private Integer cgId;
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderyfdetail.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 应收明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OrderYfDetailRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24328")
|
||||
@ExcelProperty("主键")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "付款金额")
|
||||
@ExcelProperty("付款金额")
|
||||
private BigDecimal cgYifu;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String rem;
|
||||
|
||||
@Schema(description = "付款日期")
|
||||
@ExcelProperty("回款日期")
|
||||
private LocalDate paymentDate;
|
||||
|
||||
@Schema(description = "应付id", example = "10874")
|
||||
@ExcelProperty("应付id")
|
||||
private Integer cgId;
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderyfdetail.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 应付明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class OrderYfDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24328")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "付款金额")
|
||||
private BigDecimal cgYifu;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String rem;
|
||||
|
||||
@Schema(description = "付款日期")
|
||||
private LocalDate paymentDate;
|
||||
|
||||
@Schema(description = "应付id", example = "10874")
|
||||
private Integer cgId;
|
||||
|
||||
}
|
@ -44,7 +44,7 @@ public class ProcessBomExcelVO {
|
||||
private String blueprintNo;
|
||||
|
||||
@ExcelProperty("数量")
|
||||
private Integer amount;
|
||||
private Integer amounts;
|
||||
|
||||
@ExcelProperty(value = "单位", converter = DictConvert.class)
|
||||
@DictFormat("heli_material_unit")
|
||||
|
@ -0,0 +1,102 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.PurchaseOrderNoPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.PurchaseOrderNoRespVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.PurchaseOrderNoSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.purchaseorderno.PurchaseOrderNoService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
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.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||
|
||||
@Tag(name = "管理后台 - 采购订单主")
|
||||
@RestController
|
||||
@RequestMapping("/heli/purchase-order-no")
|
||||
@Validated
|
||||
public class PurchaseOrderNoController {
|
||||
|
||||
@Resource
|
||||
private PurchaseOrderNoService purchaseOrderNoService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建采购订单主")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no:create')")
|
||||
public CommonResult<Long> createPurchaseOrderNo(@Valid @RequestBody PurchaseOrderNoSaveReqVO createReqVO) {
|
||||
return success(purchaseOrderNoService.createPurchaseOrderNo(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新采购订单主")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no:update')")
|
||||
public CommonResult<Boolean> updatePurchaseOrderNo(@Valid @RequestBody PurchaseOrderNoSaveReqVO updateReqVO) {
|
||||
purchaseOrderNoService.updatePurchaseOrderNo(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除采购订单主")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no:delete')")
|
||||
public CommonResult<Boolean> deletePurchaseOrderNo(@RequestParam("id") Long id) {
|
||||
purchaseOrderNoService.deletePurchaseOrderNo(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得采购订单主")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no:query')")
|
||||
public CommonResult<PurchaseOrderNoRespVO> getPurchaseOrderNo(@RequestParam("id") Long id) {
|
||||
PurchaseOrderNoDO purchaseOrderNo = purchaseOrderNoService.getPurchaseOrderNo(id);
|
||||
return success(BeanUtils.toBean(purchaseOrderNo, PurchaseOrderNoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得采购订单主分页")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no:query')")
|
||||
public CommonResult<PageResult<PurchaseOrderNoRespVO>> getPurchaseOrderNoPage(@Valid PurchaseOrderNoPageReqVO pageReqVO) {
|
||||
PageResult<PurchaseOrderNoDO> pageResult = purchaseOrderNoService.getPurchaseOrderNoPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PurchaseOrderNoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出采购订单主 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportPurchaseOrderNoExcel(@Valid PurchaseOrderNoPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PurchaseOrderNoDO> list = purchaseOrderNoService.getPurchaseOrderNoPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "采购订单主.xls", "数据", PurchaseOrderNoRespVO.class,
|
||||
BeanUtils.toBean(list, PurchaseOrderNoRespVO.class));
|
||||
}
|
||||
@GetMapping("/getPurchaseOrderPage")
|
||||
@Operation(summary = "获得采购订单主分页")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no:query')")
|
||||
public CommonResult<PageResult<PurchaseOrderNoRespVO>> getPurchaseOrderPage(@Valid PurchaseOrderNoPageReqVO pageReqVO) {
|
||||
PageResult<PurchaseOrderNoDO> pageResult = purchaseOrderNoService.getPurchaseOrderPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PurchaseOrderNoRespVO.class));
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 采购订单主分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PurchaseOrderNoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "采购单号")
|
||||
private String purchaseNo;
|
||||
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "1")
|
||||
private Boolean purchaseType;
|
||||
|
||||
@Schema(description = "采购物类型,1物料,2加工件", example = "2")
|
||||
private Boolean goodsType;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "2163")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "1238")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1", example = "2")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "送审人", example = "18499")
|
||||
private Long submitUserId;
|
||||
|
||||
@Schema(description = "送审时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] submitTime;
|
||||
|
||||
@Schema(description = "审核人")
|
||||
private Long auditor;
|
||||
|
||||
@Schema(description = "审核时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] auditTime;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "供应商id", example = "3648")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "是否打印")
|
||||
private String isPrint;
|
||||
|
||||
@Schema(description = "打印时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] printDtime;
|
||||
|
||||
@Schema(description = "订单日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDate[] ordDate;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "1")
|
||||
private Boolean receivingStatus;
|
||||
|
||||
@Schema(description = "结算币种", example = "2")
|
||||
private Integer currencyType;
|
||||
|
||||
@Schema(description = "税率")
|
||||
private Integer taxRatio;
|
||||
|
||||
@Schema(description = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 采购订单主 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PurchaseOrderNoRespVO {
|
||||
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "5114")
|
||||
@ExcelProperty("自增字段,唯一")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "采购单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("采购单号")
|
||||
private String purchaseNo;
|
||||
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "1")
|
||||
@ExcelProperty("采购单类型,1按物料需求计划采购,2备库采购")
|
||||
private Integer purchaseType;
|
||||
|
||||
@Schema(description = "采购物类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("采购物类型,1物料,2加工件")
|
||||
private Integer goodsType;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "2163")
|
||||
@ExcelProperty("暂估价金额")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "1238")
|
||||
@ExcelProperty("实际价金额")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1", example = "2")
|
||||
@ExcelProperty("单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "送审人", example = "18499")
|
||||
@ExcelProperty("送审人")
|
||||
private Long submitUserId;
|
||||
|
||||
@Schema(description = "送审时间")
|
||||
@ExcelProperty("送审时间")
|
||||
private LocalDateTime submitTime;
|
||||
|
||||
@Schema(description = "审核人")
|
||||
@ExcelProperty("审核人")
|
||||
private Long auditor;
|
||||
|
||||
@Schema(description = "审核时间")
|
||||
@ExcelProperty("审核时间")
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "供应商id", example = "3648")
|
||||
@ExcelProperty("供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "是否打印")
|
||||
@ExcelProperty("是否打印")
|
||||
private String isPrint;
|
||||
|
||||
@Schema(description = "打印时间")
|
||||
@ExcelProperty("打印时间")
|
||||
private LocalDateTime printDtime;
|
||||
|
||||
@Schema(description = "订单日期")
|
||||
@ExcelProperty("订单日期")
|
||||
private LocalDate ordDate;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "1")
|
||||
@ExcelProperty("收货状态 未收货/收货中/收货完成 1/2/3")
|
||||
private Integer receivingStatus;
|
||||
|
||||
@Schema(description = "结算币种", example = "2")
|
||||
@ExcelProperty("结算币种")
|
||||
private Integer currencyType;
|
||||
|
||||
@Schema(description = "税率")
|
||||
@ExcelProperty("税率")
|
||||
private Integer taxRatio;
|
||||
@Schema(description = "供应商名称")
|
||||
@ExcelProperty("供应商名称")
|
||||
private String supplierName;
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 采购订单主新增/修改 Request VO")
|
||||
@Data
|
||||
public class PurchaseOrderNoSaveReqVO {
|
||||
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "5114")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "采购单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "采购单号不能为空")
|
||||
private String purchaseNo;
|
||||
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "1")
|
||||
private Boolean purchaseType;
|
||||
|
||||
@Schema(description = "采购物类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotNull(message = "采购物类型,1物料,2加工件不能为空")
|
||||
private Boolean goodsType;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "2163")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "1238")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1", example = "2")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "送审人", example = "18499")
|
||||
private Long submitUserId;
|
||||
|
||||
@Schema(description = "送审时间")
|
||||
private LocalDateTime submitTime;
|
||||
|
||||
@Schema(description = "审核人")
|
||||
private Long auditor;
|
||||
|
||||
@Schema(description = "审核时间")
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "供应商id", example = "3648")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "是否打印")
|
||||
private String isPrint;
|
||||
|
||||
@Schema(description = "打印时间")
|
||||
private LocalDateTime printDtime;
|
||||
|
||||
@Schema(description = "订单日期")
|
||||
private LocalDate ordDate;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "1")
|
||||
private Boolean receivingStatus;
|
||||
|
||||
@Schema(description = "结算币种", example = "2")
|
||||
private Integer currencyType;
|
||||
|
||||
@Schema(description = "税率")
|
||||
private Integer taxRatio;
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
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.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.purchaseordernodetail.PurchaseOrderNoDetailService;
|
||||
|
||||
@Tag(name = "管理后台 - 采购订单明细")
|
||||
@RestController
|
||||
@RequestMapping("/heli/purchase-order-no-detail")
|
||||
@Validated
|
||||
public class PurchaseOrderNoDetailController {
|
||||
|
||||
@Resource
|
||||
private PurchaseOrderNoDetailService purchaseOrderNoDetailService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建采购订单明细")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no-detail:create')")
|
||||
public CommonResult<Long> createPurchaseOrderNoDetail(@Valid @RequestBody PurchaseOrderNoDetailSaveReqVO createReqVO) {
|
||||
return success(purchaseOrderNoDetailService.createPurchaseOrderNoDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新采购订单明细")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no-detail:update')")
|
||||
public CommonResult<Boolean> updatePurchaseOrderNoDetail(@Valid @RequestBody PurchaseOrderNoDetailSaveReqVO updateReqVO) {
|
||||
purchaseOrderNoDetailService.updatePurchaseOrderNoDetail(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除采购订单明细")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no-detail:delete')")
|
||||
public CommonResult<Boolean> deletePurchaseOrderNoDetail(@RequestParam("id") Long id) {
|
||||
purchaseOrderNoDetailService.deletePurchaseOrderNoDetail(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得采购订单明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no-detail:query')")
|
||||
public CommonResult<PurchaseOrderNoDetailRespVO> getPurchaseOrderNoDetail(@RequestParam("id") Long id) {
|
||||
PurchaseOrderNoDetailDO purchaseOrderNoDetail = purchaseOrderNoDetailService.getPurchaseOrderNoDetail(id);
|
||||
return success(BeanUtils.toBean(purchaseOrderNoDetail, PurchaseOrderNoDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得采购订单明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no-detail:query')")
|
||||
public CommonResult<PageResult<PurchaseOrderNoDetailRespVO>> getPurchaseOrderNoDetailPage(@Valid PurchaseOrderNoDetailPageReqVO pageReqVO) {
|
||||
PageResult<PurchaseOrderNoDetailDO> pageResult = purchaseOrderNoDetailService.getPurchaseOrderNoDetailPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PurchaseOrderNoDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出采购订单明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no-detail:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportPurchaseOrderNoDetailExcel(@Valid PurchaseOrderNoDetailPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PurchaseOrderNoDetailDO> list = purchaseOrderNoDetailService.getPurchaseOrderNoDetailPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "采购订单明细.xls", "数据", PurchaseOrderNoDetailRespVO.class,
|
||||
BeanUtils.toBean(list, PurchaseOrderNoDetailRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 采购订单明细分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PurchaseOrderNoDetailPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "采购单id", example = "30207")
|
||||
private Long purchaseOrderId;
|
||||
|
||||
@Schema(description = "加工件boom detail id", example = "11069")
|
||||
private Long boomDetailId;
|
||||
|
||||
@Schema(description = "零件名称", example = "李四")
|
||||
private String boomName;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
private String boomSpec;
|
||||
|
||||
@Schema(description = "系统单位")
|
||||
private String boomUnit;
|
||||
|
||||
@Schema(description = "材质")
|
||||
private String composition;
|
||||
|
||||
@Schema(description = "采购数量")
|
||||
private BigDecimal purchaseAmount;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "23890")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "22431")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "预计到货日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] arriveTime;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "需求数量")
|
||||
private BigDecimal boomAmount;
|
||||
|
||||
@Schema(description = "需求到货日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] requireTime;
|
||||
|
||||
@Schema(description = "物料需求计划id", example = "7559")
|
||||
private Long projectMaterialPlanId;
|
||||
|
||||
@Schema(description = "物料需求计划子项目id", example = "897")
|
||||
private Long projectMaterialPlanBoomId;
|
||||
|
||||
@Schema(description = "订单子项目id", example = "24805")
|
||||
private Long projectPlanSubId;
|
||||
|
||||
@Schema(description = "子项目名称,唯一", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "子项目简码")
|
||||
private String nameSim;
|
||||
|
||||
@Schema(description = "订单id", example = "7893")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "生产计划id", example = "15506")
|
||||
private Long projectPlanId;
|
||||
|
||||
@Schema(description = "客户id", example = "15375")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "客户简称")
|
||||
private String brief;
|
||||
|
||||
@Schema(description = "项目名称", example = "王五")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "项目名称简码")
|
||||
private String projectNameSim;
|
||||
|
||||
@Schema(description = "物料id", example = "5042")
|
||||
private Long materialId;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "2")
|
||||
private Boolean receivingStatus;
|
||||
|
||||
@Schema(description = "入库单id", example = "28663")
|
||||
private Long storageId;
|
||||
|
||||
@Schema(description = "入库单物料id", example = "9584")
|
||||
private Long storageMatId;
|
||||
|
||||
@Schema(description = "剩余数量")
|
||||
private BigDecimal purchaseRemAmount;
|
||||
|
||||
@Schema(description = "零件理论重量")
|
||||
private BigDecimal theWeight;
|
||||
|
||||
@Schema(description = "责任人id", example = "30495")
|
||||
private Long duEmpId;
|
||||
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 采购订单明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PurchaseOrderNoDetailRespVO {
|
||||
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "967")
|
||||
@ExcelProperty("自增字段,唯一")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "采购单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "30207")
|
||||
@ExcelProperty("采购单id")
|
||||
private Long purchaseOrderId;
|
||||
|
||||
@Schema(description = "加工件boom detail id", example = "11069")
|
||||
@ExcelProperty("加工件boom detail id")
|
||||
private Long boomDetailId;
|
||||
|
||||
@Schema(description = "零件名称", example = "李四")
|
||||
@ExcelProperty("零件名称")
|
||||
private String boomName;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
@ExcelProperty("规格型号")
|
||||
private String boomSpec;
|
||||
|
||||
@Schema(description = "系统单位")
|
||||
@ExcelProperty("系统单位")
|
||||
private String boomUnit;
|
||||
|
||||
@Schema(description = "材质")
|
||||
@ExcelProperty("材质")
|
||||
private String composition;
|
||||
|
||||
@Schema(description = "采购数量")
|
||||
@ExcelProperty("采购数量")
|
||||
private BigDecimal purchaseAmount;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "23890")
|
||||
@ExcelProperty("暂估价金额")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "22431")
|
||||
@ExcelProperty("实际价金额")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "预计到货日期")
|
||||
@ExcelProperty("预计到货日期")
|
||||
private LocalDateTime arriveTime;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@ExcelProperty("备注")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "需求数量")
|
||||
@ExcelProperty("需求数量")
|
||||
private BigDecimal boomAmount;
|
||||
|
||||
@Schema(description = "需求到货日期")
|
||||
@ExcelProperty("需求到货日期")
|
||||
private LocalDateTime requireTime;
|
||||
|
||||
@Schema(description = "物料需求计划id", example = "7559")
|
||||
@ExcelProperty("物料需求计划id")
|
||||
private Long projectMaterialPlanId;
|
||||
|
||||
@Schema(description = "物料需求计划子项目id", example = "897")
|
||||
@ExcelProperty("物料需求计划子项目id")
|
||||
private Long projectMaterialPlanBoomId;
|
||||
|
||||
@Schema(description = "订单子项目id", example = "24805")
|
||||
@ExcelProperty("订单子项目id")
|
||||
private Long projectPlanSubId;
|
||||
|
||||
@Schema(description = "子项目名称,唯一", example = "芋艿")
|
||||
@ExcelProperty("子项目名称,唯一")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "子项目简码")
|
||||
@ExcelProperty("子项目简码")
|
||||
private String nameSim;
|
||||
|
||||
@Schema(description = "订单id", example = "7893")
|
||||
@ExcelProperty("订单id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "生产计划id", example = "15506")
|
||||
@ExcelProperty("生产计划id")
|
||||
private Long projectPlanId;
|
||||
|
||||
@Schema(description = "客户id", example = "15375")
|
||||
@ExcelProperty("客户id")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "客户简称")
|
||||
@ExcelProperty("客户简称")
|
||||
private String brief;
|
||||
|
||||
@Schema(description = "项目名称", example = "王五")
|
||||
@ExcelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "项目名称简码")
|
||||
@ExcelProperty("项目名称简码")
|
||||
private String projectNameSim;
|
||||
|
||||
@Schema(description = "物料id", example = "5042")
|
||||
@ExcelProperty("物料id")
|
||||
private Long materialId;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "2")
|
||||
@ExcelProperty("收货状态 未收货/收货中/收货完成 1/2/3")
|
||||
private Boolean receivingStatus;
|
||||
|
||||
@Schema(description = "入库单id", example = "28663")
|
||||
@ExcelProperty("入库单id")
|
||||
private Long storageId;
|
||||
|
||||
@Schema(description = "入库单物料id", example = "9584")
|
||||
@ExcelProperty("入库单物料id")
|
||||
private Long storageMatId;
|
||||
|
||||
@Schema(description = "剩余数量")
|
||||
@ExcelProperty("剩余数量")
|
||||
private BigDecimal purchaseRemAmount;
|
||||
|
||||
@Schema(description = "零件理论重量")
|
||||
@ExcelProperty("零件理论重量")
|
||||
private BigDecimal theWeight;
|
||||
|
||||
@Schema(description = "责任人id", example = "30495")
|
||||
@ExcelProperty("责任人id")
|
||||
private Long duEmpId;
|
||||
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 采购订单明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class PurchaseOrderNoDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "967")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "采购单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "30207")
|
||||
@NotNull(message = "采购单id不能为空")
|
||||
private Long purchaseOrderId;
|
||||
|
||||
@Schema(description = "加工件boom detail id", example = "11069")
|
||||
private Long boomDetailId;
|
||||
|
||||
@Schema(description = "零件名称", example = "李四")
|
||||
private String boomName;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
private String boomSpec;
|
||||
|
||||
@Schema(description = "系统单位")
|
||||
private String boomUnit;
|
||||
|
||||
@Schema(description = "材质")
|
||||
private String composition;
|
||||
|
||||
@Schema(description = "采购数量")
|
||||
private BigDecimal purchaseAmount;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "23890")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "22431")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "预计到货日期")
|
||||
private LocalDateTime arriveTime;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "需求数量")
|
||||
private BigDecimal boomAmount;
|
||||
|
||||
@Schema(description = "需求到货日期")
|
||||
private LocalDateTime requireTime;
|
||||
|
||||
@Schema(description = "物料需求计划id", example = "7559")
|
||||
private Long projectMaterialPlanId;
|
||||
|
||||
@Schema(description = "物料需求计划子项目id", example = "897")
|
||||
private Long projectMaterialPlanBoomId;
|
||||
|
||||
@Schema(description = "订单子项目id", example = "24805")
|
||||
private Long projectPlanSubId;
|
||||
|
||||
@Schema(description = "子项目名称,唯一", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "子项目简码")
|
||||
private String nameSim;
|
||||
|
||||
@Schema(description = "订单id", example = "7893")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "生产计划id", example = "15506")
|
||||
private Long projectPlanId;
|
||||
|
||||
@Schema(description = "客户id", example = "15375")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "客户简称")
|
||||
private String brief;
|
||||
|
||||
@Schema(description = "项目名称", example = "王五")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "项目名称简码")
|
||||
private String projectNameSim;
|
||||
|
||||
@Schema(description = "物料id", example = "5042")
|
||||
private Long materialId;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "2")
|
||||
private Boolean receivingStatus;
|
||||
|
||||
@Schema(description = "入库单id", example = "28663")
|
||||
private Long storageId;
|
||||
|
||||
@Schema(description = "入库单物料id", example = "9584")
|
||||
private Long storageMatId;
|
||||
|
||||
@Schema(description = "剩余数量")
|
||||
private BigDecimal purchaseRemAmount;
|
||||
|
||||
@Schema(description = "零件理论重量")
|
||||
private BigDecimal theWeight;
|
||||
|
||||
@Schema(description = "责任人id", example = "30495")
|
||||
private Long duEmpId;
|
||||
|
||||
}
|
@ -89,6 +89,18 @@ public class MaterialPlanBoomDO extends BaseDO {
|
||||
* 零件重量
|
||||
*/
|
||||
private BigDecimal matWeight;
|
||||
/**
|
||||
* 工序id
|
||||
*/
|
||||
private Long procedureId;
|
||||
/**
|
||||
* 泡沫否 Y 是 N 否
|
||||
*/
|
||||
private String isFoam;
|
||||
/**
|
||||
* 订单打回原因
|
||||
*/
|
||||
private String rejRemark;
|
||||
@TableField(exist = false)
|
||||
private String materialName;
|
||||
@TableField(exist = false)
|
||||
@ -96,6 +108,8 @@ public class MaterialPlanBoomDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String boomSpec;
|
||||
@TableField(exist = false)
|
||||
private String procedureName;
|
||||
@TableField(exist = false)
|
||||
private String boomUnit;
|
||||
@TableField(exist = false)
|
||||
private String compositionName;
|
||||
|
@ -58,5 +58,7 @@ public class OrderYfDO extends BaseDO {
|
||||
* 备注
|
||||
*/
|
||||
private String rem;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyfdetail;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 应收明细 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("cg_order_yf_detail")
|
||||
@KeySequence("cg_order_yf_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderYfDetailDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 回款金额
|
||||
*/
|
||||
private BigDecimal cgYifu;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String rem;
|
||||
/**
|
||||
* 应付日期
|
||||
*/
|
||||
private LocalDate paymentDate;
|
||||
/**
|
||||
* 应付id
|
||||
*/
|
||||
private Integer cgId;
|
||||
|
||||
}
|
@ -134,6 +134,8 @@ public class ProcessBomDetailDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private BigDecimal storageOkQty;
|
||||
@TableField(exist = false)
|
||||
private Integer amounts;
|
||||
@TableField(exist = false)
|
||||
private String bomCode;
|
||||
@TableField(exist = false)
|
||||
private Long boomDetailId;
|
||||
|
@ -0,0 +1,114 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 采购订单主 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("project_purchase_order_no")
|
||||
@KeySequence("project_purchase_order_no_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PurchaseOrderNoDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 自增字段,唯一
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 采购单号
|
||||
*/
|
||||
private String purchaseNo;
|
||||
/**
|
||||
* 采购单类型,1按物料需求计划采购,2备库采购
|
||||
*/
|
||||
private Integer purchaseType;
|
||||
/**
|
||||
* 采购物类型,1物料,2加工件
|
||||
*/
|
||||
private Integer goodsType;
|
||||
/**
|
||||
* 暂估价金额
|
||||
*/
|
||||
private BigDecimal estimatedPrice;
|
||||
/**
|
||||
* 实际价金额
|
||||
*/
|
||||
private BigDecimal actualPrice;
|
||||
/**
|
||||
* 单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 送审人
|
||||
*/
|
||||
private Long submitUserId;
|
||||
/**
|
||||
* 送审时间
|
||||
*/
|
||||
private LocalDateTime submitTime;
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private Long auditor;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private Long supplierId;
|
||||
/**
|
||||
* 是否打印
|
||||
*/
|
||||
private String isPrint;
|
||||
/**
|
||||
* 打印时间
|
||||
*/
|
||||
private LocalDateTime printDtime;
|
||||
/**
|
||||
* 订单日期
|
||||
*/
|
||||
private LocalDate ordDate;
|
||||
/**
|
||||
* 收货状态 未收货/收货中/收货完成 1/2/3
|
||||
*/
|
||||
private Integer receivingStatus;
|
||||
/**
|
||||
* 结算币种
|
||||
*/
|
||||
private Integer currencyType;
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
private Integer taxRatio;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String supplierName;
|
||||
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 采购订单明细 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("project_purchase_order_no_detail")
|
||||
@KeySequence("project_purchase_order_no_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PurchaseOrderNoDetailDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 自增字段,唯一
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 采购单id
|
||||
*/
|
||||
private Long purchaseOrderId;
|
||||
/**
|
||||
* 加工件boom detail id
|
||||
*/
|
||||
private Long boomDetailId;
|
||||
/**
|
||||
* 零件名称
|
||||
*/
|
||||
private String boomName;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String boomSpec;
|
||||
/**
|
||||
* 系统单位
|
||||
*/
|
||||
private String boomUnit;
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
private String composition;
|
||||
/**
|
||||
* 采购数量
|
||||
*/
|
||||
private BigDecimal purchaseAmount;
|
||||
/**
|
||||
* 暂估价金额
|
||||
*/
|
||||
private BigDecimal estimatedPrice;
|
||||
/**
|
||||
* 实际价金额
|
||||
*/
|
||||
private BigDecimal actualPrice;
|
||||
/**
|
||||
* 预计到货日期
|
||||
*/
|
||||
private LocalDateTime arriveTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 需求数量
|
||||
*/
|
||||
private BigDecimal boomAmount;
|
||||
/**
|
||||
* 需求到货日期
|
||||
*/
|
||||
private LocalDateTime requireTime;
|
||||
/**
|
||||
* 物料需求计划id
|
||||
*/
|
||||
private Long projectMaterialPlanId;
|
||||
/**
|
||||
* 物料需求计划子项目id
|
||||
*/
|
||||
private Long projectMaterialPlanBoomId;
|
||||
/**
|
||||
* 订单子项目id
|
||||
*/
|
||||
private Long projectPlanSubId;
|
||||
/**
|
||||
* 子项目名称,唯一
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 子项目简码
|
||||
*/
|
||||
private String nameSim;
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 生产计划id
|
||||
*/
|
||||
private Long projectPlanId;
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
private Long customerId;
|
||||
/**
|
||||
* 客户简称
|
||||
*/
|
||||
private String brief;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
/**
|
||||
* 项目名称简码
|
||||
*/
|
||||
private String projectNameSim;
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
private Long materialId;
|
||||
/**
|
||||
* 收货状态 未收货/收货中/收货完成 1/2/3
|
||||
*/
|
||||
private Boolean receivingStatus;
|
||||
/**
|
||||
* 入库单id
|
||||
*/
|
||||
private Long storageId;
|
||||
/**
|
||||
* 入库单物料id
|
||||
*/
|
||||
private Long storageMatId;
|
||||
/**
|
||||
* 剩余数量
|
||||
*/
|
||||
private BigDecimal purchaseRemAmount;
|
||||
/**
|
||||
* 零件理论重量
|
||||
*/
|
||||
private BigDecimal theWeight;
|
||||
/**
|
||||
* 责任人id
|
||||
*/
|
||||
private Long duEmpId;
|
||||
|
||||
}
|
@ -9,8 +9,10 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplanboom.MaterialPlanBoomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplandetail.MaterialPlanDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.BoomDetailTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.ProcessBomStatusEnum;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
@ -74,9 +76,11 @@ public interface MaterialPlanBoomMapper extends BaseMapperX<MaterialPlanBoomDO>
|
||||
default PageResult<MaterialPlanBoomDO> getMaterialPlanBoomPages(ProcessBoomPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<MaterialPlanBoomDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(MaterialPlanBoomDO.class)
|
||||
.select("a.nickname as nickname,b.spec as boomSpec")
|
||||
.select("a.nickname as nickname,b.spec as boomSpec,g.name as procedureName,bc.`name` as compositionName")
|
||||
.leftJoin(AdminUserDO.class, "a", AdminUserDO::getId, MaterialPlanBoomDO::getDuEmpId)
|
||||
.leftJoin(ProcessBomDetailDO.class, "b", ProcessBomDetailDO::getId, MaterialPlanBoomDO::getBoomDetailId)
|
||||
.leftJoin(CompositionDO.class, "bc", CompositionDO::getId, ProcessBomDetailDO::getCompositionId)
|
||||
.leftJoin(ProcedureDO.class, "g", ProcedureDO::getId, MaterialPlanBoomDO::getProcedureId)
|
||||
.orderByDesc(MaterialPlanBoomDO::getId)
|
||||
.disableSubLogicDel()
|
||||
;
|
||||
|
@ -5,9 +5,14 @@ import java.util.*;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo.OrderYsPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyf.OrderYfDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderys.OrderYsDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.*;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 应付记录 Mapper
|
||||
@ -18,16 +23,34 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.*;
|
||||
public interface OrderYfMapper extends BaseMapperX<OrderYfDO> {
|
||||
|
||||
default PageResult<OrderYfDO> selectPage(OrderYfPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<OrderYfDO>()
|
||||
.betweenIfPresent(OrderYfDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(OrderYfDO::getCgOrderNum, reqVO.getCgOrderNum())
|
||||
.betweenIfPresent(OrderYfDO::getCgTime, reqVO.getCgTime())
|
||||
.likeIfPresent(OrderYfDO::getCgGysname, reqVO.getCgGysname())
|
||||
.eqIfPresent(OrderYfDO::getCgYf, reqVO.getCgYf())
|
||||
.eqIfPresent(OrderYfDO::getCgYifu, reqVO.getCgYifu())
|
||||
.eqIfPresent(OrderYfDO::getCgTypee, reqVO.getCgTypee())
|
||||
.eqIfPresent(OrderYfDO::getRem, reqVO.getRem())
|
||||
.orderByDesc(OrderYfDO::getId));
|
||||
|
||||
MPJLambdaWrapper<OrderYfDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(OrderYfDO.class)
|
||||
.select("sum(i.amount) as amount")
|
||||
.leftJoin(
|
||||
"finance_invoice i ON i.order_code = t.cg_order_num AND i.business_type = 'FINANCE_RECEIVE_INVOICE' AND i.status !='3'")
|
||||
.disableSubLogicDel()
|
||||
.groupBy(OrderYfDO::getId)
|
||||
.orderByDesc(OrderYfDO::getCreateTime);
|
||||
|
||||
query.like(!StringUtils.isEmpty(reqVO.getCgOrderNum()), OrderYfDO::getCgOrderNum, reqVO.getCgOrderNum())
|
||||
.like(!StringUtils.isEmpty(reqVO.getCgGysname()), OrderYfDO::getCgGysname, reqVO.getCgGysname())
|
||||
.eq(!StringUtils.isEmpty(reqVO.getCgTypee()), OrderYfDO::getCgTypee, reqVO.getCgTypee());
|
||||
|
||||
return selectPage(reqVO, query);
|
||||
|
||||
}
|
||||
|
||||
default OrderYfDO selectOrderYfId(Integer id){
|
||||
MPJLambdaWrapper<OrderYfDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(OrderYfDO.class)
|
||||
.select("sum(i.amount) as amount")
|
||||
.leftJoin(
|
||||
"finance_invoice i ON i.order_code = t.cg_order_num AND i.business_type = 'FINANCE_RECEIVE_INVOICE' AND i.status !='3'")
|
||||
.disableSubLogicDel();
|
||||
query
|
||||
.eq( OrderYsDO::getId, id);
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.orderyfdetail;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyfdetail.OrderYfDetailDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyfdetail.vo.*;
|
||||
|
||||
/**
|
||||
* 应收明细 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderYfDetailMapper extends BaseMapperX<OrderYfDetailDO> {
|
||||
|
||||
default PageResult<OrderYfDetailDO> selectPage(OrderYfDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<OrderYfDetailDO>()
|
||||
.betweenIfPresent(OrderYfDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(OrderYfDetailDO::getCgYifu, reqVO.getCgYifu())
|
||||
.eqIfPresent(OrderYfDetailDO::getRem, reqVO.getRem())
|
||||
.betweenIfPresent(OrderYfDetailDO::getPaymentDate, reqVO.getPaymentDate())
|
||||
.eqIfPresent(OrderYfDetailDO::getCgId, reqVO.getCgId())
|
||||
.orderByDesc(OrderYfDetailDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -201,7 +201,7 @@ public interface ProcessBomDetailMapper extends BaseMapperX<ProcessBomDetailDO>
|
||||
.select( "c.brief as customerName", "b.project_name as projectName","b.project_name_sim as projectNameSim")
|
||||
.select("d.name as projectSubName,d.id as projectSubId,d.name_sim as nameSim,f.name as compositionName")
|
||||
.select("b.id as projectId,g.plan_id as planId,c.id as customerId")
|
||||
.select("u.nickname as nickname")
|
||||
.select("u.nickname as nickname,t.amount*d.amount as amounts")
|
||||
.select("DATE_FORMAT(p.boom_arrive_date, '%Y-%m-%d') AS boomArriveDates")
|
||||
.select("p.boom_arrive_date as boomArriveDate,p.du_emp_id as duEmpId,h.project_material_plan_no as projectMaterialPlanNo")
|
||||
.leftJoin(ProcessBomDO.class,"g",ProcessBomDO::getId,ProcessBomDetailDO::getBomId)
|
||||
|
@ -0,0 +1,61 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseorderno;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.supplier.SupplierDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.*;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 采购订单主 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface PurchaseOrderNoMapper extends BaseMapperX<PurchaseOrderNoDO> {
|
||||
|
||||
default PageResult<PurchaseOrderNoDO> selectPage(PurchaseOrderNoPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PurchaseOrderNoDO>()
|
||||
.eqIfPresent(PurchaseOrderNoDO::getPurchaseNo, reqVO.getPurchaseNo())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getPurchaseType, reqVO.getPurchaseType())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getGoodsType, reqVO.getGoodsType())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getEstimatedPrice, reqVO.getEstimatedPrice())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getActualPrice, reqVO.getActualPrice())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getSubmitUserId, reqVO.getSubmitUserId())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getSubmitTime, reqVO.getSubmitTime())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getAuditor, reqVO.getAuditor())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getAuditTime, reqVO.getAuditTime())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getDescription, reqVO.getDescription())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getSupplierId, reqVO.getSupplierId())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getIsPrint, reqVO.getIsPrint())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getPrintDtime, reqVO.getPrintDtime())
|
||||
.betweenIfPresent(PurchaseOrderNoDO::getOrdDate, reqVO.getOrdDate())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getReceivingStatus, reqVO.getReceivingStatus())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getCurrencyType, reqVO.getCurrencyType())
|
||||
.eqIfPresent(PurchaseOrderNoDO::getTaxRatio, reqVO.getTaxRatio())
|
||||
.orderByDesc(PurchaseOrderNoDO::getId));
|
||||
}
|
||||
|
||||
default PageResult<PurchaseOrderNoDO> getPurchaseOrderPage(PurchaseOrderNoPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<PurchaseOrderNoDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(PurchaseOrderNoDO.class)
|
||||
.select("s.name as supplierName")
|
||||
.leftJoin(SupplierDO.class, "s", SupplierDO::getId, PurchaseOrderNoDO::getSupplierId)
|
||||
.orderByDesc(PurchaseOrderNoDO::getCreateTime);
|
||||
query.like(!StringUtils.isEmpty(pageReqVO.getPurchaseNo()), PurchaseOrderNoDO::getPurchaseNo, pageReqVO.getPurchaseNo())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getSupplierName()), "s.name", pageReqVO.getSupplierName())
|
||||
.eq(pageReqVO.getGoodsType() != null, PurchaseOrderNoDO::getGoodsType, pageReqVO.getGoodsType());
|
||||
return selectPage(pageReqVO, query);
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordernodetail;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail.vo.*;
|
||||
|
||||
/**
|
||||
* 采购订单明细 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface PurchaseOrderNoDetailMapper extends BaseMapperX<PurchaseOrderNoDetailDO> {
|
||||
|
||||
default PageResult<PurchaseOrderNoDetailDO> selectPage(PurchaseOrderNoDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PurchaseOrderNoDetailDO>()
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getPurchaseOrderId, reqVO.getPurchaseOrderId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBoomDetailId, reqVO.getBoomDetailId())
|
||||
.likeIfPresent(PurchaseOrderNoDetailDO::getBoomName, reqVO.getBoomName())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBoomSpec, reqVO.getBoomSpec())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBoomUnit, reqVO.getBoomUnit())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getComposition, reqVO.getComposition())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getPurchaseAmount, reqVO.getPurchaseAmount())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getEstimatedPrice, reqVO.getEstimatedPrice())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getActualPrice, reqVO.getActualPrice())
|
||||
.betweenIfPresent(PurchaseOrderNoDetailDO::getArriveTime, reqVO.getArriveTime())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getDescription, reqVO.getDescription())
|
||||
.betweenIfPresent(PurchaseOrderNoDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBoomAmount, reqVO.getBoomAmount())
|
||||
.betweenIfPresent(PurchaseOrderNoDetailDO::getRequireTime, reqVO.getRequireTime())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectMaterialPlanId, reqVO.getProjectMaterialPlanId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectMaterialPlanBoomId, reqVO.getProjectMaterialPlanBoomId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectPlanSubId, reqVO.getProjectPlanSubId())
|
||||
.likeIfPresent(PurchaseOrderNoDetailDO::getName, reqVO.getName())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getNameSim, reqVO.getNameSim())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectId, reqVO.getProjectId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectPlanId, reqVO.getProjectPlanId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getCustomerId, reqVO.getCustomerId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getBrief, reqVO.getBrief())
|
||||
.likeIfPresent(PurchaseOrderNoDetailDO::getProjectName, reqVO.getProjectName())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getProjectNameSim, reqVO.getProjectNameSim())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getMaterialId, reqVO.getMaterialId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getReceivingStatus, reqVO.getReceivingStatus())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getStorageId, reqVO.getStorageId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getStorageMatId, reqVO.getStorageMatId())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getPurchaseRemAmount, reqVO.getPurchaseRemAmount())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getTheWeight, reqVO.getTheWeight())
|
||||
.eqIfPresent(PurchaseOrderNoDetailDO::getDuEmpId, reqVO.getDuEmpId())
|
||||
.orderByDesc(PurchaseOrderNoDetailDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -683,9 +683,9 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
default PageResult<TaskDispatchDetailDO> getPartPage(MaterialPlanPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(TaskDispatchDetailDO.class)
|
||||
.select("f.name as compositionName,g.name as procedureName,d.amount as boomAmount")
|
||||
.select("f.name as compositionName,g.name as procedureName,t.amount as boomAmount")
|
||||
.select("b.project_name_sim as projectNameSim,c.name_sim as nameSim")
|
||||
.select("b.id as projectId,i.plan_id as planId,c.id as customerId,d.id as bomDetailId")
|
||||
.select("b.id as projectId,i.plan_id as planId,e.id as customerId,d.id as bomDetailId")
|
||||
.select( "b.project_name as projectName", "c.name as projectSubName")
|
||||
.select("d.material_name as materialName,DATE_FORMAT(p.boom_arrive_date, '%Y-%m-%d') AS boomArriveDates")
|
||||
.select("e.brief as customerName,u.nickname as nickname,c.id as projectSubId")
|
||||
|
@ -56,4 +56,6 @@ public interface InvoiceService {
|
||||
Long operate(InvoiceSaveReqVO operateReqVO);
|
||||
|
||||
List<InvoiceDO> getOrderYsInvoice(String code);
|
||||
|
||||
List<InvoiceDO> getOrderYfInvoice(String code);
|
||||
}
|
||||
|
@ -113,4 +113,12 @@ public class InvoiceServiceImpl implements InvoiceService {
|
||||
return invoiceMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InvoiceDO> getOrderYfInvoice(String code) {
|
||||
LambdaQueryWrapper<InvoiceDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(InvoiceDO::getOrderCode, code);
|
||||
wrapper.ne(InvoiceDO::getStatus, InvoiceStatusEnum.CANCEL.getCode());
|
||||
return invoiceMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -287,6 +287,7 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
|
||||
boomDO.setMatName(taskDispatchDetailDO.getMaterialName());
|
||||
boomDO.setDuEmpId(taskDispatchDetailDO.getDuEmpId());
|
||||
boomDO.setProjectPlanSubId(taskDispatchDetailDO.getProjectSubId());
|
||||
boomDO.setProcedureId(taskDispatchDetailDO.getProcedureId());
|
||||
boomDO.setMplanStatus(0);
|
||||
boomDO.setMatWeight(taskDispatchDetailDO.getMatWeight());
|
||||
boomDO.setDescription(taskDispatchDetailDO.getDescription());
|
||||
|
@ -1,5 +1,8 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.orderyf;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyfdetail.OrderYfDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.orderyfdetail.OrderYfDetailMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -7,6 +10,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyf.OrderYfDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
@ -29,6 +34,8 @@ public class OrderYfServiceImpl implements OrderYfService {
|
||||
|
||||
@Resource
|
||||
private OrderYfMapper orderYfMapper;
|
||||
@Resource
|
||||
private OrderYfDetailMapper orderYfDetailMapper;
|
||||
|
||||
@Override
|
||||
public Integer createOrderYf(OrderYfSaveReqVO createReqVO) {
|
||||
@ -46,11 +53,21 @@ public class OrderYfServiceImpl implements OrderYfService {
|
||||
// 更新
|
||||
OrderYfDO updateObj = BeanUtils.toBean(updateReqVO, OrderYfDO.class);
|
||||
|
||||
if(updateObj.getCgYifu().compareTo(updateReqVO.getCgYf())>=0){
|
||||
updateObj.setCgTypee(2);
|
||||
}
|
||||
// if(updateObj.getCgYifu().compareTo(updateReqVO.getCgYf())>=0){
|
||||
// updateObj.setCgTypee(2);
|
||||
// }
|
||||
|
||||
orderYfMapper.updateById(updateObj);
|
||||
this.createOrUpdateOrderYfDetails(updateReqVO.getOrderYfDetails());
|
||||
|
||||
}
|
||||
private void createOrUpdateOrderYfDetails(List<OrderYfDetailDO> orderYfDetails) {
|
||||
// 分组更新与插入
|
||||
List<OrderYfDetailDO> updateList = orderYfDetails.stream().filter(o -> o.getId() != null).collect(Collectors.toList());
|
||||
List<OrderYfDetailDO> insertList = orderYfDetails.stream().filter(o -> o.getId() == null).collect(Collectors.toList());
|
||||
|
||||
if(!updateList.isEmpty()) orderYfDetailMapper.updateBatch(updateList);
|
||||
if(!insertList.isEmpty()) orderYfDetailMapper.insertBatch(insertList);
|
||||
}
|
||||
|
||||
public void createCg(OrderYfSaveReqVO createReqVO){
|
||||
@ -75,7 +92,7 @@ public class OrderYfServiceImpl implements OrderYfService {
|
||||
|
||||
@Override
|
||||
public OrderYfDO getOrderYf(Integer id) {
|
||||
return orderYfMapper.selectById(id);
|
||||
return orderYfMapper.selectOrderYfId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,56 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.orderyfdetail;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyfdetail.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyfdetail.OrderYfDetailDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 应收明细 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface OrderYfDetailService {
|
||||
|
||||
/**
|
||||
* 创建应收明细
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createOrderYfDetail(@Valid OrderYfDetailSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新应收明细
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateOrderYfDetail(@Valid OrderYfDetailSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除应收明细
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteOrderYfDetail(Integer id);
|
||||
|
||||
/**
|
||||
* 获得应收明细
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 应收明细
|
||||
*/
|
||||
OrderYfDetailDO getOrderYfDetail(Integer id);
|
||||
|
||||
/**
|
||||
* 获得应收明细分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 应收明细分页
|
||||
*/
|
||||
PageResult<OrderYfDetailDO> getOrderYfDetailPage(OrderYfDetailPageReqVO pageReqVO);
|
||||
|
||||
List<OrderYfDetailDO> getOrderYfDetails(Integer id);
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.orderyfdetail;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyfdetail.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyfdetail.OrderYfDetailDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.orderyfdetail.OrderYfDetailMapper;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 应收明细 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class OrderYfDetailServiceImpl implements OrderYfDetailService {
|
||||
|
||||
@Resource
|
||||
private OrderYfDetailMapper orderYfDetailMapper;
|
||||
|
||||
@Override
|
||||
public Integer createOrderYfDetail(OrderYfDetailSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
OrderYfDetailDO orderYfDetail = BeanUtils.toBean(createReqVO, OrderYfDetailDO.class);
|
||||
orderYfDetailMapper.insert(orderYfDetail);
|
||||
// 返回
|
||||
return orderYfDetail.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOrderYfDetail(OrderYfDetailSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateOrderYfDetailExists(updateReqVO.getId());
|
||||
// 更新
|
||||
OrderYfDetailDO updateObj = BeanUtils.toBean(updateReqVO, OrderYfDetailDO.class);
|
||||
orderYfDetailMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteOrderYfDetail(Integer id) {
|
||||
// 校验存在
|
||||
validateOrderYfDetailExists(id);
|
||||
// 删除
|
||||
orderYfDetailMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateOrderYfDetailExists(Integer id) {
|
||||
if (orderYfDetailMapper.selectById(id) == null) {
|
||||
// throw exception(ORDER_YF_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderYfDetailDO getOrderYfDetail(Integer id) {
|
||||
return orderYfDetailMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<OrderYfDetailDO> getOrderYfDetailPage(OrderYfDetailPageReqVO pageReqVO) {
|
||||
return orderYfDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderYfDetailDO> getOrderYfDetails(Integer id) {
|
||||
LambdaQueryWrapper<OrderYfDetailDO> eq = new LambdaQueryWrapper<OrderYfDetailDO>().eq(OrderYfDetailDO::getCgId, id);
|
||||
return orderYfDetailMapper.selectList(eq); }
|
||||
|
||||
}
|
@ -1036,12 +1036,11 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
||||
MaterialPlanBoomDO boomDO = new MaterialPlanBoomDO();
|
||||
boomDO.setProjectMaterialPlanId(planDO.getId());
|
||||
boomDO.setBoomDetailId(processBomDetailDO.getId());
|
||||
boomDO.setBoomAmount(new BigDecimal(processBomDetailDO.getAmount()));
|
||||
boomDO.setBoomAmount(new BigDecimal(processBomDetailDO.getAmounts()));
|
||||
boomDO.setBoomArriveDate(processBomDetailDO.getBoomArriveDate());
|
||||
boomDO.setMatName(processBomDetailDO.getMaterialName());
|
||||
boomDO.setDuEmpId(processBomDetailDO.getDuEmpId());
|
||||
boomDO.setProjectPlanSubId(processBomDetailDO.getProjectSubId());
|
||||
boomDO.setMaterialId(processBomDetailDO.getMaterialId());
|
||||
boomDO.setMplanStatus(0);
|
||||
materialPlanBoomDOList.add(boomDO);
|
||||
processBomDetailDO.setMplanDate(processBomDetailDO.getBoomArriveDate());
|
||||
|
@ -0,0 +1,56 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.purchaseorderno;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 采购订单主 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface PurchaseOrderNoService {
|
||||
|
||||
/**
|
||||
* 创建采购订单主
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createPurchaseOrderNo(@Valid PurchaseOrderNoSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新采购订单主
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatePurchaseOrderNo(@Valid PurchaseOrderNoSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除采购订单主
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePurchaseOrderNo(Long id);
|
||||
|
||||
/**
|
||||
* 获得采购订单主
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 采购订单主
|
||||
*/
|
||||
PurchaseOrderNoDO getPurchaseOrderNo(Long id);
|
||||
|
||||
/**
|
||||
* 获得采购订单主分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 采购订单主分页
|
||||
*/
|
||||
PageResult<PurchaseOrderNoDO> getPurchaseOrderNoPage(PurchaseOrderNoPageReqVO pageReqVO);
|
||||
|
||||
PageResult<PurchaseOrderNoDO> getPurchaseOrderPage(PurchaseOrderNoPageReqVO pageReqVO);
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.purchaseorderno;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseorderno.PurchaseOrderNoMapper;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 采购订单主 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PurchaseOrderNoServiceImpl implements PurchaseOrderNoService {
|
||||
|
||||
@Resource
|
||||
private PurchaseOrderNoMapper purchaseOrderNoMapper;
|
||||
|
||||
@Override
|
||||
public Long createPurchaseOrderNo(PurchaseOrderNoSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
PurchaseOrderNoDO purchaseOrderNo = BeanUtils.toBean(createReqVO, PurchaseOrderNoDO.class);
|
||||
purchaseOrderNoMapper.insert(purchaseOrderNo);
|
||||
// 返回
|
||||
return purchaseOrderNo.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePurchaseOrderNo(PurchaseOrderNoSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validatePurchaseOrderNoExists(updateReqVO.getId());
|
||||
// 更新
|
||||
PurchaseOrderNoDO updateObj = BeanUtils.toBean(updateReqVO, PurchaseOrderNoDO.class);
|
||||
purchaseOrderNoMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePurchaseOrderNo(Long id) {
|
||||
// 校验存在
|
||||
validatePurchaseOrderNoExists(id);
|
||||
// 删除
|
||||
purchaseOrderNoMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validatePurchaseOrderNoExists(Long id) {
|
||||
if (purchaseOrderNoMapper.selectById(id) == null) {
|
||||
// throw exception(PURCHASE_ORDER_NO_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrderNoDO getPurchaseOrderNo(Long id) {
|
||||
return purchaseOrderNoMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PurchaseOrderNoDO> getPurchaseOrderNoPage(PurchaseOrderNoPageReqVO pageReqVO) {
|
||||
return purchaseOrderNoMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PurchaseOrderNoDO> getPurchaseOrderPage(PurchaseOrderNoPageReqVO pageReqVO) {
|
||||
return purchaseOrderNoMapper.getPurchaseOrderPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.purchaseordernodetail;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 采购订单明细 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface PurchaseOrderNoDetailService {
|
||||
|
||||
/**
|
||||
* 创建采购订单明细
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createPurchaseOrderNoDetail(@Valid PurchaseOrderNoDetailSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新采购订单明细
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatePurchaseOrderNoDetail(@Valid PurchaseOrderNoDetailSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除采购订单明细
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePurchaseOrderNoDetail(Long id);
|
||||
|
||||
/**
|
||||
* 获得采购订单明细
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 采购订单明细
|
||||
*/
|
||||
PurchaseOrderNoDetailDO getPurchaseOrderNoDetail(Long id);
|
||||
|
||||
/**
|
||||
* 获得采购订单明细分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 采购订单明细分页
|
||||
*/
|
||||
PageResult<PurchaseOrderNoDetailDO> getPurchaseOrderNoDetailPage(PurchaseOrderNoDetailPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.purchaseordernodetail;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordernodetail.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordernodetail.PurchaseOrderNoDetailMapper;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 采购订单明细 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PurchaseOrderNoDetailServiceImpl implements PurchaseOrderNoDetailService {
|
||||
|
||||
@Resource
|
||||
private PurchaseOrderNoDetailMapper purchaseOrderNoDetailMapper;
|
||||
|
||||
@Override
|
||||
public Long createPurchaseOrderNoDetail(PurchaseOrderNoDetailSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
PurchaseOrderNoDetailDO purchaseOrderNoDetail = BeanUtils.toBean(createReqVO, PurchaseOrderNoDetailDO.class);
|
||||
purchaseOrderNoDetailMapper.insert(purchaseOrderNoDetail);
|
||||
// 返回
|
||||
return purchaseOrderNoDetail.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePurchaseOrderNoDetail(PurchaseOrderNoDetailSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validatePurchaseOrderNoDetailExists(updateReqVO.getId());
|
||||
// 更新
|
||||
PurchaseOrderNoDetailDO updateObj = BeanUtils.toBean(updateReqVO, PurchaseOrderNoDetailDO.class);
|
||||
purchaseOrderNoDetailMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePurchaseOrderNoDetail(Long id) {
|
||||
// 校验存在
|
||||
validatePurchaseOrderNoDetailExists(id);
|
||||
// 删除
|
||||
purchaseOrderNoDetailMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validatePurchaseOrderNoDetailExists(Long id) {
|
||||
if (purchaseOrderNoDetailMapper.selectById(id) == null) {
|
||||
// throw exception(PURCHASE_ORDER_NO_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrderNoDetailDO getPurchaseOrderNoDetail(Long id) {
|
||||
return purchaseOrderNoDetailMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PurchaseOrderNoDetailDO> getPurchaseOrderNoDetailPage(PurchaseOrderNoDetailPageReqVO pageReqVO) {
|
||||
return purchaseOrderNoDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chanko.yunxi.mes.module.heli.dal.mysql.orderyfdetail.OrderYfDetailMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chanko.yunxi.mes.module.project.dal.mysql.purchaseorderno.PurchaseOrderNoMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chanko.yunxi.mes.module.project.dal.mysql.purchaseordernodetail.PurchaseOrderNoDetailMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -6,6 +6,7 @@ import com.chanko.yunxi.mes.framework.common.enums.CommonStatusEnum;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||
import com.chanko.yunxi.mes.module.system.controller.admin.user.vo.user.*;
|
||||
@ -104,7 +105,20 @@ public class UserController {
|
||||
return success(new PageResult<>(UserConvert.INSTANCE.convertList(pageResult.getList(), deptMap),
|
||||
pageResult.getTotal()));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
@Operation(summary = "获得全部用户列表")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:list')")
|
||||
public CommonResult<List<UserRespVO>> all() {
|
||||
// 获得用户分页列表
|
||||
List<AdminUserDO> list = userService.getList();
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return success(BeanUtils.toBean(list, UserRespVO.class));
|
||||
}
|
||||
// 拼接数据
|
||||
Map<Long, DeptDO> deptMap = deptService.getDeptMap(
|
||||
convertList(list, AdminUserDO::getDeptId));
|
||||
return success(UserConvert.INSTANCE.convertList(list, deptMap));
|
||||
}
|
||||
@GetMapping({"/list-all-simple", "/simple-list"})
|
||||
@Operation(summary = "获取用户精简信息列表", description = "只包含被开启的用户,主要用于前端的下拉选项")
|
||||
public CommonResult<List<UserSimpleRespVO>> getSimpleUserList() {
|
||||
|
@ -204,4 +204,6 @@ public interface AdminUserService {
|
||||
boolean isPasswordMatch(String rawPassword, String encodedPassword);
|
||||
|
||||
List<AdminUserDO> getUserListByDeptName(String name);
|
||||
|
||||
List<AdminUserDO> getList();
|
||||
}
|
||||
|
@ -453,6 +453,14 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
return userMapper.getUserListByDeptName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdminUserDO> getList() {
|
||||
LambdaQueryWrapper<AdminUserDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(AdminUserDO::getStatus, CommonStatusEnum.ENABLE.getStatus());
|
||||
wrapper.eq(AdminUserDO::getDeleted, 0);
|
||||
return userMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对密码进行加密
|
||||
*
|
||||
|
@ -55,3 +55,7 @@ export async function operateInvoice(data: InvoiceVO) {
|
||||
export const getOrderYsInvoice = async (code: string) => {
|
||||
return await request.get({ url: `/heli/invoice/getOrderYsInvoice?code=` + code })
|
||||
}
|
||||
// 查询应收记录详情
|
||||
export const getOrderYfInvoice = async (code: string) => {
|
||||
return await request.get({ url: `/heli/invoice/getOrderYfInvoice?code=` + code })
|
||||
}
|
||||
|
@ -1,42 +1,48 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface OrderYfVO {
|
||||
id: number
|
||||
cgOrderNum: string
|
||||
cgTime: Date
|
||||
cgGysname: string
|
||||
cgYf: number
|
||||
cgYifu: number
|
||||
cgTypee: number
|
||||
rem: string
|
||||
}
|
||||
|
||||
// 查询应付记录分页
|
||||
export const getOrderYfPage = async (params) => {
|
||||
return await request.get({ url: `/heli/order-yf/page`, params })
|
||||
}
|
||||
|
||||
// 查询应付记录详情
|
||||
export const getOrderYf = async (id: number) => {
|
||||
return await request.get({ url: `/heli/order-yf/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增应付记录
|
||||
export const createOrderYf = async (data: OrderYfVO) => {
|
||||
return await request.post({ url: `/heli/order-yf/create`, data })
|
||||
}
|
||||
|
||||
// 修改应付记录
|
||||
export const updateOrderYf = async (data: OrderYfVO) => {
|
||||
return await request.put({ url: `/heli/order-yf/update`, data })
|
||||
}
|
||||
|
||||
// 删除应付记录
|
||||
export const deleteOrderYf = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/order-yf/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出应付记录 Excel
|
||||
export const exportOrderYf = async (params) => {
|
||||
return await request.download({ url: `/heli/order-yf/export-excel`, params })
|
||||
}
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface OrderYfVO {
|
||||
id: number
|
||||
cgOrderNum: string
|
||||
cgTime: Date
|
||||
cgGysname: string
|
||||
cgYf: number
|
||||
cgYifu: number
|
||||
cgTypee: number
|
||||
rem: string
|
||||
orderYfDetails:any[];
|
||||
|
||||
}
|
||||
|
||||
// 查询应付记录分页
|
||||
export const getOrderYfPage = async (params) => {
|
||||
return await request.get({ url: `/heli/order-yf/page`, params })
|
||||
}
|
||||
|
||||
// 查询应付记录详情
|
||||
export const getOrderYf = async (id: number) => {
|
||||
return await request.get({ url: `/heli/order-yf/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增应付记录
|
||||
export const createOrderYf = async (data: OrderYfVO) => {
|
||||
return await request.post({ url: `/heli/order-yf/create`, data })
|
||||
}
|
||||
|
||||
// 修改应付记录
|
||||
export const updateOrderYf = async (data: OrderYfVO) => {
|
||||
return await request.put({ url: `/heli/order-yf/update`, data })
|
||||
}
|
||||
|
||||
// 删除应付记录
|
||||
export const deleteOrderYf = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/order-yf/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出应付记录 Excel
|
||||
export const exportOrderYf = async (params) => {
|
||||
return await request.download({ url: `/heli/order-yf/export-excel`, params })
|
||||
}
|
||||
// 查询根据应付id查询应收记录表明细
|
||||
export const getOrderYfDetails = async (id: number) => {
|
||||
return await request.get({ url: `/heli/order-ys-detail/getOrderYfDetails?id=` + id })
|
||||
}
|
||||
|
43
mes-ui/mes-ui-admin-vue3/src/api/heli/orderyfdetail/index.ts
Normal file
43
mes-ui/mes-ui-admin-vue3/src/api/heli/orderyfdetail/index.ts
Normal file
@ -0,0 +1,43 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface OrderYfDetailVO {
|
||||
id: number
|
||||
cgYishou: number
|
||||
rem: string
|
||||
paymentDate: localdate
|
||||
cgId: number
|
||||
}
|
||||
|
||||
// 查询应收明细分页
|
||||
export const getOrderYfDetailPage = async (params) => {
|
||||
return await request.get({ url: `/heli/order-yf-detail/page`, params })
|
||||
}
|
||||
|
||||
// 查询应收明细详情
|
||||
export const getOrderYfDetail = async (id: number) => {
|
||||
return await request.get({ url: `/heli/order-yf-detail/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增应收明细
|
||||
export const createOrderYfDetail = async (data: OrderYfDetailVO) => {
|
||||
return await request.post({ url: `/heli/order-yf-detail/create`, data })
|
||||
}
|
||||
|
||||
// 修改应收明细
|
||||
export const updateOrderYfDetail = async (data: OrderYfDetailVO) => {
|
||||
return await request.put({ url: `/heli/order-yf-detail/update`, data })
|
||||
}
|
||||
|
||||
// 删除应收明细
|
||||
export const deleteOrderYfDetail = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/order-yf-detail/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出应收明细 Excel
|
||||
export const exportOrderYfDetail = async (params) => {
|
||||
return await request.download({ url: `/heli/order-yf-detail/export-excel`, params })
|
||||
}
|
||||
// 查询根据应付id查询应收记录表明细
|
||||
export const getOrderYfDetails = async (id: number) => {
|
||||
return await request.get({ url: `/heli/order-yf-detail/getOrderYfDetails?id=` + id })
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface PurchaseOrderNoVO {
|
||||
id: number
|
||||
purchaseNo: string
|
||||
purchaseType: boolean
|
||||
goodsType: boolean
|
||||
estimatedPrice: number
|
||||
actualPrice: number
|
||||
status: boolean
|
||||
submitUserId: number
|
||||
submitTime: Date
|
||||
auditor: number
|
||||
auditTime: Date
|
||||
description: string
|
||||
supplierId: number
|
||||
isPrint: string
|
||||
printDtime: Date
|
||||
ordDate: Date
|
||||
receivingStatus: boolean
|
||||
currencyType: number
|
||||
taxRatio: number
|
||||
}
|
||||
|
||||
// 查询采购订单主分页
|
||||
export const getPurchaseOrderNoPage = async (params) => {
|
||||
return await request.get({ url: `/heli/purchase-order-no/page`, params })
|
||||
}
|
||||
|
||||
// 查询采购订单主详情
|
||||
export const getPurchaseOrderNo = async (id: number) => {
|
||||
return await request.get({ url: `/heli/purchase-order-no/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增采购订单主
|
||||
export const createPurchaseOrderNo = async (data: PurchaseOrderNoVO) => {
|
||||
return await request.post({ url: `/heli/purchase-order-no/create`, data })
|
||||
}
|
||||
|
||||
// 修改采购订单主
|
||||
export const updatePurchaseOrderNo = async (data: PurchaseOrderNoVO) => {
|
||||
return await request.put({ url: `/heli/purchase-order-no/update`, data })
|
||||
}
|
||||
|
||||
// 删除采购订单主
|
||||
export const deletePurchaseOrderNo = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/purchase-order-no/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出采购订单主 Excel
|
||||
export const exportPurchaseOrderNo = async (params) => {
|
||||
return await request.download({ url: `/heli/purchase-order-no/export-excel`, params })
|
||||
}
|
||||
// 查询采购订单分页
|
||||
export const getPurchaseOrderPage = async (params) => {
|
||||
return await request.get({ url: `/heli/purchase-order-no/getPurchaseOrderPage`, params })
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface PurchaseOrderNoDetailVO {
|
||||
id: number
|
||||
purchaseOrderId: number
|
||||
boomDetailId: number
|
||||
boomName: string
|
||||
boomSpec: string
|
||||
boomUnit: string
|
||||
composition: string
|
||||
purchaseAmount: number
|
||||
estimatedPrice: number
|
||||
actualPrice: number
|
||||
arriveTime: Date
|
||||
description: string
|
||||
boomAmount: number
|
||||
requireTime: Date
|
||||
projectMaterialPlanId: number
|
||||
projectMaterialPlanBoomId: number
|
||||
projectPlanSubId: number
|
||||
name: string
|
||||
nameSim: string
|
||||
projectId: number
|
||||
projectPlanId: number
|
||||
customerId: number
|
||||
brief: string
|
||||
projectName: string
|
||||
projectNameSim: string
|
||||
materialId: number
|
||||
receivingStatus: boolean
|
||||
storageId: number
|
||||
storageMatId: number
|
||||
purchaseRemAmount: number
|
||||
theWeight: number
|
||||
duEmpId: number
|
||||
}
|
||||
|
||||
// 查询采购订单明细分页
|
||||
export const getPurchaseOrderNoDetailPage = async (params) => {
|
||||
return await request.get({ url: `/heli/purchase-order-no-detail/page`, params })
|
||||
}
|
||||
|
||||
// 查询采购订单明细详情
|
||||
export const getPurchaseOrderNoDetail = async (id: number) => {
|
||||
return await request.get({ url: `/heli/purchase-order-no-detail/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增采购订单明细
|
||||
export const createPurchaseOrderNoDetail = async (data: PurchaseOrderNoDetailVO) => {
|
||||
return await request.post({ url: `/heli/purchase-order-no-detail/create`, data })
|
||||
}
|
||||
|
||||
// 修改采购订单明细
|
||||
export const updatePurchaseOrderNoDetail = async (data: PurchaseOrderNoDetailVO) => {
|
||||
return await request.put({ url: `/heli/purchase-order-no-detail/update`, data })
|
||||
}
|
||||
|
||||
// 删除采购订单明细
|
||||
export const deletePurchaseOrderNoDetail = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/purchase-order-no-detail/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出采购订单明细 Excel
|
||||
export const exportPurchaseOrderNoDetail = async (params) => {
|
||||
return await request.download({ url: `/heli/purchase-order-no-detail/export-excel`, params })
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" width="80%" v-model="dialogVisible" center>
|
||||
<Dialog :title="dialogTitle" width="60%" v-model="dialogVisible" center>
|
||||
<ContentWrap class="borderxx">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="108px">
|
||||
@ -30,21 +30,21 @@
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table" @selection-change="handleCurrentChange" @row-click="clickRow" highlight-current-row ref="singleTable" selection>
|
||||
<el-table-column fixed type="selection" width="40" />
|
||||
<el-table-column label="序号" type="index" width="100" />
|
||||
<el-table-column label="采购订单号" align="center" prop="purchaseNo" width="240" />
|
||||
<el-table-column label="序号" type="index" width="70" />
|
||||
<el-table-column label="采购订单号" align="center" prop="purchaseNo" width="180" />
|
||||
<el-table-column label="供应商" align="center" prop="supplierName" width="220" />
|
||||
<el-table-column label="采购单类型" align="center" prop="purchaseType" min-width="210">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PURCHASE_ORDER_TYPE" :value="scope.row.purchaseType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购物类型" align="center" prop="goodsType" width="240">
|
||||
<el-table-column label="采购物类型" align="center" prop="goodsType" width="120">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_PROJECT_PURCHASE_GOODS_TYPE" :value="scope.row.goodsType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="暂估价金额(元)" align="center" prop="estimatedPrice" min-width="180" />
|
||||
<el-table-column label="实际价金额(元)" align="center" prop="actualPrice" min-width="180" />
|
||||
<!-- <el-table-column label="暂估价金额(元)" align="center" prop="estimatedPrice" min-width="180" />-->
|
||||
<!-- <el-table-column label="实际价金额(元)" align="center" prop="actualPrice" min-width="180" />-->
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
@ -58,7 +58,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import * as PurchaseOrderApi from '@/api/heli/purchaseorder'
|
||||
import * as PurchaseOrderNoApi from '@/api/heli/purchaseorderno'
|
||||
|
||||
import { ref } from 'vue'
|
||||
import { ElTable } from 'element-plus'
|
||||
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
|
||||
@ -85,7 +86,7 @@ const queryFormRef = ref() // 搜索的表单
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await PurchaseOrderApi.getPurchaseOrderPage(queryParams)
|
||||
const data = await PurchaseOrderNoApi.getPurchaseOrderPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
|
@ -47,6 +47,8 @@
|
||||
<el-card class="hl-card-info">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">零件明细</span>
|
||||
<el-button style="margin-left: 20px" @click="singleSubmissions()" type="success" size="large">全部提交</el-button>
|
||||
<el-button style="margin-left: 20px" @click="withdraw()" type="danger" size="large">撤回</el-button>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
@ -64,7 +66,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" min-width="180" />
|
||||
<el-table-column label="子项目名称" align="center" prop="projectSubName" min-width="180" />
|
||||
<el-table-column label="客户简码" align="center" prop="customerName" min-width="150" />
|
||||
<el-table-column label="客户简码" align="center" prop="customerName" min-width="100" />
|
||||
<el-table-column label="零件名称" align="center" prop="materialName" min-width="180" />
|
||||
<el-table-column label="材质" align="center" prop="compositionName" min-width="120" />
|
||||
<el-table-column label="数量" align="center" prop="boomAmount" min-width="120" />
|
||||
@ -117,8 +119,7 @@
|
||||
</el-row>
|
||||
</el-card>
|
||||
<div class="hl-footer text-center">
|
||||
<el-button @click="submitForm()" type="success" size="large">全部提交</el-button>
|
||||
<el-button style="margin-left: 20px" @click="withdraw()" type="danger" size="large">撤回</el-button>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -126,9 +127,8 @@
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import download from '@/utils/download'
|
||||
import * as ProcessBomApi from '@/api/heli/processbom'
|
||||
import { useCommonStateWithOut } from '@/store/modules/common'
|
||||
import UserSelect from "@/views/heli/hlvuestyle/userSelect.vue";
|
||||
import UserSelect from "@/views/heli/materialplan/userSelectNew.vue";
|
||||
import {inject, ref} from "vue";
|
||||
import * as MaterialPlanApi from "@/api/heli/materialplan";
|
||||
import {ElTable} from "element-plus";
|
||||
@ -193,12 +193,9 @@ const handleExportDetail = async () => {
|
||||
}
|
||||
|
||||
const handleSelectionChange = (val) => {
|
||||
if (val.length > 1) {
|
||||
// multipleTable.value.clearSelection()
|
||||
multipleTable.value=val
|
||||
} else {
|
||||
multipleSelection.value = val.pop()
|
||||
}
|
||||
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
@ -213,43 +210,66 @@ const singleSubmission= (val) =>{
|
||||
multipleTable.value.push(val)
|
||||
submitForm();
|
||||
}
|
||||
const singleSubmissions=()=>{
|
||||
submitForm();
|
||||
}
|
||||
const submitForm = async () => {
|
||||
const list= multipleTable.value;
|
||||
if (list.length <= 0) {
|
||||
message.error("提交明细不能为空,请确认");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
console.log("开始提交"); // 调试点1:确认函数是否触发
|
||||
|
||||
const list = multipleTable.value|| []; // 安全获取数据
|
||||
console.log("明细数据:", list);
|
||||
console.log(list.length)
|
||||
// 1. 检查空数据
|
||||
if (!list || list.length==null) {
|
||||
message.error("提交明细不能为空,请确认");
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 检查子项目一致性
|
||||
const firstProjectSubId = list[0].projectSubId;
|
||||
for (let i = 1; i < list.length; i++) {
|
||||
if (list[i].projectSubId !== firstProjectSubId) {
|
||||
message.error("零件明细不属于同一个子项目,请确认");
|
||||
if (list.some(item => item.projectSubId !== firstProjectSubId)) {
|
||||
message.error("零件明细不属于同一个子项目,请确认");
|
||||
return;
|
||||
}
|
||||
|
||||
// 3. 校验每个零件
|
||||
for (const item of list) {
|
||||
if (item.projectMaterialPlanNo) {
|
||||
message.error(`工序${item.procedureName}中零件 ${item.materialName} 已生成物料需求计划,请确认`);
|
||||
return;
|
||||
}
|
||||
if (!item.boomArriveDate) { // 注意:原代码是 boomArriveDate,确保拼写正确
|
||||
message.error(`工序${item.procedureName}中零件 ${item.materialName} 要求完成日期为空,请确认`);
|
||||
return;
|
||||
}
|
||||
if (!item.duEmpId) {
|
||||
message.error(`工序${item.procedureName}中零件 ${item.materialName} 责任人为空,请确认`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].projectMaterialPlanNo!=null){
|
||||
message.error("零件"+list[i].materialName+"已生成物料需求计划,请确认")
|
||||
return
|
||||
}
|
||||
if (list[i].boomArriveDate==null){
|
||||
message.error("零件"+list[i].materialName+"要求完成日期为空,请确认")
|
||||
return
|
||||
}
|
||||
if (list[i].duEmpId==null){
|
||||
message.error("零件"+list[i].materialName+"责任人为空,请确认")
|
||||
return
|
||||
}
|
||||
}
|
||||
formLoading.value = true
|
||||
try {
|
||||
await MaterialPlanApi.submitForm(list)
|
||||
message.success("提交成功")
|
||||
// 发送操作成功的事件
|
||||
getList()
|
||||
emit('success')
|
||||
// 4. 添加加载状态(Element Plus 兼容处理)
|
||||
formLoading.value = true;
|
||||
|
||||
// 5. 提交数据(添加超时处理)
|
||||
const res = await Promise.race([
|
||||
MaterialPlanApi.submitForm(list),
|
||||
new Promise((_, reject) =>
|
||||
setTimeout(() => reject(new Error("请求超时")), 30000)
|
||||
)
|
||||
]);
|
||||
|
||||
message.success("提交成功");
|
||||
getList(); // 确保刷新完成
|
||||
emit('success');
|
||||
|
||||
|
||||
} catch (error) {
|
||||
console.error("提交失败:", error);
|
||||
message.error(`操作失败: ${error.message || "未知错误"}`);
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
formLoading.value = false;
|
||||
}
|
||||
}
|
||||
const withdraw = async () => {
|
||||
|
@ -49,16 +49,23 @@
|
||||
<el-table :data="formData.matBoomDOList" class="hl-table" v-loading="loading">
|
||||
<el-table-column type="index" label="序号" fixed align="center" min-width="60" />
|
||||
<el-table-column prop="matName" min-width="200" label="物料名称" align="center"/>
|
||||
<el-table-column label="工序" align="center" prop="procedureName" min-width="100" >
|
||||
<template #default="scope">
|
||||
<el-button text type="primary">
|
||||
{{ scope.row.procedureName }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nickname" min-width="120" label="责任人" align="center"/>
|
||||
<el-table-column prop="compositionName" min-width="120" label="材质" align="center"/>
|
||||
<el-table-column prop="boomAmount" min-width="100" label="需求数量" align="center"/>
|
||||
<el-table-column prop="boomArriveDate" min-width="200" label="需求到货日期" align="center" :formatter="dateFormatter1"/>
|
||||
<el-table-column prop="boomSpec" min-width="200" label="规格类型" align="center"/>
|
||||
<el-table-column prop="boomArriveDate" min-width="150" label="需求到货日期" align="center" :formatter="dateFormatter1"/>
|
||||
<el-table-column prop="mplanStatus" min-width="100" label="需求状态" align="center">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_PROJECT_MATERIAL_PLAN_BOOM_STATUS" :value="scope.row.mplanStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matWeight" min-width="200" label="重量(吨)" align="center"/>
|
||||
<el-table-column prop="matWeight" min-width="100" label="重量(吨)" align="center"/>
|
||||
<el-table-column prop="description" min-width="200" label="要求说明" align="center"/>
|
||||
</el-table>
|
||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
|
@ -61,6 +61,8 @@
|
||||
<el-card class="hl-card-info">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">标准件明细</span>
|
||||
<el-button style="margin-left: 20px" @click="submitForm()" type="success" size="large">提 交</el-button>
|
||||
<el-button style="margin-left: 20px" @click="withdraw()" type="danger" size="large">撤回</el-button>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
@ -68,14 +70,14 @@
|
||||
<el-form ref="subFormRef" :model="list" v-loading="formLoading" label-width="0" >
|
||||
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" class="hl-table">
|
||||
<el-table-column fixed label="序号" align="center" type="index" width="60" />
|
||||
<el-table-column label="客户简称" align="center" prop="customerName" min-width="240" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" min-width="180" />
|
||||
<el-table-column label="子项目名称" align="center" prop="projectSubName" min-width="180" />
|
||||
<el-table-column label="零件名称" align="center" prop="materialName" min-width="180" />
|
||||
<el-table-column label="材质" align="center" prop="compositionName" min-width="180" />
|
||||
<el-table-column label="客户简称" align="center" prop="customerName" min-width="120" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" min-width="150" />
|
||||
<el-table-column label="子项目名称" align="center" prop="projectSubName" min-width="150" />
|
||||
<el-table-column label="零件名称" align="center" prop="materialName" min-width="150" />
|
||||
<el-table-column label="材质" align="center" prop="compositionName" min-width="150" />
|
||||
<el-table-column label="规格型号" align="center" prop="spec" min-width="150" />
|
||||
<el-table-column label="图号" align="center" prop="blueprintNo" min-width="120" />
|
||||
<el-table-column label="数量" align="center" prop="amount" min-width="120" />
|
||||
<el-table-column label="图号" align="center" prop="blueprintNo" min-width="80" />
|
||||
<el-table-column label="数量" align="center" prop="amounts" min-width="80" />
|
||||
<el-table-column label="单位" align="center" prop="unit" min-width="100">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="scope.row.unit" />
|
||||
@ -115,8 +117,7 @@
|
||||
</el-row>
|
||||
</el-card>
|
||||
<div class="hl-footer text-center">
|
||||
<el-button @click="submitForm()" type="success" size="large">提 交</el-button>
|
||||
<el-button style="margin-left: 20px" @click="withdraw()" type="danger" size="large">撤回</el-button>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -126,10 +127,8 @@ import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import download from '@/utils/download'
|
||||
import * as ProcessBomApi from '@/api/heli/processbom'
|
||||
import { useCommonStateWithOut } from '@/store/modules/common'
|
||||
import UserSelect from "@/views/heli/hlvuestyle/userSelect.vue";
|
||||
import UserSelect from "@/views/heli/materialplan/userSelectNew.vue";
|
||||
import {inject, ref} from "vue";
|
||||
import * as UserGroupApi from "@/api/bpm/userGroup";
|
||||
import {exportStandard} from "@/api/heli/processbom";
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
|
||||
defineOptions({ name: 'standard' })
|
||||
|
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<!-- 负责人选择 -->
|
||||
<el-select v-if="status1==false" v-model="propsmodelValue" v-loading="loading" element-loading-background="rgb(255, 255, 255)" placeholder="请选择相关人员" :remote-method="remoteMethod" remote-show-suffix remote clearable reserve-keyword filterable :loading="userSelectLoading" @change="onSelectChange" @clear="clearchange" @visible-change="onVisibleChange">
|
||||
<el-option v-for="item in userSelectList" :key="item.id" :label="item.username + ' ' + item.nickname" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select v-else style="text-decoration: line-through" v-model="propsmodelValue" v-loading="loading" element-loading-background="rgb(255, 255, 255)" placeholder="请选择相关人员" :remote-method="remoteMethod" remote-show-suffix remote clearable reserve-keyword filterable :loading="userSelectLoading" @change="onSelectChange" @clear="clearchange" @visible-change="onVisibleChange">
|
||||
<el-option v-for="item in userSelectList" :key="item.id" :label="item.username + ' ' + item.nickname" :value="item.id" />
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, toRefs, computed } from 'vue'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: [Number, String],
|
||||
required: true // 如果是必需的属性,可以设置为true
|
||||
}
|
||||
})
|
||||
const userParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: 0, // 根据实际情况调整参数
|
||||
username: undefined,
|
||||
nickname: undefined,
|
||||
userNickName: undefined
|
||||
}
|
||||
const valueName: any = ref() //选中的值
|
||||
const valueNameObject: any = ref() // 存储选中的完整用户对象
|
||||
|
||||
const emit = defineEmits(['update:newValue'])
|
||||
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||
const userSelectList = ref<UserApi.UserVO[]>([])
|
||||
const loading = ref(true)
|
||||
const userSelectLoading = ref(false)
|
||||
const propsmodelValue = toRefs(props).modelValue // 获取 props 中的 modelValue
|
||||
const initialValue: any = ref(null) // 存储初始选中的用户 ID
|
||||
|
||||
const status1 = ref(false)
|
||||
|
||||
const gitlist = async () => {
|
||||
const data = await UserApi.getAllUser()
|
||||
userList.value = []
|
||||
userSelectList.value = []
|
||||
userList.value = [...userList.value, ...data]
|
||||
// 设置初始值
|
||||
if (propsmodelValue.value) {
|
||||
valueName.value = propsmodelValue.value
|
||||
const initialUser = await UserApi.getUser(valueName.value)
|
||||
if (initialUser.status == 1) {
|
||||
status1.value = true
|
||||
} else {
|
||||
status1.value = false
|
||||
}
|
||||
// 查找初始用户是否已经在 userList 中
|
||||
let foundInitialUserInList = false
|
||||
for (const user of userList.value) {
|
||||
if (user.id === initialUser.id) {
|
||||
// propsmodelValue.value=initialUser.username+' '+initialUser.nickname
|
||||
|
||||
foundInitialUserInList = true
|
||||
break
|
||||
}
|
||||
}
|
||||
// 如果初始用户不在列表中,则将其添加到列表开头
|
||||
if (!foundInitialUserInList && !userSelectList.value.length) {
|
||||
userList.value.unshift(initialUser)
|
||||
// propsmodelValue.value=initialUser.username+' '+initialUser.nickname
|
||||
}
|
||||
// loading.value = false
|
||||
}
|
||||
userSelectList.value = userList.value
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const remoteMethod = async (query: any) => {
|
||||
userSelectLoading.value = true
|
||||
userSelectList.value = []
|
||||
try {
|
||||
if (query) {
|
||||
userParams.userNickName = query
|
||||
const data = await UserApi.getUserPage(userParams)
|
||||
userList.value = data.list
|
||||
userSelectList.value = data.list
|
||||
} else {
|
||||
gitlist()
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
userSelectLoading.value = false
|
||||
}
|
||||
}
|
||||
// 初始化用户列表
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await gitlist()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
})
|
||||
watch(propsmodelValue, (newValue: any) => {
|
||||
if (newValue) {
|
||||
userList.value = []
|
||||
gitlist()
|
||||
}
|
||||
})
|
||||
|
||||
const onVisibleChange = (isVisible: boolean) => {
|
||||
if (!isVisible) {
|
||||
// 下拉框关闭时,重置查询参数和下拉框列表
|
||||
userParams.userNickName = undefined
|
||||
userList.value = []
|
||||
userSelectList.value = []
|
||||
} else {
|
||||
gitlist()
|
||||
}
|
||||
}
|
||||
//清空逻辑传递空值
|
||||
const clearchange = () => {
|
||||
emit('update:newValue', undefined)
|
||||
}
|
||||
//选择之后传递的值
|
||||
const onSelectChange = (newValue: any) => {
|
||||
valueNameObject.value = userList.value.find((user) => user.id === newValue) // 更新选中的完整用户对象
|
||||
emit('update:newValue', valueNameObject.value)
|
||||
}
|
||||
</script>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" :style="{width: '700px', height: '600px'}">
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1200px">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
@ -7,50 +7,112 @@
|
||||
label-width="160px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="采购订单编号" prop="cgOrderNum" >
|
||||
<el-input class="!w-265px" v-model="formData.cgOrderNum" placeholder="请输入采购订单编号" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="生成日期" prop="cgTime">
|
||||
<el-date-picker
|
||||
v-model="formData.cgTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择生成日期"
|
||||
class="!w-265px"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="cgGysname">
|
||||
<el-input class="!w-265px" v-model="formData.cgGysname" placeholder="请输入供应商名称" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="应付金额" prop="cgYf">
|
||||
<el-input class="!w-265px" v-model="formData.cgYf" placeholder="请输入应付金额" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="已付金额" prop="cgYifu">
|
||||
<el-input class="!w-265px" v-model="formData.cgYifu" placeholder="请输入已付金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否付款完成" prop="cgTypee">
|
||||
<el-select
|
||||
v-model="formData.cgTypee"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_YINGFU_MONEY)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<!-- <el-input class="!w-265px" v-model="formData.cgTypee" placeholder="请输入是否付款完成" disabled/> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="rem">
|
||||
<el-input class="!w-265px" v-model="formData.rem" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
|
||||
|
||||
<!-- <el-form-item label="项目编号" prop="code" width="200px">-->
|
||||
<!-- <el-input v-model="formData.code" placeholder="请输入项目编号" disabled class="!w-220px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="采购订单编号" prop="cgOrderNum" >
|
||||
<el-input class="!w-230px" v-model="formData.cgOrderNum" placeholder="请输入采购订单编号" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="生成日期" prop="cgTime" >
|
||||
<el-date-picker
|
||||
v-model="formData.cgTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择生成日期" disabled
|
||||
class="!w-230px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="cgGysname" >
|
||||
<el-input v-model="formData.cgGysname" placeholder="请输入供应商名称" disabled class="!w-230px"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="应付金额" prop="cgYf" >
|
||||
<el-input v-model="formData.cgYf" placeholder="请输入应付金额" disabled class="!w-230px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="已付金额" prop="cgYifu">
|
||||
<el-input v-model="formData.cgYifu" placeholder="请输入已付金额" disabled class="!w-230px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="已开票金额" prop="amount">
|
||||
<el-input v-model="formData.amount" placeholder="请输入已开票金额" disabled class="!w-230px"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="付款状态" prop="cgTypee" >
|
||||
<el-select
|
||||
v-model="formData.cgTypee"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_YINGFU_MONEY)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="备注" prop="rem">
|
||||
<el-input type="textarea" :rows='3' v-model="formData.rem" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-card class="hl-card-info">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">付款明细信息</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button type="primary" size="large" @click="onAddItem" v-if="formData.cgTypee==2||formData.cgTypee==3">新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="orderYfDetailsubFormRef" :model="formData.orderYfDetails" label-width="0" >
|
||||
<el-table :data="formData.orderYfDetails" class="hl-table" >
|
||||
<el-table-column type="index" label="序号" align="center" min-width="60" fixed />
|
||||
<el-table-column min-width="100" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>付款日期 </template>
|
||||
<template #default="scope">
|
||||
<el-form-item prop="paymentDate" >
|
||||
<el-date-picker :disabled="scope.row.id"
|
||||
v-model="scope.row.paymentDate"
|
||||
type="date"
|
||||
value-format=""
|
||||
placeholder="选择付款日期"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center">
|
||||
<template #header> <span class="hl-table_header">*</span>付款金额 </template>
|
||||
<template #default="scope">
|
||||
<el-form-item prop="cgYifu" >
|
||||
<el-input v-model="scope.row.cgYifu" type="number" placeholder="请输入付款金额" @change="sum" :disabled="scope.row.id" min="0" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" @click.prevent="onDeleteItem(scope.$index)" v-if="formData.cgTypee==2||formData.cgTypee==3">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
@ -59,29 +121,50 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import * as OrderYfApi from '@/api/heli/orderyf'
|
||||
import * as OrderYfDetailApi from '@/api/heli/orderyfdetail'
|
||||
import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from "@/utils/dict";
|
||||
import {getOrderYfDetails} from "@/api/heli/orderyfdetail";
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
orderYfDetails: [],
|
||||
id: undefined,
|
||||
cgOrderNum: undefined,
|
||||
cgTime: undefined,
|
||||
cgGysname: undefined,
|
||||
cgYf: undefined,
|
||||
cgYf: 0,
|
||||
cgYifu: undefined,
|
||||
cgTypee: undefined,
|
||||
rem: undefined,
|
||||
amount:undefined,
|
||||
})
|
||||
// const subFormRules = reactive({
|
||||
// paymentDate: [{
|
||||
// required: true,
|
||||
// message: '回款日期不能为空',
|
||||
// trigger: 'blur'
|
||||
// }],
|
||||
// cgType: [{
|
||||
// required: true,
|
||||
// message: '回款类型不能为空',
|
||||
// trigger: 'change'
|
||||
// }],
|
||||
// cgYishou: [{
|
||||
// required: true,
|
||||
// message: '回款金额不能为空',
|
||||
// trigger: 'blur'
|
||||
// }]
|
||||
// })
|
||||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
const orderYfDetailsubFormRef = ref()
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
@ -93,22 +176,85 @@ const open = async (type: string, id?: number) => {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await OrderYfApi.getOrderYf(id)
|
||||
formData.value.orderYfDetails= await OrderYfDetailApi.getOrderYfDetails(id)
|
||||
formData.value.orderYfDetails.map(o=>{
|
||||
o.cgType=Number( o.cgType)
|
||||
let date = new Date();
|
||||
date.setFullYear(o.paymentDate[0]);
|
||||
date.setMonth(o.paymentDate[1]-1);
|
||||
date.setDate(o.paymentDate[2]);
|
||||
o.paymentDate=date
|
||||
})
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
/** 新增子项按钮操作 */
|
||||
const onAddItem = () => {
|
||||
const row = {
|
||||
id: undefined,
|
||||
cgYifu: undefined,
|
||||
paymentDate:new Date(),
|
||||
cgId: undefined,
|
||||
}
|
||||
row.cgId = formData.value.id
|
||||
|
||||
formData.value.orderYfDetails.push(row)
|
||||
}
|
||||
/** 删除子项操作 */
|
||||
const onDeleteItem = async (index) => {
|
||||
if (index!=formData.value.orderYfDetails.length-1){
|
||||
message.error(`请从最后一条数据开始删除`)
|
||||
return false
|
||||
}
|
||||
let deletedItems = formData.value.orderYfDetails.splice(index, 1)
|
||||
let id = deletedItems[0].id;
|
||||
if (id) await OrderYfDetailApi.deleteOrderYfDetail(id)
|
||||
formData.value.cgYifu=formData.value.orderYfDetails.reduce((sum, item) => sum + Number(item.cgYifu), 0);
|
||||
}
|
||||
const sum = async () => {
|
||||
formData.value.cgYifu=formData.value.orderYfDetails.reduce((sum, item) => sum + Number(item.cgYifu), 0);
|
||||
}
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// await formRef.value.validate()
|
||||
// await orderYfDetailsubFormRef.value.validate()
|
||||
for (let i = 0; i < formData.value.orderYfDetails.length; i++) {
|
||||
if (formData.value.orderYfDetails[i].paymentDate==null){
|
||||
message.error('第'+(i+1)+'行付款日期不能为空')
|
||||
return false
|
||||
}
|
||||
// if (formData.value.orderYfDetails[i].cgType==null){
|
||||
// message.error('第'+(i+1)+'行回款类型不能为空')
|
||||
// return false
|
||||
// }
|
||||
if (formData.value.orderYfDetails[i].cgYifu==null){
|
||||
message.error('第'+(i+1)+'行付款金额不能为空')
|
||||
return false
|
||||
}
|
||||
}
|
||||
if (formData.value.cgYifu!=''&&formData.value.cgYifu!=undefined&&formData.value.cgYifu!=null){
|
||||
if (formData.value.cgYifu<formData.value.cgYf&&formData.value.cgTypee==1){
|
||||
await message.confirm("已付金额小于应付金额,付款未全部完成,请确认")
|
||||
}else if (formData.value.cgYifu>=formData.value.cgYf&&formData.value.cgTypee==2){
|
||||
await message.confirm("已付金额大于等于应付金额,付款已完成,请确认")
|
||||
}else if (formData.value.cgTypee==3){
|
||||
await message.confirm("已付金额不为0,不能选择未付款,请确认")
|
||||
}
|
||||
}else {
|
||||
if (formData.value.cgTypee==2||formData.value.cgTypee==1){
|
||||
await message.confirm("未输入已付金额,付款未完成,请确认")
|
||||
}
|
||||
}
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as OrderYfApi.OrderYfVO
|
||||
|
||||
if (formType.value === 'create') {
|
||||
await OrderYfApi.createOrderYf(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
@ -123,12 +269,12 @@ const submitForm = async () => {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
cgOrderNum: undefined,
|
||||
code: undefined,
|
||||
projectName: undefined,
|
||||
cgTime: undefined,
|
||||
cgGysname: undefined,
|
||||
cgYf: undefined,
|
||||
@ -138,4 +284,4 @@ const resetForm = () => {
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@ -8,7 +8,7 @@
|
||||
:inline="true"
|
||||
label-width="160px"
|
||||
>
|
||||
|
||||
|
||||
<el-form-item label="采购订单编号" prop="cgOrderNum">
|
||||
<el-input
|
||||
v-model="queryParams.cgOrderNum"
|
||||
@ -18,17 +18,17 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成日期" prop="cgTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.cgTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="生成日期" prop="cgTime">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="queryParams.cgTime"-->
|
||||
<!-- value-format="YYYY-MM-DD HH:mm:ss"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
|
||||
<!-- class="!w-240px"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="供应商名称" prop="cgGysname">
|
||||
<el-input
|
||||
v-model="queryParams.cgGysname"
|
||||
@ -39,7 +39,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否付款完成" prop="cgTypee">
|
||||
<el-form-item label="付款状态" prop="cgTypee">
|
||||
<!-- <el-input
|
||||
v-model="queryParams.cgTypee"
|
||||
placeholder="请输入是否付款完成"
|
||||
@ -60,8 +60,8 @@
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
|
||||
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -96,28 +96,29 @@
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
:formatter="dateFormatter1"
|
||||
width="180px"
|
||||
v-if="false"
|
||||
/>
|
||||
<el-table-column label="采购订单编号" align="center" prop="cgOrderNum" />
|
||||
<el-table-column
|
||||
label="生成日期"
|
||||
align="center"
|
||||
prop="cgTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="供应商名称" align="center" prop="cgGysname" />
|
||||
<el-table-column label="应付金额" align="center" prop="cgYf" />
|
||||
<el-table-column label="已付金额" align="center" prop="cgYifu" />
|
||||
<el-table-column label="是否付款完成" align="center" prop="cgTypee" >
|
||||
<el-table-column label="采购订单编号" align="center" prop="cgOrderNum" width="200"/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="生成日期"-->
|
||||
<!-- align="center"-->
|
||||
<!-- prop="cgTime"-->
|
||||
<!-- :formatter="dateFormatter"-->
|
||||
<!-- width="180px"-->
|
||||
<!-- />-->
|
||||
<el-table-column label="供应商名称" align="center" prop="cgGysname" width="250"/>
|
||||
<el-table-column label="应付金额(元)" align="center" prop="cgYf" width="150"/>
|
||||
<el-table-column label="已付金额(元)" align="center" prop="cgYifu" width="150"/>
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" width="150"/>
|
||||
<el-table-column label="付款状态" align="center" prop="cgTypee" width="120">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_YINGFU_MONEY" :value="scope.row.cgTypee" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="rem" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<el-table-column label="备注" align="center" prop="rem" width="220" />
|
||||
<el-table-column label="操作" align="center" width="80">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
@ -127,14 +128,14 @@
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['heli:order-yf:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="danger"-->
|
||||
<!-- @click="handleDelete(scope.row.id)"-->
|
||||
<!-- v-hasPermi="['heli:order-yf:delete']"-->
|
||||
<!-- >-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -152,7 +153,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import {dateFormatter, dateFormatter1} from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import * as OrderYfApi from '@/api/heli/orderyf'
|
||||
import OrderYfForm from './OrderYfForm.vue'
|
||||
|
@ -0,0 +1,87 @@
|
||||
<!-- 基于 ruoyi-vue3 的 Pagination 重构,核心是简化无用的属性,并使用 ts 重写 -->
|
||||
<template>
|
||||
<el-pagination
|
||||
v-show="total > 0"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:background="true"
|
||||
:page-sizes="[5,10, 20, 30, 50, 100]"
|
||||
:pager-count="pagerCount"
|
||||
:total="total"
|
||||
:small="isSmall"
|
||||
class="float-right mb-15px mt-15px"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed, watchEffect } from 'vue'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
|
||||
defineOptions({ name: 'Pagination' })
|
||||
|
||||
// 此处解决了当全局size为small的时候分页组件样式太大的问题
|
||||
const appStore = useAppStore()
|
||||
const layoutCurrentSize = computed(() => appStore.currentSize)
|
||||
const isSmall = ref<boolean>(layoutCurrentSize.value === 'small')
|
||||
watchEffect(() => {
|
||||
isSmall.value = layoutCurrentSize.value === 'small'
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
// 总条目数
|
||||
total: {
|
||||
required: true,
|
||||
type: Number
|
||||
},
|
||||
// 当前页数:pageNo
|
||||
page: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
// 每页显示条目个数:pageSize
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 20
|
||||
},
|
||||
// 设置最大页码按钮数。 页码按钮的数量,当总页数超过该值时会折叠
|
||||
// 移动端页码按钮的数量端默认值 5
|
||||
pagerCount: {
|
||||
type: Number,
|
||||
default: document.body.clientWidth < 992 ? 5 : 7
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:page', 'update:limit', 'pagination', 'pagination'])
|
||||
const currentPage = computed({
|
||||
get() {
|
||||
return props.page
|
||||
},
|
||||
set(val) {
|
||||
// 触发 update:page 事件,更新 limit 属性,从而更新 pageNo
|
||||
emit('update:page', val)
|
||||
}
|
||||
})
|
||||
const pageSize = computed({
|
||||
get() {
|
||||
return props.limit
|
||||
},
|
||||
set(val) {
|
||||
// 触发 update:limit 事件,更新 limit 属性,从而更新 pageSize
|
||||
emit('update:limit', val)
|
||||
}
|
||||
})
|
||||
const handleSizeChange = (val) => {
|
||||
// 如果修改后超过最大页面,强制跳转到第 1 页
|
||||
if (currentPage.value * val > props.total) {
|
||||
currentPage.value = 1
|
||||
}
|
||||
// 触发 pagination 事件,重新加载列表
|
||||
emit('pagination', { page: currentPage.value, limit: val })
|
||||
}
|
||||
const handleCurrentChange = (val) => {
|
||||
// 触发 pagination 事件,重新加载列表
|
||||
emit('pagination', { page: val, limit: pageSize.value })
|
||||
}
|
||||
</script>
|
297
mes-ui/mes-ui-admin-vue3/src/views/heli/orderyf/record.vue
Normal file
297
mes-ui/mes-ui-admin-vue3/src/views/heli/orderyf/record.vue
Normal file
@ -0,0 +1,297 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="采购订单编号" prop="cgOrderNum">
|
||||
<el-input
|
||||
v-model="queryParams.cgOrderNum"
|
||||
placeholder="请输入采购订单编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="供应商名称" prop="cgGysname">
|
||||
<el-input
|
||||
v-model="queryParams.cgGysname"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="付款状态" prop="cgTypee">
|
||||
|
||||
<el-select
|
||||
v-model="queryParams.cgTypee"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
class="!w-200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_YINGFU_MONEY)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- @click="openForm('create')"-->
|
||||
<!-- v-hasPermi="['heli:order-ys:create']"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- :loading="exportLoading"-->
|
||||
<!-- v-hasPermi="['heli:order-ys:export']"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon icon="ep:download" class="mr-5px" /> 导出-->
|
||||
<!-- </el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @row-click="rowClick" highlight-current-row>
|
||||
<el-table-column label="采购订单编号" align="center" prop="cgOrderNum" width="200"/>
|
||||
|
||||
<el-table-column label="供应商名称" align="center" prop="cgGysname" width="250px"/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="预计回款日期"-->
|
||||
<!-- align="center"-->
|
||||
<!-- prop="paymentDate"-->
|
||||
<!-- :formatter="dateFormatter1"-->
|
||||
<!-- width="200px"-->
|
||||
<!-- />-->
|
||||
<el-table-column label="应付金额(元)" align="center" prop="cgYf" width="150"/>
|
||||
<el-table-column label="已付金额(元)" align="center" prop="cgYifu" width="150"/>
|
||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" width="150"/>
|
||||
<el-table-column label="付款状态" align="center" prop="cgTypee" width="150" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_YINGFU_MONEY" :value="scope.row.cgTypee" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="项目编号" align="center" prop="code" width="180"/>-->
|
||||
<el-table-column label="备注" align="center" prop="rem" width="250"/>
|
||||
<!-- <el-table-column label="操作" align="center" width="180">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="openForm('update', scope.row.id)"-->
|
||||
<!-- v-hasPermi="['heli:order-ys:update']"-->
|
||||
<!-- >-->
|
||||
<!-- 编辑-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button v-if=" scope.row.cgYishou==null"-->
|
||||
<!-- link-->
|
||||
<!-- type="danger"-->
|
||||
<!-- @click="handleDelete(scope.row.id)"-->
|
||||
<!-- v-hasPermi="['heli:order-ys:delete']"-->
|
||||
<!-- >-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Paginations
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
<ContentWrap>
|
||||
<div class="footer">
|
||||
<el-table :data="OrderYfDetailLiat" highlight-current-row style="width: 50%; height: 100%;box-shadow: 3px 0 10px rgba(0,0,0,0.1)">
|
||||
<el-table-column prop="paymentDate" label="付款日期" align="center" :formatter="dateFormatter2"
|
||||
/>
|
||||
<!-- <el-table-column prop="cgType" label="回款类型" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_CGTYPE" :value="scope.row.cgType" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="cgYifu" label="付款金额" align="center"/>
|
||||
</el-table>
|
||||
<el-table :data="InvoiceList" class="ml-10" style="width: 50%;height: 100%;box-shadow: 3px 0 10px rgba(0,0,0,0.1)">
|
||||
<el-table-column label="发票编码" align="center" prop="number"/>
|
||||
|
||||
<el-table-column
|
||||
label="开票日期"
|
||||
align="center"
|
||||
prop="billingDate"
|
||||
:formatter="dateFormatter2"
|
||||
/>
|
||||
<el-table-column label="发票金额" align="center" prop="amount" />
|
||||
<el-table-column label="发票类型" align="center" prop="type" width="160">
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.HELI_INVOICE_TYPE" :value="scope.row.type" />-->
|
||||
<!-- </template>-->
|
||||
<template #default="scope">
|
||||
{{ getDictLabel(DICT_TYPE.HELI_INVOICE_TYPE,scope.row.type) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税率(%)" align="center" prop="rate" width="140" />
|
||||
</el-table>
|
||||
</div>
|
||||
</ContentWrap>
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<!-- <OrderYsForm ref="formRef" @success="getList" />-->
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {dateFormatter, dateFormatter1, dateFormatter2} from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import Paginations from './pagination.vue'
|
||||
import * as OrderYsApi from '@/api/heli/orderys'
|
||||
import * as OrderYfDetailApi from '@/api/heli/orderyfdetail'
|
||||
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
|
||||
import * as InvoiceApi from "@/api/heli/invoice";
|
||||
import * as OrderYfApi from "@/api/heli/orderyf";
|
||||
|
||||
|
||||
defineOptions({ name: 'OrderYs' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref([]) // 列表的数据
|
||||
const OrderYfDetailLiat = ref([]) // 列表的数据
|
||||
const InvoiceList = ref([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 5,
|
||||
createTime: [],
|
||||
code: undefined,
|
||||
cgOrderNum: undefined,
|
||||
cgTime: [],
|
||||
cgGysname: undefined,
|
||||
cgYf: undefined,
|
||||
cgYifu: undefined,
|
||||
cgTypee: undefined,
|
||||
rem: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await OrderYfApi.getOrderYfPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
/** 处理某一行的点击 */
|
||||
const rowClick = async (row) => {
|
||||
console.log(row)
|
||||
OrderYfDetailLiat.value= await OrderYfDetailApi.getOrderYfDetails(row.id)
|
||||
InvoiceList.value= await InvoiceApi.getOrderYfInvoice(row.cgOrderNum)
|
||||
// OrderYsDetailLiat.value.map(item=>{item.cgTypee=Number(item.cgTypee)})
|
||||
}
|
||||
const getDictLabel = (dictType, value) => {
|
||||
|
||||
var intDictOptions = getIntDictOptions(dictType);
|
||||
const dict = intDictOptions.find(item => item.value == value)
|
||||
return dict?.label || value // 找不到时显示原始值
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
OrderYfDetailLiat.value=[]
|
||||
InvoiceList.value=[]
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await OrderYfApi.deleteOrderYf(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await OrderYsApi.exportOrderYs(queryParams)
|
||||
download.excel(data, '应付记录.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.ml-10 {
|
||||
>>> .el-scrollbar__wrap {
|
||||
margin-left: 10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 10px;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.ml-10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.warning-row1 {
|
||||
background-color:#F08080 !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user