fix:1.班次页面:月度统计时间调整为上月26到本月25;班次支持右键添加批注
2.外购下单:KJNS域订单免检自动更新批次属性;外购下单-全部页新增【更新IFS批次属性】按钮,支持更新已提交订单的批次属性
3.资源要求-设备:设备核查计划:核查负责人回显问题修复;设备使用授权:检验项目导出数据错误问题修复
| | |
| | | */ |
| | | @ApiOperation("导åºä½¿ç¨ææ") |
| | | @GetMapping("/exportDeviceImpower") |
| | | public Result exportDeviceImpower(@RequestParam("impowerId") Integer impowerId, HttpServletResponse response) { |
| | | return deviceImpowerService.exportDeviceImpowerDto(impowerId, response); |
| | | public void exportDeviceImpower(@RequestParam("impowerId") Integer impowerId, HttpServletResponse response) { |
| | | deviceImpowerService.exportDeviceImpowerDto(impowerId, response); |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * ä½¿ç¨ææå¯¼åº |
| | | */ |
| | | Result exportDeviceImpowerDto(Integer impowerId, HttpServletResponse response); |
| | | void exportDeviceImpowerDto(Integer impowerId, HttpServletResponse response); |
| | | } |
| | |
| | | * @param impowerId 设å¤ä½¿ç¨id |
| | | */ |
| | | @Override |
| | | public Result exportDeviceImpowerDto(Integer impowerId, HttpServletResponse response) { |
| | | public void exportDeviceImpowerDto(Integer impowerId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤ä½¿ç¨ææè®¡å |
| | | DeviceImpower deviceImpower = baseMapper.selectById(impowerId); |
| | | DeviceImpowerDto deviceImpowerDto = new DeviceImpowerDto(); |
| | |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | } |
| | |
| | | <!--è®¾å¤æ ¸æ¥è®¡å详æ
å表--> |
| | | <select id="pageDeviceExaminePlanDetail" resultType="com.ruoyi.device.dto.DeviceExaminePlanDetailsDto"> |
| | | select * from ( |
| | | select d.*, |
| | | select |
| | | d.plan_details_id, |
| | | d.plan_id, |
| | | d.device_id, |
| | | d.device_number, |
| | | d.device_name, |
| | | d.check_time, |
| | | d.check_index, |
| | | d.check_method, |
| | | d.how_results, |
| | | d.check_charger_user_id, |
| | | CASE WHEN d.check_charger_user='' or d.check_charger_user is null THEN u.name |
| | | ELSE d.check_charger_user END AS check_charger_user, |
| | | d.remark, |
| | | d.create_user, |
| | | d.create_time, |
| | | d.update_user, |
| | | d.update_time, |
| | | CASE |
| | | WHEN dc.review_status = 0 THEN 3 |
| | | WHEN dc.review_status = 1 THEN 2 |
| | |
| | | WHEN dd.record_contrast_id IS NOT NULL THEN 1 |
| | | ELSE 0 END record_contrast_status |
| | | from device_examine_plan_details d |
| | | left join user u on u.id = d.check_charger_user_id |
| | | left join device_examine_record dc on d.plan_details_id = dc.plan_details_id |
| | | left join device_examine_record_contrast dd on dd.plan_details_id = dc.plan_details_id |
| | | order by check_time asc |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.aspect; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.enums.ContractType; |
| | | import com.ruoyi.common.enums.OrderType; |
| | | import com.ruoyi.common.utils.api.IfsApiUtils; |
| | | import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO; |
| | | import com.ruoyi.inspect.service.IfsPartPropsRecordService; |
| | | import com.ruoyi.inspect.service.IfsSplitOrderRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Before; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Isolation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * å¤è´ä¸åï¼KJNSå订åå
æ£åï¼æ¥è¯¢ZTNSåç¸å订åçæ¹æ¬¡å±æ§å¹¶æ¨éå°IFS |
| | | */ |
| | | @Aspect |
| | | @Slf4j |
| | | @Component |
| | | public class PushIfsPartPropsRecordAspect { |
| | | |
| | | @Autowired |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | |
| | | @Autowired |
| | | private IfsApiUtils ifsApiUtils; |
| | | |
| | | @Autowired |
| | | private IfsPartPropsRecordService ifsPartPropsRecordService; |
| | | |
| | | @Before(value = "execution(* com.ruoyi.inspect.service.impl.RawMaterialOrderServiceImpl.rawOrderRelease(..))") |
| | | @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED) |
| | | public void doAfterReturning(JoinPoint joinPoint) { |
| | | Object[] args = joinPoint.getArgs(); |
| | | if(Objects.nonNull(args) && args.length>0) { |
| | | Long ifsInventoryId = (Long)args[0]; |
| | | log.info("id:{}",ifsInventoryId); |
| | | IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryId); |
| | | //å¦æè®¢åæ¯KJNSåçå¤è´è®¢åï¼å
æ£æ¶åæ¥ZTNSåçIFSæ¹æ¬¡å±æ§ |
| | | if(StringUtils.equals(ContractType.KJNS.getValue(),ifsInventoryQuantity.getContract()) && StringUtils.equals(OrderType.WG.getValue(),ifsInventoryQuantity.getOrderType())){ |
| | | //æ¥è¯¢ZTNSåçç¸åæ¹æ¬¡è®¢åæ¶æ¯ |
| | | IfsInventoryQuantityDto ifsInventoryQuantityDto = new IfsInventoryQuantityDto(); |
| | | BeanUtil.copyProperties(ifsInventoryQuantity,ifsInventoryQuantityDto); |
| | | ifsInventoryQuantityDto.setContract(ContractType.ZTNS.getValue()); |
| | | IfsPartPropsRecordDTO oneByContract = ifsPartPropsRecordService.getOneByContract(ifsInventoryQuantityDto); |
| | | if(Objects.nonNull(oneByContract)){ |
| | | //æ´æ°IFSæ¹æ¬¡å±æ§ |
| | | Map<String, Object> inAttrMap = new HashMap<>(); |
| | | String actionType = "New"; |
| | | inAttrMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | inAttrMap.put("SYSCODE", "LIMS"); |
| | | inAttrMap.put("SYSMODEL", "åºåç©ææ¹æ¬¡å±æ§ä¿®æ¹"); |
| | | HashMap<String, Object> batchInfoMap = new HashMap<>(); |
| | | batchInfoMap.put("CONTRACT",ContractType.KJNS.getValue());//å |
| | | batchInfoMap.put("PART_NO",oneByContract.getPartNo());//é¶ä»¶å· |
| | | batchInfoMap.put("LOT_BATCH_NO",oneByContract.getLotBatchNo());//æ¹æ¬¡å· |
| | | batchInfoMap.put("ATTR1",oneByContract.getDrumNo());//è½½å
·ç¼å· |
| | | batchInfoMap.put("ATTR2",oneByContract.getStartMeterMark().toString());//èµ·å§ç±³æ |
| | | batchInfoMap.put("ATTR3",oneByContract.getEndMeterMark().toString());//æªæ¢ç±³æ |
| | | batchInfoMap.put("ATTR4", oneByContract.getOuterColor());//夿¤é¢è² |
| | | batchInfoMap.put("ATTR5",oneByContract.getInsulationColor());//ç»ç¼é¢è² |
| | | batchInfoMap.put("ATTR8",oneByContract.getLetteringInfo());//å°åä¿¡æ¯ |
| | | batchInfoMap.put("ATTR23","车é´è®¢å");//å
¥åºæ¥æº |
| | | batchInfoMap.put("ATTR24","0");//åå²é¢çæ°é |
| | | batchInfoMap.put("ACTION_TYPE",actionType);//æä½ç±»å |
| | | inAttrMap.put("BATCH_INFO", Collections.singletonList(batchInfoMap)); |
| | | Result result = ifsApiUtils.importPartLotAttr(ContractType.KJNS.getValue(), JSONUtil.toJsonStr(inAttrMap)); |
| | | if(result.getCode()!=200){ |
| | | throw new RuntimeException("åºåç©ææ¹æ¬¡å±æ§æ´æ°å¤±è´¥ï¼"+result.getMessage()); |
| | | } |
| | | } |
| | | ifsPartPropsRecordService.save(oneByContract); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO; |
| | | import com.ruoyi.inspect.pojo.IfsPartPropsRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | public interface IfsPartPropsRecordMapper extends BaseMapper<IfsPartPropsRecord> { |
| | | |
| | | Long selectCountByPartNoAndLotBatchNo(@Param("partNo") String partNo, @Param("lotBatchNo") String lotBatchNo); |
| | | |
| | | IfsPartPropsRecordDTO selectOneByContract(@Param("dto") IfsInventoryQuantityDto ifsInventoryQuantityDto); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO; |
| | | import com.ruoyi.inspect.pojo.IfsPartPropsRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | |
| | | boolean saveOrUpdateProps(IfsPartPropsRecordDTO ifsPartPropsRecord); |
| | | |
| | | IfsPartPropsRecord getOneByIfsId(Long ifsId); |
| | | |
| | | IfsPartPropsRecordDTO getOneByContract(IfsInventoryQuantityDto ifsInventoryQuantityDto); |
| | | } |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | |
| | | /** |
| | | * @author 27233 |
| | |
| | | * @createDate 2025-09-23 11:20:20 |
| | | */ |
| | | public interface IfsSplitOrderRecordService extends IService<IfsSplitOrderRecord> { |
| | | |
| | | } |
| | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.common.core.domain.Result; |
| | |
| | | if(Objects.isNull(ifsPartPropsRecord)){ |
| | | throw new RuntimeException("åæ°ä¸è½ä¸ºç©º"); |
| | | } |
| | | //æ¥è¯¢æ¯å¦å·²æåæ¹æ¬¡åé¶ä»¶å·çæ¹æ¬¡å±æ§ï¼æ²¡æææ´æ° |
| | | Long count = baseMapper.selectCountByPartNoAndLotBatchNo(ifsPartPropsRecord.getPartNo(),ifsPartPropsRecord.getLotBatchNo()); |
| | | if(count==0){ |
| | | //å¤ææ¯æ°å¢è¿æ¯æ´æ° |
| | | String actionType = Objects.isNull(ifsPartPropsRecord.getId())?"New":"Modify"; |
| | | Map<String, Object> inAttrMap = new HashMap<>(); |
| | | inAttrMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | inAttrMap.put("SYSCODE", "LIMS"); |
| | | inAttrMap.put("SYSMODEL", "åºåç©ææ¹æ¬¡å±æ§ä¿®æ¹"); |
| | | HashMap<String, Object> batchInfoMap = new HashMap<>(); |
| | | batchInfoMap.put("CONTRACT",ifsPartPropsRecord.getContract());//å |
| | | batchInfoMap.put("PART_NO",ifsPartPropsRecord.getPartNo());//é¶ä»¶å· |
| | | batchInfoMap.put("LOT_BATCH_NO",ifsPartPropsRecord.getLotBatchNo());//æ¹æ¬¡å· |
| | | batchInfoMap.put("ATTR1",ifsPartPropsRecord.getDrumNo());//è½½å
·ç¼å· |
| | | batchInfoMap.put("ATTR2",ifsPartPropsRecord.getStartMeterMark().toString());//èµ·å§ç±³æ |
| | | batchInfoMap.put("ATTR3",ifsPartPropsRecord.getEndMeterMark().toString());//æªæ¢ç±³æ |
| | | batchInfoMap.put("ATTR4", ifsPartPropsRecord.getOuterColor());//夿¤é¢è² |
| | | batchInfoMap.put("ATTR5",ifsPartPropsRecord.getInsulationColor());//ç»ç¼é¢è² |
| | | batchInfoMap.put("ATTR8",ifsPartPropsRecord.getLetteringInfo());//å°åä¿¡æ¯ |
| | | batchInfoMap.put("ATTR23","车é´è®¢å");//å
¥åºæ¥æº |
| | | batchInfoMap.put("ATTR24","0");//åå²é¢çæ°é |
| | | batchInfoMap.put("ACTION_TYPE",actionType);//æä½ç±»å |
| | | inAttrMap.put("BATCH_INFO", Collections.singletonList(batchInfoMap)); |
| | | Result result = ifsApiUtils.importPartLotAttr(ifsPartPropsRecord.getContract(),JSONUtil.toJsonStr(inAttrMap)); |
| | | if(result.getCode()!=200){ |
| | | throw new RuntimeException("åºåç©ææ¹æ¬¡å±æ§æ´æ°å¤±è´¥ï¼"+result.getMessage()); |
| | | } |
| | | //å¤ææ¯æ°å¢è¿æ¯æ´æ° |
| | | String actionType = Objects.isNull(ifsPartPropsRecord.getId())?"New":"Modify"; |
| | | Map<String, Object> inAttrMap = new HashMap<>(); |
| | | inAttrMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | inAttrMap.put("SYSCODE", "LIMS"); |
| | | inAttrMap.put("SYSMODEL", "åºåç©ææ¹æ¬¡å±æ§ä¿®æ¹"); |
| | | HashMap<String, Object> batchInfoMap = new HashMap<>(); |
| | | batchInfoMap.put("CONTRACT",ifsPartPropsRecord.getContract());//å |
| | | batchInfoMap.put("PART_NO",ifsPartPropsRecord.getPartNo());//é¶ä»¶å· |
| | | batchInfoMap.put("LOT_BATCH_NO",ifsPartPropsRecord.getLotBatchNo());//æ¹æ¬¡å· |
| | | batchInfoMap.put("ATTR1",ifsPartPropsRecord.getDrumNo());//è½½å
·ç¼å· |
| | | batchInfoMap.put("ATTR2",ifsPartPropsRecord.getStartMeterMark().toString());//èµ·å§ç±³æ |
| | | batchInfoMap.put("ATTR3",ifsPartPropsRecord.getEndMeterMark().toString());//æªæ¢ç±³æ |
| | | batchInfoMap.put("ATTR4", ifsPartPropsRecord.getOuterColor());//夿¤é¢è² |
| | | batchInfoMap.put("ATTR5",ifsPartPropsRecord.getInsulationColor());//ç»ç¼é¢è² |
| | | batchInfoMap.put("ATTR8",ifsPartPropsRecord.getLetteringInfo());//å°åä¿¡æ¯ |
| | | batchInfoMap.put("ATTR23","车é´è®¢å");//å
¥åºæ¥æº |
| | | batchInfoMap.put("ATTR24","0");//åå²é¢çæ°é |
| | | batchInfoMap.put("ACTION_TYPE",actionType);//æä½ç±»å |
| | | inAttrMap.put("BATCH_INFO", Collections.singletonList(batchInfoMap)); |
| | | Result result = ifsApiUtils.importPartLotAttr(ifsPartPropsRecord.getContract(),JSONUtil.toJsonStr(inAttrMap)); |
| | | if(result.getCode()!=200){ |
| | | throw new RuntimeException("åºåç©ææ¹æ¬¡å±æ§æ´æ°å¤±è´¥ï¼"+result.getMessage()); |
| | | } |
| | | return this.saveOrUpdate(ifsPartPropsRecord); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public IfsPartPropsRecord getOneByIfsId(Long ifsId) { |
| | |
| | | } |
| | | return this.getOne(Wrappers.<IfsPartPropsRecord>lambdaQuery().eq(IfsPartPropsRecord::getIfsInventoryId,ifsId).last("limit 1")); |
| | | } |
| | | |
| | | @Override |
| | | public IfsPartPropsRecordDTO getOneByContract(IfsInventoryQuantityDto ifsInventoryQuantityDto) { |
| | | return baseMapper.selectOneByContract(ifsInventoryQuantityDto); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspect.mapper.IfsSplitOrderRecordMapper; |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | import com.ruoyi.inspect.service.IfsSplitOrderRecordService; |
| | | import com.ruoyi.inspect.mapper.IfsSplitOrderRecordMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class IfsSplitOrderRecordServiceImpl extends ServiceImpl<IfsSplitOrderRecordMapper, IfsSplitOrderRecord> |
| | | implements IfsSplitOrderRecordService{ |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.io.IoUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.support.ExcelTypeEnum; |
| | |
| | | import com.ruoyi.common.constant.InsOrderTypeConstants; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.enums.ContractType; |
| | | import com.ruoyi.common.enums.OrderType; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.LimsDateUtil; |
| | |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.common.utils.api.IfsApiUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.CopperInsOrderDto; |
| | | import com.ruoyi.inspect.dto.OrderSplitDTO; |
| | | import com.ruoyi.inspect.dto.RawMaterialStandardTreeDto; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.excel.OrderSplitExcelData; |
| | | import com.ruoyi.inspect.excel.OrderSplitExcelListener; |
| | | import com.ruoyi.inspect.mapper.InsOrderMapper; |
| | |
| | | private IfsApiUtils ifsApiUtils; |
| | | |
| | | private IfsSplitOrderRecordService ifsSplitOrderRecordService; |
| | | |
| | | private InsUnqualifiedHandlerMapper insUnqualifiedHandlerMapper; |
| | | |
| | | private final NumberGenerator<IfsSplitOrderRecord> splitOrderRecordNumberGenerator; |
| | | |
| | |
| | | and iiq.update_batch_no= #{lotBatchNo} |
| | | and ippr.id is not null |
| | | </select> |
| | | <select id="selectOneByContract" resultType="com.ruoyi.inspect.dto.IfsPartPropsRecordDTO"> |
| | | select iiq.part_no, |
| | | iiq.update_batch_no as lot_batch_no, |
| | | iiq.contract, |
| | | ippr.id, |
| | | ippr.ifs_inventory_id, |
| | | ippr.drum_no, |
| | | ippr.start_meter_mark, |
| | | ippr.end_meter_mark, |
| | | ippr.insulation_color, |
| | | ippr.outer_color, |
| | | ippr.lettering_info, |
| | | ippr.part_props_flag |
| | | from ifs_inventory_quantity iiq |
| | | left join ifs_part_props_record ippr on iiq.id = ippr.ifs_inventory_id |
| | | where iiq.contract = #{dto.contract} |
| | | AND iiq.update_batch_no = #{dto.updateBatchNo} |
| | | AND iiq.part_no = #{dto.partNo} |
| | | AND iiq.order_type = #{dto.orderType} |
| | | LIMIT 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @ApiOperation(value = "ç¼è¾æ¹æ³¨å
容") |
| | | @PostMapping("editAnnotationText") |
| | | public Result<?> editAnnotationText(@RequestBody PerformanceShift performanceShift){ |
| | | return Result.success(performanceShiftService.editAnnotationText(performanceShift)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æç") |
| | | @PostMapping("add") |
| | | public Result<?> performanceShiftAdd(@RequestBody PerformanceShiftAddDto performanceShiftAddDto) { |
| | |
| | | import com.ruoyi.performance.pojo.PerformanceShift; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | IPage<PerformanceShiftMapDto> performanceShiftPage( |
| | | Page<Object> page, |
| | | @Param("time") String time, |
| | | @Param("firstDayOfMonth") LocalDate firstDayOfMonth, |
| | | @Param("lastDayOfMonth") LocalDate lastDayOfMonth, |
| | | @Param("userName") String userName, |
| | | @Param("laboratory") String laboratory |
| | | ); |
| | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("æ¹æ³¨å
容") |
| | | private String annotationText; |
| | | |
| | | } |
| | |
| | | Map<Object, Object> exportToYearExcel(String time, String userName, String laboratory) throws Exception; |
| | | |
| | | Map<Object, Object> exportToMonthExcel(String time, String userName, String laboratory); |
| | | |
| | | boolean editAnnotationText(PerformanceShift performanceShift); |
| | | } |
| | |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | IPage<PerformanceShiftMapDto> mapIPage = baseMapper.performanceShiftPage(page, time, userName, laboratory); |
| | | // è·åheaderæ¶é´ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | DateTimeFormatter formatters = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | // å°å符串æ¶é´è½¬æ¢ä¸º LocalDateTime ç±»åæ¶é´ |
| | | LocalDateTime localDateTime = LocalDateTime.parse(time, formatters); |
| | | //çæ¬¡æ¶é´èå´ä¸ºä¸ä¸ªæç26å·å°æ¬æç25å· |
| | | LocalDate firstDayOfMonth = localDateTime.toLocalDate().minusMonths(1L).withDayOfMonth(26); |
| | | LocalDate lastDayOfMonth = localDateTime.toLocalDate().withDayOfMonth(25); |
| | | |
| | | IPage<PerformanceShiftMapDto> mapIPage = baseMapper.performanceShiftPage(page, firstDayOfMonth,lastDayOfMonth, userName, laboratory); |
| | | |
| | | List<SysDictData> shiftType = dictTypeService.selectDictDataByName("çæ¬¡ç±»å"); |
| | | List<Map<String, Object>> mapYearIPage = baseMapper.performanceShiftYearPage(time, userName, laboratory); |
| | |
| | | i.getMonthlyAttendance().put(enums.getDictLabel(), bigDecimal.add(new BigDecimal("1"))); |
| | | } |
| | | // åï¼å¦å¤å天ç®ç»æ© |
| | | if (shiftTimeAndShift[1].equals("5") && enums.getDictValue().equals("0")) { |
| | | BigDecimal bigDecimal = new BigDecimal(i.getMonthlyAttendance().get(enums.getDictLabel()).toString()); |
| | | i.getMonthlyAttendance().put(enums.getDictLabel(), bigDecimal.add(new BigDecimal("0.5"))); |
| | | } |
| | | // if (shiftTimeAndShift[1].equals("5") && enums.getDictValue().equals("0")) { |
| | | // BigDecimal bigDecimal = new BigDecimal(i.getMonthlyAttendance().get(enums.getDictLabel()).toString()); |
| | | // i.getMonthlyAttendance().put(enums.getDictLabel(), bigDecimal.add(new BigDecimal("0.5"))); |
| | | // } |
| | | } |
| | | // æ©ï¼ä¸ï¼å¤ï¼å·® |
| | | if (shiftTimeAndShift[1].equals("1") || shiftTimeAndShift[1].equals("2") || shiftTimeAndShift[1].equals("0") || shiftTimeAndShift[1].equals("6")) { |
| | | if (shiftTimeAndShift[1].equals("2") || shiftTimeAndShift[1].equals("3") || shiftTimeAndShift[1].equals("4")) { |
| | | i.getMonthlyAttendance().put("totalAttendance", totalAttendance += 1); |
| | | } |
| | | // å |
| | | if (shiftTimeAndShift[1].equals("5")) { |
| | | i.getMonthlyAttendance().put("totalAttendance", totalAttendance += 0.5); |
| | | } |
| | | hashMap.put("id", shiftTimeAndShift[2]); |
| | | // if (shiftTimeAndShift[1].equals("5")) { |
| | | // i.getMonthlyAttendance().put("totalAttendance", totalAttendance += 0.5); |
| | | // } |
| | | hashMap.put("id", shiftTimeAndShift[3]); |
| | | hashMap.put("shift", shiftTimeAndShift[1]); |
| | | hashMap.put("time", shiftTimeAndShift[0]); |
| | | hashMap.put("annotationText", shiftTimeAndShift[2]); |
| | | map.add(hashMap); |
| | | } |
| | | double totalYearAttendance = 0; |
| | |
| | | hashMap.put(enums.getDictLabel(), num.add(new BigDecimal("1"))); |
| | | } |
| | | // åï¼å¦å¤å天ç®ç»æ© |
| | | if (record.get("shift").equals("5") && enums.getDictValue().equals("0")) { |
| | | BigDecimal bigDecimal = new BigDecimal(hashMap.get(enums.getDictLabel()).toString()); |
| | | hashMap.put(enums.getDictLabel(), bigDecimal.add(new BigDecimal("0.5"))); |
| | | } |
| | | // if (record.get("shift").equals("5") && enums.getDictValue().equals("0")) { |
| | | // BigDecimal bigDecimal = new BigDecimal(hashMap.get(enums.getDictLabel()).toString()); |
| | | // hashMap.put(enums.getDictLabel(), bigDecimal.add(new BigDecimal("0.5"))); |
| | | // } |
| | | } |
| | | if (record.get("shift").equals("1") || record.get("shift").equals("2") || record.get("shift").equals("0") || record.get("shift").equals("6")) { |
| | | if (record.get("shift").equals("2") || record.get("shift").equals("3") || record.get("shift").equals("4")) { |
| | | hashMap.put("totalAttendance", totalYearAttendance += 1); |
| | | } |
| | | // å |
| | | if (record.get("shift").equals("5")) { |
| | | hashMap.put("totalAttendance", totalYearAttendance += 0.5); |
| | | } |
| | | // if (record.get("shift").equals("5")) { |
| | | // hashMap.put("totalAttendance", totalYearAttendance += 0.5); |
| | | // } |
| | | } |
| | | } |
| | | i.setSidebarAnnualAttendance(hashMap); |
| | | i.setList(map); |
| | | i.setShiftTime(null); |
| | | }); |
| | | // è·åheaderæ¶é´ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | DateTimeFormatter formatters = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | // å°å符串æ¶é´è½¬æ¢ä¸º LocalDateTime ç±»åæ¶é´ |
| | | LocalDateTime localDateTime = LocalDateTime.parse(time, formatters); |
| | | LocalDate firstDayOfMonth = localDateTime.toLocalDate().withDayOfMonth(1); |
| | | LocalDate lastDayOfMonth = localDateTime.toLocalDate().with(TemporalAdjusters.lastDayOfMonth()); |
| | | List<LocalDateTime> localDateTimesBetween = getLocalDateTimesBetween(firstDayOfMonth.atStartOfDay(), lastDayOfMonth.atStartOfDay()); |
| | | List<Object> list1 = new ArrayList<>(); |
| | | for (LocalDateTime dateTime : localDateTimesBetween) { |
| | |
| | | if (shiftTimeAndShift[1].equals("5")) { |
| | | i.getMonthlyAttendance().put("totalAttendance", totalAttendance += 0.5); |
| | | } |
| | | hashMap.put("id", shiftTimeAndShift[2]); |
| | | hashMap.put("id", shiftTimeAndShift[3]); |
| | | hashMap.put("shift", shiftTimeAndShift[1]); |
| | | hashMap.put("time", shiftTimeAndShift[0]); |
| | | hashMap.put("annotationText", shiftTimeAndShift[2]); |
| | | map.add(hashMap); |
| | | } |
| | | i.setList(map); |
| | |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public boolean editAnnotationText(PerformanceShift performanceShift) { |
| | | return this.updateById(performanceShift); |
| | | } |
| | | |
| | | // è·å两个localDateTimeçæ¯ä¸å¤© |
| | | public static List<LocalDateTime> getLocalDateTimesBetween(LocalDateTime start, LocalDateTime end) { |
| | | List<LocalDateTime> localDateTimes = new ArrayList<>(); |
| | |
| | | <select id="performanceShiftPage" resultMap="performanceShiftPageMap"> |
| | | SELECT |
| | | u2.name name, |
| | | GROUP_CONCAT(s.work_time, 'ï¼', s.shift, 'ï¼', s.id order by s.work_time SEPARATOR ';') AS shift_time, u2.id user_id |
| | | GROUP_CONCAT(s.work_time, 'ï¼', s.shift, 'ï¼',IFNULL(s.annotation_text,''), 'ï¼',s.id order by s.work_time SEPARATOR ';') AS shift_time, |
| | | u2.id user_id |
| | | FROM performance_shift s |
| | | LEFT JOIN (SELECT distinct u.* from |
| | | user u |
| | |
| | | ) u2 on u2.id = s.user_id |
| | | <where> |
| | | name is not null |
| | | <if test="time != null and time != ''"> |
| | | and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m' ) |
| | | <if test="firstDayOfMonth != null and lastDayOfMonth != null"> |
| | | AND s.work_time BETWEEN #{firstDayOfMonth} AND #{lastDayOfMonth} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u2.name like concat('%', #{userName}, '%') |
| | |
| | | - contract: KJNS #ç§æèä¸å |
| | | contract-key-get: ueWGmvzoc4iR0y%2FsP6iOMeYn3ohC45KTCl3dZ94WaNk%3D #get请æ±å¯é¥ |
| | | contract-key-post: ueWGmvzoc4iR0y/sP6iOMeYn3ohC45KTCl3dZ94WaNk= #post请æ±å¯é¥ |
| | | custorder: http://192.168.20.50/PurchService.ashx? #get请æ±å°å |
| | | custorder-port: http://192.168.20.50:8008/PurchService.ashx? #post请æ±å°å |
| | | erp-services: http://192.168.20.50:8081 #erp请æ±å°å |
| | | custorder: http://192.168.47.50/PurchService.ashx? #get请æ±å°å |
| | | custorder-port: http://192.168.20.47:8008/PurchService.ashx? #post请æ±å°å |
| | | erp-services: http://192.168.20.47:8081 #erp请æ±å°å |
| | | tobe-inspected-location: A101 #å¾
æ£åºä½ |
| | | raw-qualified-location: A201 #åææåæ ¼åºä½ |
| | | product-qualified-location: C101 #æååæ ¼åºä½ |