1、pad接口-请领单、退货单物料信息增加三级分类名称

This commit is contained in:
1378012178@qq.com 2025-12-18 09:43:40 +08:00
parent b84fdc155d
commit 7d3ad8af79
5 changed files with 65 additions and 6 deletions

View File

@ -43,11 +43,13 @@
if(gwc.wl_id is null, '0', '1') as isAdd,
gwc.th_num AS thNum,
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
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_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}
<where>
nukcsl.wl_num is not null
@ -68,7 +70,8 @@
info.material_units AS "materialInfo.materialUnits",
info.material_img AS "materialInfo.materialImg",
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
<where>
<if test="thdNo != null and thdNo != ''">

View File

@ -14,7 +14,8 @@
ANY_VALUE(info.material_units) AS "materialInfo.materialUnits",
ANY_VALUE(info.material_img) AS "materialInfo.materialImg",
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
WHERE
info.qld_no IN

View File

@ -505,4 +505,17 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
public Result<List<ConfigServiceDirective>> compareList(ConfigServiceDirective 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);
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.RabbitMQUtil;
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.vo.DictModel;
import org.jeecg.common.system.vo.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
@ -401,7 +404,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && !insUsing) {
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());
if (catList != null) {
catList.sort(Comparator.comparingInt(ConfigServiceCategory::getSort));
@ -410,7 +413,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && !catUsing) {
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());
if (typeList != null) {
typeList.sort(Comparator.comparingInt(ConfigServiceType::getSort));
@ -419,7 +422,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && !typUsing) {
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());
// if (dirList != null) {
// dirList.sort(Comparator.comparingInt(ConfigServiceDirective::getSort));
@ -641,4 +644,41 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
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;
}
}