Commit 442edf6f by 宋祥

1.修改默认前缀

parent 64890cd8
......@@ -105,7 +105,6 @@ public class ServiceHPPZ006 extends ServiceBase {
*
* @param resultRows
*/
@OperationLogAnnotation(operModul = "存货档案",operType = "校验",operDesc = "校验保存的数据")
private void checkSaveData(List<Map> resultRows) {
for (int i = 0; i < resultRows.size(); i++) {
HPPZ006 fPz006 = new HPPZ006();
......
......@@ -7,7 +7,6 @@ import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.RsaUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -15,7 +14,6 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import com.baosight.xservices.xs.constants.LoginConstants;
......@@ -37,7 +35,8 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "企业管理",operType = "查询",operDesc = "初始化")
@Override
@OperationLogAnnotation(operModul = "企业管理", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ009().eiMetadata);
......@@ -53,8 +52,8 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "企业管理",operType = "查询",operDesc = "查询")
@Override
@OperationLogAnnotation(operModul = "企业管理", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPPZ009.query", new HPPZ009());
......@@ -123,10 +122,7 @@ public class ServiceHPPZ009 extends ServiceBase {
// 生成企业编码
fPz009.setCompanyCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.COMPANY_CODE));
fPz009.setDeleteFlag(CommonConstant.YesNo.NO_0);
fPz009.setCreatedBy(UserSession.getLoginName());
fPz009.setCreatedName(UserSession.getLoginCName());
fPz009.setCreatedTime(DateUtils.shortDateTime());
dao.insert(HPPZ009.INSERT, fPz009);
DaoUtils.insert(HPPZ009.INSERT, fPz009);
// 默认新增企业管理员账号
this.initUser(fPz009);
// 关联企业管理员角色
......@@ -149,8 +145,8 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "配置管理",operType = "新增",operDesc = "新增")
@Override
@OperationLogAnnotation(operModul = "配置管理", operType = "新增", operDesc = "新增")
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......@@ -240,7 +236,7 @@ public class ServiceHPPZ009 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HPPZ009 hppz009 = new HPPZ009();
hppz009.fromMap(resultRows.get(i));
DaoUtils.update("HPPZ009.update", hppz009);
DaoUtils.update(HPPZ009.UPDATE, hppz009);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......@@ -270,7 +266,7 @@ public class ServiceHPPZ009 extends ServiceBase {
throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户",
fPz009.getCompanyName()));
}
DaoUtils.update("HPPZ009.delete", fPz009);
DaoUtils.update(HPPZ009.DELETE, fPz009);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......
package com.baosight.xservices.xs.og.service;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.iplat4j.common.ed.domain.TEDCM01;
import com.baosight.iplat4j.core.data.dao.DaoFactory;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -24,6 +26,7 @@ import com.baosight.xservices.xs.service.ServiceXSTreeNode;
import com.baosight.xservices.xs.up.utils.XSExcelUtils;
import com.baosight.xservices.xs.util.LoginUserDetails;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;
......@@ -257,8 +260,8 @@ public class ServiceXSOG0801 extends ServiceBase {
}
// 非管理员组织机构编码前缀增加企业编码 added by songx at 2024-01-15
String companyCode = UserSessionUtils.getCompanyCode();
final String companyPrefix = LoginUserDetails.isUserAdmin(UserSessionUtils.getLoginName())
? "" : "[" + companyCode + "]";
HPPZ009 dbPz009 = StringUtils.isBlank(companyCode) ? null : HPPZTools.HpPz009.getByCode(companyCode);
final String companyPrefix = dbPz009 == null ? "" : "[" + dbPz009.getLoginPrefix() + "]";
resultBlock = inInfo.getBlock(EiConstant.resultBlock);
List rows = resultBlock.getRows();
rows.forEach((m) -> {
......
package com.baosight.xservices.xs.service;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -225,9 +227,9 @@ public class ServiceXS40 extends ServiceEPBase {
eiBlock.setRows(r1Block.getRows());
// 非管理员组织机构编码前缀增加企业编码 added by songx at 2024-01-15
String companyCode = UserSessionUtils.getCompanyCode();
final String companyPrefix = LoginUserDetails.isUserAdmin(UserSessionUtils.getLoginName())
? "" : "[" + companyCode + "]";
for(int i = 0; i < eiBlock.getRowCount(); ++i) {
HPPZ009 dbPz009 = StringUtils.isBlank(companyCode) ? null : HPPZTools.HpPz009.getByCode(companyCode);
final String companyPrefix = dbPz009 == null ? "" : "[" + dbPz009.getLoginPrefix() + "]";
for (int i = 0; i < eiBlock.getRowCount(); ++i) {
Map<String, Object> inInfoRowMap = eiBlock.getRow(i);
inInfoRowMap.remove("groupId");
inInfoRowMap.put("groupEname", companyPrefix + inInfoRowMap.get("groupEname"));
......
......@@ -38,6 +38,12 @@ $(function () {
result4Grid.dataSource.page(1);
});
/**
* 查询锁定用户
*/
$("#QUERY_LOCK").on("click", function () {
result9Region.dataSource.page(1);
});
$(window).load(function () {
resultGrid.dataSource.page(1)
......@@ -663,4 +669,4 @@ $(document).ready(function () {
}else{
$("#resetPasswordBtn").hide()
}
});
\ No newline at end of file
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment