rentaiming
2024-07-30 a248df0c4a0e5405bedbd3db7b6a0b0ed7cc90a6
ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionCkglServiceImpl.java
@@ -15,6 +15,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.domain.getVolumeProductionRkQuery;
import com.ruoyi.system.api.feignClient.LogClient;
import com.ruoyi.system.api.feignClient.SysUserClient;
import io.swagger.models.auth.In;
import org.springframework.stereotype.Service;
@@ -53,6 +54,9 @@
    @Resource
    private ManagementGoodsMaterialsMapper managementGoodsMaterialsMapper;
    @Resource
    private LogClient logClient;
    @Override
    public PageDTO<VolumeProductionCkglVO> getslVolumeProductionCkglList(getslVolumeProductionCkglQuery VolumeProductionCkglQuery) {
@@ -94,7 +98,7 @@
        if (volumeProductionCkglDTO.getId()!=null){
            SlVolumeProductionCkgl slVolumeProductionRkgl=new  SlVolumeProductionCkgl();
            slVolumeProductionRkgl.setAttachmentUrl(volumeProductionCkglDTO.getAttachmentUrl());
            slVolumeProductionRkgl.setAuthorization(volumeProductionCkglDTO.getAuthorization());
            slVolumeProductionRkgl.setAuthorizationUrl(volumeProductionCkglDTO.getAuthorization());
            slVolumeProductionRkgl.setSource(volumeProductionCkglDTO.getSource());
            slVolumeProductionRkgl.setAuditStatus(1);
            slVolumeProductionRkgl.setManagementId(volumeProductionCkglDTO.getManagementId());
@@ -112,14 +116,14 @@
                byId.setAttachmentUrl(volumeProductionCkglDTO.getAttachmentUrl());
            }
            if (volumeProductionCkglDTO.getAuthorization()!=null){
                byId.setAuthorization(volumeProductionCkglDTO.getAuthorization());
                byId.setAuthorizationUrl(volumeProductionCkglDTO.getAuthorization());
            }
            this.updateById(byId);
        }
    }
    @Override
    public VolumeProductionCkglInfoVO getVolumeProductionCkglnfo(Integer id) {
    public VolumeProductionCkglInfoVO getVolumeProductionCkglnfo(Long id) {
        SlVolumeProductionCkgl byId = this.getById(id);
        VolumeProductionCkglInfoVO v= BeanUtils.copyBean(byId, VolumeProductionCkglInfoVO.class);
@@ -132,7 +136,7 @@
    }
    @Override
    public VolumeProductionCkglInventoryVO getVolumeProductionCkglInventory(Integer id) {
    public VolumeProductionCkglInventoryVO getVolumeProductionCkglInventory(Long id) {
        SlVolumeProductionCkgl byId = this.getById(id);
        VolumeProductionCkglInventoryVO vo = new VolumeProductionCkglInventoryVO();
        SysUser data = sysUserClient.getSysUser(byId.getId()).getData();
@@ -143,7 +147,7 @@
        vo.setStoreManagementName(slStoreManagement.getStoreManagementName());
        String directorId = slStoreManagement.getDirectorId();
        List<String> stri = Arrays.asList(directorId.split(","));
        String str1 = null;
        String str1 = "";
        if (stri.size() > 0) {
            for (String str : stri) {
                SysUser data1 = sysUserClient.getSysUser(Long.valueOf(str)).getData();
@@ -154,7 +158,7 @@
        String competentId = slStoreManagement.getCompetentId();
        List<String> stri1 = Arrays.asList(competentId.split(","));
        String str11 = null;
        String str11 = "";
        if (stri1.size() > 0) {
            for (String str : stri1) {
                SysUser data1 = sysUserClient.getSysUser(Long.valueOf(str)).getData();
@@ -165,7 +169,7 @@
        String administratorId = slStoreManagement.getAdministratorId();
        List<String> stri11 = Arrays.asList(administratorId.split(","));
        String str111 = null;
        String str111 = "";
        if (stri11.size() > 0) {
            for (String str : stri11) {
                SysUser data1 = sysUserClient.getSysUser(Long.valueOf(str)).getData();
@@ -202,7 +206,7 @@
    }
    @Override
    public void ck(Integer id) {
    public void ck(Long id) {
        LambdaQueryWrapper<SlVolumeProductionCk> wrapper1 = Wrappers.lambdaQuery();
        wrapper1.eq(SlVolumeProductionCk::getCkglId, id);
        wrapper1.eq(SlVolumeProductionCk::getDelFlag, 0);
@@ -231,16 +235,21 @@
        SlVolumeProductionCkgl byId = this.getById(id);
        byId.setAuditStatus(6);
        this.updateById(byId);
        logClient.savelong1();
    }
    @Override
    public void gh(Integer id) {
    public void gh(Long id) {
        LambdaQueryWrapper<SlVolumeProductionCk> wrapper1 = Wrappers.lambdaQuery();
        wrapper1.eq(SlVolumeProductionCk::getCkglId, id);
        wrapper1.eq(SlVolumeProductionCk::getDelFlag, 0);
        wrapper1.orderByDesc(SlVolumeProductionCk::getCreateTime);
        List<SlVolumeProductionCk> page2 = slVolumeProductionCkMapper.selectList(wrapper1);
        for (SlVolumeProductionCk list : page2) {
            list.setIsGh(2);
            slVolumeProductionCkMapper.updateById(list);
            SlVolumeProductionRk slVolumeProductionRk = slVolumeProductionRkMapper.selectById(list.getRkId());
            Long num =slVolumeProductionRk.getRepertoryZhai()+Long.valueOf(list.getGuihNum());
            slVolumeProductionRk.setRepertoryZhai(num);