Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
0c8f8cb88e
@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import com.alibaba.excel.annotation.*;
|
import com.alibaba.excel.annotation.*;
|
||||||
@ -86,5 +87,7 @@ public class TrackRespVO {
|
|||||||
@Schema(description = "完成状态")
|
@Schema(description = "完成状态")
|
||||||
@ExcelProperty("完成状态")
|
@ExcelProperty("完成状态")
|
||||||
private Integer isover;
|
private Integer isover;
|
||||||
|
@Schema(description = "项目结束日期")
|
||||||
|
@ExcelProperty("项目结束日期")
|
||||||
|
private LocalDateTime projectEndTime;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.ygjx
|
||||||
|
;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.taskdispatch.TaskDispatchService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Tag(name = "管理后台 - 车间")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/ygJx")
|
||||||
|
@Validated
|
||||||
|
public class YgJxController {
|
||||||
|
@Resource
|
||||||
|
private TaskDispatchService taskDispatchService;
|
||||||
|
|
||||||
|
@GetMapping("/task-dispatch-detail/page")
|
||||||
|
@Operation(summary = "获得派工明细分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
||||||
|
public CommonResult<PageResult<TaskDispatchDetailDO>> getTaskDispatchPageDetail(@Valid YgjxPageReqVO pageReqVO) {
|
||||||
|
PageResult<TaskDispatchDetailDO> pageResult = taskDispatchService.getGroupTaskDispatchDetailPage(pageReqVO);
|
||||||
|
return success(pageResult);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 员工绩效 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class YgjxPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "年月,唯一")
|
||||||
|
private String yearMonth;
|
||||||
|
|
||||||
|
@Schema(description = "工号/名称,唯一", example = "芋艿")
|
||||||
|
private String workerIdOrName;
|
||||||
|
|
||||||
|
@Schema(description = "制造设备", example = "14307")
|
||||||
|
private Long manufacturingEquipment;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -75,4 +75,6 @@ public class MaterialPlanDetailDO extends BaseDO {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String named;
|
private String named;
|
||||||
|
|
||||||
|
private String creator;
|
||||||
|
|
||||||
}
|
}
|
@ -156,4 +156,6 @@ public class PgMasterLineDO extends BaseDO {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String nickName;
|
private String nickName;
|
||||||
|
|
||||||
|
private String creator;
|
||||||
|
|
||||||
}
|
}
|
@ -200,6 +200,8 @@ public class PlanDO extends BaseDO {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String processDesignType;
|
private String processDesignType;
|
||||||
|
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
|||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -111,9 +113,18 @@ public class ProjectOrderSubDO extends BaseDO {
|
|||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String reportDateFormat;
|
private String reportDateFormat;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String planCode;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer planType;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private BigDecimal progress;
|
private BigDecimal progress;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer totalReportAmount;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private LocalDateTime projectEndTime;
|
||||||
|
// @TableField(exist = false)
|
||||||
|
// private Date projectStartTime;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer property;
|
private Integer property;
|
||||||
}
|
}
|
||||||
|
@ -58,4 +58,6 @@ public class StorageLogNowDO extends BaseDO {
|
|||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Long matUnitId;
|
private Long matUnitId;
|
||||||
|
|
||||||
|
private String creator;
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,8 @@ public class TaskDispatchDO extends BaseDO {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Long requiredEndDate;
|
private Long requiredEndDate;
|
||||||
|
|
||||||
|
private String creator;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String craftContent;
|
private String craftContent;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
@ -152,4 +152,27 @@ public class TaskDispatchDetailDO extends BaseDO {
|
|||||||
private Integer numAmount;
|
private Integer numAmount;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Long beginProduce;
|
private Long beginProduce;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String yearMonth;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String manufacturingEquipment;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal totalPlannedHours;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal totalReportedHours;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer totalDispatchedQuantity;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer totalReportedQuantity;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String workerId;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String workerName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package com.chanko.yunxi.mes.module.heli.dal.dataobject.track;
|
|||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
||||||
@ -83,11 +84,11 @@ public class TrackDO extends BaseDO {
|
|||||||
/**
|
/**
|
||||||
* 总报工时间
|
* 总报工时间
|
||||||
*/
|
*/
|
||||||
private BigDecimal reportAllHour;
|
private Integer reportAllHour;
|
||||||
/**
|
/**
|
||||||
* 总预计工时
|
* 总预计工时
|
||||||
*/
|
*/
|
||||||
private BigDecimal reportPreviewHour;
|
private Integer reportPreviewHour;
|
||||||
/**
|
/**
|
||||||
* 总报工数量
|
* 总报工数量
|
||||||
*/
|
*/
|
||||||
@ -96,5 +97,6 @@ public class TrackDO extends BaseDO {
|
|||||||
* 完成状态
|
* 完成状态
|
||||||
*/
|
*/
|
||||||
private Integer isover;
|
private Integer isover;
|
||||||
|
private LocalDateTime projectEndTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -131,6 +131,9 @@ public class ZjPgMasterLineDO extends BaseDO {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String nickName;
|
private String nickName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -71,4 +71,5 @@ public interface AttentiontodoMapper extends BaseMapperX<AttentiontodoDO> {
|
|||||||
|
|
||||||
int deleteall(AttentiontodoSaveReqVO createReqVO);
|
int deleteall(AttentiontodoSaveReqVO createReqVO);
|
||||||
List<AttentiontodoDO> selectByIdlist(Integer id);
|
List<AttentiontodoDO> selectByIdlist(Integer id);
|
||||||
|
List<AttentiontodoDO> getAttentiontodolistdaiban(Integer id);
|
||||||
}
|
}
|
@ -64,6 +64,7 @@ public interface DeliverOrderMapper extends BaseMapperX<DeliverOrderDO> {
|
|||||||
|
|
||||||
|
|
||||||
List<DeliverOrderDO> selectPagemyn(Long id);
|
List<DeliverOrderDO> selectPagemyn(Long id);
|
||||||
|
List<DeliverOrderDO> selectPagemyn1();
|
||||||
void showendmoney(Long id);
|
void showendmoney(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -79,5 +79,6 @@ public interface MaterialPlanDetailMapper extends BaseMapperX<MaterialPlanDetail
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
List<MaterialPlanDetailDO> selectafterten(Long id);
|
List<MaterialPlanDetailDO> selectafterten(Long id);
|
||||||
|
List<MaterialPlanDetailDO> selectafterten1();
|
||||||
|
|
||||||
}
|
}
|
@ -74,5 +74,7 @@ public interface PgMasterMapper extends BaseMapperX<PgMasterDO> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<PgMasterLineDO> selectgcjinsert(Long id);
|
List<PgMasterLineDO> selectgcjinsert(Long id);
|
||||||
|
List<PgMasterLineDO> selectgcjinsert1();
|
||||||
List<ZjPgMasterLineDO> selectgcjinsertzj(Long id);
|
List<ZjPgMasterLineDO> selectgcjinsertzj(Long id);
|
||||||
|
List<ZjPgMasterLineDO> selectgcjinsertzj1();
|
||||||
}
|
}
|
||||||
|
@ -122,5 +122,6 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
|||||||
// .orderByDesc(PlanDO::getId));
|
// .orderByDesc(PlanDO::getId));
|
||||||
// }
|
// }
|
||||||
List<PlanDO> selectfhtj(Long txrid);
|
List<PlanDO> selectfhtj(Long txrid);
|
||||||
|
List<PlanDO> selectfhtj1();
|
||||||
|
|
||||||
}
|
}
|
@ -45,8 +45,14 @@ public interface ProcessDesignMapper extends BaseMapperX<ProcessDesignDO> {
|
|||||||
.leftJoin("system_users u4 on u4.id = b.two_dim_owner")
|
.leftJoin("system_users u4 on u4.id = b.two_dim_owner")
|
||||||
.leftJoin("system_users u5 on u5.id = b.three_dim_owner")
|
.leftJoin("system_users u5 on u5.id = b.three_dim_owner")
|
||||||
.leftJoin("(select progress,process_design_id,blueprint_link FROM pro_process_design_progress where id in (select max(id) FROM pro_process_design_progress GROUP BY process_design_id) ) z on z.process_design_id = t.id")
|
.leftJoin("(select progress,process_design_id,blueprint_link FROM pro_process_design_progress where id in (select max(id) FROM pro_process_design_progress GROUP BY process_design_id) ) z on z.process_design_id = t.id")
|
||||||
.orderByDesc(ProcessDesignDO::getId)
|
|
||||||
.disableSubLogicDel();
|
.disableSubLogicDel();
|
||||||
|
if(reqVO.getPgType()!=null && reqVO.getPgType() == 0){
|
||||||
|
query.orderByAsc(ProjectOrderDO::getCode);
|
||||||
|
}else {
|
||||||
|
query.orderByDesc(ProjectOrderDO::getCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
query.like(!StringUtils.isEmpty(reqVO.getPlanCode()), PlanDO::getPlanNo, reqVO.getPlanCode())
|
query.like(!StringUtils.isEmpty(reqVO.getPlanCode()), PlanDO::getPlanNo, reqVO.getPlanCode())
|
||||||
.like(!StringUtils.isEmpty(reqVO.getProjectCode()), ProjectOrderDO::getCode, reqVO.getProjectCode())
|
.like(!StringUtils.isEmpty(reqVO.getProjectCode()), ProjectOrderDO::getCode, reqVO.getProjectCode())
|
||||||
.like(!StringUtils.isEmpty(reqVO.getCustomerName()), CustomerDO::getName, reqVO.getCustomerName())
|
.like(!StringUtils.isEmpty(reqVO.getCustomerName()), CustomerDO::getName, reqVO.getCustomerName())
|
||||||
|
@ -27,6 +27,7 @@ import java.util.List;
|
|||||||
public interface StorageLogNowMapper extends BaseMapperX<StorageLogNowDO> {
|
public interface StorageLogNowMapper extends BaseMapperX<StorageLogNowDO> {
|
||||||
|
|
||||||
List<StorageLogNowDO> selectPagesmall(Long id);
|
List<StorageLogNowDO> selectPagesmall(Long id);
|
||||||
|
List<StorageLogNowDO> selectPagesmall1();
|
||||||
List<StorageLogNowDO> selectPagesmallbyid(String id);
|
List<StorageLogNowDO> selectPagesmallbyid(String id);
|
||||||
default PageResult<StorageLogNowDO> selectPage(StorageLogPageReqVO reqVO) {
|
default PageResult<StorageLogNowDO> selectPage(StorageLogPageReqVO reqVO) {
|
||||||
MPJLambdaWrapper<StorageLogNowDO> query = new MPJLambdaWrapper<>();
|
MPJLambdaWrapper<StorageLogNowDO> query = new MPJLambdaWrapper<>();
|
||||||
|
@ -6,6 +6,8 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
|||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailTotalVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailTotalVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||||
@ -35,6 +37,35 @@ import java.util.Set;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetailDO> {
|
public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetailDO> {
|
||||||
|
|
||||||
|
default PageResult<TaskDispatchDetailDO> selectPageGroup(YgjxPageReqVO pageReqVO) {
|
||||||
|
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
||||||
|
query.select( "DATE_FORMAT(t.create_time, '%Y-%m') as yearMonth,\n" +
|
||||||
|
" t.owner," +
|
||||||
|
" t.device_model," +
|
||||||
|
" CASE " +
|
||||||
|
" WHEN t.device_model IS NULL THEN '' " +
|
||||||
|
" ELSE (select c.name from base_equip_manufacture c where c.id = t.device_model) " +
|
||||||
|
" END AS manufacturingEquipment," +
|
||||||
|
" sum(t.work_time) as totalPlannedHours," +
|
||||||
|
" sum(b.work_time) as totalReportedHours," +
|
||||||
|
" sum(t.amount) as totalDispatchedQuantity," +
|
||||||
|
" sum(b.amount) as totalReportedQuantity,max(u2.username) as workerId ,max(u2.nickname) as workerName ")
|
||||||
|
.leftJoin(TaskReportDO.class,"b",TaskReportDO::getDispatchDetailId,TaskDispatchDetailDO::getId)
|
||||||
|
//.leftJoin("base_equip_manufacture c on c.id = t.device_model or t.device_model is null ")
|
||||||
|
//.leftJoin(EquipManufactureDO.class,"c",EquipManufactureDO::getId,TaskDispatchDetailDO::getDeviceModel)
|
||||||
|
.leftJoin("system_users u2 on u2.id = t.owner");
|
||||||
|
if (pageReqVO.getWorkerIdOrName()!= null &&!pageReqVO.getWorkerIdOrName().isEmpty()) {
|
||||||
|
query.and(i -> i.like("u2.username", pageReqVO.getWorkerIdOrName()).or().like("u2.nickname", pageReqVO.getWorkerIdOrName()));
|
||||||
|
}
|
||||||
|
query.isNotNull(TaskReportDO::getOwner)
|
||||||
|
.isNotNull(TaskDispatchDetailDO::getOwner)
|
||||||
|
.eq(pageReqVO.getYearMonth() !=null&&pageReqVO.getYearMonth()!="","DATE_FORMAT(t.create_time, '%Y-%m')",pageReqVO.getYearMonth())
|
||||||
|
.eq(pageReqVO.getManufacturingEquipment() !=null&&pageReqVO.getManufacturingEquipment()>0,"t.device_model",pageReqVO.getManufacturingEquipment())
|
||||||
|
.groupBy("DATE_FORMAT(t.create_time, '%Y-%m'),t.OWNER,t.device_model");
|
||||||
|
|
||||||
|
return selectPage(pageReqVO, query);
|
||||||
|
}
|
||||||
|
|
||||||
public int updateOwnerAndPostIdById(@Param("id") Long id,@Param("type") Integer type);
|
public int updateOwnerAndPostIdById(@Param("id") Long id,@Param("type") Integer type);
|
||||||
List<TaskDispatchDetailDO> planBbPage(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO);
|
List<TaskDispatchDetailDO> planBbPage(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO);
|
||||||
List<TaskDispatchDetailDO> planBb(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO);
|
List<TaskDispatchDetailDO> planBb(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO);
|
||||||
@ -477,7 +508,7 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BigDecimal hoursAverage = stWorkTimeTotal.divide(new BigDecimal(7), RoundingMode.HALF_UP);
|
BigDecimal hoursAverage = stWorkTimeTotal.divide(new BigDecimal(7), 2, RoundingMode.HALF_UP);
|
||||||
// 判断是否超出最大时长
|
// 判断是否超出最大时长
|
||||||
if (hoursAverage.compareTo(maxTime) > 0) {
|
if (hoursAverage.compareTo(maxTime) > 0) {
|
||||||
// 如果超时,返回符合条件的结果
|
// 如果超时,返回符合条件的结果
|
||||||
|
@ -30,7 +30,9 @@ import java.util.List;
|
|||||||
public interface TaskDispatchMapper extends BaseMapperX<TaskDispatchDO> {
|
public interface TaskDispatchMapper extends BaseMapperX<TaskDispatchDO> {
|
||||||
|
|
||||||
List<TaskDispatchDO> getzplist(Long id);
|
List<TaskDispatchDO> getzplist(Long id);
|
||||||
|
List<TaskDispatchDO> getzplist1();
|
||||||
List<TaskDispatchDO> getsclist(Long id);
|
List<TaskDispatchDO> getsclist(Long id);
|
||||||
|
List<TaskDispatchDO> getsclist1();
|
||||||
|
|
||||||
public int deleteDetailByIds(List<Long> ids);
|
public int deleteDetailByIds(List<Long> ids);
|
||||||
default PageResult<TaskDispatchDO> selectPage(TaskDispatchPageReqVO reqVO) {
|
default PageResult<TaskDispatchDO> selectPage(TaskDispatchPageReqVO reqVO) {
|
||||||
|
@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.generator.IFill;
|
|||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
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.query.LambdaQueryWrapperX;
|
||||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderSubPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderSubDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO;
|
||||||
@ -19,6 +21,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatch
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.track.TrackDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.track.TrackDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderSubMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
@ -33,36 +36,30 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.track.vo.*;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface TrackMapper extends BaseMapperX<TrackDO> {
|
public interface TrackMapper extends BaseMapperX<TrackDO> {
|
||||||
|
|
||||||
default PageResult<TaskDispatchDetailDO> selectPage(TrackPageReqVO reqVO, TaskDispatchDetailMapper taskDispatchDetailMapper) {
|
default PageResult<ProjectOrderSubDO> selectPage(TrackPageReqVO reqVO, ProjectOrderSubMapper projectOrderSubMapper) {
|
||||||
TaskDispatchDetailPageReqVO dispatchDetailPageReqVO = new TaskDispatchDetailPageReqVO();
|
ProjectOrderSubPageReqVO projectOrderSubPageReqVO = new ProjectOrderSubPageReqVO();
|
||||||
dispatchDetailPageReqVO.setPageSize(reqVO.getPageSize()).setPageNo(reqVO.getPageNo());
|
projectOrderSubPageReqVO.setPageSize(reqVO.getPageSize()).setPageNo(reqVO.getPageNo());
|
||||||
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
MPJLambdaWrapper<ProjectOrderSubDO> query = new MPJLambdaWrapper<>();
|
||||||
query.select(TaskDispatchDetailDO::getAmount)
|
query.select(ProjectOrderSubDO::getAmount)
|
||||||
.select(TaskDispatchDetailDO::getWorkTime)
|
.select(ProjectOrderSubDO::getName)
|
||||||
.select(TaskDispatchDetailDO::getProcedureId)
|
.select("pod.code as projectCode,pod.project_name as projectName,pod.project_end_time as projectEndTime")
|
||||||
.select(TaskDispatchDetailDO::getProcedureStatus)
|
|
||||||
.select("pod.code as projectCode,pod.project_name as projectName")
|
|
||||||
.select("pl.plan_no as planCode,pl.status as planType")
|
.select("pl.plan_no as planCode,pl.status as planType")
|
||||||
.select("tpd.bom_detail_id as bomDetailId")
|
.select("ps.project_sub_code as projectSubCode")
|
||||||
.select("pos.name as projectSubName,ps.project_sub_code as projectSubCode")
|
.leftJoin(ProjectOrderDO.class,"pod",ProjectOrderDO::getId,ProjectOrderSubDO::getProjectOrderId)
|
||||||
.leftJoin(TaskDispatchDO.class,"tpd",TaskDispatchDO::getId,TaskDispatchDetailDO::getDispatchId)
|
.leftJoin(PlanSubDO.class,"ps",PlanSubDO::getProjectSubId,ProjectOrderSubDO::getId)
|
||||||
.leftJoin(ProjectOrderSubDO.class,"pos",ProjectOrderSubDO::getId,TaskDispatchDO::getProjectSubId)
|
.leftJoin(PlanDO.class,"pl",PlanDO::getId,PlanSubDO::getProjectPlanId)
|
||||||
.leftJoin(ProjectOrderDO.class,"pod",ProjectOrderDO::getId,TaskDispatchDO::getProjectId)
|
.leftJoin(DeliverOrderSubDO.class,"dos",DeliverOrderSubDO::getSaleOrderSubId,ProjectOrderSubDO::getId)
|
||||||
.leftJoin(PlanDO.class,"pl",PlanDO::getId,TaskDispatchDO::getPlanId)
|
// .ne(DeliverOrderSubDO::getCategory,"OTHER_LIST")
|
||||||
.leftJoin(PlanSubDO.class,"ps",PlanSubDO::getProjectSubId,TaskDispatchDO::getProjectSubId)
|
.selectSum(DeliverOrderSubDO::getAmount,"totalReportAmount")//总共发货数量
|
||||||
.leftJoin(TaskReportDO.class,"tr",TaskReportDO::getDispatchDetailId,TaskDispatchDetailDO::getId)
|
.eq(ProjectOrderDO::getOrderStatus,32) //已启动
|
||||||
.leftJoin(AdminUserDO.class,"u",AdminUserDO::getId,TaskDispatchDetailDO::getOwner)
|
.ne(ProjectOrderDO::getDeliveryStatus,3) //不为全部发货
|
||||||
.leftJoin(ProcessBomDO.class,"pb",ProcessBomDO::getProjectSubId,TaskDispatchDO::getProjectSubId)
|
.orderByDesc(ProjectOrderDO::getProjectEndTime)
|
||||||
.ne(ProcessBomDO::getBomStatus,3)
|
.groupBy(ProjectOrderSubDO::getId);
|
||||||
.selectSum(TaskReportDO::getAmount,"totalReportAmount").selectSum(TaskReportDO::getWorkTime,"totalWorkTime")
|
|
||||||
.ne(ProjectOrderDO::getStatus,3)
|
|
||||||
.groupBy(TaskDispatchDetailDO::getId)
|
|
||||||
.getSelectDistinct();
|
|
||||||
if (reqVO.getProjectCode()!=null&&!reqVO.getProjectCode().trim().equals("")){
|
if (reqVO.getProjectCode()!=null&&!reqVO.getProjectCode().trim().equals("")){
|
||||||
query.like(ProjectOrderDO::getCode,reqVO.getProjectCode());
|
query.like(ProjectOrderDO::getCode,reqVO.getProjectCode());
|
||||||
}
|
}
|
||||||
if (reqVO.getPlanCode()!=null && !reqVO.getPlanCode().trim().equals("")){
|
if (reqVO.getPlanCode()!=null && !reqVO.getPlanCode().trim().equals("")){
|
||||||
query.like(PlanDO::getPlanNo,reqVO.getPlanCode());
|
query.like(ProjectOrderDO::getProjectName,reqVO.getPlanCode());
|
||||||
}
|
}
|
||||||
if (reqVO.getProjectOrderSubCode()!=null && !reqVO.getProjectOrderSubCode().trim().equals("")){
|
if (reqVO.getProjectOrderSubCode()!=null && !reqVO.getProjectOrderSubCode().trim().equals("")){
|
||||||
query.like(PlanSubDO::getProjectSubCode,reqVO.getProjectOrderSubCode());
|
query.like(PlanSubDO::getProjectSubCode,reqVO.getProjectOrderSubCode());
|
||||||
@ -70,15 +67,15 @@ public interface TrackMapper extends BaseMapperX<TrackDO> {
|
|||||||
if (reqVO.getProjectOrderSubName()!=null && !reqVO.getProjectOrderSubName().trim().equals("")){
|
if (reqVO.getProjectOrderSubName()!=null && !reqVO.getProjectOrderSubName().trim().equals("")){
|
||||||
query.like(ProjectOrderSubDO::getName,reqVO.getProjectOrderSubName());
|
query.like(ProjectOrderSubDO::getName,reqVO.getProjectOrderSubName());
|
||||||
}
|
}
|
||||||
if (reqVO.getBomDetailName()!=null && !reqVO.getBomDetailName().trim().equals("")){
|
// if (reqVO.getBomDetailName()!=null && !reqVO.getBomDetailName().trim().equals("")){
|
||||||
query .select("pbd.material_name as materialName")
|
// query .select("pbd.material_name as materialName")
|
||||||
.leftJoin(ProcessBomDetailDO.class,"pbd",ProcessBomDetailDO::getId,TaskDispatchDO::getBomDetailId)
|
// .leftJoin(ProcessBomDetailDO.class,"pbd",ProcessBomDetailDO::getId,TaskDispatchDO::getBomDetailId)
|
||||||
.like(ProcessBomDetailDO::getMaterialName,reqVO.getBomDetailName());
|
// .like(ProcessBomDetailDO::getMaterialName,reqVO.getBomDetailName());
|
||||||
}
|
// }
|
||||||
if (reqVO.getOwner()!=null){
|
// if (reqVO.getOwner()!=null){
|
||||||
query.eq(AdminUserDO::getId,reqVO.getOwner());
|
// query.eq(AdminUserDO::getId,reqVO.getOwner());
|
||||||
}
|
// }
|
||||||
return taskDispatchDetailMapper.selectPage(dispatchDetailPageReqVO, query);
|
return projectOrderSubMapper.selectPage(projectOrderSubPageReqVO, query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ public interface AttentiontodoService {
|
|||||||
*/
|
*/
|
||||||
AttentiontodoDO getAttentiontodo(Integer id);
|
AttentiontodoDO getAttentiontodo(Integer id);
|
||||||
List<AttentiontodoDO> getAttentiontodolist(Integer id);
|
List<AttentiontodoDO> getAttentiontodolist(Integer id);
|
||||||
|
List<AttentiontodoDO> getAttentiontodolistdaiban(Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得待办关注分页
|
* 获得待办关注分页
|
||||||
|
@ -96,6 +96,10 @@ public class AttentiontodoServiceImpl implements AttentiontodoService {
|
|||||||
public List<AttentiontodoDO> getAttentiontodolist(Integer id) {
|
public List<AttentiontodoDO> getAttentiontodolist(Integer id) {
|
||||||
return attentiontodoMapper.selectByIdlist(id);
|
return attentiontodoMapper.selectByIdlist(id);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public List<AttentiontodoDO> getAttentiontodolistdaiban(Integer id) {
|
||||||
|
return attentiontodoMapper.getAttentiontodolistdaiban(id);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<AttentiontodoDO> getAttentiontodoPage(AttentiontodoPageReqVO pageReqVO) {
|
public PageResult<AttentiontodoDO> getAttentiontodoPage(AttentiontodoPageReqVO pageReqVO) {
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.service.bdgzsomthing;
|
package com.chanko.yunxi.mes.module.heli.service.bdgzsomthing;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.http.useragent.UserAgentUtil;
|
||||||
|
import cn.hutool.system.SystemUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.TypeReference;
|
import com.alibaba.fastjson.TypeReference;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO;
|
||||||
@ -27,6 +30,9 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum;
|
import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||||
|
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||||
|
import com.chanko.yunxi.mes.module.system.controller.admin.user.UserController;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
import com.chanko.yunxi.mes.module.system.service.user.AdminUserService;
|
import com.chanko.yunxi.mes.module.system.service.user.AdminUserService;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
@ -39,6 +45,7 @@ import org.apache.http.entity.StringEntity;
|
|||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.http.impl.client.HttpClients;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
@ -71,6 +78,11 @@ import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExcept
|
|||||||
@Service
|
@Service
|
||||||
@Validated
|
@Validated
|
||||||
public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||||
|
@Resource
|
||||||
|
private AdminUserApi userApi;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AttentiontodoService attentiontodoService;
|
||||||
@Resource
|
@Resource
|
||||||
private TaskDispatchDetailMapper taskDispatchDetailMapper;
|
private TaskDispatchDetailMapper taskDispatchDetailMapper;
|
||||||
@Resource
|
@Resource
|
||||||
@ -217,6 +229,27 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
|||||||
// PageResult<ProcessBomDO> pageResult = processBomService.getProcessBomPagesall();
|
// PageResult<ProcessBomDO> pageResult = processBomService.getProcessBomPagesall();
|
||||||
//库存低于安全库存
|
//库存低于安全库存
|
||||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(2);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(2);//查找该类型的待办和关注人 改
|
||||||
|
// String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||||
|
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(2);
|
||||||
|
if (attentiontodook1.size()<1){
|
||||||
|
|
||||||
|
List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall1();//查询符合条件的值
|
||||||
|
for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("库存低于安全库存");
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname());
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodook.add(attentiontodoDO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||||
List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall(attentiontodoRespVO.getTxrid());//查询符合条件的值
|
List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall(attentiontodoRespVO.getTxrid());//查询符合条件的值
|
||||||
@ -267,6 +300,30 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
|||||||
List<AttentiontodoDO> attentiontodookddfh = attentiontodoMapper.selectByIdlist(3);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodookddfh = attentiontodoMapper.selectByIdlist(3);//查找该类型的待办和关注人 改
|
||||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||||
|
|
||||||
|
List<AttentiontodoDO> attentiontodook3 = attentiontodoService.getAttentiontodolistdaiban(3);
|
||||||
|
if (attentiontodook3.size()<1){
|
||||||
|
|
||||||
|
List<DeliverOrderDO> pageResult = deliverOrderMapper.selectPagemyn1();//查询符合条件的值
|
||||||
|
for (DeliverOrderDO storageLogNowDO : pageResult) {
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("订单发货满一年");
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCustomerId()).getNickname());
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodookddfh.add(attentiontodoDO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodookddfh) {
|
for (AttentiontodoDO attentiontodoRespVO : attentiontodookddfh) {
|
||||||
List<DeliverOrderDO> deliverOrderDOS = deliverOrderMapper.selectPagemyn(attentiontodoRespVO.getTxrid());
|
List<DeliverOrderDO> deliverOrderDOS = deliverOrderMapper.selectPagemyn(attentiontodoRespVO.getTxrid());
|
||||||
{
|
{
|
||||||
@ -315,6 +372,26 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
|||||||
|
|
||||||
//生产任务派工单 到期当天逾期
|
//生产任务派工单 到期当天逾期
|
||||||
List<AttentiontodoDO> attentiontodookddfh6 = attentiontodoMapper.selectByIdlist(6);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodookddfh6 = attentiontodoMapper.selectByIdlist(6);//查找该类型的待办和关注人 改
|
||||||
|
|
||||||
|
List<AttentiontodoDO> attentiontodook6 = attentiontodoService.getAttentiontodolistdaiban(6);//改两个数字
|
||||||
|
if (attentiontodook6.size()<1){ //改对应
|
||||||
|
|
||||||
|
List<TaskDispatchDO> pageResult = taskDispatchMapper.getsclist1();//复制条件+改
|
||||||
|
for (TaskDispatchDO storageLogNowDO : pageResult) {
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("生产任务到期"); //改内容
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodookddfh6.add(attentiontodoDO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||||
//查数据
|
//查数据
|
||||||
TaskDispatchPageReqVO taskDispatchPageReqVO = new TaskDispatchPageReqVO();
|
TaskDispatchPageReqVO taskDispatchPageReqVO = new TaskDispatchPageReqVO();
|
||||||
@ -396,6 +473,26 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
|||||||
List<AttentiontodoDO> attentiontodookddfh5 = attentiontodoMapper.selectByIdlist(5);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodookddfh5 = attentiontodoMapper.selectByIdlist(5);//查找该类型的待办和关注人 改
|
||||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||||
//查数据
|
//查数据
|
||||||
|
List<AttentiontodoDO> attentiontodook5 = attentiontodoService.getAttentiontodolistdaiban(5);//改两个数字
|
||||||
|
if (attentiontodook5.size()<1){ //改对应
|
||||||
|
|
||||||
|
List<TaskDispatchDO> pageResult = taskDispatchMapper.getzplist1();//复制条件+改
|
||||||
|
for (TaskDispatchDO storageLogNowDO : pageResult) {
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("装配任务到期"); //改内容
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodookddfh5.add(attentiontodoDO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取今天日期
|
//获取今天日期
|
||||||
@ -461,6 +558,32 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
|||||||
|
|
||||||
//过程检查-质检 到期当天逾期
|
//过程检查-质检 到期当天逾期
|
||||||
List<AttentiontodoDO> attentiontodookddfh7 = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodookddfh7 = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改
|
||||||
|
|
||||||
|
|
||||||
|
List<AttentiontodoDO> attentiontodook7 = attentiontodoService.getAttentiontodolistdaiban(7);//改两个数字
|
||||||
|
if (attentiontodook7.size()<1){ //改对应
|
||||||
|
|
||||||
|
List<PgMasterLineDO> pageResult = pgMasterMapper.selectgcjinsert1();//复制条件+改
|
||||||
|
for (PgMasterLineDO storageLogNowDO : pageResult) {
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("质检任务到期前"); //改内容
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodookddfh7.add(attentiontodoDO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||||
//查数据
|
//查数据
|
||||||
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
||||||
@ -532,6 +655,28 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
|||||||
|
|
||||||
//终检-质检 到期当天逾期
|
//终检-质检 到期当天逾期
|
||||||
List<AttentiontodoDO> attentiontodookddfh7o = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodookddfh7o = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<AttentiontodoDO> attentiontodook70 = attentiontodoService.getAttentiontodolistdaiban(7);//改两个数字
|
||||||
|
if (attentiontodook70.size()<1){ //改对应
|
||||||
|
|
||||||
|
List<ZjPgMasterLineDO> pageResult = pgMasterMapper.selectgcjinsertzj1();//复制条件+改
|
||||||
|
for (ZjPgMasterLineDO storageLogNowDO : pageResult) {
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("质检任务到期前"); //改内容
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodookddfh7o.add(attentiontodoDO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||||
//查数据
|
//查数据
|
||||||
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
||||||
@ -604,6 +749,27 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
|||||||
|
|
||||||
//生产工艺 到期当天逾期
|
//生产工艺 到期当天逾期
|
||||||
List<AttentiontodoDO> attentiontodookddfh4 = attentiontodoMapper.selectByIdlist(4);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodookddfh4 = attentiontodoMapper.selectByIdlist(4);//查找该类型的待办和关注人 改
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<AttentiontodoDO> attentiontodook4 = attentiontodoService.getAttentiontodolistdaiban(4);//改两个数字
|
||||||
|
if (attentiontodook4.size()<1){ //改对应
|
||||||
|
|
||||||
|
List<PlanDO> pageResult = planMapper.selectfhtj1();//复制条件+改
|
||||||
|
for (PlanDO storageLogNowDO : pageResult) {
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("设计任务到期"); //改内容
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodookddfh4.add(attentiontodoDO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||||
//查数据
|
//查数据
|
||||||
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
||||||
@ -689,6 +855,28 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
|||||||
|
|
||||||
//物料需求计划到期前十天 到期当天逾期
|
//物料需求计划到期前十天 到期当天逾期
|
||||||
List<AttentiontodoDO> attentiontodookddfh9 = attentiontodoMapper.selectByIdlist(9);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodookddfh9 = attentiontodoMapper.selectByIdlist(9);//查找该类型的待办和关注人 改
|
||||||
|
|
||||||
|
List<AttentiontodoDO> attentiontodook9 = attentiontodoService.getAttentiontodolistdaiban(9);//改两个数字
|
||||||
|
if (attentiontodook9.size()<1){ //改对应
|
||||||
|
|
||||||
|
List<MaterialPlanDetailDO> pageResult = materialPlanDetailMapper.selectafterten1();//复制条件+改
|
||||||
|
for (MaterialPlanDetailDO storageLogNowDO : pageResult) {
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("《物料需求计划》的采购"); //改内容
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodookddfh9.add(attentiontodoDO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
// List<StorageLogNowDO> pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值
|
||||||
//查数据
|
//查数据
|
||||||
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
// TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.service.materialplandetail;
|
package com.chanko.yunxi.mes.module.heli.service.materialplandetail;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagelog.vo.StorageLogPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.storagelog.vo.StorageLogPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
||||||
@ -7,6 +8,8 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlan
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplan.MaterialPlanMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplan.MaterialPlanMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||||
|
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -33,6 +36,11 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
|||||||
@Service
|
@Service
|
||||||
@Validated
|
@Validated
|
||||||
public class MaterialPlanDetailServiceImpl implements MaterialPlanDetailService {
|
public class MaterialPlanDetailServiceImpl implements MaterialPlanDetailService {
|
||||||
|
@Resource
|
||||||
|
private AdminUserApi userApi;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AttentiontodoService attentiontodoService;
|
||||||
@Resource
|
@Resource
|
||||||
private MaterialPlanMapper materialPlanMapper;
|
private MaterialPlanMapper materialPlanMapper;
|
||||||
@Resource
|
@Resource
|
||||||
@ -62,6 +70,21 @@ public class MaterialPlanDetailServiceImpl implements MaterialPlanDetailService
|
|||||||
|
|
||||||
|
|
||||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(8);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(8);//查找该类型的待办和关注人 改
|
||||||
|
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||||
|
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(8);
|
||||||
|
if (attentiontodook1.size()<1){
|
||||||
|
{
|
||||||
|
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("《物料需求计划》提交后");
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(nickname);
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodook.add(attentiontodoDO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||||
{
|
{
|
||||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||||
|
@ -12,6 +12,7 @@ import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
|||||||
import com.chanko.yunxi.mes.framework.dict.core.util.DictFrameworkUtils;
|
import com.chanko.yunxi.mes.framework.dict.core.util.DictFrameworkUtils;
|
||||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||||
|
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomImportExcelVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomImportExcelVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomSaveReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomSaveReqVO;
|
||||||
@ -33,13 +34,16 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMap
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.enums.ProcessBomStatusEnum;
|
import com.chanko.yunxi.mes.module.heli.enums.ProcessBomStatusEnum;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.composition.CompositionService;
|
import com.chanko.yunxi.mes.module.heli.service.composition.CompositionService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.material.MaterialService;
|
import com.chanko.yunxi.mes.module.heli.service.material.MaterialService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.plantaskbom.PlanTaskBomService;
|
import com.chanko.yunxi.mes.module.heli.service.plantaskbom.PlanTaskBomService;
|
||||||
|
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||||
import com.chanko.yunxi.mes.module.system.controller.admin.dict.vo.data.DictDataPageReqVO;
|
import com.chanko.yunxi.mes.module.system.controller.admin.dict.vo.data.DictDataPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO;
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper;
|
import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -78,6 +82,11 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ProcessBomMapper processBomMapper;
|
private ProcessBomMapper processBomMapper;
|
||||||
@Resource
|
@Resource
|
||||||
|
private AdminUserApi userApi;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AttentiontodoService attentiontodoService;
|
||||||
|
@Resource
|
||||||
private ProcessBomDetailMapper processBomDetailMapper;
|
private ProcessBomDetailMapper processBomDetailMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private MaterialService materialService;
|
private MaterialService materialService;
|
||||||
@ -515,6 +524,23 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
|||||||
if (hasBomType4) {
|
if (hasBomType4) {
|
||||||
PlanDO getplanid = processBomMapper.getplanid(updateObj.getPlanId());
|
PlanDO getplanid = processBomMapper.getplanid(updateObj.getPlanId());
|
||||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(13);// 改
|
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(13);// 改
|
||||||
|
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||||
|
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(13);
|
||||||
|
if (attentiontodook1.size()<1){
|
||||||
|
{
|
||||||
|
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("BOM变更审核通过后");
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(nickname);
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodook.add(attentiontodoDO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||||
{
|
{
|
||||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||||
@ -686,6 +712,24 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
|||||||
.anyMatch(bomDetail -> bomDetail.getBomType() == 4);
|
.anyMatch(bomDetail -> bomDetail.getBomType() == 4);
|
||||||
if (hasBomType4) {
|
if (hasBomType4) {
|
||||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(14);// 改
|
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(14);// 改
|
||||||
|
|
||||||
|
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||||
|
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(14);
|
||||||
|
if (attentiontodook1.size()<1){
|
||||||
|
{
|
||||||
|
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("BOM变更通知");
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(nickname);
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodook.add(attentiontodoDO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||||
{
|
{
|
||||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||||
@ -733,6 +777,24 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
|||||||
|
|
||||||
if(hasBomType4){
|
if(hasBomType4){
|
||||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(12);// 改
|
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(12);// 改
|
||||||
|
|
||||||
|
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||||
|
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(12);
|
||||||
|
if (attentiontodook1.size()<1){
|
||||||
|
{
|
||||||
|
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("BOM变更审核");
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(nickname);
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodook.add(attentiontodoDO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||||
{
|
{
|
||||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||||
|
@ -444,32 +444,41 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
|
|||||||
createProjectOrder(operateReqVO);
|
createProjectOrder(operateReqVO);
|
||||||
if(operateReqVO.getHasPrice().equals(1)&&(operateReqVO.getPrice()==null)){
|
if(operateReqVO.getHasPrice().equals(1)&&(operateReqVO.getPrice()==null)){
|
||||||
//订单有价格但是没录价格
|
//订单有价格但是没录价格
|
||||||
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
|
||||||
|
|
||||||
|
|
||||||
List<AttentiontodoDO> attentiontodook = attentiontodoService.getAttentiontodolist(1);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodook = attentiontodoService.getAttentiontodolist(1);//查找该类型的待办和关注人 改
|
||||||
AttentiontodoDO attentiontodoDO = attentiontodook.get(0);
|
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||||
boolean containsAaa = attentiontodook.stream()
|
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(1);
|
||||||
.anyMatch(item -> nickname.equals(item.getAttr4()));
|
if (attentiontodook1.size()<1){
|
||||||
if (!containsAaa){
|
|
||||||
{
|
{
|
||||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
|
||||||
bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO();
|
|
||||||
BdgzsomthingDO.setThingname(attentiontodoDO.getEvent());//事件名称
|
|
||||||
BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称
|
|
||||||
BdgzsomthingDO.setAttr2(operateReqVO.getCode());//因为不用跳转所以为null
|
|
||||||
// BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期
|
|
||||||
// BdgzsomthingDO.setShowname(new Date());比较创建时间,不用单独填写
|
|
||||||
BdgzsomthingDO.setDborgz("待办");
|
|
||||||
BdgzsomthingDO.setClick(nickname);//提醒人
|
|
||||||
BdgzsomthingDO.setLevel("紧急");
|
|
||||||
// BdgzsomthingDO.setClick(attentiontodoRespVO.getRemindman());//提醒人
|
|
||||||
BdgzsomthingDO.setYesorno("0");//是否点击
|
|
||||||
BdgzsomthingDO.setAttr4("0");//是否已处理
|
|
||||||
|
|
||||||
BdgzsomthingDO.setAttr3(operateReqVO.getId().toString());//获取数据当前表的id
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
// BdgzsomthingDO.setShowname(operateReqVO.getCreateTime());//获取数据当前表的创建事件 改
|
attentiontodoDO.setEvent("订单有价格");
|
||||||
bdgzsomthingMapper.insert(BdgzsomthingDO);
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(nickname);
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodook.add(attentiontodoDO);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||||
|
// bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO();
|
||||||
|
// BdgzsomthingDO.setThingname("订单有价格");//事件名称
|
||||||
|
// BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称
|
||||||
|
// BdgzsomthingDO.setAttr2(operateReqVO.getCode());//因为不用跳转所以为null
|
||||||
|
//// BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期
|
||||||
|
//// BdgzsomthingDO.setShowname(new Date());比较创建时间,不用单独填写
|
||||||
|
// BdgzsomthingDO.setDborgz("待办");
|
||||||
|
// BdgzsomthingDO.setClick(nickname);//提醒人
|
||||||
|
// BdgzsomthingDO.setLevel("紧急");
|
||||||
|
//// BdgzsomthingDO.setClick(attentiontodoRespVO.getRemindman());//提醒人
|
||||||
|
// BdgzsomthingDO.setYesorno("0");//是否点击
|
||||||
|
// BdgzsomthingDO.setAttr4("0");//是否已处理
|
||||||
|
//
|
||||||
|
// BdgzsomthingDO.setAttr3(operateReqVO.getId().toString());//获取数据当前表的id
|
||||||
|
//// BdgzsomthingDO.setShowname(operateReqVO.getCreateTime());//获取数据当前表的创建事件 改
|
||||||
|
// bdgzsomthingMapper.insert(BdgzsomthingDO);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.heli.service.purchaseorder;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.chanko.yunxi.mes.framework.security.core.LoginUser;
|
import com.chanko.yunxi.mes.framework.security.core.LoginUser;
|
||||||
|
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.OrderYfSaveReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.OrderYfSaveReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.plan.vo.PlanPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plan.vo.PlanPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
||||||
@ -14,9 +15,12 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMap
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.supplier.SupplierMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.supplier.SupplierMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.orderyf.OrderYfService;
|
import com.chanko.yunxi.mes.module.heli.service.orderyf.OrderYfService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||||
|
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -47,6 +51,12 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
|||||||
@Service
|
@Service
|
||||||
@Validated
|
@Validated
|
||||||
public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AdminUserApi userApi;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AttentiontodoService attentiontodoService;
|
||||||
@Resource
|
@Resource
|
||||||
private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper;
|
private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper;
|
||||||
@Resource
|
@Resource
|
||||||
@ -141,6 +151,25 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
|||||||
bdgzsomthingMapper.updateokone(abc);
|
bdgzsomthingMapper.updateokone(abc);
|
||||||
//采购订单收货完成
|
//采购订单收货完成
|
||||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(10);//查找该类型的待办和关注人 改
|
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(10);//查找该类型的待办和关注人 改
|
||||||
|
|
||||||
|
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||||
|
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(10);
|
||||||
|
if (attentiontodook1.size()<1){
|
||||||
|
{
|
||||||
|
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("《采购订单》到货时通知检验");
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(nickname);
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodook.add(attentiontodoDO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||||
{
|
{
|
||||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||||
|
@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.heli.service.taskdispatch;
|
|||||||
|
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||||
|
|
||||||
@ -76,6 +77,7 @@ public interface TaskDispatchService {
|
|||||||
|
|
||||||
void deleteTaskDispatchDetail(Long id);
|
void deleteTaskDispatchDetail(Long id);
|
||||||
|
|
||||||
|
PageResult<TaskDispatchDetailDO> getGroupTaskDispatchDetailPage(YgjxPageReqVO pageReqVO);
|
||||||
PageResult<TaskDispatchDetailDO> getTaskDispatchDetailPage(TaskDispatchDetailPageReqVO pageReqVO);
|
PageResult<TaskDispatchDetailDO> getTaskDispatchDetailPage(TaskDispatchDetailPageReqVO pageReqVO);
|
||||||
PageResult<TaskDispatchDetailDO> getTaskDispatchDetailPageWx(TaskDispatchDetailPageReqVO pageReqVO);
|
PageResult<TaskDispatchDetailDO> getTaskDispatchDetailPageWx(TaskDispatchDetailPageReqVO pageReqVO);
|
||||||
TaskDispatchDetailDO getTaskDispatchDetail(TaskDispatchDetailPageReqVO pageReqVO);
|
TaskDispatchDetailDO getTaskDispatchDetail(TaskDispatchDetailPageReqVO pageReqVO);
|
||||||
|
@ -10,6 +10,7 @@ import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
|||||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||||
@ -328,6 +329,12 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
|||||||
taskDispatchDetailMapper.deleteByDispatchId(id);
|
taskDispatchDetailMapper.deleteByDispatchId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<TaskDispatchDetailDO> getGroupTaskDispatchDetailPage(YgjxPageReqVO pageReqVO) {
|
||||||
|
|
||||||
|
return taskDispatchDetailMapper.selectPageGroup(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<TaskDispatchDetailDO> getTaskDispatchDetailPage(TaskDispatchDetailPageReqVO pageReqVO) {
|
public PageResult<TaskDispatchDetailDO> getTaskDispatchDetailPage(TaskDispatchDetailPageReqVO pageReqVO) {
|
||||||
List<FpUserDetailDO> fpUserDetailDOS = fpUserDetailMapper.selectList(new LambdaQueryWrapper<FpUserDetailDO>().eq(FpUserDetailDO::getBusyId, pageReqVO.getOwner()));
|
List<FpUserDetailDO> fpUserDetailDOS = fpUserDetailMapper.selectList(new LambdaQueryWrapper<FpUserDetailDO>().eq(FpUserDetailDO::getBusyId, pageReqVO.getOwner()));
|
||||||
@ -405,6 +412,16 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
|||||||
if(operate == TaskReportOperateEnum.END || operate == TaskReportOperateEnum.SUBMIT){
|
if(operate == TaskReportOperateEnum.END || operate == TaskReportOperateEnum.SUBMIT){
|
||||||
throw exception(TASK_DISPATCH_TASK_NO_PERMISSION_FOR_OPERATE);
|
throw exception(TASK_DISPATCH_TASK_NO_PERMISSION_FOR_OPERATE);
|
||||||
}
|
}
|
||||||
|
if(operate==TaskReportOperateEnum.START){
|
||||||
|
List<TaskReportDO> historyReportList = taskReportMapper.selectList(new LambdaQueryWrapper<TaskReportDO>() {{
|
||||||
|
eq(TaskReportDO::getDispatchDetailId, taskDispatchDetailDO.getId())
|
||||||
|
.ne(TaskReportDO::getAmount, 0);
|
||||||
|
}});
|
||||||
|
int historyReportAmount = historyReportList.stream().mapToInt(TaskReportDO::getAmount).sum();
|
||||||
|
if (taskDispatchDetailDO.getAmount() <= historyReportAmount){
|
||||||
|
throw exception(TASK_DISPATCH_TASK_IS_OVER);
|
||||||
|
}
|
||||||
|
}
|
||||||
lastReportDO = new TaskReportDO();
|
lastReportDO = new TaskReportDO();
|
||||||
}else{
|
}else{
|
||||||
// 如有
|
// 如有
|
||||||
|
@ -3,17 +3,24 @@ package com.chanko.yunxi.mes.module.heli.service.track;
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
||||||
|
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.time.temporal.ChronoUnit;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.procedure.ProcedureMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.procedure.ProcedureMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderSubMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskreport.TaskReportMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskreport.TaskReportMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.track.vo.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.track.vo.*;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.track.TrackDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.track.TrackDO;
|
||||||
@ -38,7 +45,7 @@ public class TrackServiceImpl implements TrackService {
|
|||||||
@Resource
|
@Resource
|
||||||
private TrackMapper trackMapper;
|
private TrackMapper trackMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private TaskDispatchDetailMapper taskDispatchDetailMapper;
|
private ProjectOrderSubMapper projectOrderSubMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ProcessBomDetailMapper processBomDetailDO;
|
private ProcessBomDetailMapper processBomDetailDO;
|
||||||
@Resource
|
@Resource
|
||||||
@ -84,50 +91,68 @@ public class TrackServiceImpl implements TrackService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<TrackDO> getTrackPage(TrackPageReqVO pageReqVO) {
|
public PageResult<TrackDO> getTrackPage(TrackPageReqVO pageReqVO) {
|
||||||
PageResult<TaskDispatchDetailDO> taskDispatchDetailDOPageResult = trackMapper.selectPage(pageReqVO, taskDispatchDetailMapper);
|
PageResult<ProjectOrderSubDO> projectOrderSubDOPageResult = trackMapper.selectPage(pageReqVO, projectOrderSubMapper);
|
||||||
PageResult<TrackDO> pageResult = new PageResult<>();
|
PageResult<TrackDO> pageResult = new PageResult<>();
|
||||||
pageResult.setTotalPages(taskDispatchDetailDOPageResult.getTotalPages());
|
pageResult.setTotalPages(projectOrderSubDOPageResult.getTotalPages());
|
||||||
pageResult.setTotal(taskDispatchDetailDOPageResult.getTotal());
|
pageResult.setTotal(projectOrderSubDOPageResult.getTotal());
|
||||||
List<TaskDispatchDetailDO> list = taskDispatchDetailDOPageResult.getList();
|
List<ProjectOrderSubDO> list = projectOrderSubDOPageResult.getList();
|
||||||
List<TrackDO> trackDOS = new ArrayList<>();
|
List<TrackDO> trackDOS = new ArrayList<>();
|
||||||
|
// 当前时间
|
||||||
|
LocalDateTime currentTime = LocalDateTime.now();
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
|
||||||
pageResult.setList(trackDOS);
|
pageResult.setList(trackDOS);
|
||||||
//如果零件名字为空就查一下零
|
//如果零件名字为空就查一下零
|
||||||
for (TaskDispatchDetailDO to : list) {
|
for (ProjectOrderSubDO to : list) {
|
||||||
|
// 计算两个时间之间的天数差异
|
||||||
|
long daysBetween = ChronoUnit.DAYS.between(currentTime, to.getProjectEndTime());
|
||||||
|
if(to.getTotalReportAmount() == null){
|
||||||
|
to.setTotalReportAmount(0);
|
||||||
|
}
|
||||||
|
// 四舍五入到最接近的整数
|
||||||
|
BigDecimal daysDifference = BigDecimal.valueOf(daysBetween).setScale(0, RoundingMode.HALF_UP);
|
||||||
TrackDO trackDO = new TrackDO();
|
TrackDO trackDO = new TrackDO();
|
||||||
trackDOS.add(trackDO);
|
trackDOS.add(trackDO);
|
||||||
trackDO.setProjectCode(to.getProjectCode())
|
trackDO.setProjectCode(to.getProjectCode())
|
||||||
.setProjectName(to.getProjectName())
|
.setProjectName(to.getProjectName())
|
||||||
.setPlanCode(to.getPlanCode())
|
.setPlanCode(to.getPlanCode())
|
||||||
.setPlanStatus(to.getPlanType())
|
.setPlanStatus(to.getPlanType())
|
||||||
.setProjectOrderSubName(to.getProjectSubName())
|
.setProjectOrderSubName(to.getName())
|
||||||
.setProjectOrderSubCode(to.getProjectSubCode())
|
.setProjectOrderSubCode(to.getProjectSubCode())
|
||||||
.setProcessId(to.getProcedureId())
|
.setDispatchAmount(to.getAmount()) //总
|
||||||
.setReportAmount(to.getTotalReportAmount())
|
// .setReportAmount(to.getTotalReportAmount()) //已发货
|
||||||
.setDispatchAmount(to.getAmount())
|
.setProcessName(formatter.format(to.getProjectEndTime()))
|
||||||
.setReportPreviewHour(to.getWorkTime())
|
// .setProjectEndTime(to.getProjectEndTime())
|
||||||
.setReportAllHour(to.getTotalWorkTime())
|
.setReportAmount(daysDifference.intValue())//日期
|
||||||
|
// .setProcessId(to.getProcedureId())
|
||||||
|
.setReportAllHour(to.getTotalReportAmount()) //已发货数量
|
||||||
|
.setReportPreviewHour(to.getAmount()-to.getTotalReportAmount()); //未发货数量
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// .setReportPreviewHour(to.getWorkTime())
|
||||||
|
// .setReportAllHour(to.getTotalWorkTime())
|
||||||
;
|
;
|
||||||
if (to.getProcedureStatus() == 2){
|
// if (to.getProcedureStatus() == 2){
|
||||||
trackDO.setIsover(2);
|
// trackDO.setIsover(2);
|
||||||
}else {
|
// }else {
|
||||||
trackDO.setIsover(1);
|
// trackDO.setIsover(1);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//1.零件名字if (reqVO.getBomDetailName()!=null && !reqVO.getBomDetailName().trim().equals(""))
|
//1.零件名字if (reqVO.getBomDetailName()!=null && !reqVO.getBomDetailName().trim().equals(""))
|
||||||
if (to.getBomDetailId()!=null && (pageReqVO.getBomDetailName() == null || pageReqVO.getBomDetailName().trim().equals(""))){
|
// if (to.getBomDetailId()!=null && (pageReqVO.getBomDetailName() == null || pageReqVO.getBomDetailName().trim().equals(""))){
|
||||||
ProcessBomDetailDO processBomDetailDO1 = processBomDetailDO.selectById(to.getBomDetailId());
|
// ProcessBomDetailDO processBomDetailDO1 = processBomDetailDO.selectById(to.getBomDetailId());
|
||||||
|
//
|
||||||
if(processBomDetailDO1!=null&&processBomDetailDO1.getMaterialName()!=null){
|
// if(processBomDetailDO1!=null&&processBomDetailDO1.getMaterialName()!=null){
|
||||||
trackDO.setBomDetailName(processBomDetailDO1.getMaterialName());
|
// trackDO.setBomDetailName(processBomDetailDO1.getMaterialName());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (to.getProcedureId()!=null){
|
// if (to.getProcedureId()!=null){
|
||||||
ProcedureDO procedureDO = procedureMapper.selectById(to.getProcedureId());
|
// ProcedureDO procedureDO = procedureMapper.selectById(to.getProcedureId());
|
||||||
if (procedureDO!=null){
|
// if (procedureDO!=null){
|
||||||
trackDO.setProcessName(procedureDO.getName());
|
// trackDO.setProcessName(procedureDO.getName());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return pageResult;
|
return pageResult;
|
||||||
|
@ -17,8 +17,11 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.unqualifiednotification.Unqual
|
|||||||
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
||||||
import com.chanko.yunxi.mes.module.heli.enums.CodeEnum;
|
import com.chanko.yunxi.mes.module.heli.enums.CodeEnum;
|
||||||
import com.chanko.yunxi.mes.module.heli.enums.UnqualifiedNotificationStatusEnum;
|
import com.chanko.yunxi.mes.module.heli.enums.UnqualifiedNotificationStatusEnum;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.unqualifiednotificationfile.UnqualifiedNotificationFileService;
|
import com.chanko.yunxi.mes.module.heli.service.unqualifiednotificationfile.UnqualifiedNotificationFileService;
|
||||||
|
import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -42,6 +45,11 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.UNQUALIF
|
|||||||
@Service
|
@Service
|
||||||
@Validated
|
@Validated
|
||||||
public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificationService {
|
public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificationService {
|
||||||
|
@Resource
|
||||||
|
private AdminUserApi userApi;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AttentiontodoService attentiontodoService;
|
||||||
@Resource
|
@Resource
|
||||||
private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper;
|
private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper;
|
||||||
@Resource
|
@Resource
|
||||||
@ -69,6 +77,24 @@ public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificati
|
|||||||
//质检通知单预警
|
//质检通知单预警
|
||||||
{
|
{
|
||||||
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(15);// 改
|
List<AttentiontodoDO> attentiontodook = attentiontodoMapper.selectByIdlist(15);// 改
|
||||||
|
|
||||||
|
String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname();
|
||||||
|
List<AttentiontodoDO> attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(15);
|
||||||
|
if (attentiontodook1.size()<1){
|
||||||
|
{
|
||||||
|
|
||||||
|
AttentiontodoDO attentiontodoDO = new AttentiontodoDO();
|
||||||
|
attentiontodoDO.setEvent("质检通知单");
|
||||||
|
attentiontodoDO.setAttr5("1");
|
||||||
|
attentiontodoDO.setAttr4(nickname);
|
||||||
|
attentiontodoDO.setLevel("1");
|
||||||
|
attentiontodook.add(attentiontodoDO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
for (AttentiontodoDO attentiontodoRespVO : attentiontodook) {
|
||||||
{
|
{
|
||||||
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
// for (StorageLogNowDO storageLogNowDO : pageResult) {
|
||||||
|
@ -26,5 +26,16 @@ FROM db_attentiontodo a
|
|||||||
WHERE a.attr2 = #{param1}
|
WHERE a.attr2 = #{param1}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getAttentiontodolistdaiban"
|
||||||
|
parameterType="Integer"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO">
|
||||||
|
|
||||||
|
|
||||||
|
SELECT a.*, b.tenant_id as txrid
|
||||||
|
FROM db_attentiontodo a
|
||||||
|
INNER JOIN system_users b ON a.attr4 = b.nickname
|
||||||
|
WHERE a.attr2 = #{param1} and a.attr5='1'
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -40,6 +40,35 @@
|
|||||||
t.id ORDER BY t.id DESC
|
t.id ORDER BY t.id DESC
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="selectPagemyn1"
|
||||||
|
parameterType="Long"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO">
|
||||||
|
SELECT t.id, t.code, t.sale_order_ids,
|
||||||
|
t.customer_id, t.deliver_date,
|
||||||
|
t.deliver_status, t.deliver_person,
|
||||||
|
t.deliver_person_mobile, t.deliver_mode,
|
||||||
|
t.receive_person_mobile, t.transport_driver_name,
|
||||||
|
t.transport_driver_mobile, t.transport_bus_number,
|
||||||
|
t.transport_weight, t.transport_size, t.transport_freight_cost,
|
||||||
|
t.remark, t.status, t.receive_person_name, t.receive_address,
|
||||||
|
t.create_time, t.update_time, t.creator, t.updater, t.deleted,
|
||||||
|
u.nickname AS deliverPersonName, e.name AS customerName,
|
||||||
|
GROUP_CONCAT(DISTINCT p.code) AS saleOrderCode,
|
||||||
|
GROUP_CONCAT(p.project_name) AS projectName,
|
||||||
|
GROUP_CONCAT(p.contract_no) AS contractNo,
|
||||||
|
GROUP_CONCAT(p.property) AS property FROM
|
||||||
|
project_deliver_order t LEFT JOIN project_sale_order p
|
||||||
|
ON FIND_IN_SET(p.id, t.sale_order_ids) AND p.tenant_id = 1
|
||||||
|
LEFT JOIN system_users u ON (u.id = t.deliver_person) AND u.tenant_id = 1
|
||||||
|
LEFT JOIN base_customer e ON (e.id = t.customer_id) AND e.tenant_id = 1
|
||||||
|
WHERE t.deleted = 0 AND (t.deliver_status = 2) AND t.tenant_id = 1
|
||||||
|
and DATE_ADD(t.deliver_date, INTERVAL 1 YEAR) < CURDATE()
|
||||||
|
and t.show_zbmoney is null and t.deliver_status in('2')
|
||||||
|
GROUP by
|
||||||
|
t.id ORDER BY t.id DESC
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="showendmoney"
|
<update id="showendmoney"
|
||||||
|
@ -31,5 +31,27 @@
|
|||||||
group by project_material_plan_no
|
group by project_material_plan_no
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectafterten1"
|
||||||
|
parameterType="Long"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplandetail.MaterialPlanDetailDO">
|
||||||
|
select w.*from project_purchase_order q,
|
||||||
|
(SELECT
|
||||||
|
b.project_material_plan_no,a.project_material_plan_id,a.creator
|
||||||
|
FROM
|
||||||
|
project_material_plan_detail a
|
||||||
|
JOIN
|
||||||
|
project_material_plan b ON a.project_material_plan_id = b.id
|
||||||
|
JOIN
|
||||||
|
base_material bm ON a.material_id = bm.id
|
||||||
|
WHERE
|
||||||
|
b.status = '3'
|
||||||
|
AND CURDATE() >= DATE_SUB(a.require_arrive_time, INTERVAL 10 DAY)
|
||||||
|
|
||||||
|
) w
|
||||||
|
where q.project_material_plan_id =w.project_material_plan_id
|
||||||
|
and q.receiving_status !='3'
|
||||||
|
group by project_material_plan_no
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -31,6 +31,29 @@ FROM quality_bg_master_line
|
|||||||
WHERE zj_mx_id = b.zj_mx_id
|
WHERE zj_mx_id = b.zj_mx_id
|
||||||
GROUP BY zj_mx_id
|
GROUP BY zj_mx_id
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="selectgcjinsert1"
|
||||||
|
parameterType="Long"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO">
|
||||||
|
SELECT a.*
|
||||||
|
FROM quality_pg_master_line a
|
||||||
|
WHERE ent_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||||
|
|
||||||
|
and deleted !='1'
|
||||||
|
AND pg_type = '0'
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM quality_bg_master_line b
|
||||||
|
WHERE b.zj_mx_id = a.id
|
||||||
|
AND b.zj_mx_id IS NOT NULL
|
||||||
|
AND a.amount <= (
|
||||||
|
SELECT SUM(amount)
|
||||||
|
FROM quality_bg_master_line
|
||||||
|
WHERE zj_mx_id = b.zj_mx_id
|
||||||
|
GROUP BY zj_mx_id
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
@ -60,5 +83,32 @@ GROUP BY zj_mx_id
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="selectgcjinsertzj1"
|
||||||
|
parameterType="Long"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.zjpgmaster.ZjPgMasterLineDO">
|
||||||
|
|
||||||
|
SELECT a.*
|
||||||
|
FROM quality_zj_pg_master_line a
|
||||||
|
WHERE ent_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||||
|
|
||||||
|
and deleted !='1'
|
||||||
|
AND pg_type = '0'
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM quality_zj_bg_master_line b
|
||||||
|
WHERE b.zj_mx_id = a.id
|
||||||
|
AND b.zj_mx_id IS NOT NULL
|
||||||
|
AND a.amount <= (
|
||||||
|
SELECT SUM(amount)
|
||||||
|
FROM quality_zj_bg_master_line
|
||||||
|
WHERE zj_mx_id = b.zj_mx_id
|
||||||
|
GROUP BY zj_mx_id
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -155,5 +155,151 @@
|
|||||||
where a.progress not like '%100%'
|
where a.progress not like '%100%'
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectfhtj1"
|
||||||
|
parameterType="Long"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO">
|
||||||
|
|
||||||
|
select a.* from (
|
||||||
|
SELECT
|
||||||
|
b.*,
|
||||||
|
COALESCE(a.progress, '0') AS progress
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
d.id,
|
||||||
|
d.creator,
|
||||||
|
d.project_id,
|
||||||
|
d.project_sub_id,
|
||||||
|
c.plan_no AS project_sub_code,
|
||||||
|
d.process_design_type,
|
||||||
|
c.blank_date AS change_end_time
|
||||||
|
FROM
|
||||||
|
pro_process_design d
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
x.*,
|
||||||
|
y.plan_no
|
||||||
|
FROM (
|
||||||
|
SELECT * FROM project_plan_sub pps WHERE blank_date IS NOT NULL
|
||||||
|
AND blank_date<= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||||
|
) x
|
||||||
|
JOIN project_plan y ON x.project_plan_id = y.id
|
||||||
|
) c ON c.project_plan_id = d.plan_id AND c.project_sub_id = d.project_sub_id
|
||||||
|
WHERE
|
||||||
|
d.process_design_type = 'BLUEPRINT_WORKBLANK'
|
||||||
|
AND d.status = '1'
|
||||||
|
GROUP BY
|
||||||
|
d.project_id,
|
||||||
|
d.creator,
|
||||||
|
d.project_sub_id,
|
||||||
|
c.project_sub_code,
|
||||||
|
d.process_design_type,
|
||||||
|
c.blank_date
|
||||||
|
) b
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
process_design_id,
|
||||||
|
progress,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY process_design_id ORDER BY progress DESC) AS rn
|
||||||
|
FROM
|
||||||
|
pro_process_design_progress
|
||||||
|
) a ON a.process_design_id = b.id AND a.rn = 1
|
||||||
|
) a
|
||||||
|
where a.progress not like '%100%'
|
||||||
|
union all
|
||||||
|
select a.* from (
|
||||||
|
SELECT
|
||||||
|
b.*,
|
||||||
|
COALESCE(a.progress, '0') AS progress
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
d.id,
|
||||||
|
d.creator,
|
||||||
|
d.project_id,
|
||||||
|
d.project_sub_id,
|
||||||
|
c.plan_no AS project_sub_code,
|
||||||
|
d.process_design_type,
|
||||||
|
c.three_dim_date AS change_end_time
|
||||||
|
FROM
|
||||||
|
pro_process_design d
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
x.*,
|
||||||
|
y.plan_no
|
||||||
|
FROM (
|
||||||
|
SELECT * FROM project_plan_sub pps WHERE three_dim_date IS NOT NULL
|
||||||
|
AND three_dim_date<= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||||
|
) x
|
||||||
|
JOIN project_plan y ON x.project_plan_id = y.id
|
||||||
|
) c ON c.project_plan_id = d.plan_id AND c.project_sub_id = d.project_sub_id
|
||||||
|
WHERE
|
||||||
|
d.process_design_type = 'BLUEPRINT_3D'
|
||||||
|
AND d.status = '1'
|
||||||
|
GROUP BY
|
||||||
|
d.project_id,
|
||||||
|
d.creator,
|
||||||
|
d.project_sub_id,
|
||||||
|
c.project_sub_code,
|
||||||
|
d.process_design_type,
|
||||||
|
c.three_dim_date
|
||||||
|
) b
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
process_design_id,
|
||||||
|
progress,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY process_design_id ORDER BY progress DESC) AS rn
|
||||||
|
FROM
|
||||||
|
pro_process_design_progress
|
||||||
|
) a ON a.process_design_id = b.id AND a.rn = 1
|
||||||
|
) a
|
||||||
|
where a.progress not like '%100%'
|
||||||
|
union all
|
||||||
|
select a.* from (
|
||||||
|
SELECT
|
||||||
|
b.*,
|
||||||
|
COALESCE(a.progress, '0') AS progress
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
d.id,
|
||||||
|
d.creator,
|
||||||
|
d.project_id,
|
||||||
|
d.project_sub_id,
|
||||||
|
c.plan_no AS project_sub_code,
|
||||||
|
d.process_design_type,
|
||||||
|
c.two_dim_date AS change_end_time
|
||||||
|
FROM
|
||||||
|
pro_process_design d
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
x.*,
|
||||||
|
y.plan_no
|
||||||
|
FROM (
|
||||||
|
SELECT * FROM project_plan_sub pps WHERE two_dim_date IS NOT NULL
|
||||||
|
AND two_dim_date <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||||
|
) x
|
||||||
|
JOIN project_plan y ON x.project_plan_id = y.id
|
||||||
|
) c ON c.project_plan_id = d.plan_id AND c.project_sub_id = d.project_sub_id
|
||||||
|
WHERE
|
||||||
|
d.process_design_type = 'BLUEPRINT_2D'
|
||||||
|
AND d.status = '1'
|
||||||
|
GROUP by
|
||||||
|
d.creator,
|
||||||
|
d.project_id,
|
||||||
|
d.project_sub_id,
|
||||||
|
c.project_sub_code,
|
||||||
|
d.process_design_type,
|
||||||
|
c.two_dim_date
|
||||||
|
) b
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
process_design_id,
|
||||||
|
progress,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY process_design_id ORDER BY progress DESC) AS rn
|
||||||
|
FROM
|
||||||
|
pro_process_design_progress
|
||||||
|
) a ON a.process_design_id = b.id AND a.rn = 1
|
||||||
|
) a
|
||||||
|
where a.progress not like '%100%'
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -109,12 +109,13 @@
|
|||||||
b.mat_code id,
|
b.mat_code id,
|
||||||
b.create_time,
|
b.create_time,
|
||||||
b.mat_name,
|
b.mat_name,
|
||||||
b.total_storage_ok_qty
|
b.total_storage_ok_qty,
|
||||||
|
b.creator
|
||||||
FROM
|
FROM
|
||||||
(SELECT
|
(SELECT
|
||||||
mat_code,
|
mat_code,
|
||||||
create_time,
|
create_time,
|
||||||
mat_name,
|
mat_name,creator,
|
||||||
id,
|
id,
|
||||||
SUM(storage_ok_qty) AS total_storage_ok_qty
|
SUM(storage_ok_qty) AS total_storage_ok_qty
|
||||||
FROM
|
FROM
|
||||||
@ -123,13 +124,45 @@
|
|||||||
mat_code,
|
mat_code,
|
||||||
create_time,
|
create_time,
|
||||||
mat_name,
|
mat_name,
|
||||||
id) b
|
id,creator) b
|
||||||
JOIN
|
JOIN
|
||||||
base_material a ON b.mat_code = a.code
|
base_material a ON b.mat_code = a.code
|
||||||
WHERE
|
WHERE
|
||||||
b.total_storage_ok_qty < a.inv_safe
|
b.total_storage_ok_qty < a.inv_safe
|
||||||
and a.tenant_id =#{param1}
|
and a.tenant_id =#{param1}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="selectPagesmall1"
|
||||||
|
parameterType="Long"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
b.mat_code id,
|
||||||
|
b.create_time,
|
||||||
|
b.mat_name,
|
||||||
|
b.total_storage_ok_qty,
|
||||||
|
b.creator
|
||||||
|
FROM
|
||||||
|
(SELECT
|
||||||
|
mat_code,
|
||||||
|
create_time,
|
||||||
|
mat_name,creator,
|
||||||
|
id,
|
||||||
|
SUM(storage_ok_qty) AS total_storage_ok_qty
|
||||||
|
FROM
|
||||||
|
v_storage_material_now
|
||||||
|
GROUP BY
|
||||||
|
mat_code,
|
||||||
|
create_time,
|
||||||
|
mat_name,
|
||||||
|
id,creator) b
|
||||||
|
JOIN
|
||||||
|
base_material a ON b.mat_code = a.code
|
||||||
|
WHERE
|
||||||
|
b.total_storage_ok_qty < a.inv_safe
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPagesmallbyid"
|
<select id="selectPagesmallbyid"
|
||||||
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO">
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO">
|
||||||
|
@ -28,6 +28,24 @@
|
|||||||
where d.dispatch_id =c.id and c.dispatch_type ='ASSEMBLE'
|
where d.dispatch_id =c.id and c.dispatch_type ='ASSEMBLE'
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="getzplist1"
|
||||||
|
parameterType="Long"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
select c.code,d.end_time project_end_time from pro_task_dispatch c,(SELECT b.*, COALESCE(SUM(a.amount), 0) AS total_amount
|
||||||
|
FROM pro_task_dispatch_detail b
|
||||||
|
LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id
|
||||||
|
WHERE b.end_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||||
|
GROUP BY b.id
|
||||||
|
HAVING COALESCE(SUM(a.amount), 0) < b.amount) d
|
||||||
|
where d.dispatch_id =c.id and c.dispatch_type ='ASSEMBLE'
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getsclist"
|
<select id="getsclist"
|
||||||
parameterType="Long"
|
parameterType="Long"
|
||||||
@ -45,6 +63,23 @@
|
|||||||
where d.dispatch_id =c.id and c.dispatch_type ='PRODUCTION'
|
where d.dispatch_id =c.id and c.dispatch_type ='PRODUCTION'
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="getsclist1"
|
||||||
|
parameterType="Long"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
select c.code,d.end_time project_end_time,d.creator from pro_task_dispatch c,(SELECT b.*, COALESCE(SUM(a.amount), 0) AS total_amount
|
||||||
|
FROM pro_task_dispatch_detail b
|
||||||
|
LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id
|
||||||
|
WHERE b.end_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||||
|
GROUP BY b.id
|
||||||
|
HAVING COALESCE(SUM(a.amount), 0) < b.amount) d
|
||||||
|
where d.dispatch_id =c.id and c.dispatch_type ='PRODUCTION'
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteDetailByIds">
|
<delete id="deleteDetailByIds">
|
||||||
DELETE FROM pro_task_dispatch_detail WHERE dispatch_id IN
|
DELETE FROM pro_task_dispatch_detail WHERE dispatch_id IN
|
||||||
|
@ -14,7 +14,6 @@ VITE_UPLOAD_BATCH_URL='http://127.0.0.1:8080/admin-api/infra/file/uploadBatch'
|
|||||||
|
|
||||||
# 接口前缀
|
# 接口前缀
|
||||||
VITE_API_BASEPATH=/dev-api
|
VITE_API_BASEPATH=/dev-api
|
||||||
|
|
||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_URL=/admin-api
|
VITE_API_URL=/admin-api
|
||||||
|
|
||||||
|
19
mes-ui/mes-ui-admin-vue3/src/api/heli/ygjx/index.ts
Normal file
19
mes-ui/mes-ui-admin-vue3/src/api/heli/ygjx/index.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
export interface ZjPgMasterVO {
|
||||||
|
id: number
|
||||||
|
pgNumber: string
|
||||||
|
taskNo: string
|
||||||
|
taskId: number
|
||||||
|
projectId: number
|
||||||
|
projectNo: string
|
||||||
|
projectName: string
|
||||||
|
pgUser: number
|
||||||
|
pgDatetime: Date
|
||||||
|
yearMonth: string
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询质量派工单过程检验行分页
|
||||||
|
export const getZjPgMasterLinePage = async (params) => {
|
||||||
|
return await request.get({ url: `/heli/ygJx/task-dispatch-detail/page`, params })
|
||||||
|
}
|
@ -11,10 +11,10 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产计划单号" prop="planCode">
|
<el-form-item label="项目名称" prop="planCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.planCode"
|
v-model="queryParams.planCode"
|
||||||
placeholder="请输入生产计划单号"
|
placeholder="项目名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
@ -38,7 +38,7 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="零件名称" prop="bomDetailName">
|
<!-- <el-form-item label="零件名称" prop="bomDetailName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.bomDetailName"
|
v-model="queryParams.bomDetailName"
|
||||||
placeholder="请输入零件名称"
|
placeholder="请输入零件名称"
|
||||||
@ -50,7 +50,7 @@
|
|||||||
<el-form-item label="任务负责人" prop="owner">
|
<el-form-item label="任务负责人" prop="owner">
|
||||||
<UserSelect v-model="queryParams.owner" @update:new-value="handleSelectedUser1" class="!w-265px"/>
|
<UserSelect v-model="queryParams.owner" @update:new-value="handleSelectedUser1" class="!w-265px"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 查 询</el-button>
|
<el-button type="primary" @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 @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重 置</el-button>
|
||||||
@ -72,19 +72,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="子项目编号" align="center" prop="projectOrderSubCode" />
|
<el-table-column label="子项目编号" align="center" prop="projectOrderSubCode" />
|
||||||
<el-table-column label="子项目名称" align="center" prop="projectOrderSubName" width="120"/>
|
<el-table-column label="子项目名称" align="center" prop="projectOrderSubName" width="120"/>
|
||||||
<el-table-column label="零件名称" align="center" prop="bomDetailName" width="120"/>
|
<el-table-column label="订单数量" align="center" prop="dispatchAmount" width="120"/>
|
||||||
<el-table-column label="工序名称" align="center" prop="processName" width="110"/>
|
<el-table-column label="已发货数量" align="center" prop="reportAllHour" width="120"/>
|
||||||
<el-table-column label="总派工数量" align="center" prop="dispatchAmount" width="120"/>
|
<el-table-column label="未发货数量" align="center" prop="reportPreviewHour" width="120"/>
|
||||||
<el-table-column label="总报工时间" align="center" prop="reportAllHour" width="120"/>
|
<el-table-column label="项目结束日期" align="center" prop="processName" width="150" />
|
||||||
<el-table-column label="总预计工时" align="center" prop="reportPreviewHour" width="120"/>
|
<el-table-column label="剩余天数" align="center" prop="reportAmount" width="110"/>
|
||||||
<el-table-column label="总报工数量" align="center" prop="reportAmount" width="120" />
|
|
||||||
<el-table-column label="完成标志" align="center" prop="isover" width="110">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-tag v-if="scope.row.isover==2">完成</el-tag>
|
|
||||||
<el-tag v-else class="ml-2" type="danger">未完成</el-tag>
|
|
||||||
<!-- <dict-tag :type="DICT_TYPE.HELI_YINGFU_MONEY" :value="scope.row.isover" /> -->
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column label="操作" align="center">
|
<!-- <el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -707,8 +707,10 @@ watch(
|
|||||||
}
|
}
|
||||||
console.log(`第 ${index + 1} 行的预计工时变化为: ${newWorkTime}`);
|
console.log(`第 ${index + 1} 行的预计工时变化为: ${newWorkTime}`);
|
||||||
console.log("detail==", detail)
|
console.log("detail==", detail)
|
||||||
|
if(detail.startTime){
|
||||||
openDialogWT(detail);
|
openDialogWT(detail);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
watches.push(unwatch); // 存储当前的取消监听函数
|
watches.push(unwatch); // 存储当前的取消监听函数
|
||||||
});
|
});
|
||||||
@ -719,7 +721,6 @@ watch(
|
|||||||
const openDialogWT = async (dataParam) => {
|
const openDialogWT = async (dataParam) => {
|
||||||
taskDD.value = null;
|
taskDD.value = null;
|
||||||
taskDD.value = dataParam.startTime;
|
taskDD.value = dataParam.startTime;
|
||||||
console.log("taskDD==", taskDD)
|
|
||||||
const data = await TaskDispatchApi.getTaskDispatchDetailListByWorkTime(dataParam);
|
const data = await TaskDispatchApi.getTaskDispatchDetailListByWorkTime(dataParam);
|
||||||
//debugger
|
//debugger
|
||||||
dataList.value = [];
|
dataList.value = [];
|
||||||
|
@ -753,9 +753,11 @@ watch(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(`第 ${index + 1} 行的预计工时变化为: ${newWorkTime}`);
|
console.log(`第 ${index + 1} 行的预计工时变化为: ${newWorkTime}`);
|
||||||
console.log("detail==", detail)
|
console.log("detail=", detail.startTime)
|
||||||
|
if(detail.startTime){
|
||||||
openDialogWT(detail);
|
openDialogWT(detail);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
watches.push(unwatch); // 存储当前的取消监听函数
|
watches.push(unwatch); // 存储当前的取消监听函数
|
||||||
});
|
});
|
||||||
@ -766,7 +768,6 @@ watch(
|
|||||||
const openDialogWT = async (dataParam) => {
|
const openDialogWT = async (dataParam) => {
|
||||||
taskDD.value = null;
|
taskDD.value = null;
|
||||||
taskDD.value = dataParam.startTime;
|
taskDD.value = dataParam.startTime;
|
||||||
console.log("taskDD==", taskDD)
|
|
||||||
const data = await TaskdispatchApi.getTaskDispatchDetailListByWorkTime(dataParam);
|
const data = await TaskdispatchApi.getTaskDispatchDetailListByWorkTime(dataParam);
|
||||||
//debugger
|
//debugger
|
||||||
dataList.value = [];
|
dataList.value = [];
|
||||||
|
145
mes-ui/mes-ui-admin-vue3/src/views/heli/ygjx/index.vue
Normal file
145
mes-ui/mes-ui-admin-vue3/src/views/heli/ygjx/index.vue
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="hl-card">
|
||||||
|
<template #header>
|
||||||
|
<span>员工月度绩效总结</span>
|
||||||
|
</template>
|
||||||
|
<ContentWrap class="borderxx">
|
||||||
|
<!-- 搜索工作栏 -->
|
||||||
|
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="130px">
|
||||||
|
<el-form-item label="年月" prop="yearMonth">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.yearMonth"
|
||||||
|
type="month"
|
||||||
|
placeholder="年月"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工号/姓名" prop="workerIdOrName">
|
||||||
|
<el-input v-model="queryParams.workerIdOrName" placeholder="工号/姓名"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="制造设备" prop="manufacturingEquipment">
|
||||||
|
<EquipmentSelect v-model="queryParams.manufacturingEquipment" @update:newValue="handleSelectedEquip" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item style="margin-left:15px">
|
||||||
|
<el-button @click="handleQuery" type="primary">
|
||||||
|
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||||
|
</el-button>
|
||||||
|
<!-- <el-button @click="resetQuery(formatDate(queryParams.dates, 'YYYY-MM'))">
|
||||||
|
<Icon icon="ep:refresh" 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" border class="hl-table">
|
||||||
|
<el-table-column prop="yearMonth" label="年月"/>
|
||||||
|
<el-table-column prop="workerId" label="报工人工号"/>
|
||||||
|
<el-table-column prop="workerName" label="报工人姓名"/>
|
||||||
|
<el-table-column prop="manufacturingEquipment" label="制造设备"/>
|
||||||
|
<el-table-column prop="totalPlannedHours" label="总预计工时"/>
|
||||||
|
<el-table-column prop="totalReportedHours" label="总报工工时"/>
|
||||||
|
<el-table-column prop="totalDispatchedQuantity" label="总派工数量"/>
|
||||||
|
<el-table-column prop="totalReportedQuantity" label="总报工数量"/>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
|
<MaterialPlanForm ref="formRef" @success="getList" />
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
|
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||||
|
import download from '@/utils/download'
|
||||||
|
import * as ShopCalendarApi from '@/api/heli/shopCalendar'
|
||||||
|
import * as YgjxApi from '@/api/heli/ygjx'
|
||||||
|
import * as UserApi from '@/api/system/user'
|
||||||
|
import EquipmentSelect from '../hlvuestyle/equipmentSelect.vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'MaterialPlan'
|
||||||
|
})
|
||||||
|
const router = useRouter()
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
|
const loading = ref(false) // 列表的加载中
|
||||||
|
const list = ref([]) // 列表的数据
|
||||||
|
const total = ref(0) // 列表的总页数
|
||||||
|
const queryParams = reactive({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
yearMonth: '',
|
||||||
|
workerIdOrName: '',
|
||||||
|
manufacturingEquipment: ''
|
||||||
|
})
|
||||||
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
|
//接收客户设备传递的数据
|
||||||
|
const handleSelectedEquip = (newValue: any) => {
|
||||||
|
console.log('接收客户设备对应的数据:', newValue)
|
||||||
|
if(newValue){
|
||||||
|
queryParams.manufacturingEquipment = newValue.id
|
||||||
|
}else{
|
||||||
|
queryParams.manufacturingEquipment = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/** 查询列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await YgjxApi.getZjPgMasterLinePage(queryParams)
|
||||||
|
list.value = data.list
|
||||||
|
total.value = data.total
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 重置 */
|
||||||
|
const resetQuery = (dates) =>{
|
||||||
|
if (typeof dates === 'undefined' || dates === null || dates === '') {
|
||||||
|
message.error("请选择年月后再进行重置")
|
||||||
|
} else {
|
||||||
|
//根据传入的年月调用接口更新表信息
|
||||||
|
resetRl(dates)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetRl = async (dates: string) =>{
|
||||||
|
|
||||||
|
const data = await ShopCalendarApi.resetRl(dates);
|
||||||
|
|
||||||
|
if(data){
|
||||||
|
ElMessage({
|
||||||
|
message: '重置成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 2000, // 提示持续时间,单位为毫秒
|
||||||
|
});
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
queryParams.yearMonth = formatDate(queryParams.yearMonth,'YYYY-MM')
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user