diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncSckhclxb.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncSckhclxb.java new file mode 100644 index 00000000..434604ff --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncSckhclxb.java @@ -0,0 +1,44 @@ +package org.jeecg.modules.kc.grab.SynchronizationService; + +import lombok.extern.slf4j.Slf4j; +import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync; +import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService; +import org.quartz.JobExecutionContext; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Map; + +@Slf4j +public class SyncSckhclxb extends BaseSync { + + @Autowired + private IZyInfoStudentService zyInfoStudentService; + + /** + * 考核材料修补 + */ + + @Override + public void execute(JobExecutionContext jobExecutionContext) { + start(); + run(getParamMap()); + end(); + } + + + /** + * 有参定时任务实现 + * @param param + */ + public void run(Map param){ + zyInfoStudentService.sckhclxb();//获取维普剩余查重次数 + } + + /** + * 无参定时任务实现 + */ + public void run(){ + run(null); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudentXbkhcl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudentXbkhcl.java new file mode 100644 index 00000000..29dff176 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudentXbkhcl.java @@ -0,0 +1,35 @@ +package org.jeecg.modules.kc.zyInfoStudent.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 修补考核材料 + * @Author: jeecg-boot + * @Date: 2024-05-06 + * @Version: V1.0 + */ +@Data +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +public class ZyInfoStudentXbkhcl implements Serializable { + private static final long serialVersionUID = 1L; + + private String kid; + private String path; + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/ZyInfoStudentMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/ZyInfoStudentMapper.java index 09d3172d..a2402f4c 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/ZyInfoStudentMapper.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/ZyInfoStudentMapper.java @@ -10,6 +10,7 @@ import org.jeecg.modules.kc.zyInfo.entity.ZyInfo; import org.jeecg.modules.kc.zyInfo.entity.ZyXzryInfo; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys; +import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentXbkhcl; import org.jeecg.modules.kc.zyInfoStudentPcz.entity.ZyInfoStudentPcz; import javax.servlet.http.HttpServletResponse; @@ -55,4 +56,6 @@ public interface ZyInfoStudentMapper extends BaseMapper { List getZyStuId(@Param("dto") ZyXzryInfo zyXzryInfo); List getZyStuIdById(@Param("dto") ZyXzryInfo zyXzryInfo); + + void insertXbkhcl(ZyInfoStudentXbkhcl zyInfoStudentXbkhcl); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml index 47ad4cd4..bdea0650 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml @@ -230,4 +230,10 @@ WHERE zyinfo_id = #{dto.zyinfoId} AND xh = #{dto.xh})) + + + insert into v_jxyth_k_0016(kid,path) value (#{kid},#{path}) + + + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java index 1d8ea5a0..b9f1f72c 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java @@ -69,4 +69,6 @@ public interface IZyInfoStudentService extends IService { List getZyStuId(ZyXzryInfo zyXzryInfo); List getZyStuIdById(ZyXzryInfo zyXzryInfo); + + void sckhclxb(); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java index 385c24e0..04126707 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java @@ -28,6 +28,7 @@ import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl; import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys; +import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentXbkhcl; import org.jeecg.modules.kc.zyInfoStudent.mapper.ZyInfoStudentMapper; import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService; import org.jeecg.modules.tools.dbsdkfzpt.RestTemplateUtils; @@ -539,6 +540,37 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("a.sfsckhcl", "1"); +// queryWrapper.eq("a.id", "1865917324597338113"); + queryWrapper.apply("a.fwq_path is null and a.file_path is not null"); + List list = baseMapper.selectList(queryWrapper); + + String yyyy = DateUtils.formatDate(new Date(), "yyyy"); + String mm = DateUtils.formatDate(new Date(), "MM"); + for(ZyInfoStudent zyInfoStudentPar2 :list){ + Map uploadMap = SFTPUtil.upload(sftpConfig, upLoadPath + "/" + zyInfoStudentPar2.getFilePath(), yyyy + "/" + mm + "/xbkhcl/" + zyInfoStudentPar2.getFilePath().replace("temp/", "/")); + System.out.println("======================================="); + System.out.println("uploadMap:"+uploadMap); + System.out.println("======================================="); + if (StringUtils.equals(uploadMap.get("code"), "0")) { + zyInfoStudentPar2.setFwqPath(uploadMap.get("data")); + } + baseMapper.updateById(zyInfoStudentPar2); + + ZyInfoStudentXbkhcl zyInfoStudentXbkhcl = new ZyInfoStudentXbkhcl(); + zyInfoStudentXbkhcl.setKid(zyInfoStudentPar2.getId()); + zyInfoStudentXbkhcl.setPath(zyInfoStudentPar2.getFwqPath()); + baseMapper.insertXbkhcl(zyInfoStudentXbkhcl); + + } + + + + } + public JSONObject getSycs(String url, String type) { Map textMap = new HashMap(); //可以设置多个input的name,value