bug修复
This commit is contained in:
parent
2f23be03f4
commit
41e82056d1
@ -1,13 +1,13 @@
|
||||
package com.zhgd.xmgl.modules.smartbeamfield.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeamToProcess;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.entity.vo.CountDurationVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -26,4 +26,6 @@ public interface SmartBeamFieldBeamToProcessMapper extends BaseMapper<SmartBeamF
|
||||
List<SmartBeamFieldBeamToProcess> queryList(@Param(Constants.WRAPPER) QueryWrapper<SmartBeamFieldBeamToProcess> queryWrapper);
|
||||
|
||||
CountDurationVo countDuration(String smartBeamFieldBeamId);
|
||||
|
||||
int updateByPrimaryKeyCustom(SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess);
|
||||
}
|
||||
|
||||
@ -21,4 +21,43 @@
|
||||
from smart_beam_field_beam_to_process
|
||||
where smart_beam_field_beam_id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="updateByPrimaryKeyCustom"
|
||||
parameterType="com.zhgd.xmgl.modules.smartbeamfield.entity.SmartBeamFieldBeamToProcess">
|
||||
update smart_beam_field_beam_to_process
|
||||
<set>
|
||||
<if test="smartBeamFieldBeamId != null">
|
||||
smart_beam_field_beam_id = #{smartBeamFieldBeamId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="smartBeamFieldProcessId != null">
|
||||
smart_beam_field_process_id = #{smartBeamFieldProcessId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="processName != null">
|
||||
process_name = #{processName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
planned_start_time = #{plannedStartTime,jdbcType=TIMESTAMP},
|
||||
planned_end_time = #{plannedEndTime,jdbcType=TIMESTAMP},
|
||||
actual_start_time = #{actualStartTime,jdbcType=TIMESTAMP},
|
||||
actual_end_time = #{actualEndTime,jdbcType=TIMESTAMP},
|
||||
<if test="makeBeamPedestalSn != null">
|
||||
make_beam_pedestal_sn = #{makeBeamPedestalSn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="processChargePerson != null">
|
||||
process_charge_person = #{processChargePerson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectSn != null">
|
||||
project_sn = #{projectSn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createDate != null">
|
||||
create_date = #{createDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateDate != null">
|
||||
update_date = #{updateDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="smartBeamFieldMakeBeamPedestalId != null">
|
||||
smart_beam_field_make_beam_pedestal_id = #{smartBeamFieldMakeBeamPedestalId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
select sbfsbp.*,if(count(sbfsbp.id) =2 ,1 ,0) bindByBeamTwice
|
||||
from smart_beam_field_save_beam_pedestal sbfsbp
|
||||
left join smart_beam_field_beam_to_save_beam_pedestal sbfbtsbp on sbfsbp.id =
|
||||
sbfbtsbp.smart_beam_field_save_beam_pedestal_id
|
||||
sbfbtsbp.smart_beam_field_save_beam_pedestal_id and sbfbtsbp.is_save_beam=1
|
||||
${ew.customSqlSegment}
|
||||
group by sbfsbp.id
|
||||
order by sbfsbp.id desc
|
||||
|
||||
@ -6,6 +6,7 @@ import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -164,6 +165,13 @@ public class SmartBeamFieldBeamServiceImpl extends ServiceImpl<SmartBeamFieldBea
|
||||
throw new OpenAlertException("该存梁台座已存在该梁");
|
||||
}
|
||||
|
||||
//处理梁的之前的存梁台座
|
||||
smartBeamFieldBeamToSaveBeamPedestalMapper.update(null, new LambdaUpdateWrapper<SmartBeamFieldBeamToSaveBeamPedestal>()
|
||||
.set(SmartBeamFieldBeamToSaveBeamPedestal::getIsSaveBeam, 0)
|
||||
.eq(SmartBeamFieldBeamToSaveBeamPedestal::getSmartBeamFieldBeamId, smartBeamFieldBeamId)
|
||||
.eq(SmartBeamFieldBeamToSaveBeamPedestal::getIsSaveBeam, 1)
|
||||
);
|
||||
|
||||
SmartBeamFieldBeam beam = getById(smartBeamFieldBeamId);
|
||||
SmartBeamFieldBeamToSaveBeamPedestal saveBeamPedestalBeam = new SmartBeamFieldBeamToSaveBeamPedestal();
|
||||
saveBeamPedestalBeam.setSmartBeamFieldSaveBeamPedestalId(smartBeamFieldSaveBeamPedestalId);
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.smartbeamfield.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
@ -16,15 +15,15 @@ import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamMapper;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.mapper.SmartBeamFieldBeamToProcessMapper;
|
||||
import com.zhgd.xmgl.modules.smartbeamfield.service.ISmartBeamFieldBeamToProcessService;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import com.zhgd.xmgl.util.TimeUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @Description: 智慧梁场-梁和工序中间表
|
||||
@ -78,7 +77,9 @@ public class SmartBeamFieldBeamToProcessServiceImpl extends ServiceImpl<SmartBea
|
||||
//判断梁是否完成
|
||||
Long smartBeamFieldBeamId = smartBeamFieldBeamToProcess.getSmartBeamFieldBeamId();
|
||||
List<SmartBeamFieldBeamToProcess> smartBeamFieldBeamToProcesses = smartBeamFieldBeamToProcessMapper.selectList(new LambdaQueryWrapper<SmartBeamFieldBeamToProcess>()
|
||||
.eq(SmartBeamFieldBeamToProcess::getSmartBeamFieldBeamId, smartBeamFieldBeamId));
|
||||
.eq(SmartBeamFieldBeamToProcess::getSmartBeamFieldBeamId, smartBeamFieldBeamId)
|
||||
.in(SmartBeamFieldBeamToProcess::getStatus, Stream.of(1, 2).collect(Collectors.toList()))
|
||||
);
|
||||
if (CollUtil.isEmpty(smartBeamFieldBeamToProcesses)) {
|
||||
smartBeamFieldBeamMapper.update(null, new LambdaUpdateWrapper<SmartBeamFieldBeam>().set(SmartBeamFieldBeam::getBeamMakeStatus, 3)
|
||||
.eq(SmartBeamFieldBeam::getId, smartBeamFieldBeamId));
|
||||
@ -98,7 +99,7 @@ public class SmartBeamFieldBeamToProcessServiceImpl extends ServiceImpl<SmartBea
|
||||
@Override
|
||||
public void edit(SmartBeamFieldBeamToProcess smartBeamFieldBeamToProcess) {
|
||||
smartBeamFieldBeamToProcess.setStatus(getStatus(smartBeamFieldBeamToProcess));
|
||||
baseMapper.updateById(smartBeamFieldBeamToProcess);
|
||||
baseMapper.updateByPrimaryKeyCustom(smartBeamFieldBeamToProcess);
|
||||
setDoneIf(smartBeamFieldBeamToProcess);
|
||||
}
|
||||
|
||||
|
||||
@ -263,6 +263,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.antMatchers("/xmgl/project/getProjectExtendInfo").permitAll()
|
||||
.antMatchers("/xmgl/gouliPkpm/getTokenByCode").permitAll()
|
||||
.antMatchers("/xmgl/weight/weighBookVehicleInfo/pull/list").permitAll()
|
||||
.antMatchers("/xmgl/gouliPkpmModel/getBimTokenByProjectSn").permitAll()
|
||||
.antMatchers("/xmgl/gouliPkpmModel/queryById").permitAll()
|
||||
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
|
||||
.anyRequest().authenticated() // 剩下所有的验证都需要验证
|
||||
.and()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user