1、pad接口-请领单、退货单物料信息增加三级分类名称
This commit is contained in:
parent
b84fdc155d
commit
7d3ad8af79
|
|
@ -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 != ''">
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue