1.优化调整,修复bug

master
董哲奇 5 months ago
parent aa7dfc04dc
commit f89fc18d39

@ -105,21 +105,28 @@ public class ZyjhController {
dmYdjh.setZtByZyjhzx(dto.getZxZtName());
}
}
YcldwInfo info = dto.getYcldwInfo();
if ("PWFK".equals(dto.getZxZtName())){
// ycldwInfoService.updatePw(dto.getYcldwInfo());
wsHandler.sendPwComplete((JSONObject) JSONObject.toJSON(dto.getYcldwInfo()));
if (ObjUtil.isNotEmpty(info)&&info.getId()!=null){
ycldwInfoService.updatePw(info);
wsHandler.sendPwComplete((JSONObject) JSONObject.toJSON(info));
}
}
if ("HXFK".equals(dto.getZxZtName())){
// ycldwInfoService.updatePw(dto.getYcldwInfo());
wsHandler.sendHXComplete((JSONObject) JSONObject.toJSON(dto.getYcldwInfo()));
if (ObjUtil.isNotEmpty(info)&&info.getId()!=null){
ycldwInfoService.updatePw(dto.getYcldwInfo());
wsHandler.sendHXComplete((JSONObject) JSONObject.toJSON(dto.getYcldwInfo()));
}
}
if ("QGFK".equals(dto.getZxZtName())){
//无需划线,从理料间获取时才更新垛位信息
if ("42".equals(dto.getZt())){
// ycldwInfoService.updatePw(dto.getYcldwInfo());
if (ObjUtil.isNotEmpty(info)&&info.getId()!=null){
if ("42".equals(dto.getZt())){
ycldwInfoService.updatePw(dto.getYcldwInfo());
}
wsHandler.sendHXComplete((JSONObject) JSONObject.toJSON(dto.getYcldwInfo()));
wsHandler.sendQGComplete((JSONObject) JSONObject.toJSON(dto.getYcldwInfo()));
}
wsHandler.sendHXComplete((JSONObject) JSONObject.toJSON(dto.getYcldwInfo()));
wsHandler.sendQGComplete((JSONObject) JSONObject.toJSON(dto.getYcldwInfo()));
}
zyjhService.updateBatchById(list);

@ -66,5 +66,5 @@ public interface DmYdjhMapper extends BaseMapper<DmYdjh> {
List<Map<String,Object>> getWcl();
List<Map<String,Object>> getYdjhByZt(String zt,String wgzt,String wclzt);
List<Map<String,Object>> getYdjhByZt(String zt,String wgzt,String wclzt,String from, String to);
}

@ -1,5 +1,6 @@
package com.dsic.gj_erp.service.zyjh;
import cn.hutool.core.util.ObjUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsic.gj_erp.bean.jhgk.DmYdjh;
@ -27,11 +28,8 @@ public class YcldwInfoService extends ServiceImpl<YcldwInfoMapper, YcldwInfo> {
@Transactional(rollbackOn = Exception.class)
public void updatePw(YcldwInfo info){
this.removeById(info.getId());
baseMapper.pwfk(info.getCeng(),info.getDwId());
this.removeById(info.getId());
baseMapper.pwfk(info.getCeng(),info.getDwId());
}
@Transactional(rollbackOn = Exception.class)

@ -38,24 +38,28 @@ public class ZyjhService extends ServiceImpl<DmYdjhMapper,DmYdjh> {
public List<DmYdjh> getYdjhByZtOrForeman(String zt,String foreman){
QueryWrapper<DmYdjh> wrapper = new QueryWrapper<DmYdjh>()
.lt("zt",62);
.ge("zt",11);
switch (zt){
case "31":
wrapper.eq("pwpgry",foreman);
wrapper.eq("pwpgry",foreman).isNull("pwfkry");
break;
case "51":
wrapper.eq("hxpgry",foreman);
wrapper.eq("hxpgry",foreman).isNull("hxfkry");
break;
case "61":
wrapper.eq("qgpgry",foreman);
wrapper.eq("qgpgry",foreman).isNull("qgfkry");
break;
}
wrapper.orderByDesc("dc_ch","dc_pl,dc_fd,tzbh");
return list(wrapper);
}
public List<Map<String,Object>> getYdjhByZt(String zt,String wgzt,String wclzt){
return baseMapper.getYdjhByZt(zt,wgzt,wclzt);
DateTime date = DateUtil.date();
String from = DateUtil.beginOfMonth(date).toString("yyyy/MM/dd");
String to = DateUtil.endOfMonth(date).toString("yyyy/MM/dd");
return baseMapper.getYdjhByZt(zt,wgzt,wclzt,from,to);
}

@ -897,7 +897,7 @@ where dc_ch=#{dcch} and dc_pl =#{dcpl}
from
dm_ydjh
where
zt>='2' and zt&lt;'62' ) a
zt>=2 and zt&lt;62 ) a
where a.rn=1
order by dcCh asc ,dcPl desc ,zt
</select>
@ -906,32 +906,41 @@ where dc_ch=#{dcch} and dc_pl =#{dcpl}
select
dc_ch dcCh,dc_pl dcPl,count(1) total,plxh,
<if test="wgzt=='62'">
sum(case when isnull(qgfkry,'')='' then 1 else 0 end) wwg,
sum(case when isnull(qgfkry,'')!='' then 1 else 0 end) comp,
sum(case when isnull(qgfkrq,'')='' then 1 else 0 end) wwg,
sum(case when isnull(qgfkrq,'')!='' then 1 else 0 end) comp,
</if>
<if test="wgzt=='52'">
sum(case when isnull(hxfkry,'')='' then 1 else 0 end) wwg,
sum(case when isnull(hxfkry,'')!='' then 1 else 0 end) comp,
sum(case when isnull(hxfkrq,'')='' then 1 else 0 end) wwg,
sum(case when isnull(hxfkrq,'')!='' then 1 else 0 end) comp,
</if>
<if test="wgzt=='32'">
sum(case when isnull(pwfkry,'')='' then 1 else 0 end) wwg,
sum(case when isnull(pwfkry,'')!='' then 1 else 0 end) comp,
sum(case when isnull(pwfkrq,'')='' then 1 else 0 end) wwg,
sum(case when isnull(pwfkrq,'')!='' then 1 else 0 end) comp,
</if>
<if test="zt!=null and zt!=''">
sum(case when zt=#{zt} then 1 else 0 end) compOnLastGx,
sum(case when zt>=#{zt} then 1 else 0 end) compOnLastGx,
</if>
<if test="wgzt=='62'">
sum(case when isnull(qgpgry,'')='' then 1 else 0 end) wpg
sum(case when isnull(qgpgrq,'')='' then 1 else 0 end) wpg
</if>
<if test="wgzt=='52'">
sum(case when isnull(hxpgry,'')='' then 1 else 0 end) wpg
sum(case when isnull(hxpgrq,'')='' then 1 else 0 end) wpg
</if>
<if test="wgzt=='32'">
sum(case when isnull(pwpgry,'')='' then 1 else 0 end) wpg
sum(case when isnull(pwpgrq,'')='' then 1 else 0 end) wpg
</if>
from
dm_ydjh
where zt>=11 and zt&lt;=62
where zt>=11
<if test="wgzt=='62'">
and isnull(qgfkrq,'')=''
</if>
<if test="wgzt=='52'">
and isnull(hxfkrq,'')=''
</if>
<if test="wgzt=='32'">
and isnull(pwfkrq,'')=''
</if>
group by dc_ch, dc_pl,plxh
order by dc_ch,dc_pl
</select>

Loading…
Cancel
Save