basic-server/src/main/java/com/ruoyi/basic/mapper/StandardProductListMapper.java
@@ -3,6 +3,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.ruoyi.basic.pojo.StandardProductList; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -14,6 +15,7 @@ * @createDate 2024-03-05 10:33:29 * @Entity com.ruoyi.basic.pojo.StandardProductList */ @Mapper public interface StandardProductListMapper extends BaseMapper<StandardProductList> { IPage<StandardProductList> standardProductListIPage(@Param("id") Integer id, @Param("tree") String tree, IPage<StandardProductList> page, @Param("laboratory") String laboratory, @Param("insItem") String insItem, @Param("insItems") String insItems); inspect-server/src/main/java/com/ruoyi/inspect/aspect/InternalOrderAutoInspectionExemptionAspect.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,60 @@ package com.ruoyi.inspect.aspect; import cn.hutool.core.bean.BeanUtil; import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; import com.ruoyi.basic.pojo.IfsInventoryQuantity; import com.ruoyi.inspect.service.RawMaterialOrderService; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.Aspect; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; import java.util.List; import java.util.Objects; /** * å é¨è®¢åæ¥æ£åèªå¨æ§è¡å æ£ */ @Aspect @Slf4j @Component public class InternalOrderAutoInspectionExemptionAspect { @Autowired private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; @Lazy @Autowired private RawMaterialOrderService rawMaterialOrderService; /** * å é¨å ¬å¸å表 */ private final static List<String> internalCompany = Arrays.asList("æ±èä¸å¤©ç§æè¡ä»½æéå ¬å¸(èä¸å·¥å)","ä¸å¤©è䏿éå ¬å¸"); @AfterReturning(value = "execution(* com.ruoyi.inspect.service.impl.RawMaterialOrderServiceImpl.inspectionReportOne(..))") @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED) public void doAfterReturning(JoinPoint joinPoint) { try{ Object[] args = joinPoint.getArgs(); if(Objects.nonNull(args) && args.length>0) { IfsInventoryQuantity ifsInventoryQuantity = BeanUtil.toBean(args[0], IfsInventoryQuantity.class); //æ¥è¯¢ifséè´è®¢åä¿¡æ¯ IfsInventoryQuantity record = ifsInventoryQuantityMapper.selectById(ifsInventoryQuantity.getId()); if(internalCompany.contains(record.getSupplierName())){ log.info("å é¨å ¬å¸æ¥æ£ï¼èªå¨æ§è¡å æ£ï¼è®¢åå·ï¼{}, ä¾åºåï¼{},订åidï¼{}", record.getOrderNo(), record.getSupplierName(), record.getId()); rawMaterialOrderService.rawOrderRelease(record.getId(), record.getPartDesc()); } } }catch (Exception e){ log.error("å é¨å ¬å¸æ¥æ£åå æ£æ§è¡å¼å¸¸->{}",e.getMessage()); } } } inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsReportMapper.java
@@ -6,6 +6,7 @@ import com.ruoyi.inspect.dto.InsReportExport; import com.ruoyi.inspect.dto.ReportPageDto; import com.ruoyi.inspect.pojo.InsReport; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -16,6 +17,7 @@ * @createDate 2024-03-17 22:10:02 * @Entity com.yuanchu.mom.pojo.InsReport */ @Mapper public interface InsReportMapper extends BaseMapper<InsReport> { /** inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleUserMapper.java
@@ -3,6 +3,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.inspect.pojo.InsSampleUser; import com.ruoyi.inspect.vo.InsSampleUserVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; /** @@ -11,6 +12,7 @@ * @createDate 2024-03-14 17:12:02 * @Entity com.yuanchu.mom.pojo.InsSampleUser */ @Mapper public interface InsSampleUserMapper extends BaseMapper<InsSampleUser> { InsSampleUserVO selectUserNameByOrderId(@Param("orderId") Integer orderId); inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
@@ -85,16 +85,27 @@ public class RawMaterialOrderServiceImpl implements RawMaterialOrderService { private StandardTreeMapper standardTreeMapper; private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; private UserMapper userMapper; private InsOrderService insOrderService; private InsOrderMapper insOrderMapper; private InsSampleMapper insSampleMapper; private final NumberGenerator<InsOrder> numberGenerator; private InsReportService insReportService; private WechatProperty wechatProperty; private ThreadPoolTaskExecutor threadPoolTaskExecutor; private InsProductMapper insProductMapper; private AuxiliaryOutputWorkingHoursMapper auxiliaryOutputWorkingHoursMapper; private IfsApiUtils ifsApiUtils; inspect-server/src/main/resources/mapper/InsUnqualifiedHandlerMapper.xml
@@ -107,12 +107,12 @@ FROM common_oa ) AS coa ON iuh.request_id = coa.workflow_id AND coa.rn = 1 <where> <if test="feedbackStartDate!=null and feedbackEndDate !=null"> AND iuh.feedback_time between #{feedbackStartDate} AND #{feedbackEndDate} </if> </where> )tempA <where> <if test="feedbackStartDate!=null and feedbackEndDate !=null"> AND feedback_time between #{feedbackStartDate} AND #{feedbackEndDate} </if> </where> <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} </if>