value
2024-05-12 3b75c8cf561035c41d25d5b8765a7c89375ca264
各bug修复;
已修改12个文件
74 ■■■■ 文件已修改
framework/src/main/java/com/yuanchu/mom/pojo/InformationNotification.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/com/yuanchu/mom/service/InformationNotificationService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/com/yuanchu/mom/service/impl/InformationNotificationServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/controller/InsOrderPlanController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/InsOrderPlanService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/vo/InsOrderPlanVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsSampleMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user-server/src/main/java/com/yuanchu/mom/pojo/User.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/com/yuanchu/mom/pojo/InformationNotification.java
@@ -1,14 +1,13 @@
package com.yuanchu.mom.pojo;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * <p>
@@ -27,6 +26,7 @@
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键ID")
    @TableId(type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty("创建人")
framework/src/main/java/com/yuanchu/mom/service/InformationNotificationService.java
@@ -2,11 +2,9 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.mom.pojo.InformationNotification;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.mom.pojo.InformationNotification;
import com.yuanchu.mom.pojo.InformationNotificationDto;
import java.util.List;
/**
 * <p>
@@ -25,4 +23,6 @@
    Boolean checkForUnreadData();
    void triggerModificationStatusToRead(Integer id);
    int addInformationNotification(InformationNotification informationNotification);
}
framework/src/main/java/com/yuanchu/mom/service/impl/InformationNotificationServiceImpl.java
@@ -3,15 +3,15 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.common.GetLook;
import com.yuanchu.mom.pojo.InformationNotification;
import com.yuanchu.mom.mapper.InformationNotificationMapper;
import com.yuanchu.mom.pojo.InformationNotification;
import com.yuanchu.mom.pojo.InformationNotificationDto;
import com.yuanchu.mom.service.InformationNotificationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@@ -26,12 +26,12 @@
@Service
public class InformationNotificationServiceImpl extends ServiceImpl<InformationNotificationMapper, InformationNotification> implements InformationNotificationService {
    @Autowired
    @Resource
    private GetLook getLook;
    @Override
    public IPage<InformationNotificationDto> getPage(Page page, String messageType) {
        Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter");
        Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId(null);
        return baseMapper.getPage(page, messageType, map1.get("userId"));
    }
@@ -71,4 +71,9 @@
                .eq(InformationNotification::getId, id)
                .set(InformationNotification::getViewStatus, true));
    }
    @Override
    public int addInformationNotification(InformationNotification informationNotification) {
        return baseMapper.insert(informationNotification);
    }
}
inspect-server/src/main/java/com/yuanchu/mom/controller/InsOrderPlanController.java
@@ -65,8 +65,8 @@
    @ValueClassify("检验任务")
    @ApiOperation(value = "检验任务提交")
    @PostMapping("/submitPlan")
    public Result<?> submitPlan(Integer orderId, String laboratory) {
        int num = insOrderPlanService.submitPlan(orderId, laboratory);
    public Result<?> submitPlan(Integer orderId, String laboratory, Integer verifyUser) {
        int num = insOrderPlanService.submitPlan(orderId, laboratory, verifyUser);
        return num==1?Result.success():Result.fail("提交失败,部分项目还未进行检验");
    }
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java
@@ -198,4 +198,6 @@
    @TableField(exist = false)
    private String templateName;
    private String dic;
}
inspect-server/src/main/java/com/yuanchu/mom/service/InsOrderPlanService.java
@@ -23,5 +23,5 @@
    int verifyPlan(Integer orderId, String laboratory, Integer type, String tell);
    int submitPlan(Integer orderId, String laboratory);
    int submitPlan(Integer orderId, String laboratory, Integer verifyUser);
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -26,6 +26,7 @@
import com.yuanchu.mom.exception.ErrorException;
import com.yuanchu.mom.mapper.*;
import com.yuanchu.mom.pojo.*;
import com.yuanchu.mom.service.InformationNotificationService;
import com.yuanchu.mom.service.InsOrderPlanService;
import com.yuanchu.mom.service.InsOrderService;
import com.yuanchu.mom.service.StandardTemplateService;
@@ -93,6 +94,9 @@
    @Resource
    private InsProductUserMapper insProductUserMapper;
    @Resource
    private InformationNotificationService informationNotificationService;
    @Override
    public Map<String, Object> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) {
@@ -711,7 +715,7 @@
    }
    @Override
    public int submitPlan(Integer orderId, String laboratory) {
    public int submitPlan(Integer orderId, String laboratory, Integer verifyUser) {
        List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId));
        List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList());
        List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().in(InsProduct::getInsSampleId, ids).eq(InsProduct::getSonLaboratory, laboratory).eq(InsProduct::getState, 1).isNull(InsProduct::getInsResult));
@@ -722,7 +726,19 @@
            }
            throw new ErrorException("以下是未检验的项目:" + str);
        }
        insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate().eq(InsOrderState::getInsOrderId, orderId).eq(InsOrderState::getLaboratory, laboratory).set(InsOrderState::getInsTime, LocalDateTime.now()).set(InsOrderState::getInsState, 3));
        insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate().eq(InsOrderState::getInsOrderId, orderId).eq(InsOrderState::getLaboratory, laboratory).set(InsOrderState::getInsTime, LocalDateTime.now()).set(InsOrderState::getInsState, 3).set(InsOrderState::getVerifyUser, verifyUser));
        Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId");
        InformationNotification info = new InformationNotification();
        info.setCreateUser(insProductMapper.selectUserById(userId).get("name"));
        info.setMessageType("2");
        info.setTheme("复核通知");
        info.setContent("您有一条检验任务待复核消息");
        info.setSenderId(userId);
        info.setConsigneeId(verifyUser);
        info.setViewStatus(false);
        info.setJumpPath("b1-inspect-order-plan");
        informationNotificationService.addInformationNotification(info);
        upPlanUser(userId, orderId);
        return 1;
    }
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java
@@ -117,6 +117,9 @@
                    product.setUpdateTime(null);
                    product.setUpdateUser(null);
                    product.setInsSampleId(a.getId());
                    if(product.getInspectionItemSubclass() == null){
                        product.setInspectionItemSubclass("");
                    }
                    insProductMapper.insert(product);
                }
            }
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
@@ -52,7 +52,7 @@
    @Override
    public List<StandardProductList> selectStandardProductList(InsSample insSample) {
        String[] models = insSample.getModel().split("-");
        String[] models = insSample.getModel().split("-(?=[^-]*$)");//拆分最后一个【-】
        List<StandardProductList> list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()).eq(StandardProductList::getState, 1).eq(StandardProductList::getModel, models[0]));
        list = list.stream().filter(a -> {
            try {
inspect-server/src/main/java/com/yuanchu/mom/vo/InsOrderPlanVO.java
@@ -40,4 +40,6 @@
    private Integer orderUserId;
    private Integer verifyUser;
}
inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -28,7 +28,7 @@
    <select id="findInsSampleAndOrder" resultType="com.yuanchu.mom.vo.InsOrderPlanVO">
        select * from(
        SELECT
        a.*,ios.ins_state,ios.verify_tell,isu2.order_user_id
        a.*,ios.ins_state,ios.verify_tell,isu2.order_user_id,(ios.verify_user = #{userId}) verify_user
        FROM
        (
        SELECT
@@ -152,7 +152,8 @@
               ipr.equip_value,
               ipr.equip_name,
               ip.method_s,
               ip.tell
               ip.tell,
               ip.dic
        from ins_sample isa
        left join ins_product ip on isa.id = ip.ins_sample_id
        left join ins_product_result ipr on ip.id = ipr.ins_product_id
@@ -225,6 +226,7 @@
        <result property="templateId" column="template_id" jdbcType="INTEGER"/>
        <result property="methodS" column="method_s"/>
        <result property="tell" column="tell"/>
        <result property="dic" column="dic"/>
        <collection property="insProductResult" resultMap="insProductResult"/>
    </resultMap>
user-server/src/main/java/com/yuanchu/mom/pojo/User.java
@@ -62,7 +62,7 @@
    @ApiModelProperty(value = "单位")
    private String company;
    @ValueTableShow(8)
    @ValueTableShow(14)
    @ApiModelProperty(value = "单位地址")
    private String address;