丽知:新增存货档案分类

This commit is contained in:
zhengyf 2024-08-02 20:24:52 +08:00
parent 0be04bb37f
commit 77b1b87970
2 changed files with 112 additions and 0 deletions

View File

@ -0,0 +1,109 @@
package com.hzya.frame.plugin.lets.plugin.base;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.lets.plugin.sales.SoSaleOutPluginInitializerToC;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* OFS->U8C货品档案分类 新增修改删除
* add by zyd 20240802
*
* 存货基本档案新增 /u8cloud/api/uapbd/invbasdoc/insert
* 存货基本档案修改 /u8cloud/api/uapbd/invbasdoc/update
* 存货基本档案封存 /u8cloud/api/uapbd/invbasdoc/seal
* 存货基本档案取消封存 /u8cloud/api/uapbd/invbasdoc/unseal
*/
import java.util.Date;
import java.util.concurrent.locks.ReentrantLock;
public class GoodsClassPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(GoodsClassPluginInitializer.class);
private static final ReentrantLock LOCK = new ReentrantLock(true);
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "GoodsClassPluginInitializer";
}
@Override
public String getPluginName() {
return "丽知OFS货品档案分类--->U8C货品档案分类";
}
@Override
public String getPluginLabel() {
return "丽知OFS货品档案分类--->U8C货品档案分类";
}
@Override
public String getPluginType() {
return "1";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
return null;
}
/**
* 默认推送
*/
public void start() {
try {
//获取当前时间
Date currentDate = new Date();
Date startTime = DateUtil.offset(currentDate, DateField.MINUTE, -10);
Date endTime = DateUtil.offset(currentDate, DateField.MINUTE, -2);
String startTimeStr = DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss" + ".000");
String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss" + ".000");
} catch (Exception e) {
logger.error("丽知OFS货品档案分类--->U8C货品档案分类,start()方法报错:", e);
}
}
/**
* 按分类名称
*/
public void start(String className) {
try {
} catch (Exception e) {
logger.error("丽知OFS货品档案分类--->U8C货品档案分类,start(String className)方法报错:", e);
}
}
/**
* 按时间区间
*/
public void start(String startTime, String endTime) {
try {
Date business_start = DateUtil.parse(startTime);
Date business_end = DateUtil.parse(endTime);
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00";
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
} catch (Exception e) {
logger.error("丽知OFS货品档案分类--->U8C货品档案分类,start(String startTime, String endTime)方法报错:", e);
}
}
}

View File

@ -3,4 +3,7 @@
<beans default-autowire="byName">
<!-- 销售业务 -->
<bean name="soSaleOutPluginInitializerToC" class="com.hzya.frame.plugin.lets.plugin.sales.SoSaleOutPluginInitializerToC"/>
<!--基础档案-->
<bean name="goodsClassPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.GoodsClassPluginInitializer"/>
</beans>