| | |
| | | throw new RuntimeException("åºåç©ææ¹æ¬¡å±æ§æ´æ°å¤±è´¥ï¼"+result.getMessage()); |
| | | } |
| | | log.info("KJNSåå¤è´è®¢åå
æ£åæ¥åºåç©ææ¹æ¬¡å±æ§å°IFS->{}", result); |
| | | oneByContract.setId(null); |
| | | oneByContract.setIfsInventoryId(ifsInventoryId); |
| | | ifsPartPropsRecordService.save(oneByContract); |
| | | } |
| | | oneByContract.setId(null); |
| | | oneByContract.setIfsInventoryId(ifsInventoryId); |
| | | ifsPartPropsRecordService.save(oneByContract); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¤é") |
| | | @ApiOperation(value = "æ¤éæªå®¡æ ¸è®¢å") |
| | | @PostMapping("/updateStatus") |
| | | public Result<?> updateStatus(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | insOrderService.updateStatus(id); |
| | | public Result<?> updateStatus(@RequestBody ProductOrderRevokeDTO revokeDTO) { |
| | | insOrderService.updateStatus(revokeDTO.getId()); |
| | | return Result.success(); |
| | | } |
| | | |
| | | //å¾
æ£çæ¤éçæ¥è¯¢å¾
æ£é¡¹ç® |
| | | @GetMapping("/selectNoProducts") |
| | | public Result<?> selectNoProducts(Page page, InsProduct insProduct, Integer orderId, String ids) { |
| | | return Result.success(insProductService.selectNoProducts(page, insProduct, orderId, ids)); |
| | | public Result<?> selectNoProducts(Page page, ProductOrderRevokeDTO revokeDTO) { |
| | | return Result.success(insProductService.selectNoProducts(page, revokeDTO.getOrderId(), revokeDTO.getRevocationInsProductIds())); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å¾
æ£çæ¤é") |
| | | @PostMapping("/updateInspected") |
| | | public Result<?> updateInspected(@RequestBody Map<String, Object> param) { |
| | | Integer orderId = (Integer) param.get("orderId"); |
| | | String ids = (String) param.get("ids"); |
| | | Integer typeSource = (Integer) param.get("typeSource"); |
| | | Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString()); |
| | | if (Objects.nonNull(typeSource) && typeSource == 1) { |
| | | ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>() |
| | | .set(IfsInventoryQuantity::getState, 0) |
| | | .eq(IfsInventoryQuantity::getId, ifsInventoryId)); |
| | | insOrderService.update(null, new LambdaUpdateWrapper<InsOrder>().set(InsOrder::getState, -1).eq(InsOrder::getId, orderId)); // æ¤é |
| | | } |
| | | insProductService.updateInspected(orderId, ids); |
| | | public Result<?> updateInspected(@RequestBody ProductOrderRevokeDTO revokeDTO) { |
| | | insProductService.updateInspected(revokeDTO.getOrderId(), revokeDTO.getIds().stream().map(String::valueOf).collect(Collectors.joining(","))); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸å¾
æ£æ¤é") |
| | | @PostMapping("/checkUpdate") |
| | | public Result<?> checkUpdate(@RequestBody Map<String, Object> param) { |
| | | Integer orderId = (Integer) param.get("orderId"); |
| | | Integer state = (Integer) param.get("state"); |
| | | insProductService.checkUpdate(orderId, state); |
| | | public Result<?> checkUpdate(@RequestBody ProductOrderRevokeDTO revokeDTO) { |
| | | insProductService.checkUpdate(revokeDTO.getOrderId(), revokeDTO.getState()); |
| | | return Result.success(); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æåä¸åï¼æå¨ä¸åæ¤édto |
| | | */ |
| | | @Data |
| | | public class ProductOrderRevokeDTO { |
| | | |
| | | private Integer id; |
| | | |
| | | /** |
| | | * æ¤éçæ£éªé¡¹idå表 |
| | | */ |
| | | private List<Integer> ids; |
| | | |
| | | /** |
| | | * 订åid |
| | | */ |
| | | private Integer orderId; |
| | | |
| | | /** |
| | | * 订åç¶æ |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * æ¤éæ£éªé¡¹idå符串 |
| | | */ |
| | | private String revocationInsProductIds; |
| | | |
| | | } |
| | |
| | | |
| | | boolean write(InsOrder insOrder); |
| | | |
| | | IPage<InsProduct> selectNoProducts(Page page, InsProduct insProduct, Integer orderId, String ids); |
| | | IPage<InsProduct> selectNoProducts(Page page, Integer orderId, String ids); |
| | | |
| | | void checkUpdate(Integer orderId,Integer state); |
| | | |
| | |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | import com.ruoyi.inspect.service.IfsPartPropsRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | IfsPartPropsRecord ifsPartPropsRecord = new IfsPartPropsRecord(); |
| | | ifsPartPropsRecord.setIfsInventoryId(ifsInventoryQuantity.getId());//ifs订åid |
| | | ifsPartPropsRecord.setDrumNo(parseObject.get("ATTR1").toString());//è½½å
·ç¼å· |
| | | BigDecimal startMeterMark = new BigDecimal(parseObject.get("ATTR2").toString()); |
| | | BigDecimal endMeterMark = new BigDecimal(parseObject.get("ATTR3").toString()); |
| | | BigDecimal startMeterMark = ObjectUtils.isNotEmpty(parseObject.get("ATTR2"))?new BigDecimal(parseObject.get("ATTR2").toString()):BigDecimal.ZERO; |
| | | BigDecimal endMeterMark = ObjectUtils.isNotEmpty(parseObject.get("ATTR3"))?new BigDecimal(parseObject.get("ATTR3").toString()):BigDecimal.ZERO; |
| | | ifsPartPropsRecord.setStartMeterMark(startMeterMark);//èµ·å§ç±³æ |
| | | ifsPartPropsRecord.setEndMeterMark(endMeterMark);//æªæ¢ç±³æ |
| | | ifsPartPropsRecord.setOuterColor(parseObject.get("ATTR4").toString());//夿¤é¢è² |
| | |
| | | |
| | | //æ¥è¯¢å¾
æ£é¡¹ç® |
| | | @Override |
| | | public IPage<InsProduct> selectNoProducts(Page page, InsProduct insProduct, Integer orderId, String ids) { |
| | | public IPage<InsProduct> selectNoProducts(Page page, Integer orderId, String ids) { |
| | | List<Integer> noIds = null; |
| | | if (StringUtils.isNotBlank(ids)) { |
| | | noIds = Arrays.asList(ids.split(",")).stream() |
| | | noIds = Arrays.stream(ids.split(",")) |
| | | .map(Integer::parseInt) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | IPage<InsProduct> insProductIPage = baseMapper.selectNoProducts(page, orderId, noIds); |
| | | return insProductIPage; |
| | | return baseMapper.selectNoProducts(page, orderId, noIds); |
| | | } |
| | | |
| | | //å®¡æ ¸å¾
æ£æ¤é |
| | |
| | | @Data |
| | | public class StaffAttendanceDTO extends StaffAttendanceTrackingRecord { |
| | | |
| | | |
| | | /** |
| | | * å¯¼åºæ¥æ |
| | | */ |
| | | @ApiModelProperty("å¯¼åºæ¥æ") |
| | | private String reportDate; |
| | | |
| | | /** |
| | | * å¼å§æ¶é´ |
| | | */ |
| | |
| | | import java.math.RoundingMode; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.ZoneId; |
| | | import java.time.*; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | |
| | | return this.saveOrUpdateBatch(records); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®å¯¼åºæ¥ææ ¼å¼åå¯¼åºæ¶é´èå´ |
| | | * @param staffAttendanceDTO |
| | | */ |
| | | private static void formatExportDateRange(StaffAttendanceDTO staffAttendanceDTO){ |
| | | if(StringUtils.isNoneBlank(staffAttendanceDTO.getReportDate())){ |
| | | LocalTime startTime = LocalTime.of(0,0,0); |
| | | LocalTime endTime = LocalTime.of(23,59,59); |
| | | YearMonth yearMonth; |
| | | if(StringUtils.equals(staffAttendanceDTO.getAttendanceReportType(),CalendarType.MONTH.name())){ |
| | | yearMonth = YearMonth.parse(staffAttendanceDTO.getReportDate(),DateTimeFormatter.ofPattern("yyyy-MM")); |
| | | LocalDateTime startDateTime = LocalDateTime.of(yearMonth.minusMonths(1L).atDay(26),startTime); |
| | | LocalDateTime endDateTime = LocalDateTime.of(yearMonth.atDay(25),endTime); |
| | | staffAttendanceDTO.setStartDate(startDateTime); |
| | | staffAttendanceDTO.setEndDate(endDateTime); |
| | | }else if(StringUtils.equals(staffAttendanceDTO.getAttendanceReportType(),CalendarType.YEAR.name())){ |
| | | Year year = Year.parse(staffAttendanceDTO.getReportDate(),DateTimeFormatter.ofPattern("yyyy")); |
| | | yearMonth = year.atMonth(1); |
| | | LocalDateTime startDateTime = LocalDateTime.of(yearMonth.minusMonths(1L).atDay(26),startTime); |
| | | LocalDateTime endDateTime = LocalDateTime.of(yearMonth.withMonth(12).atDay(25),endTime); |
| | | staffAttendanceDTO.setStartDate(startDateTime); |
| | | staffAttendanceDTO.setEndDate(endDateTime); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void exportStaffAttendanceRecords(HttpServletResponse response, StaffAttendanceDTO staffAttendanceDTO) { |
| | | response.reset(); |
| | | try{ |
| | | formatExportDateRange(staffAttendanceDTO); |
| | | //æ¥è¯¢äººåæ¶æ |
| | | List<User> userList = userMapper.selectUserListByPerformance(false); |
| | | List<Integer> userIdList = userList.stream().map(User::getId).collect(Collectors.toList()); |
| | |
| | | //æ¹æ³¨ä¿¡æ¯åæ ä¿¡æ¯ |
| | | List<StaffAttendanceAnnotationTextExcelData> annotationTextList = new ArrayList<>(); |
| | | // æ¥è¯¢ç次 |
| | | |
| | | List<PerformanceShiftMapDto> performanceShifts = performanceShiftMapper.selectListByWorkTime( |
| | | staffAttendanceDTO.getStartDate(), staffAttendanceDTO.getEndDate(), staffAttendanceDTO.getKeyword()); |
| | | //è·åè夿°æ® |
| | |
| | | * @return |
| | | */ |
| | | public Result queryPartLotAttr(String contract,String inAttr) { |
| | | return getResult(contract,"QUERY_PART_LOT_ATTR_STD", inAttr, "GET", "åºåç©ææ¹æ¬¡å±æ§æ¥è¯¢æ¥å£-->"); |
| | | return getResult(contract,"QUERY_PART_LOT_ATTR_STD", inAttr, "POST", "åºåç©ææ¹æ¬¡å±æ§æ¥è¯¢æ¥å£-->"); |
| | | } |
| | | |
| | | /** |