定时job生成
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b4300cc19f
commit
aef8481db4
@ -0,0 +1,22 @@
|
||||
package com.ruoyi.flyingbook.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 erp_lark_relation
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-17
|
||||
*/
|
||||
@Data
|
||||
public class ErpLarkRelation extends BaseEntity {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String key;
|
||||
|
||||
private String method;
|
||||
|
||||
private Long flag;
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.ruoyi.flyingbook.mapper;
|
||||
|
||||
|
||||
import com.ruoyi.flyingbook.domain.ErpLarkRelation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-17
|
||||
*/
|
||||
public interface ErpLarkRelationMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public ErpLarkRelation selectErpLarkRelationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param erpLarkRelation 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<ErpLarkRelation> selectErpLarkRelationList(ErpLarkRelation erpLarkRelation);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param erpLarkRelation 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertErpLarkRelation(ErpLarkRelation erpLarkRelation);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param erpLarkRelation 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateErpLarkRelation(ErpLarkRelation erpLarkRelation);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteErpLarkRelationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteErpLarkRelationByIds(Long[] ids);
|
||||
|
||||
|
||||
public List<ErpLarkRelation> queryListByKeyList(@Param("keyList") List<String> keyList,@Param("method") String method);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.ruoyi.flyingbook.service;
|
||||
|
||||
|
||||
import com.ruoyi.flyingbook.domain.ErpLarkRelation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-17
|
||||
*/
|
||||
public interface IErpLarkRelationService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public ErpLarkRelation selectErpLarkRelationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param erpLarkRelation 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<ErpLarkRelation> selectErpLarkRelationList(ErpLarkRelation erpLarkRelation);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param erpLarkRelation 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertErpLarkRelation(ErpLarkRelation erpLarkRelation);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param erpLarkRelation 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateErpLarkRelation(ErpLarkRelation erpLarkRelation);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteErpLarkRelationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteErpLarkRelationById(Long id);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.flyingbook.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.flyingbook.domain.ErpLarkRelation;
|
||||
import com.ruoyi.flyingbook.mapper.ErpLarkRelationMapper;
|
||||
import com.ruoyi.flyingbook.service.IErpLarkRelationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-17
|
||||
*/
|
||||
@Service
|
||||
public class ErpLarkRelationServiceImpl implements IErpLarkRelationService
|
||||
{
|
||||
@Autowired
|
||||
private ErpLarkRelationMapper erpLarkRelationMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public ErpLarkRelation selectErpLarkRelationById(Long id)
|
||||
{
|
||||
return erpLarkRelationMapper.selectErpLarkRelationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param erpLarkRelation 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<ErpLarkRelation> selectErpLarkRelationList(ErpLarkRelation erpLarkRelation)
|
||||
{
|
||||
return erpLarkRelationMapper.selectErpLarkRelationList(erpLarkRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param erpLarkRelation 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertErpLarkRelation(ErpLarkRelation erpLarkRelation)
|
||||
{
|
||||
erpLarkRelation.setCreateTime(DateUtils.getNowDate());
|
||||
return erpLarkRelationMapper.insertErpLarkRelation(erpLarkRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param erpLarkRelation 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateErpLarkRelation(ErpLarkRelation erpLarkRelation)
|
||||
{
|
||||
erpLarkRelation.setUpdateTime(DateUtils.getNowDate());
|
||||
return erpLarkRelationMapper.updateErpLarkRelation(erpLarkRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteErpLarkRelationByIds(Long[] ids)
|
||||
{
|
||||
return erpLarkRelationMapper.deleteErpLarkRelationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteErpLarkRelationById(Long id)
|
||||
{
|
||||
return erpLarkRelationMapper.deleteErpLarkRelationById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.flyingbook.mapper.ErpLarkRelationMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.flyingbook.domain.ErpLarkRelation" id="ErpLarkRelationResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="key" column="key"/>
|
||||
<result property="method" column="method"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="flag" column="flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectErpLarkRelationVo">
|
||||
select id, key, method, create_by, create_time, update_by, update_time, flag, remark
|
||||
from erp_lark_relation
|
||||
</sql>
|
||||
|
||||
<select id="selectErpLarkRelationList" parameterType="com.ruoyi.flyingbook.domain.ErpLarkRelation"
|
||||
resultMap="ErpLarkRelationResult">
|
||||
<include refid="selectErpLarkRelationVo"/>
|
||||
<where>
|
||||
<if test="key != null and key != ''">and key = #{key}</if>
|
||||
<if test="method != null and method != ''">and method = #{method}</if>
|
||||
<if test="flag != null ">and flag = #{flag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectErpLarkRelationById" parameterType="Long" resultMap="ErpLarkRelationResult">
|
||||
<include refid="selectErpLarkRelationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="queryListByKeyList" resultMap="ErpLarkRelationResult">
|
||||
select `key`, `method`
|
||||
from erp_lark_relation
|
||||
where `method` = #{method} and `key` in
|
||||
<foreach collection="keyList" open="(" separator="," close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<insert id="insertErpLarkRelation" parameterType="com.ruoyi.flyingbook.domain.ErpLarkRelation"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
insert into erp_lark_relation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="key != null">key,</if>
|
||||
<if test="method != null">method,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="flag != null">flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="key != null">#{key},</if>
|
||||
<if test="method != null">#{method},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="flag != null">#{flag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateErpLarkRelation" parameterType="com.ruoyi.flyingbook.domain.ErpLarkRelation">
|
||||
update erp_lark_relation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="key != null">key = #{key},</if>
|
||||
<if test="method != null">method = #{method},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="flag != null">flag = #{flag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteErpLarkRelationById" parameterType="Long">
|
||||
delete
|
||||
from erp_lark_relation
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteErpLarkRelationByIds" parameterType="String">
|
||||
delete from erp_lark_relation where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,8 @@
|
||||
package com.ruoyi.quartz.domain;
|
||||
|
||||
/**
|
||||
* @author yuxiangyong
|
||||
* @create 2023-07-17 20:31
|
||||
*/
|
||||
public class CJTJobRequest extends JobRequest{
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.ruoyi.quartz.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author yuxiangyong
|
||||
* @create 2023-07-17 20:30
|
||||
*/
|
||||
public class JobRequest implements Serializable {
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.quartz.task.CJT;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.quartz.domain.CJTJobContext;
|
||||
import com.ruoyi.quartz.domain.CJTRequest;
|
||||
import com.ruoyi.quartz.helper.OkHttpHelper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 生产加工单
|
||||
* @author yuxiangyong
|
||||
* @create 2023-07-17 21:21
|
||||
*/
|
||||
@Component("ManufactureOrder")
|
||||
public class ManufactureOrderSyncJob extends SyncAccountsJobAbstract{
|
||||
|
||||
private static final String urlPath = "/tplus/api/v2/ManufactureOrderOpenApi/FindVoucherList";
|
||||
|
||||
@Override
|
||||
protected void sync(CJTJobContext context) {
|
||||
CJTRequest cjtRequest = buildCJTRequest(context);
|
||||
JSONObject post = OkHttpHelper.post(cjtRequest);
|
||||
List<JSONObject> result = new ArrayList<>();
|
||||
List<String> keyList = new ArrayList<>();
|
||||
Map<String, String> existKeyMap = getExistKeyMap(keyList);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fieldMapping() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRequestUrl() {
|
||||
return REQUEST_ROOT_PATH + urlPath;
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.quartz.task.CJT;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.quartz.domain.CJTJobContext;
|
||||
import com.ruoyi.quartz.domain.CJTRequest;
|
||||
import com.ruoyi.quartz.helper.OkHttpHelper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 进货单
|
||||
* @author yuxiangyong
|
||||
* @create 2023-07-17 21:21
|
||||
*/
|
||||
@Component("PurchaseArrivalOpen")
|
||||
public class PurchaseArrivalOpenSyncJob extends SyncAccountsJobAbstract{
|
||||
|
||||
private static final String urlPath = "/tplus/api/v2/PurchaseArrivalOpenApi/FindVoucherList";
|
||||
|
||||
@Override
|
||||
protected void sync(CJTJobContext context) {
|
||||
CJTRequest cjtRequest = buildCJTRequest(context);
|
||||
JSONObject post = OkHttpHelper.post(cjtRequest);
|
||||
List<JSONObject> result = new ArrayList<>();
|
||||
List<String> keyList = new ArrayList<>();
|
||||
Map<String, String> existKeyMap = getExistKeyMap(keyList);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fieldMapping() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRequestUrl() {
|
||||
return REQUEST_ROOT_PATH + urlPath;
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.quartz.task.CJT;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.quartz.domain.CJTJobContext;
|
||||
import com.ruoyi.quartz.domain.CJTRequest;
|
||||
import com.ruoyi.quartz.helper.OkHttpHelper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 采购订单
|
||||
* @author yuxiangyong
|
||||
* @create 2023-07-17 21:21
|
||||
*/
|
||||
@Component("PurchaseOrder")
|
||||
public class PurchaseOrderSyncJob extends SyncAccountsJobAbstract{
|
||||
|
||||
private static final String urlPath = "/tplus/api/v2/PurchaseOrderOpenApi/FindVoucherList";
|
||||
|
||||
@Override
|
||||
protected void sync(CJTJobContext context) {
|
||||
CJTRequest cjtRequest = buildCJTRequest(context);
|
||||
JSONObject post = OkHttpHelper.post(cjtRequest);
|
||||
List<JSONObject> result = new ArrayList<>();
|
||||
List<String> keyList = new ArrayList<>();
|
||||
Map<String, String> existKeyMap = getExistKeyMap(keyList);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fieldMapping() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRequestUrl() {
|
||||
return REQUEST_ROOT_PATH + urlPath;
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.quartz.task.CJT;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.quartz.domain.CJTJobContext;
|
||||
import com.ruoyi.quartz.domain.CJTRequest;
|
||||
import com.ruoyi.quartz.helper.OkHttpHelper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 销货单
|
||||
* @author yuxiangyong
|
||||
* @create 2023-07-17 21:21
|
||||
*/
|
||||
@Component("SaleDelivery")
|
||||
public class SaleDeliverySyncJob extends SyncAccountsJobAbstract{
|
||||
|
||||
private static final String urlPath = "/tplus/api/v2/SaleDeliveryOpenApi/FindVoucherList";
|
||||
|
||||
@Override
|
||||
protected void sync(CJTJobContext context) {
|
||||
CJTRequest cjtRequest = buildCJTRequest(context);
|
||||
JSONObject post = OkHttpHelper.post(cjtRequest);
|
||||
List<JSONObject> result = new ArrayList<>();
|
||||
List<String> keyList = new ArrayList<>();
|
||||
Map<String, String> existKeyMap = getExistKeyMap(keyList);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fieldMapping() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRequestUrl() {
|
||||
return REQUEST_ROOT_PATH + urlPath;
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.quartz.task.CJT;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.quartz.domain.CJTJobContext;
|
||||
import com.ruoyi.quartz.domain.CJTRequest;
|
||||
import com.ruoyi.quartz.helper.OkHttpHelper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 销售订单
|
||||
* @author yuxiangyong
|
||||
* @create 2023-07-17 21:21
|
||||
*/
|
||||
@Component("SaleOrderSync")
|
||||
public class SaleOrderSyncJob extends SyncAccountsJobAbstract{
|
||||
|
||||
private static final String urlPath = "/tplus/api/v2/SaleOrderOpenApi/FindVoucherList";
|
||||
|
||||
@Override
|
||||
protected void sync(CJTJobContext context) {
|
||||
CJTRequest cjtRequest = buildCJTRequest(context);
|
||||
JSONObject post = OkHttpHelper.post(cjtRequest);
|
||||
List<JSONObject> result = new ArrayList<>();
|
||||
List<String> keyList = new ArrayList<>();
|
||||
Map<String, String> existKeyMap = getExistKeyMap(keyList);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fieldMapping() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRequestUrl() {
|
||||
return REQUEST_ROOT_PATH + urlPath;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue