Commit 168e80c2 by liulei

Merge remote-tracking branch 'origin/dev' into dev

parents ada756b8 74923941
......@@ -229,7 +229,7 @@ public class ServiceHPKC001 extends ServiceBase {
// 入库单号
List<String> otherEnterNos = ObjectUtils.listKey(resultRows, "otherEnterNo");
// 锁记录
HPKCTools.HpKc001.lock(otherEnterNos);
HPKCTools.HpKc001. lock(otherEnterNos);
// 查询数据库记录
Map<String, HPKC001> mapKc001 = HPKCTools.HpKc001.map(otherEnterNos);
// 删除数据
......
......@@ -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());
......@@ -121,10 +120,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);
// 关联企业管理员角色
......@@ -146,8 +142,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();
......@@ -235,7 +231,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);
......@@ -265,7 +261,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);
......
......@@ -139,7 +139,7 @@
<!-- 逻辑删除 -->
<delete id="delete">
UPDATE FROM ${hpjxSchema}.T_HPPZ012 SET DELETE_FLAG = #deleteFlag# WHERE ID = #id#
UPDATE ${hpjxSchema}.T_HPPZ012 SET DELETE_FLAG = #deleteFlag# WHERE ID = #id#
</delete>
<update id="update">
......
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"));
......
......@@ -112,6 +112,13 @@ $(function() {
}
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
......
......@@ -9,6 +9,11 @@ $(function () {
}
}],
loadComplete: function (grid) {
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
......
......@@ -13,6 +13,11 @@ $(function () {
},
columns: [],
loadComplete: function (grid) {
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
......
......@@ -10,7 +10,12 @@ $(function () {
}],
loadComplete: function (grid) {
}
}
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
// 查询
......
......@@ -80,7 +80,14 @@ $(function() {
}
}],
loadComplete: function (grid) {
}
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
......
......@@ -186,6 +186,13 @@ $(function() {
console.log(e.model.inventCode);*/
//e.preventDefault(); // 不关闭单元格
}
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
......
......@@ -13,6 +13,11 @@ $(function() {
}
}],
loadComplete: function (grid) {
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
......
......@@ -34,7 +34,14 @@ $(function() {
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}]
}],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
});
......
......@@ -18,7 +18,14 @@ $(function() {
template: function (options) {
return showUserName(options.updatedBy, options.updatedName);
}
}]
}],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
});
......
......@@ -18,7 +18,14 @@ $(function() {
template: function (options) {
return showUserName(options.updatedBy, options.updatedName);
}
}]
}],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
});
......
......@@ -18,7 +18,14 @@ $(function() {
template: function (options) {
return showUserName(options.updatedBy, options.updatedName);
}
}]
}],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
});
......
......@@ -69,7 +69,14 @@ $(function() {
template: "#=textField#"
});
}
}]
}],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
});
......
......@@ -18,7 +18,14 @@ $(function() {
template: function (options) {
return showUserName(options.updatedBy, options.updatedName);
}
}]
}],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
});
......
......@@ -34,6 +34,13 @@ $(function () {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
......
......@@ -116,6 +116,13 @@ $(function () {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
......
......@@ -43,7 +43,14 @@ $(function () {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
......
......@@ -51,8 +51,8 @@
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完成重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker ename="detail-0-planCompletionDate" cname="计划完成日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" disabled="true" />
<EF:EFDatePicker ename="detail-0-actualCompletionDate" cname="实际完成时间" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" disabled="true" />
<EF:EFDatePicker ename="detail-0-planCompletionDate" cname="计划完成日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
<EF:EFDatePicker ename="detail-0-actualCompletionDate" cname="实际完成时间" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
</div>
</EF:EFRegion>
</EF:EFPage>
......@@ -176,7 +176,13 @@ $(function () {
}
}
],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
......
......@@ -140,6 +140,11 @@ $(function () {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
......
......@@ -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