This commit is contained in:
yangjun 2023-06-09 22:13:15 +08:00
commit 84fffd6445
3 changed files with 13 additions and 8 deletions

View File

@ -168,10 +168,10 @@ public class TJwKckb {
@Excel(name = "xqbh", width = 15)
@ApiModelProperty(value = "xqbh")
private java.lang.String xqbh;
/**bh*/
@Excel(name = "bh", width = 15)
@ApiModelProperty(value = "bh")
private java.lang.String bh;
// /**bh*/
// @Excel(name = "bh", width = 15)
// @ApiModelProperty(value = "bh")
// private java.lang.String bh;
/**jxdgnr*/
@Excel(name = "jxdgnr", width = 15)
@ApiModelProperty(value = "jxdgnr")

View File

@ -3,7 +3,7 @@
<mapper namespace="org.jeecg.modules.kc.grab.imports.mapper.XxhbtkxxMapper">
<update id="updateToKeTang">
UPDATE xxhbtkxx tk, ketangbiao kt
UPDATE xxhbtkxx tk, kc_ketangbiao kt
SET kt.sftk = tk.tklx, kt.tkyy = tk.tksy, kt.bkjh = tk.bkjh
WHERE
STR_TO_DATE( tk.skrq, '%Y%m%d' ) = kt.skrq

View File

@ -1,5 +1,6 @@
package org.jeecg.modules.kc.grab.imports.service.impl;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@ -31,6 +32,7 @@ public class XxhbtkxxServiceImpl extends ServiceImpl<XxhbtkxxMapper, Xxhbtkxx> i
@Override
@Transactional(rollbackFor = {Exception.class})
@InterceptorIgnore(tenantLine = "true")
public boolean syncList(Collection<Xxhbtkxx> entityList, boolean isDelete) {
QueryWrapper dqw = new QueryWrapper();
if(isDelete){
@ -38,15 +40,18 @@ public class XxhbtkxxServiceImpl extends ServiceImpl<XxhbtkxxMapper, Xxhbtkxx> i
}
// SQL1UPDATE xxhbtkxx set jc = replace( convert(jc using ascii),'?', '')第5-6节 -> 5-6
UpdateWrapper<Xxhbtkxx> upw1 = new UpdateWrapper<>();
upw1.setSql("jc = replace( convert(jc using ascii),'?', '')");
//upw1.setSql("jc = replace( convert(jc using ascii),'?', '')");
upw1.set("jc","replace( convert(jc using ascii),'?', '')");
update(upw1);
// SQL2UPDATE xxhbtkxx set jc = replace( jc,'-', '、')5-6 -> 56
UpdateWrapper<Xxhbtkxx> upw2 = new UpdateWrapper<>();
upw2.setSql("jc = replace( jc,'-', '、')");
//upw2.setSql("jc = replace( jc,'-', '、')");
upw2.set("jc","replace( jc,'-', '、')");
update(upw2);
//56 -> 0506
UpdateWrapper<Xxhbtkxx> upw3 = new UpdateWrapper<>();
upw3.setSql("jc = CONCAT("+
upw3.set("jc",
"CONCAT("+
"CASE"+
"WHEN POSITION( '、' IN jc ) = 2 THEN concat( '0', substr( jc, 1, 1 ), '、' )"+
"WHEN POSITION( '、' IN jc ) = 3 THEN concat( '0', substr( jc, 1, 2 ), '、' )"+