丽知:新增其他出入库(ZZ)自动审核
This commit is contained in:
parent
b1baa823bf
commit
ac802e693f
|
@ -0,0 +1,116 @@
|
||||||
|
package com.hzya.frame.plugin.lets.plugin.adjust;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
|
||||||
|
import com.hzya.frame.plugin.lets.dao.IIcGeneralHDao;
|
||||||
|
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||||
|
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||||
|
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组装自动生成的其他入库单自动审核。
|
||||||
|
*/
|
||||||
|
public class OtherInPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(OtherInPluginInitializer.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 "adjust.OtherInPluginInitializer";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "丽知:其他入库单自动审核";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "丽知:其他入库单自动审核";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
|
||||||
|
@Autowired
|
||||||
|
private PushDataByU8cUtil pushDataByU8cUtil;
|
||||||
|
@Autowired
|
||||||
|
private PushU8CByApiCode pushU8CByApiCode;
|
||||||
|
@Autowired
|
||||||
|
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OfsUnifiedService ofsUnifiedService;
|
||||||
|
@Autowired
|
||||||
|
private IIcGeneralHDao iIcGeneralHDao;
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
try {
|
||||||
|
logger.info("调用:" + getPluginName() + "-插件");
|
||||||
|
String prod = "prod";
|
||||||
|
String param = String.valueOf(requestJson.get("param"));
|
||||||
|
if (requestJson != null && ProfilesActiveConstant.TYPE_DATE.equals(requestJson.get("type"))) {
|
||||||
|
//按日期
|
||||||
|
if (param != null && !"".equals(param)) {
|
||||||
|
String[] split = param.split("/");
|
||||||
|
if (!(split.length == 2)) {
|
||||||
|
Assert.state(false, "时间格式传递不正确");
|
||||||
|
}
|
||||||
|
Assert.notNull(split[0], "开始时间不能为空");
|
||||||
|
Assert.notNull(split[1], "结束时间不能为空");
|
||||||
|
start(split[0], split[1]);
|
||||||
|
}
|
||||||
|
} else if (requestJson != null && ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||||
|
//按单号
|
||||||
|
if (param != null && !"".equals(param)) {
|
||||||
|
start(param);
|
||||||
|
}
|
||||||
|
} else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
|
||||||
|
String integrationTaskLivingDetails = (String) requestJson.get("integration_task_living_details_id");
|
||||||
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integrationTaskLivingDetails);
|
||||||
|
start(integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
} else if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(prod)) {
|
||||||
|
//默认
|
||||||
|
start();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.error("executeBusiness方法抛出异常", e);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void start(){
|
||||||
|
|
||||||
|
}
|
||||||
|
public void start(String vbillcode){
|
||||||
|
|
||||||
|
}
|
||||||
|
public void start(String startTime, String endTime){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,117 @@
|
||||||
|
package com.hzya.frame.plugin.lets.plugin.adjust;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
|
||||||
|
import com.hzya.frame.plugin.lets.dao.IIcGeneralHDao;
|
||||||
|
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||||
|
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||||
|
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||||
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
|
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组装自动生成的其他出库单自动审核。
|
||||||
|
*/
|
||||||
|
public class OtherOutPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(OtherOutPluginInitializer.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 "adjust.OtherOutPluginInitializer";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "丽知:其他出库单自动审核";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "丽知:其他出库单自动审核";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
|
||||||
|
@Autowired
|
||||||
|
private PushDataByU8cUtil pushDataByU8cUtil;
|
||||||
|
@Autowired
|
||||||
|
private PushU8CByApiCode pushU8CByApiCode;
|
||||||
|
@Autowired
|
||||||
|
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OfsUnifiedService ofsUnifiedService;
|
||||||
|
@Autowired
|
||||||
|
private IIcGeneralHDao iIcGeneralHDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
try {
|
||||||
|
logger.info("调用:" + getPluginName() + "-插件");
|
||||||
|
String prod = "prod";
|
||||||
|
String param = String.valueOf(requestJson.get("param"));
|
||||||
|
if (requestJson != null && ProfilesActiveConstant.TYPE_DATE.equals(requestJson.get("type"))) {
|
||||||
|
//按日期
|
||||||
|
if (param != null && !"".equals(param)) {
|
||||||
|
String[] split = param.split("/");
|
||||||
|
if (!(split.length == 2)) {
|
||||||
|
Assert.state(false, "时间格式传递不正确");
|
||||||
|
}
|
||||||
|
Assert.notNull(split[0], "开始时间不能为空");
|
||||||
|
Assert.notNull(split[1], "结束时间不能为空");
|
||||||
|
start(split[0], split[1]);
|
||||||
|
}
|
||||||
|
} else if (requestJson != null && ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||||
|
//按单号
|
||||||
|
if (param != null && !"".equals(param)) {
|
||||||
|
start(param);
|
||||||
|
}
|
||||||
|
} else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
|
||||||
|
String integrationTaskLivingDetails = (String) requestJson.get("integration_task_living_details_id");
|
||||||
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integrationTaskLivingDetails);
|
||||||
|
start(integrationTaskLivingDetailsEntity.getRootAppPk());
|
||||||
|
} else if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(prod)) {
|
||||||
|
//默认
|
||||||
|
start();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.error("executeBusiness方法抛出异常", e);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void start(){
|
||||||
|
|
||||||
|
}
|
||||||
|
public void start(String vbillcode){
|
||||||
|
|
||||||
|
}
|
||||||
|
public void start(String startTime, String endTime){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue