添加修补考核材料伤处丢失文件的脚本
This commit is contained in:
parent
caa5c265a3
commit
5279a97eab
|
@ -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<String, Object> param){
|
||||||
|
zyInfoStudentService.sckhclxb();//获取维普剩余查重次数
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无参定时任务实现
|
||||||
|
*/
|
||||||
|
public void run(){
|
||||||
|
run(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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;
|
||||||
|
|
||||||
|
}
|
|
@ -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.zyInfo.entity.ZyXzryInfo;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
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 org.jeecg.modules.kc.zyInfoStudentPcz.entity.ZyInfoStudentPcz;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -55,4 +56,6 @@ public interface ZyInfoStudentMapper extends BaseMapper<ZyInfoStudent> {
|
||||||
List<ZyInfoStudent> getZyStuId(@Param("dto") ZyXzryInfo zyXzryInfo);
|
List<ZyInfoStudent> getZyStuId(@Param("dto") ZyXzryInfo zyXzryInfo);
|
||||||
|
|
||||||
List<ZyInfoStudent> getZyStuIdById(@Param("dto") ZyXzryInfo zyXzryInfo);
|
List<ZyInfoStudent> getZyStuIdById(@Param("dto") ZyXzryInfo zyXzryInfo);
|
||||||
|
|
||||||
|
void insertXbkhcl(ZyInfoStudentXbkhcl zyInfoStudentXbkhcl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,4 +230,10 @@
|
||||||
WHERE
|
WHERE
|
||||||
zyinfo_id = #{dto.zyinfoId} AND xh = #{dto.xh}))
|
zyinfo_id = #{dto.zyinfoId} AND xh = #{dto.xh}))
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertXbkhcl">
|
||||||
|
insert into v_jxyth_k_0016(kid,path) value (#{kid},#{path})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -69,4 +69,6 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
|
||||||
List<ZyInfoStudent> getZyStuId(ZyXzryInfo zyXzryInfo);
|
List<ZyInfoStudent> getZyStuId(ZyXzryInfo zyXzryInfo);
|
||||||
|
|
||||||
List<ZyInfoStudent> getZyStuIdById(ZyXzryInfo zyXzryInfo);
|
List<ZyInfoStudent> getZyStuIdById(ZyXzryInfo zyXzryInfo);
|
||||||
|
|
||||||
|
void sckhclxb();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.zyInfoScjl.service.IZyInfoScjlService;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
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.mapper.ZyInfoStudentMapper;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService;
|
import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService;
|
||||||
import org.jeecg.modules.tools.dbsdkfzpt.RestTemplateUtils;
|
import org.jeecg.modules.tools.dbsdkfzpt.RestTemplateUtils;
|
||||||
|
@ -539,6 +540,37 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
return baseMapper.getZyStuIdById(zyXzryInfo);
|
return baseMapper.getZyStuIdById(zyXzryInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sckhclxb() {
|
||||||
|
QueryWrapper<ZyInfoStudent> 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<ZyInfoStudent> list = baseMapper.selectList(queryWrapper);
|
||||||
|
|
||||||
|
String yyyy = DateUtils.formatDate(new Date(), "yyyy");
|
||||||
|
String mm = DateUtils.formatDate(new Date(), "MM");
|
||||||
|
for(ZyInfoStudent zyInfoStudentPar2 :list){
|
||||||
|
Map<String, String> 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) {
|
public JSONObject getSycs(String url, String type) {
|
||||||
Map<String, String> textMap = new HashMap<String, String>();
|
Map<String, String> textMap = new HashMap<String, String>();
|
||||||
//可以设置多个input的name,value
|
//可以设置多个input的name,value
|
||||||
|
|
Loading…
Reference in New Issue