修正余料,质量

master
xhj 8 months ago
parent 5ee08bb336
commit 0b6aa4c268

@ -34,7 +34,7 @@ public interface DmYdjhMapper extends BaseMapper<DmYdjh> {
List<PgdTzjh> getTzjh1(@Param("begin") String begin, @Param("end") String end);
// List<PgdDh> getDhjh1(@Param("begin") String begin, @Param("end") String end);
List<PgdDh> getDhjh1(List<String> ids);
List<PgdSljh> getSljh1(@Param("begin") String begin, @Param("end") String end);
List<PgdPwjh> getPwjh1(@Param("begin") String begin, @Param("end") String end);
List<PgdQgjh> getQgjh1(@Param("begin") String begin, @Param("end") String end);

@ -143,14 +143,14 @@ public class DmYdjhServiceImpl extends ServiceImpl<DmYdjhMapper, DmYdjh> impleme
dmYdjh.setColor("yellow");
}
}
if(StringUtils.isBlank(pgdTzjh.getTltxfrq())||StringUtils.isBlank(dmYdjh.getHxrq()) ){
if(StringUtils.isBlank(pgdTzjh.getTltxfrq())||StringUtils.isBlank(dmYdjh.getHxjhrq()) ){
// corlor yellow
dmYdjh.setColor("red");
}else{
DateTime dateStr1 = DateUtil.parse(pgdTzjh.getTltxfrq(), "yyyy/MM/dd");
DateTime dateStr2 = DateUtil.parse(dmYdjh.getHxrq(), "yyyy/MM/dd");
DateTime dateStr2 = DateUtil.parse(dmYdjh.getHxjhrq(), "yyyy/MM/dd");
int result = DateUtil.compare(dateStr1, dateStr2);
if (result > 0) {
System.out.println(dateStr1 + " is after " + dateStr2);
@ -259,6 +259,14 @@ public class DmYdjhServiceImpl extends ServiceImpl<DmYdjhMapper, DmYdjh> impleme
List<String> idList = ydjhList.stream().map(DmYdjh::getId).collect(Collectors.toList());
List<PgdDh> dh= baseMapper.getDhjh1(idList);
if (dh.size()>0){
dhService.saveBatch(dh);
}
if (idList.size() > 100) {
List<String> list = idList.subList(idList.size() / 100 * 100, idList.size());
AtomicInteger index = new AtomicInteger(idList.size() / 100 + 1);

@ -387,7 +387,71 @@
ORDER BY dm_ydjh.dc_ch,
dm_ydjh.dc_pl
</select>
<select id="getDhjh1" resultType="com.dsic.gj_erp.bean.pgd.PgdDh">
SELECT
dm_ydjh.dc_ch as czbh,
dm_ydjh.dc_pl as pl,
dm_ydjh.dhqd as dhqdh,
dhxx.RKXH as wpcz,
dm_ydjh.slrq as slxqrq,
dm_ydjh.jssj as qfxqrqxz,
dm_ydjh.gjjs_dz as qfxqrqdz,
dhxx.ddmc as hth,
dhxx.dc_ch as xhth,
dhxx.HDSL as dhsl,
'01' as zt,
(CASE dm_ydjh.wpgg
WHEN null THEN null
WHEN '' THEN null
ELSE CAST( left(dm_ydjh.wpgg,charindex('*',dm_ydjh.wpgg,1)-1)as char)
END)as hd,
(CASE dm_ydjh.wpgg
WHEN null THEN null
WHEN '' THEN null
ELSE CAST( SUBSTRING(dm_ydjh.wpgg, charindex('*',dm_ydjh.wpgg,charindex('*',dm_ydjh.wpgg,1)+1)+1,LEN(dm_ydjh.wpgg))as char)
END) as cd,
(CASE dm_ydjh.wpgg
WHEN null THEN null
WHEN '' THEN null
ELSE CAST( left(SUBSTRING(dm_ydjh.wpgg,charindex('*',dm_ydjh.wpgg,1)+1, LEN(dm_ydjh.wpgg)),
charindex('*',SUBSTRING(dm_ydjh.wpgg,charindex('*',dm_ydjh.wpgg,1)+1, LEN(dm_ydjh.wpgg)),1)-1)as char)
END) as kd,
dhxx.DHSL as xqsl
from dm_ydjh left join
(select MS_DDJBP.CGFLM,
MS_DDJBP.DDH,
MS_DDJBP.ddmc as ddmc,
MS_DDMXP.dc_ch as dc_ch,
sum(MS_DDMXP.DHSL) as DHSL,
sum(im_crklsz.HDSL) as HDSL,
MS_DDMXP.WPHD as WPHD,
MS_DDMXP.WPCD as WPCD,
MS_DDMXP.WPKD as WPKD,
MS_DDMXP.RKXH as RKXH,
MS_DDJBP.dhqdh as dhqdh,
'00' as zt
from MS_DDJBP,
MS_DDMXP,
im_crklsz
where MS_DDJBP.ddmc = im_crklsz.dc_fd
and MS_DDMXP.dc_ch = im_crklsz.GCDDH
and RTRIM(MS_DDJBP.CGFLM) = MS_DDMXP.cgflm
and RTRIM(MS_DDJBP.DDH) = MS_DDMXP.DDH
and (MS_DDJBP.DDLX) = 'B'
and im_crklsz.CKH = '01'
and im_crklsz.CRKBS = 'RK'
and im_crklsz.HDLX <![CDATA[ <> ]]> '99'
GROUP BY MS_DDJBP.CGFLM, MS_DDJBP.DDH, MS_DDJBP.ddmc, MS_DDMXP.dc_ch, MS_DDMXP.WPHD, MS_DDMXP.WPCD,
MS_DDMXP.WPKD, MS_DDMXP.RKXH, MS_DDJBP.dhqdh) dhxx
on dhxx.dhqdh = dm_ydjh.dhqd
where
and dm_ydjh.id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=");">
#{item}
</foreach>
ORDER BY dm_ydjh.dc_ch,
dm_ydjh.dc_pl
</select>
<select id="getSljh" resultType="com.dsic.gj_erp.bean.pgd.PgdSljh">
insert into pgd_sljh
(

Loading…
Cancel
Save