This commit is contained in:
yangjun 2025-12-18 09:46:32 +08:00
commit 3ac9ec16bc
9 changed files with 153 additions and 13 deletions

View File

@ -43,11 +43,13 @@
if(gwc.wl_id is null, '0', '1') as isAdd, if(gwc.wl_id is null, '0', '1') as isAdd,
gwc.th_num AS thNum, gwc.th_num AS thNum,
maca.category_name as "materialInfo.categoryName", maca.category_name as "materialInfo.categoryName",
maty.type_name as "materialInfo.typeName" maty.type_name as "materialInfo.typeName",
mame.medication_name as "materialInfo.medicationName"
from nu_invoicing_nu_kcsl nukcsl from nu_invoicing_nu_kcsl nukcsl
LEFT JOIN nu_config_material_info material ON nukcsl.wl_id = material.id LEFT JOIN nu_config_material_info material ON nukcsl.wl_id = material.id
LEFT JOIN nu_config_material_category maca ON material.category_id = maca.id LEFT JOIN nu_config_material_category maca ON material.category_id = maca.id
LEFT JOIN nu_config_material_type maty ON material.type_id = maty.id LEFT JOIN nu_config_material_type maty ON material.type_id = maty.id
LEFT JOIN nu_config_material_medication mame on material.medication_id = mame.id
LEFT JOIN nu_invoicing_thd_gwc gwc ON nukcsl.wl_id = gwc.wl_id and pk_id = #{id} LEFT JOIN nu_invoicing_thd_gwc gwc ON nukcsl.wl_id = gwc.wl_id and pk_id = #{id}
<where> <where>
nukcsl.wl_num is not null nukcsl.wl_num is not null
@ -68,7 +70,8 @@
info.material_units AS "materialInfo.materialUnits", info.material_units AS "materialInfo.materialUnits",
info.material_img AS "materialInfo.materialImg", info.material_img AS "materialInfo.materialImg",
info.material_category_name as "materialInfo.categoryName", info.material_category_name as "materialInfo.categoryName",
info.material_type_name as "materialInfo.typeName" info.material_type_name as "materialInfo.typeName",
info.material_medication_name as "materialInfo.medicationName"
from nu_invoicing_thd_info info from nu_invoicing_thd_info info
<where> <where>
<if test="thdNo != null and thdNo != ''"> <if test="thdNo != null and thdNo != ''">

View File

@ -14,7 +14,8 @@
ANY_VALUE(info.material_units) AS "materialInfo.materialUnits", ANY_VALUE(info.material_units) AS "materialInfo.materialUnits",
ANY_VALUE(info.material_img) AS "materialInfo.materialImg", ANY_VALUE(info.material_img) AS "materialInfo.materialImg",
ANY_VALUE(info.material_category_name) as "materialInfo.categoryName", ANY_VALUE(info.material_category_name) as "materialInfo.categoryName",
ANY_VALUE(info.material_type_name) as "materialInfo.typeName" ANY_VALUE(info.material_type_name) as "materialInfo.typeName",
ANY_VALUE(info.material_medication_name) as "materialInfo.materialMedicationName"
FROM nu_invoicing_qld_info info FROM nu_invoicing_qld_info info
WHERE WHERE
info.qld_no IN info.qld_no IN

View File

@ -288,7 +288,7 @@ public class CameraInfoServiceImpl extends ServiceImpl<CameraInfoMapper, CameraI
}catch (Exception e){ }catch (Exception e){
errMsg += errorCode; errMsg += errorCode;
} }
log.info("getImageCommon:{}",errMsg); log.info("syncProjectIpcDevice:{}",errMsg);
return Result.error(errMsg); return Result.error(errMsg);
} }
} }
@ -413,6 +413,7 @@ public class CameraInfoServiceImpl extends ServiceImpl<CameraInfoMapper, CameraI
if("0".equals(errorCode)){ if("0".equals(errorCode)){
JSONObject image = (JSONObject)responseData.get("image"); JSONObject image = (JSONObject)responseData.get("image");
JSONObject data = (JSONObject)image.get(type); JSONObject data = (JSONObject)image.get(type);
updateDeviceStatus(id,errorCode);
return Result.OK(data); return Result.OK(data);
}else{ }else{
String errorMsg = ""; String errorMsg = "";

View File

@ -104,7 +104,7 @@
from nu_biz_employees_info a from nu_biz_employees_info a
inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id inner join nu_biz_employees_servcie_tags b on a.id = b.employees_id
inner join nu_service_tag c on c.id = b.tags_id inner join nu_service_tag c on c.id = b.tags_id
inner join nu_servtag_directive d on d.tags_id = c.id inner join nu_servtag_directive d on d.tag_id = c.id
where d.directive_id in where d.directive_id in
<foreach item="directiveId" index="index" collection="directiveIds.split(',')" <foreach item="directiveId" index="index" collection="directiveIds.split(',')"
open="(" separator="," close=")"> open="(" separator="," close=")">

View File

@ -329,7 +329,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
InvoicingOrders order = this.getOne(ioQw); InvoicingOrders order = this.getOne(ioQw);
InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格 InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格
InvoicingOrders entity = new InvoicingOrders(); InvoicingOrders entity = new InvoicingOrders();
entity.setPoolId(invoicingOrdersEntity.getPoolId()); entity.setId(order.getId());
entity.setBizId(invoicingOrdersEntity.getBizId()); entity.setBizId(invoicingOrdersEntity.getBizId());
entity.setFinishTime(c.getTime()); entity.setFinishTime(c.getTime());
entity.setIzFinish("Y"); entity.setIzFinish("Y");
@ -338,7 +338,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
entity.setBizType(invoicingOrdersEntity.getFlowCode()); entity.setBizType(invoicingOrdersEntity.getFlowCode());
entity.setTollPrice(DirectivePrice.getTollPrice()); entity.setTollPrice(DirectivePrice.getTollPrice());
entity.setComPrice(DirectivePrice.getComPrice()); entity.setComPrice(DirectivePrice.getComPrice());
baseMapper.updateOrder(entity); baseMapper.updateById(entity);
// }catch (Exception e){ // }catch (Exception e){
// e.printStackTrace(); // e.printStackTrace();
// return Result.error("完成失败:"+e.getMessage()); // return Result.error("完成失败:"+e.getMessage());

View File

@ -48,11 +48,21 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
*/ */
@Override @Override
public void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity){ public void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity){
log.info("function:flowQlsq");
log.info("BizId:"+invoicingOrdersEntity.getBizId());
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
empOrdersService.getNames(invoicingOrdersEntity); empOrdersService.getNames(invoicingOrdersEntity);
List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity); List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
if(flowList!=null){ if(flowList!=null){
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
InvoicingOrders flow = flowList.get(0); InvoicingOrders flow = flowList.get(0);
log.info("DirectiveId:"+flow.getDirectiveId());
log.info("NuId:"+invoicingOrdersEntity.getNuId());
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>(); QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
ioQw.eq("directive_id", flow.getDirectiveId()); ioQw.eq("directive_id", flow.getDirectiveId());
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId()); ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
@ -62,7 +72,9 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
ioQw.eq("del_flag", "0"); ioQw.eq("del_flag", "0");
ioQw.eq("biz_type", invoicingOrdersEntity.getFlowCode()); ioQw.eq("biz_type", invoicingOrdersEntity.getFlowCode());
InvoicingOrders order = this.getOne(ioQw); InvoicingOrders order = this.getOne(ioQw);
log.info("order:"+order);
if(order!=null){ if(order!=null){
log.info("OrderId:"+order.getId());
//修改请领单的bizId //修改请领单的bizId
InvoicingOrders entity = new InvoicingOrders(); InvoicingOrders entity = new InvoicingOrders();
entity.setId(order.getId()); entity.setId(order.getId());
@ -91,6 +103,11 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
*/ */
@Override @Override
public void flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity){ public void flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity){
log.info("function:flowQlsqR");
log.info("BizId:"+invoicingOrdersEntity.getBizId());
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
empOrdersService.getNames(invoicingOrdersEntity); empOrdersService.getNames(invoicingOrdersEntity);
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity(); InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
flowCode.setFlowCode("ql_sq"); flowCode.setFlowCode("ql_sq");
@ -98,6 +115,11 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
if(flowList!=null){ if(flowList!=null){
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
InvoicingOrders flow = flowList.get(0); InvoicingOrders flow = flowList.get(0);
log.info("DirectiveId:"+flow.getDirectiveId());
log.info("NuId:"+invoicingOrdersEntity.getNuId());
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
String subId = flow.getSubId(); String subId = flow.getSubId();
if(subId!=null&&!subId.equals("")){ if(subId!=null&&!subId.equals("")){
InvoicingOrders invoicingOrders = new InvoicingOrders(); InvoicingOrders invoicingOrders = new InvoicingOrders();
@ -118,11 +140,21 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
*/ */
@Override @Override
public void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity){ public void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity){
log.info("function:flowQlck");
log.info("BizId:"+invoicingOrdersEntity.getBizId());
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
empOrdersService.getNames(invoicingOrdersEntity); empOrdersService.getNames(invoicingOrdersEntity);
List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity); List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
if(flowList!=null){ if(flowList!=null){
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
InvoicingOrders flow = flowList.get(0); InvoicingOrders flow = flowList.get(0);
log.info("DirectiveId:"+flow.getDirectiveId());
log.info("NuId:"+invoicingOrdersEntity.getNuId());
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>(); QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
ioQw.eq("directive_id", flow.getDirectiveId()); ioQw.eq("directive_id", flow.getDirectiveId());
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId()); ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
@ -133,9 +165,15 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
ioQw.eq("biz_type", invoicingOrdersEntity.getFlowCode()); ioQw.eq("biz_type", invoicingOrdersEntity.getFlowCode());
ioQw.eq("biz_id", invoicingOrdersEntity.getBizId()); ioQw.eq("biz_id", invoicingOrdersEntity.getBizId());
InvoicingOrders order = this.getOne(ioQw); InvoicingOrders order = this.getOne(ioQw);
log.info("order:"+order);
String initiatorId = ""; String initiatorId = "";
String initiatorName = ""; String initiatorName = "";
if(order!=null){ if(order!=null){
log.info("OrderId:"+order.getId());
initiatorId = order.getInitiatorId(); initiatorId = order.getInitiatorId();
initiatorName = order.getInitiatorName(); initiatorName = order.getInitiatorName();
InvoicingOrders employee = empOrdersService.getOnLineEmployeeById(initiatorId); //获取是否在线 InvoicingOrders employee = empOrdersService.getOnLineEmployeeById(initiatorId); //获取是否在线
@ -162,12 +200,22 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
*/ */
@Override @Override
public void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity){ public void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity){
log.info("function:flowQlht");
log.info("BizId:"+invoicingOrdersEntity.getBizId());
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
empOrdersService.getNames(invoicingOrdersEntity); empOrdersService.getNames(invoicingOrdersEntity);
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity(); InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
flowCode.setFlowCode("ql_ck"); flowCode.setFlowCode("ql_ck");
List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode); List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode);
if(flowList!=null){ if(flowList!=null){
InvoicingOrders flow = flowList.get(0); InvoicingOrders flow = flowList.get(0);
log.info("DirectiveId:"+flow.getDirectiveId());
log.info("NuId:"+invoicingOrdersEntity.getNuId());
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>(); QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
ioQw.eq("directive_id", flow.getDirectiveId()); ioQw.eq("directive_id", flow.getDirectiveId());
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId()); ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
@ -177,7 +225,9 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
ioQw.eq("biz_type", "ql_ck"); ioQw.eq("biz_type", "ql_ck");
ioQw.eq("biz_id", invoicingOrdersEntity.getBizId()); ioQw.eq("biz_id", invoicingOrdersEntity.getBizId());
InvoicingOrders order = this.getOne(ioQw); InvoicingOrders order = this.getOne(ioQw);
log.info("order:"+order);
if(order!=null){ if(order!=null){
log.info("OrderId:"+order.getId());
String employeeId = order.getInitiatorId(); String employeeId = order.getInitiatorId();
String employeeName = order.getInitiatorName(); String employeeName = order.getInitiatorName();
InvoicingOrders entity = new InvoicingOrders(); InvoicingOrders entity = new InvoicingOrders();
@ -189,9 +239,15 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
baseMapper.updateOrder(entity); baseMapper.updateOrder(entity);
//回退指令 //回退指令
List<InvoicingOrders> htFlowList = baseMapper.getFlowList(invoicingOrdersEntity); List<InvoicingOrders> htFlowList = baseMapper.getFlowList(invoicingOrdersEntity);
for(int i=0;i<htFlowList.size();i++){ if(htFlowList!=null){
InvoicingOrders htFlow = htFlowList.get(i); InvoicingOrders htFlow = htFlowList.get(0);
insertNextOrder(htFlow,invoicingOrdersEntity,employeeId,employeeName,employeeId,employeeName,"ql_sq","Y"); String subId = htFlow.getSubId();
if(subId!=null&&!subId.equals("")){
InvoicingOrders invoicingOrders = new InvoicingOrders();
invoicingOrders.setFlowId(subId);
InvoicingOrders flowSub = baseMapper.getFlowOne(invoicingOrders);
insertNextOrder(flowSub,invoicingOrdersEntity,employeeId,employeeName,employeeId,employeeName,flowSub.getFlowCode(),"Y");
}
} }
} }
} }
@ -203,12 +259,22 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
*/ */
@Override @Override
public void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity){ public void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity){
log.info("function:flowQlzf");
log.info("BizId:"+invoicingOrdersEntity.getBizId());
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
empOrdersService.getNames(invoicingOrdersEntity); empOrdersService.getNames(invoicingOrdersEntity);
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity(); InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
flowCode.setFlowCode("ql_ck"); flowCode.setFlowCode("ql_ck");
List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode); List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode);
if(flowList!=null){ if(flowList!=null){
InvoicingOrders flow = flowList.get(0); InvoicingOrders flow = flowList.get(0);
log.info("DirectiveId:"+flow.getDirectiveId());
log.info("NuId:"+invoicingOrdersEntity.getNuId());
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>(); QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
ioQw.eq("directive_id", flow.getDirectiveId()); ioQw.eq("directive_id", flow.getDirectiveId());
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId()); ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
@ -218,7 +284,9 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
ioQw.eq("biz_type", "ql_ck"); ioQw.eq("biz_type", "ql_ck");
ioQw.eq("biz_id", invoicingOrdersEntity.getBizId()); ioQw.eq("biz_id", invoicingOrdersEntity.getBizId());
InvoicingOrders order = this.getOne(ioQw); InvoicingOrders order = this.getOne(ioQw);
log.info("order:"+order);
if(order!=null){ if(order!=null){
log.info("OrderId:"+order.getId());
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
InvoicingOrders entity = new InvoicingOrders(); InvoicingOrders entity = new InvoicingOrders();
entity.setId(order.getId()); entity.setId(order.getId());
@ -241,12 +309,22 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
*/ */
@Override @Override
public void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity){ public void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity){
log.info("function:flowQlhtzf");
log.info("BizId:"+invoicingOrdersEntity.getBizId());
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
empOrdersService.getNames(invoicingOrdersEntity); empOrdersService.getNames(invoicingOrdersEntity);
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity(); InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
flowCode.setFlowCode("ql_sq"); flowCode.setFlowCode("ql_sq");
List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode); List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode);
if(flowList!=null){ if(flowList!=null){
InvoicingOrders flow = flowList.get(0); InvoicingOrders flow = flowList.get(0);
log.info("DirectiveId:"+flow.getDirectiveId());
log.info("NuId:"+invoicingOrdersEntity.getNuId());
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>(); QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
ioQw.eq("directive_id", flow.getDirectiveId()); ioQw.eq("directive_id", flow.getDirectiveId());
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId()); ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
@ -257,7 +335,9 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
ioQw.eq("biz_type", "ql_sq"); ioQw.eq("biz_type", "ql_sq");
ioQw.eq("biz_id", invoicingOrdersEntity.getBizId()); ioQw.eq("biz_id", invoicingOrdersEntity.getBizId());
InvoicingOrders order = this.getOne(ioQw); InvoicingOrders order = this.getOne(ioQw);
log.info("order:"+order);
if(order!=null){ if(order!=null){
log.info("OrderId:"+order.getId());
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
InvoicingOrders entity = new InvoicingOrders(); InvoicingOrders entity = new InvoicingOrders();
entity.setId(order.getId()); entity.setId(order.getId());

View File

@ -505,4 +505,17 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
public Result<List<ConfigServiceDirective>> compareList(ConfigServiceDirective configServiceDirective) { public Result<List<ConfigServiceDirective>> compareList(ConfigServiceDirective configServiceDirective) {
return Result.OK(configServiceDirectiveService.compareList(configServiceDirective)); return Result.OK(configServiceDirectiveService.compareList(configServiceDirective));
} }
/**
* 获取镜像码
* 存储在管理平台
*
* @param orgCode
* @return
*/
@ApiOperation(value = "服务指令-获取镜像码", notes = "服务指令-获取镜像码")
@GetMapping(value = "/getSyncCode")
public Result<?> getSyncCode(@RequestParam("orgCode") String orgCode) {
return Result.OK(configServiceDirectiveService.getSyncCode(orgCode));
}
} }

View File

@ -70,4 +70,6 @@ public interface IConfigServiceDirectiveService extends IService<ConfigServiceDi
DirectiveMQDto syncDirective(String sourceOrgCode, String syncIds); DirectiveMQDto syncDirective(String sourceOrgCode, String syncIds);
List<ConfigServiceDirective> compareList(ConfigServiceDirective configServiceDirective); List<ConfigServiceDirective> compareList(ConfigServiceDirective configServiceDirective);
String getSyncCode(String orgCode);
} }

View File

@ -30,8 +30,11 @@ import com.nu.utils.HttpRequestUtil;
import com.nu.utils.NuFileUtils; import com.nu.utils.NuFileUtils;
import com.nu.utils.RabbitMQUtil; import com.nu.utils.RabbitMQUtil;
import org.apache.commons.compress.utils.Lists; import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.system.api.ISysBaseAPI; import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.vo.DictModel; import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.LoginUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -401,7 +404,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && !insUsing) { if ("enabled".equals(filterIzEnabled) && !insUsing) {
continue; continue;
} }
TreeNode instNode = new TreeNode(inst.getId(), "", "", inst.getId(), inst.getInstructionName(), 1, "", inst.getIzEnabled(), inst.getSort(), insUsing, true,inst.getIcon()); TreeNode instNode = new TreeNode(inst.getId(), "", "", inst.getId(), inst.getInstructionName(), 1, "", inst.getIzEnabled(), inst.getSort(), insUsing, true, inst.getIcon());
List<ConfigServiceCategory> catList = catMap.get(inst.getId()); List<ConfigServiceCategory> catList = catMap.get(inst.getId());
if (catList != null) { if (catList != null) {
catList.sort(Comparator.comparingInt(ConfigServiceCategory::getSort)); catList.sort(Comparator.comparingInt(ConfigServiceCategory::getSort));
@ -410,7 +413,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && !catUsing) { if ("enabled".equals(filterIzEnabled) && !catUsing) {
continue; continue;
} }
TreeNode catNode = new TreeNode(inst.getId(), cat.getId(), "", cat.getId(), cat.getCategoryName(), 2, "", cat.getIzEnabled(), cat.getSort(), insUsing && catUsing, insUsing,""); TreeNode catNode = new TreeNode(inst.getId(), cat.getId(), "", cat.getId(), cat.getCategoryName(), 2, "", cat.getIzEnabled(), cat.getSort(), insUsing && catUsing, insUsing, "");
List<ConfigServiceType> typeList = typeMap.get(cat.getId()); List<ConfigServiceType> typeList = typeMap.get(cat.getId());
if (typeList != null) { if (typeList != null) {
typeList.sort(Comparator.comparingInt(ConfigServiceType::getSort)); typeList.sort(Comparator.comparingInt(ConfigServiceType::getSort));
@ -419,7 +422,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && !typUsing) { if ("enabled".equals(filterIzEnabled) && !typUsing) {
continue; continue;
} }
TreeNode typeNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), tp.getId(), tp.getTypeName(), 3, "", tp.getIzEnabled(), tp.getSort(), insUsing && catUsing && typUsing, insUsing && catUsing,""); TreeNode typeNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), tp.getId(), tp.getTypeName(), 3, "", tp.getIzEnabled(), tp.getSort(), insUsing && catUsing && typUsing, insUsing && catUsing, "");
// List<ConfigServiceDirective> dirList = directiveMap.get(tp.getId()); // List<ConfigServiceDirective> dirList = directiveMap.get(tp.getId());
// if (dirList != null) { // if (dirList != null) {
// dirList.sort(Comparator.comparingInt(ConfigServiceDirective::getSort)); // dirList.sort(Comparator.comparingInt(ConfigServiceDirective::getSort));
@ -641,4 +644,41 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
return result; return result;
} }
@Override
public String getSyncCode(String orgCode) {
JSONObject opeOpenUrl = sysConfigApi.getByKeyByDS("master", "ope_open_url");
String opeApiAddress = opeOpenUrl.getString("configValue");
if (opeApiAddress.endsWith("/")) {
opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1);
}
String syncCode = "";
//各平台api地址都存在管理系统中 管理系统api地址在系统参数配置中 ope_open_url
{
String apiAddress = opeApiAddress + "/api/services/directive/getSyncCodeByOrgCode?orgCode=" + orgCode;
try {
String res = HttpRequestUtil.doGet(apiAddress, HttpRequestUtil.createDefaultHeaders());
JSONObject jsonResponse = JSON.parseObject(res);
JSONObject r_ = jsonResponse.getJSONObject("result");
syncCode = r_.getString("orgCode");
} catch (Exception e) {
e.printStackTrace();
}
}
//如果还没生成生成过 直接生成
if (StringUtils.isBlank(syncCode)) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String apiAddress = opeApiAddress + "/api/services/directive/generateDirectiveSyncCode?orgCode=" + orgCode + "?createBy=" + sysUser.getRealname();
try {
String res = HttpRequestUtil.doGet(apiAddress, HttpRequestUtil.createDefaultHeaders());
JSONObject jsonResponse = JSON.parseObject(res);
JSONObject r_ = jsonResponse.getJSONObject("result");
syncCode = r_.getString("orgCode");
} catch (Exception e) {
e.printStackTrace();
}
}
return syncCode;
}
} }