Merge remote-tracking branch 'origin/dev_New_pro' into dev_New_pro
# Conflicts:
# src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java
| | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.aftersalesservice.service.AfterSalesServiceService; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | |
| | | if(sysUser == null) throw new RuntimeException("审核人不存在"); |
| | | afterSalesServiceNewDto.setCheckNickName(sysUser.getNickName()); |
| | | if (StringUtils.isEmpty(afterSalesServiceNewDto.getAfterSalesServiceNo())) { |
| | | String string = OrderUtils.countAfterServiceTodayByCreateTime(afterSalesServiceMapper, "SH_"); |
| | | String string = OrderUtils.countAfterServiceTodayByCreateTime(afterSalesServiceMapper, "SH_", afterSalesServiceNewDto.getCreateTime() != null ? afterSalesServiceNewDto.getCreateTime() : LocalDateTime.now()); |
| | | afterSalesServiceNewDto.setAfterSalesServiceNo(string); |
| | | } |
| | | return this.save(afterSalesServiceNewDto); |
| | |
| | | * 创建时间 |
| | | */ |
| | | @Schema(description ="创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | |
| | | * 创建时间 |
| | | */ |
| | | @Schema(description = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean add(ApprovalInstanceDto approvalInstanceDto) { |
| | | String instanceNo = OrderUtils.countTodayByCreateTime(approvalInstanceMapper, "SP", "instance_no"); |
| | | String instanceNo = OrderUtils.countTodayByCreateTime(approvalInstanceMapper, "SP", "instance_no", approvalInstanceDto.getCreateTime() != null ? approvalInstanceDto.getCreateTime() : LocalDateTime.now()); |
| | | approvalInstanceDto.setInstanceNo(instanceNo); |
| | | approvalInstanceDto.setStatus("PENDING"); |
| | | approvalInstanceDto.setCurrentLevel(1); |
| | |
| | | List<Long> nodeIds, List<SysUser> sysUsers, Integer approveStatus) throws Exception { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | ApproveProcess approveProcess = new ApproveProcess(); |
| | | String no = OrderUtils.countTodayByCreateTime(approveProcessMapper, "", "approve_id"); |
| | | String no = OrderUtils.countTodayByCreateTime(approveProcessMapper, "", "approve_id", approveProcess.getCreateTime() != null ? approveProcess.getCreateTime() : LocalDateTime.now()); |
| | | approveProcess.setApproveId(no); |
| | | approveProcess.setApproveUser(sysUser.getUserId()); |
| | | approveProcess.setApproveUserName(sysUser.getNickName()); |
| | |
| | | String billStatus = validateAddParam(finReimbursementDto); |
| | | |
| | | // 生成报销单号 |
| | | String billNo = OrderUtils.countTodayByCreateTime(finReimbursementMapper, "BXD", "bill_no"); |
| | | String billNo = OrderUtils.countTodayByCreateTime(finReimbursementMapper, "BXD", "bill_no", finReimbursementDto.getCreateTime() != null ? finReimbursementDto.getCreateTime() : LocalDateTime.now()); |
| | | List<FinReimbursementDetail> details = finReimbursementDto.getDetails(); |
| | | BigDecimal totalAmount = details.stream() |
| | | .map(FinReimbursementDetail::getAmount) |
| | |
| | | private void startApproval(FinReimbursement reimbursement, FinReimbursementDto finReimbursementDto) { |
| | | Long businessType = resolveBusinessType(finReimbursementDto.getReimbursementType()); |
| | | ApprovalInstanceDto approvalInstanceDto = new ApprovalInstanceDto(); |
| | | approvalInstanceDto.setInstanceNo(OrderUtils.countTodayByCreateTime(approvalInstanceMapper, "SP", "instance_no")); |
| | | approvalInstanceDto.setInstanceNo(OrderUtils.countTodayByCreateTime(approvalInstanceMapper, "SP", "instance_no", approvalInstanceDto.getCreateTime() != null ? approvalInstanceDto.getCreateTime() : LocalDateTime.now())); |
| | | approvalInstanceDto.setBusinessId(reimbursement.getId()); |
| | | approvalInstanceDto.setTemplateId(null); |
| | | approvalInstanceDto.setTemplateName(TypeEnums.getLabelByValue(businessType) + "审批"); |
| | |
| | | import com.ruoyi.procurementrecord.mapper.ReturnManagementMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnManagement; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesQuotationMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesQuotation; |
| | | import com.ruoyi.sales.vo.CustomerTransactionsDetailsVo; |
| | | import com.ruoyi.sales.vo.CustomerTransactionsVo; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements ICustomerService { |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | @Autowired |
| | | private SalesQuotationMapper salesQuotationMapper; |
| | | @Autowired |
| | | private ReturnManagementMapper returnManagementMapper; |
| | | @Autowired |
| | |
| | | if (!returnManagements.isEmpty()) { |
| | | throw new RuntimeException("客户档案下有销售退货,请先删除销售退货"); |
| | | } |
| | | |
| | | // 检查是否有销售报价关联 |
| | | List<SalesQuotation> salesQuotations = salesQuotationMapper.selectList(new QueryWrapper<SalesQuotation>().lambda().in(SalesQuotation::getCustomerId, idList)); |
| | | if (!salesQuotations.isEmpty()) { |
| | | throw new RuntimeException("客户档案下有销售报价,请先删除销售报价"); |
| | | } |
| | | |
| | | // 查询是否有已分配的公海客户 |
| | | List<Customer> assignedPools = customerMapper.selectList( |
| | | new QueryWrapper<Customer>().lambda() |
| | |
| | | } |
| | | |
| | | ApprovalInstance approvalInstance = new ApprovalInstance(); |
| | | approvalInstance.setInstanceNo(OrderUtils.countTodayByCreateTime(approvalInstanceMapper, "SP", "instance_no")); |
| | | approvalInstance.setInstanceNo(OrderUtils.countTodayByCreateTime(approvalInstanceMapper, "SP", "instance_no", enterpriseNews.getCreateTime() != null ? enterpriseNews.getCreateTime() : LocalDateTime.now())); |
| | | approvalInstance.setTemplateId(enterpriseNewsDto.getTemplateId()); |
| | | approvalInstance.setTemplateName(templateName); |
| | | approvalInstance.setBusinessId(enterpriseNews.getId()); |
| | |
| | | * @param <T> 实体类型 |
| | | * @return 订单编号 |
| | | */ |
| | | public static <T> String countTodayByCreateTime(BaseMapper<T> mapper,String preFix,String code) { |
| | | LocalDate today = LocalDate.now(); |
| | | public static <T> String countTodayByCreateTime(BaseMapper<T> mapper,String preFix,String code, LocalDateTime createTime) { |
| | | LocalDate today = createTime.toLocalDate(); |
| | | LocalDateTime todayStart = today.atStartOfDay(); |
| | | LocalDateTime tomorrowStart = today.plusDays(1).atStartOfDay(); |
| | | String dateStr = today.format(DateTimeFormatter.BASIC_ISO_DATE); |
| | |
| | | * @param <T> 实体类泛型 |
| | | * @return 当天记录数量 |
| | | */ |
| | | public static <T> String countAfterServiceTodayByCreateTime(BaseMapper<T> mapper,String preFix) { |
| | | public static <T> String countAfterServiceTodayByCreateTime(BaseMapper<T> mapper,String preFix, LocalDateTime createTime) { |
| | | LocalDate localDate = createTime.toLocalDate(); |
| | | LocalDateTime todayStart = LocalDateTime.of( |
| | | LocalDateTime.now().toLocalDate(), |
| | | localDate, |
| | | LocalTime.MIN |
| | | ); |
| | | LocalDateTime todayEnd = LocalDateTime.of( |
| | | LocalDateTime.now().toLocalDate(), |
| | | localDate, |
| | | LocalTime.MAX |
| | | ); |
| | | |
| | |
| | | .lt("create_time", endDate); |
| | | |
| | | Long aLong = mapper.selectCount(queryWrapper); |
| | | return preFix + LocalDate.now().format(DateTimeFormatter.ISO_LOCAL_DATE).replaceAll("-", "") + String.format("%03d", (aLong + 1)); |
| | | return preFix + localDate.format(DateTimeFormatter.ISO_LOCAL_DATE).replaceAll("-", "") + String.format("%03d", (aLong + 1)); |
| | | } |
| | | } |
| | |
| | | wrapper.like(CustomerVisits::getVisitingPeople, customerVisits.getVisitingPeople()); |
| | | } |
| | | } |
| | | |
| | | wrapper.orderByDesc(CustomerVisits::getId); |
| | | return customerVisitsMapper.selectPage(page, wrapper); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 入库时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime createTime; |
| | |
| | | @Schema(description = "创建时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | @Schema(description = "更新时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | Long aLong = customStorageMapper.selectCount(null); |
| | | item.setInboundBatches(aLong.equals(0L) ? "第1批次(自定义入库)" : "第"+ (aLong + 1) + "批次(自定义入库)" ); |
| | | item.setCreateBy(loginUser.getNickName()); |
| | | item.setCode(OrderUtils.countTodayByCreateTime(customStorageMapper, "", "code")); |
| | | item.setCode(OrderUtils.countTodayByCreateTime(customStorageMapper, "", "code", item.getCreateTime() != null ? item.getCreateTime() : LocalDateTime.now())); |
| | | customStorageMapper.insert(item); |
| | | }); |
| | | return AjaxResult.success("自定义入库成功"); |
| | |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.procurementrecord.bean.dto.ReturnManagementDto; |
| | | import com.ruoyi.procurementrecord.bean.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.bean.vo.ShippingInfoVo; |
| | |
| | | @Override |
| | | public boolean addReturnManagementDto(ReturnManagementDto returnManagementDto) { |
| | | if (ObjectUtils.isEmpty(returnManagementDto.getReturnNo())){ |
| | | String rt = OrderUtils.countTodayByCreateTime(returnManagementMapper, "RT","return_no"); |
| | | String rt = OrderUtils.countTodayByCreateTime(returnManagementMapper, "RT","return_no", returnManagementDto.getCreateTime() != null ? returnManagementDto.getCreateTime() : LocalDateTime.now()); |
| | | returnManagementDto.setReturnNo(rt); |
| | | } |
| | | save(returnManagementDto); |
| | |
| | | private String npsNo; |
| | | |
| | | @Schema(description = "录入时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "更新时间") |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | // 下单入口统一补齐来源单据、计划和工艺信息,避免前端分别传多套字段。 |
| | | validateAndFillOrder(productionOrder, oldOrder); |
| | | if (productionOrder.getNpsNo() == null || productionOrder.getNpsNo().trim().isEmpty()) { |
| | | productionOrder.setNpsNo(generateNextOrderNo()); |
| | | productionOrder.setNpsNo(generateNextOrderNo(productionOrder.getCreateTime() != null ? productionOrder.getCreateTime() : LocalDateTime.now())); |
| | | } |
| | | if (productionOrder.getCompleteQuantity() == null) { |
| | | productionOrder.setCompleteQuantity(BigDecimal.ZERO); |
| | |
| | | .orderByDesc(ProductionOrder::getId); |
| | | } |
| | | |
| | | private String generateNextOrderNo() { |
| | | private String generateNextOrderNo(LocalDateTime createTime) { |
| | | // 生成下一个生产订单号 |
| | | String datePrefix = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | LocalDate localDate = createTime.toLocalDate(); |
| | | String datePrefix = localDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | String prefix = "SC" + datePrefix; |
| | | ProductionOrder latestOrder = this.getOne(Wrappers.<ProductionOrder>lambdaQuery() |
| | | .likeRight(ProductionOrder::getNpsNo, prefix) |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.projectManagement.dto.RoleDto; |
| | | import com.ruoyi.projectManagement.mapper.RolesMapper; |
| | | import com.ruoyi.projectManagement.pojo.Roles; |
| | |
| | | @Operation(summary = "新增") |
| | | public AjaxResult add(@RequestBody RoleDto roleDto) { |
| | | if (roleDto.getIsDefaultNo()) { |
| | | roleDto.setNo(OrderUtils.countTodayByCreateTime(rolesMapper, "XMJS","no")); |
| | | roleDto.setNo(OrderUtils.countTodayByCreateTime(rolesMapper, "XMJS","no", roleDto.getCreateTime() != null ? roleDto.getCreateTime() : LocalDateTime.now())); |
| | | } |
| | | return AjaxResult.success(rolesservice.save(roleDto)); |
| | | } |
| | |
| | | private Integer status; |
| | | |
| | | @Schema(description = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "创建用户") |
| | |
| | | import com.ruoyi.purchase.dto.PurchaseReturnOrderDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrdersMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrders; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.purchase.service.PurchaseReturnOrdersService; |
| | | import com.ruoyi.purchase.vo.PurchaseStockInProductVo; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody PurchaseReturnOrderDto purchaseReturnOrderDto) throws Exception { |
| | | if (purchaseReturnOrderDto.getIsDefaultNo()) { |
| | | purchaseReturnOrderDto.setNo(OrderUtils.countTodayByCreateTime(purchaseReturnOrdersMapper, "CGTL", "no")); |
| | | purchaseReturnOrderDto.setNo(OrderUtils.countTodayByCreateTime(purchaseReturnOrdersMapper, "CGTL", "no", purchaseReturnOrderDto.getCreateTime() != null ? purchaseReturnOrderDto.getCreateTime() : LocalDateTime.now())); |
| | | } |
| | | return AjaxResult.success(purchaseReturnOrdersService.add(purchaseReturnOrderDto)); |
| | | } |
| | |
| | | private BigDecimal totalAmount; |
| | | |
| | | @Schema(description = "录入时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Operation(summary = "添加支付与发货信息") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody PaymentShipping paymentShipping) { |
| | | String ord = OrderUtils.countTodayByCreateTime(paymentShippingMapper, "ORD","order_no"); |
| | | String ord = OrderUtils.countTodayByCreateTime(paymentShippingMapper, "ORD","order_no", paymentShipping.getCreateTime() != null ? paymentShipping.getCreateTime() : LocalDateTime.now()); |
| | | paymentShipping.setOrderNo(ord); |
| | | boolean save = paymentShippingService.save(paymentShipping); |
| | | return save ? success() : error(); |
| | |
| | | private String remark; |
| | | |
| | | @Schema(description = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "创建用户") |
| | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | |
| | | private String shippingCarNumber; |
| | | |
| | | @Schema(description = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "修改时间") |
| | |
| | | import java.math.RoundingMode; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | |
| | | ProductionPlan productionPlan = new ProductionPlan(); |
| | | productionPlan.setSalesLedgerId(salesLedgerProduct.getSalesLedgerId()); |
| | | productionPlan.setSalesLedgerProductId(salesLedgerProduct.getId()); |
| | | productionPlan.setMpsNo(generateNextPlanNo(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")))); |
| | | productionPlan.setMpsNo(generateNextPlanNo(salesLedger.getEntryDate().toInstant() |
| | | .atZone(ZoneId.systemDefault()) |
| | | .toLocalDate().format(DateTimeFormatter.ofPattern("yyyyMMdd")))); |
| | | productionPlan.setProductModelId(salesLedgerProduct.getProductModelId()); |
| | | productionPlan.setQtyRequired(salesLedgerProduct.getQuantity()); |
| | | productionPlan.setSource("销售"); |
| | |
| | | if (ObjectUtils.isNotEmpty(customer)) { |
| | | salesQuotation.setCustomer(customer.getCustomerName()); |
| | | } |
| | | String quotationNo = OrderUtils.countTodayByCreateTime(salesQuotationMapper, "QT","quotation_no"); |
| | | String quotationNo = OrderUtils.countTodayByCreateTime(salesQuotationMapper, "QT","quotation_no", salesQuotationDto.getCreateTime() != null ? salesQuotationDto.getCreateTime() : LocalDateTime.now()); |
| | | salesQuotation.setQuotationNo(quotationNo); |
| | | salesQuotation.setStatus("待审批"); |
| | | salesQuotationMapper.insert(salesQuotation); |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | |
| | | @Operation(summary = "分页查询人员打卡规则配置") |
| | | @GetMapping("/listPage") |
| | | public R listPage(Page page){ |
| | | page.addOrder(OrderItem.desc("id")); |
| | | return R.ok(personalAttendanceLocationConfigService.page(page)); |
| | | } |
| | | |
| | |
| | | schemeApplicableStaffLambdaQueryWrapper.like(SchemeApplicableStaff::getTitle, schemeApplicableStaff.getTitle()); |
| | | } |
| | | } |
| | | schemeApplicableStaffLambdaQueryWrapper.orderByDesc(SchemeApplicableStaff::getId); |
| | | Page<SchemeApplicableStaff> page1 = schemeApplicableStaffMapper.selectPage(page, schemeApplicableStaffLambdaQueryWrapper); |
| | | List<Long> collect = page1.getRecords().stream().map(SchemeApplicableStaff::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty(collect)){ |
| | |
| | | private String type; |
| | | |
| | | @Schema(description = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | |
| | | private String remark; |
| | | |
| | | @Schema(description = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.stock.dto.StockInRecordDto; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.dto.StockUninventoryDto; |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int add(StockInRecordDto stockInRecordDto) { |
| | | String no = OrderUtils.countTodayByCreateTime(stockInRecordMapper, "RK","inbound_batches"); |
| | | String no = OrderUtils.countTodayByCreateTime(stockInRecordMapper, "RK","inbound_batches", stockInRecordDto.getCreateTime() != null ? stockInRecordDto.getCreateTime() : LocalDateTime.now()); |
| | | stockInRecordDto.setInboundBatches(no); |
| | | StockInRecord stockInRecord = new StockInRecord(); |
| | | BeanUtils.copyProperties(stockInRecordDto, stockInRecord); |
| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.dto.StockOutRecordDto; |
| | | import com.ruoyi.stock.dto.StockUninventoryDto; |
| | |
| | | |
| | | @Override |
| | | public int add(StockOutRecordDto stockOutRecordDto) { |
| | | String no = OrderUtils.countTodayByCreateTime(stockOutRecordMapper, "CK","outbound_batches"); |
| | | String no = OrderUtils.countTodayByCreateTime(stockOutRecordMapper, "CK","outbound_batches", stockOutRecordDto.getCreateTime() != null ? stockOutRecordDto.getCreateTime() : LocalDateTime.now()); |
| | | stockOutRecordDto.setOutboundBatches(no); |
| | | if (StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode().equals(stockOutRecordDto.getRecordType())){ |
| | | stockOutRecordDto.setApprovalStatus(3); |
| | |
| | | package com.ruoyi.technology.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | |
| | | |
| | | @Schema(description = "创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "修改人") |
| | |
| | | |
| | | @Schema(description = "修改时间") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @Schema(description = "部门ID") |
| | |
| | | private String description; |
| | | |
| | | @Schema(description = "录入时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "更新时间") |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyRoutingVo; |
| | | import com.ruoyi.production.mapper.ProductionOrderRoutingMapper; |
| | |
| | | |
| | | @Override |
| | | public Long saveTechnologyRouting(TechnologyRouting technologyRouting) { |
| | | String code = OrderUtils.countTodayByCreateTime(technologyRoutingMapper, "GYLX", "process_route_code"); |
| | | String code = OrderUtils.countTodayByCreateTime(technologyRoutingMapper, "GYLX", "process_route_code", technologyRouting.getCreateTime() != null ? technologyRouting.getCreateTime() : LocalDateTime.now()); |
| | | technologyRouting.setProcessRouteCode(code); |
| | | technologyRoutingMapper.insert(technologyRouting); |
| | | // 带入bom产品结构 |
| | |
| | | <if test="req.approveType != null "> |
| | | and approve_type = #{req.approveType} |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | and type = #{knowledgeBase.type} |
| | | </if> |
| | | </where> |
| | | |
| | | order by id desc |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | ) |
| | | </if> |
| | | </where> |
| | | order by c.id desc |
| | | </select> |
| | | |
| | | <select id="list" resultType="com.ruoyi.basic.vo.CustomerVo"> |
| | |
| | | ) |
| | | </if> |
| | | </where> |
| | | order by c.id desc |
| | | </select> |
| | | <select id="customewTransactions" resultType="com.ruoyi.sales.vo.CustomerTransactionsVo"> |
| | | select T1.customer_id, |
| | |
| | | AND c.customer_name LIKE CONCAT('%', #{customerName}, '%') |
| | | </if> |
| | | </where> |
| | | order by T1.customer_id desc |
| | | </select> |
| | | <select id="customewTransactionsDetails" |
| | | resultType="com.ruoyi.sales.vo.CustomerTransactionsDetailsVo"> |
| | |
| | | group by sl.id |
| | | )T3 on T3.id = sl.id |
| | | where sl.customer_id = #{customerId} |
| | | order by sl.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | AND T1.is_white = #{supplierManageDto.isWhite} |
| | | </if> |
| | | </where> |
| | | order by T1.id desc |
| | | </select> |
| | | |
| | | <select id="supplierExportList" resultType="com.ruoyi.basic.excel.SupplierManageExcelDto"> |
| | |
| | | AND sm.supplier_name LIKE CONCAT('%',#{supplierName},'%') |
| | | </if> |
| | | </where> |
| | | order by T1.supplier_id desc |
| | | </select> |
| | | <select id="supplierTransactionsDetails" |
| | | resultType="com.ruoyi.purchase.vo.SupplierTransactionsDetailsVo"> |
| | |
| | | group by pl.id |
| | | )T3 on T3.id = pl.id |
| | | where pl.supplier_id = #{supplierId} |
| | | order by pl.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and n.status = #{ew.status} |
| | | </if> |
| | | </where> |
| | | order by n.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | and rrm.category = #{ew.category} |
| | | </if> |
| | | </where> |
| | | order by rrm.id desc |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | </if> |
| | | </where> |
| | | GROUP BY sam.id |
| | | order by sam.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | and sl.sales_contract_no like concat('%',#{req.salesContractNo},'%') |
| | | </if> |
| | | </where> |
| | | order by rm.id desc |
| | | </select> |
| | | <select id="getReturnManagementDtoById" resultType="com.ruoyi.procurementrecord.bean.dto.ReturnManagementDto"> |
| | | select rm.*, |
| | |
| | | AND t1.status = #{salesQuotationDto.status} |
| | | </if> |
| | | </where> |
| | | order by t1.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | and personal_attendance_records.date >= #{params.date} |
| | | and personal_attendance_records.date < DATE_ADD(DATE(#{params.date}), INTERVAL 1 DAY) |
| | | </if> |
| | | order by personal_attendance_records.id desc |
| | | </select> |
| | | |
| | | <!-- 查询指定日期没有考勤记录的在职员工(在指定时间之前入职的) --> |
| | |
| | | </if> |
| | | </where> |
| | | GROUP BY u.id, u.staff_name |
| | | ORDER BY MAX(s.create_time) |
| | | ORDER BY MAX(s.create_time) desc |
| | | </select> |
| | | |
| | | |
| | | <select id="performanceShiftYear" resultType="java.util.Map"> |
| | | SELECT |
| | | u.staff_name name, |
| | |
| | | <if test="c.staffName != null and c.staffName != '' "> |
| | | AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%') |
| | | </if> |
| | | order by staff_leave.id desc |
| | | </select> |
| | | <select id="staffLeaveList" resultType="com.ruoyi.staff.dto.StaffLeaveDto"> |
| | | SELECT |
| | |
| | | <if test="staffOnJob.contractStartTime != null"> |
| | | HAVING MIN(t1.contract_start_time) = #{staffOnJob.contractStartTime} |
| | | </if> |
| | | order by staff_on_job.id desc |
| | | </select> |
| | | <select id="staffOnJobList" resultType="com.ruoyi.staff.dto.StaffOnJobDto"> |
| | | SELECT |
| | |
| | | unit, |
| | | product_name, |
| | | product_id |
| | | order by combined.id desc |
| | | </select> |
| | | |
| | | <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData"> |
| | |
| | | and sir.create_time <= #{ew.endMonth} |
| | | </if> |
| | | </where> |
| | | order by sir.id desc |
| | | </select> |
| | | |
| | | <select id="stockInAndOutRecord" resultType="com.ruoyi.stock.dto.StockInventoryDto"> |
| | |
| | | and t.type = #{c.type} |
| | | </if> |
| | | </where> |
| | | order by t.id asc |
| | | order by t.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | and top1.technology_param_id = #{paramId} |
| | | </if> |
| | | </where> |
| | | order by top1.id asc |
| | | order by top1.id desc |
| | | </select> |
| | | </mapper> |