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;
|
||||||
|
|
@ -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