zouyu
2026-04-30 fe97e3191aaa5f5db104541946f6ac7937e46e15
人员考勤统计调整&原材料下单导出检验项详情
已添加1个文件
已修改10个文件
221 ■■■■ 文件已修改
basic-server/src/main/java/com/ruoyi/basic/dto/IfsInventoryQuantitySupplierDto.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/pojo/IfsInventoryQuantity.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/vo/ProductVo.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsProductMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/java/com/ruoyi/performance/controller/StaffAttendanceController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/java/com/ruoyi/performance/pojo/StaffAttendanceTrackingRecord.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/java/com/ruoyi/performance/service/impl/StaffAttendanceTrackingRecordServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/resources/mapper/StaffAttendanceTrackingRecordMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/enums/StaffWorkStateFlag.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/dto/IfsInventoryQuantitySupplierDto.java
@@ -19,7 +19,7 @@
    /**
     * å§”托编号
     */
    @ExcelProperty(index = 2, value = "委托编号")
    @ExcelProperty(index = 1, value = "委托编号")
    @ApiModelProperty("委托编号")
    private String entrustCode;
@@ -32,11 +32,11 @@
    @ApiModelProperty("销售订单分类名称")
    private String orderTypeName;
    @ExcelProperty(index = 7, value = "样品名称")
    @ExcelProperty(index = 6, value = "样品名称")
    @ApiModelProperty("样品名称")
    private String sampleName;
    @ExcelProperty(index = 8, value = "样品型号")
    @ExcelProperty(index = 7, value = "样品型号")
    @ApiModelProperty("样品型号")
    private String sampleModel;
@@ -90,21 +90,21 @@
    @ApiModelProperty("创建人")
    private Integer createUser;
    @ExcelProperty(index = 9, value = "检验人")
    @ExcelProperty(index = 8, value = "检验人")
    @ApiModelProperty("检验人")
    private String userName;
    @ExcelProperty(index = 10, value = "下发时间")
    @ExcelProperty(index = 9, value = "下发时间")
    private String sendTimeString;
    @ExcelProperty(index = 14, value = "接收时间")
    @ExcelProperty(index = 13, value = "接收时间")
    private String receiverDateString;
    @ExcelProperty(index = 15, value = "报检时间")
    @ExcelProperty(index = 14, value = "报检时间")
    private String declareDateString;
    // åˆæ ¼çŠ¶æ€,: 0 æ£€éªŒä¸­, 1合格, 2不合格, 3未下单,4让步放行
    @ExcelProperty(index = 6, value = "检验状态")
    @ExcelProperty(index = 5, value = "检验状态")
    private String inspectStatusString;
    @ApiModelProperty("报检开始时间")
@@ -114,12 +114,12 @@
    private String endDeclareDate;
    @ApiModelProperty("不合格描述")
    @ExcelProperty(index = 16, value = "不合格描述")
    @ExcelProperty(index = 15, value = "不合格描述")
    private String unqualifiedDesc;
    @ApiModelProperty("不合格项")
    @ExcelProperty(index = 17, value = "不合格项")
    @ExcelProperty(index = 16, value = "不合格项")
    private String unqualifiedItem;
    @ApiModelProperty("免检")
basic-server/src/main/java/com/ruoyi/basic/pojo/IfsInventoryQuantity.java
@@ -23,7 +23,7 @@
    @ApiModelProperty("域")
    private String contract;
    @ExcelProperty(index = 13, value = "订单号")
    @ExcelProperty(index = 12, value = "订单号")
    @ApiModelProperty("订单号")
    private String orderNo;
@@ -42,11 +42,11 @@
    @ApiModelProperty("接收号")
    private Integer receiptNo;
    @ExcelProperty(index = 3, value = "零件号")
    @ExcelProperty(index = 2, value = "零件号")
    @ApiModelProperty("零件号")
    private String partNo;
    @ExcelProperty(index = 4, value = "零件描述")
    @ExcelProperty(index = 3, value = "零件描述")
    @ApiModelProperty("零件描述")
    private String partDesc;
@@ -56,7 +56,7 @@
    @ApiModelProperty("状态(IFS原本拉取的状态)")
    private String statusDb;
    @ExcelProperty(index = 11, value = "抵达的采购数量")
    @ExcelProperty(index = 10, value = "抵达的采购数量")
    @ApiModelProperty("抵达的采购数量")
    private BigDecimal qtyArrived;
@@ -69,7 +69,7 @@
    @ApiModelProperty("供应商编号")
    private String supplierId;
    @ExcelProperty(index = 5, value = "供应商名称")
    @ExcelProperty(index = 4, value = "供应商名称")
    @ApiModelProperty("供应商名称")
    private String supplierName;
@@ -142,7 +142,7 @@
    @ApiModelProperty("采购订单行备注")
    private String lineRemarks;
    @ExcelProperty(index = 12, value = "单位")
    @ExcelProperty(index = 11, value = "单位")
    @ApiModelProperty("单位")
    private String buyUnitMeas;
@@ -189,7 +189,7 @@
    private Integer isQuarter;
    // ä¿®æ”¹åŽçš„
    @ExcelProperty(index = 1, value = "批号")
    @ExcelProperty(index = 0, value = "批号")
    @ApiModelProperty("批号")
    private String updateBatchNo;
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java
@@ -8,6 +8,7 @@
import com.ruoyi.inspect.dto.SampleProductRawAnalysisDto;
import com.ruoyi.inspect.pojo.InsProduct;
import com.ruoyi.inspect.pojo.InsProductDeviationWarningDetail;
import com.ruoyi.inspect.vo.ProductVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -79,6 +80,8 @@
     * @return
     */
    List<InsProductDeviationWarningDetail> selectAnalysis(@Param("insProduct") InsProduct insProduct, @Param("supplierName") String supplierName);
    List<ProductVo> selectInspectListByIfsIfs(@Param("ifsIds") List<Long> ifsIds);
}
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
@@ -51,6 +51,7 @@
import com.ruoyi.inspect.service.InsOrderService;
import com.ruoyi.inspect.service.InsReportService;
import com.ruoyi.inspect.service.RawMaterialOrderService;
import com.ruoyi.inspect.vo.ProductVo;
import com.ruoyi.performance.mapper.AuxiliaryOutputWorkingHoursMapper;
import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours;
import com.ruoyi.system.mapper.UserMapper;
@@ -783,6 +784,9 @@
            }
        }
        //查询检验项记录
        List<Long> ifsIds = ifsByOverList.stream().map(IfsInventoryQuantitySupplierDto::getId).collect(Collectors.toList());
        List<ProductVo> inspectList = insProductMapper.selectInspectListByIfsIfs(ifsIds);
        response.setContentType("application/vnd.ms-excel");
@@ -794,10 +798,12 @@
            //新建ExcelWriter
            ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build();
            //获取sheet0对象
            WriteSheet mainSheet = EasyExcel.writerSheet(0, "原材料检测信息导出").head(IfsInventoryQuantitySupplierDto.class).build();
            WriteSheet mainSheet = EasyExcel.writerSheet(0, "原材料检测信息总览").head(IfsInventoryQuantitySupplierDto.class).build();
            WriteSheet inspectSheet = EasyExcel.writerSheet(1, "原材料检测数据详情").head(ProductVo.class).build();
            //向sheet0写入数据 ä¼ å…¥ç©ºlist这样只导出表头
            excelWriter.write(ifsByOverList, mainSheet);
            excelWriter.write(inspectList, inspectSheet);
            //关闭流
            excelWriter.finish();
        } catch (IOException e) {
inspect-server/src/main/java/com/ruoyi/inspect/vo/ProductVo.java
@@ -1,22 +1,102 @@
package com.ruoyi.inspect.vo;
import com.ruoyi.inspect.pojo.InsProduct;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ProductVo  {
    //管色标
    private String bushColor;
    /**
     * è®¢å•号
     */
    @ExcelProperty(value = "订单号",index = 0)
    @ApiModelProperty("订单号")
    private String orderNo;
    //光纤色标
    private String color;
    /**
     * æ‰¹æ¬¡å·
     */
    @ExcelProperty(value = "批次号",index = 1)
    @ApiModelProperty("批次号")
    private String updateBatchNo;
    //光纤带编号
    private String code;
    /**
     * é›¶ä»¶å·
     */
    @ExcelProperty(value = "零件号",index = 2)
    @ApiModelProperty("零件号")
    private String partNo;
    //检验项目
    private InsProduct insProduct;
    /**
     * é›¶ä»¶æè¿°
     */
    @ExcelProperty(value = "零件描述",index = 3)
    @ApiModelProperty("零件描述")
    private String partDesc;
    /**
     * å§”托编号
     */
    @ExcelProperty(value = "委托编号",index = 4)
    @ApiModelProperty("委托编号")
    private String entrustCode ;
    /**
     * æ ·å“ç¼–号
     */
    @ExcelProperty(value = "样品编号",index = 5)
    @ApiModelProperty("样品编号")
    private String sampleCode;
    /**
     * æ£€éªŒé¡¹
     */
    @ExcelProperty(value = "检验项",index = 6)
    @ApiModelProperty("检验项")
    private String inspectionItem;
    /**
     * æ£€éªŒå­é¡¹
     */
    @ExcelProperty(value = "检验子项",index = 7)
    @ApiModelProperty("检验子项")
    private String inspectionItemSubclass;
    /**
     * æ ‡å‡†è¦æ±‚
     */
    @ExcelProperty(value = "标准要求",index = 8)
    @ApiModelProperty("标准要求")
    private String tell;
    /**
     * æ£€éªŒå€¼
     */
    @ExcelProperty(value = "检验值",index = 9)
    @ApiModelProperty("检验值")
    private String lastValue;
    /**
     * æ£€éªŒç»“æžœ
     */
    @ExcelProperty(value = "检验结果",index = 10)
    @ApiModelProperty("检验结果")
    private String insResult;
    /**
     * æ£€éªŒäºº
     */
    @ExcelProperty(value = "检验人",index = 11)
    @ApiModelProperty("检验人")
    private String name;
    /**
     * æ£€éªŒæ—¶é—´
     */
    @ExcelProperty(value = "检验时间",index = 12)
    @ApiModelProperty("检验时间")
    private String createTime;
}
inspect-server/src/main/resources/mapper/InsProductMapper.xml
@@ -172,4 +172,37 @@
        order by io.first_submit_date desc
        limit 10
    </select>
    <select id="selectInspectListByIfsIfs" resultType="com.ruoyi.inspect.vo.ProductVo">
        select
            iiq.order_no,
            iiq.update_batch_no,
            iiq.part_no,
            iiq.part_desc,
            io.entrust_code ,
            isa.sample_code,
            ip.inspection_item,
            ip.inspection_item_subclass,
            ip.tell,
            ip.`last_value`,
            case
               when ip.ins_result = 0 then '不合格'
               when ip.ins_result = 1 then '合格'
               when ip.ins_result = 3 then '不判定'
               else ''
            end AS ins_result,
            u.name,
            ipr.create_time
        from ifs_inventory_quantity iiq
                 inner join ins_order io on iiq.id = io.ifs_inventory_id
                 left join ins_sample isa on io.id = isa.ins_order_id
                 left join ins_product ip on isa.id = ip.ins_sample_id
                 inner join ins_product_result ipr on ip.id = ipr.ins_product_id
                 left join user u on ipr.create_user = u.id
        WHERE
            iiq.id in
            <foreach collection="ifsIds" item="ifsId" separator="," open="(" close=")">
                #{ifsId}
            </foreach>
            AND ip.state = 1
    </select>
</mapper>
performance-server/src/main/java/com/ruoyi/performance/controller/StaffAttendanceController.java
@@ -73,6 +73,7 @@
        StaffAttendanceTrackingRecord trackingRecord = new StaffAttendanceTrackingRecord();
        trackingRecord.setId(staffAttendanceDTO.getId());
        trackingRecord.setEnableReport(staffAttendanceDTO.getEnableReport());
        trackingRecord.setWorkStateFlag(staffAttendanceDTO.getWorkStateFlag());
        return Result.success(trackingRecordService.updateById(trackingRecord));
    }
performance-server/src/main/java/com/ruoyi/performance/pojo/StaffAttendanceTrackingRecord.java
@@ -163,6 +163,11 @@
    private Boolean enableReport;
    /**
     * ä¸Š/下班状态标记
     */
    private String workStateFlag;
    /**
     * åˆ›å»ºäºº
     */
    @TableField(fill = FieldFill.INSERT)
performance-server/src/main/java/com/ruoyi/performance/service/impl/StaffAttendanceTrackingRecordServiceImpl.java
@@ -13,10 +13,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.util.concurrent.AtomicDouble;
import com.ruoyi.common.core.domain.entity.User;
import com.ruoyi.common.enums.ClockInState;
import com.ruoyi.common.enums.EnterOrExitType;
import com.ruoyi.common.enums.CalendarType;
import com.ruoyi.common.enums.SyncStatus;
import com.ruoyi.common.enums.*;
import com.ruoyi.common.utils.api.icc.IccApiUtil;
import com.ruoyi.common.utils.api.icc.model.GetResultPageRequest;
import com.ruoyi.common.utils.api.icc.model.GetResultPageResponse;
@@ -240,13 +237,13 @@
                if (!enterRecords.isEmpty()) {
                    // ä¸Šç­æ—¶é—´å’ŒçŠ¶æ€
                    StaffAttendanceTrackingRecord enterRecord = enterRecords.stream()
                            .filter(s -> !s.getSwingTime().isAfter(currentShiftStartDateTime) && !s.getSwingTime().isBefore(boundaryTime))
                            .filter(s -> (!s.getSwingTime().isAfter(currentShiftStartDateTime) && !s.getSwingTime().isBefore(boundaryTime)) || StringUtils.equals(s.getWorkStateFlag(), StaffWorkStateFlag.WORK.getValue()))
                            .max(Comparator.comparing(StaffAttendanceTrackingRecord::getSwingTime))
                            .orElse(new StaffAttendanceTrackingRecord());
                    if (BeanUtil.isEmpty(enterRecord)) {
                        enterRecord = enterRecords.stream()
                                .filter(s -> (s.getSwingTime().isAfter(currentShiftStartDateTime)
                                        && s.getSwingTime().isBefore(currentShiftEndDateTime)))
                                        && s.getSwingTime().isBefore(currentShiftEndDateTime)) || StringUtils.equals(s.getWorkStateFlag(), StaffWorkStateFlag.WORK.getValue()))
                                .min(Comparator.comparing(StaffAttendanceTrackingRecord::getSwingTime))
                                .orElse(new StaffAttendanceTrackingRecord());
                        workDateTime = enterRecord.getSwingTime();
@@ -263,14 +260,14 @@
                if (!exitRecords.isEmpty()) {
                    // ä¸‹ç­æ—¶é—´å’ŒçŠ¶æ€
                    StaffAttendanceTrackingRecord exitRecord = exitRecords.stream()
                            .filter(s -> !s.getSwingTime().isBefore(currentShiftEndDateTime)
                                    && s.getSwingTime().isBefore(nextShiftStartDateTime))
                            .filter(s -> (!s.getSwingTime().isBefore(currentShiftEndDateTime)
                                    && s.getSwingTime().isBefore(nextShiftStartDateTime)) || StringUtils.equals(s.getWorkStateFlag(), StaffWorkStateFlag.OFF_WORK.getValue()))
                            .min(Comparator.comparing(StaffAttendanceTrackingRecord::getSwingTime))
                            .orElse(new StaffAttendanceTrackingRecord());
                    if (BeanUtil.isEmpty(exitRecord) && !now.isBefore(currentShiftEndDateTime)) {
                        exitRecord = exitRecords.stream()
                                .filter(s -> (s.getSwingTime().isAfter(currentShiftStartDateTime)
                                        && s.getSwingTime().isBefore(currentShiftEndDateTime)))
                                        && s.getSwingTime().isBefore(currentShiftEndDateTime)) || StringUtils.equals(s.getWorkStateFlag(), StaffWorkStateFlag.OFF_WORK.getValue()))
                                .max(Comparator.comparing(StaffAttendanceTrackingRecord::getSwingTime))
                                .orElse(new StaffAttendanceTrackingRecord());
                        offWorkDateTime = exitRecord.getSwingTime();
performance-server/src/main/resources/mapper/StaffAttendanceTrackingRecordMapper.xml
@@ -33,6 +33,7 @@
            <result property="curTemp" column="cur_temp" jdbcType="DOUBLE"/>
            <result property="isSync" column="is_sync" jdbcType="INTEGER"/>
            <result property="enableReport" column="enable_report" jdbcType="BOOLEAN"/>
            <result property="workStateFlag" column="work_state_flag" jdbcType="VARCHAR"/>
            <result property="createUser" column="create_user" jdbcType="INTEGER"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="updateUser" column="update_user" jdbcType="INTEGER"/>
@@ -48,7 +49,7 @@
        enter_or_exit,image_type,open_result,
        open_type,paper_number,record_image_url,
        record_image,remark,mask_state,
        over_temp,cur_temp,is_sync,enable_report,
        over_temp,cur_temp,is_sync,enable_report,work_state_flag,
        create_user,create_time,update_user,
        update_time
    </sql>
ruoyi-common/src/main/java/com/ruoyi/common/enums/StaffWorkStateFlag.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
package com.ruoyi.common.enums;
import lombok.Getter;
/**
 * äººå‘˜è€ƒå‹¤-上/下班状态枚举
 */
@Getter
public enum StaffWorkStateFlag {
    WORK("上班","00work"),
    OFF_WORK("下班","01offWork");
    private String desc,value;
    StaffWorkStateFlag(String desc, String value) {
        this.desc = desc;
        this.value = value;
    }
}