| | |
| | | /** |
| | | * å§æç¼å· |
| | | */ |
| | | @ExcelProperty(index = 2, value = "å§æç¼å·") |
| | | @ExcelProperty(index = 1, value = "å§æç¼å·") |
| | | @ApiModelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | |
| | | @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; |
| | | |
| | |
| | | @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("æ¥æ£å¼å§æ¶é´") |
| | |
| | | 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("å
æ£") |
| | |
| | | @ApiModelProperty("å") |
| | | private String contract; |
| | | |
| | | @ExcelProperty(index = 13, value = "订åå·") |
| | | @ExcelProperty(index = 12, value = "订åå·") |
| | | @ApiModelProperty("订åå·") |
| | | private String orderNo; |
| | | |
| | |
| | | @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; |
| | | |
| | |
| | | @ApiModelProperty("ç¶æ(IFS忬æåçç¶æ)") |
| | | private String statusDb; |
| | | |
| | | @ExcelProperty(index = 11, value = "æµè¾¾çéè´æ°é") |
| | | @ExcelProperty(index = 10, value = "æµè¾¾çéè´æ°é") |
| | | @ApiModelProperty("æµè¾¾çéè´æ°é") |
| | | private BigDecimal qtyArrived; |
| | | |
| | |
| | | @ApiModelProperty("ä¾åºåç¼å·") |
| | | private String supplierId; |
| | | |
| | | @ExcelProperty(index = 5, value = "ä¾åºååç§°") |
| | | @ExcelProperty(index = 4, value = "ä¾åºååç§°") |
| | | @ApiModelProperty("ä¾åºååç§°") |
| | | private String supplierName; |
| | | |
| | |
| | | @ApiModelProperty("éè´è®¢åè¡å¤æ³¨") |
| | | private String lineRemarks; |
| | | |
| | | @ExcelProperty(index = 12, value = "åä½") |
| | | @ExcelProperty(index = 11, value = "åä½") |
| | | @ApiModelProperty("åä½") |
| | | private String buyUnitMeas; |
| | | |
| | |
| | | private Integer isQuarter; |
| | | |
| | | // ä¿®æ¹åç |
| | | @ExcelProperty(index = 1, value = "æ¹å·") |
| | | @ExcelProperty(index = 0, value = "æ¹å·") |
| | | @ApiModelProperty("æ¹å·") |
| | | private String updateBatchNo; |
| | | |
| | |
| | | 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; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<InsProductDeviationWarningDetail> selectAnalysis(@Param("insProduct") InsProduct insProduct, @Param("supplierName") String supplierName); |
| | | |
| | | List<ProductVo> selectInspectListByIfsIfs(@Param("ifsIds") List<Long> ifsIds); |
| | | } |
| | | |
| | | |
| | |
| | | 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; |
| | |
| | | |
| | | } |
| | | } |
| | | //æ¥è¯¢æ£éªé¡¹è®°å½ |
| | | List<Long> ifsIds = ifsByOverList.stream().map(IfsInventoryQuantitySupplierDto::getId).collect(Collectors.toList()); |
| | | List<ProductVo> inspectList = insProductMapper.selectInspectListByIfsIfs(ifsIds); |
| | | |
| | | |
| | | response.setContentType("application/vnd.ms-excel"); |
| | |
| | | //æ°å»º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) { |
| | |
| | | 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; |
| | | |
| | | |
| | | } |
| | |
| | | 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> |
| | |
| | | StaffAttendanceTrackingRecord trackingRecord = new StaffAttendanceTrackingRecord(); |
| | | trackingRecord.setId(staffAttendanceDTO.getId()); |
| | | trackingRecord.setEnableReport(staffAttendanceDTO.getEnableReport()); |
| | | trackingRecord.setWorkStateFlag(staffAttendanceDTO.getWorkStateFlag()); |
| | | return Result.success(trackingRecordService.updateById(trackingRecord)); |
| | | } |
| | | |
| | |
| | | private Boolean enableReport; |
| | | |
| | | /** |
| | | * ä¸/ä¸çç¶ææ è®° |
| | | */ |
| | | private String workStateFlag; |
| | | |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | |
| | | 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; |
| | |
| | | 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(); |
| | |
| | | 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(); |
| | |
| | | <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"/> |
| | |
| | | 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |