master
LongLiu 2024-03-20 16:07:29 +08:00
parent 0da6a22454
commit c69f630c6b
3 changed files with 365 additions and 352 deletions

View File

@ -161,12 +161,12 @@ public class WmToMoveGoodsController extends BaseController {
); );
message = "批量保存成功"; message = "批量保存成功";
String movesta = "已完成"; String movesta = "已完成";
try { // try {
movesta = ResourceUtil.getConfigByName("wm.movesta"); // movesta = ResourceUtil.getConfigByName("wm.movesta");
//
} catch (Exception e) { // } catch (Exception e) {
//
} // }
wmToMoveGoods.setMoveSta(movesta); wmToMoveGoods.setMoveSta(movesta);
wmToMoveGoodsService.updateEntitie(wmToMoveGoods); wmToMoveGoodsService.updateEntitie(wmToMoveGoods);
@ -299,12 +299,12 @@ public class WmToMoveGoodsController extends BaseController {
} else { } else {
message = "批量保存成功"; message = "批量保存成功";
String movesta = "已完成"; String movesta = "已完成";
try { // try {
movesta = ResourceUtil.getConfigByName("wm.movesta"); // movesta = ResourceUtil.getConfigByName("wm.movesta");
//
} catch (Exception e) { // } catch (Exception e) {
//
} // }
t.setMoveSta(movesta); t.setMoveSta(movesta);
MyBeanUtils.copyBeanNotNull2Bean(jeecgDemo, t); MyBeanUtils.copyBeanNotNull2Bean(jeecgDemo, t);
systemService.saveOrUpdate(t); systemService.saveOrUpdate(t);
@ -548,12 +548,12 @@ public class WmToMoveGoodsController extends BaseController {
// }else{ // }else{
String movesta = "已完成"; String movesta = "已完成";
try { // try {
movesta = ResourceUtil.getConfigByName("wm.movesta"); // movesta = ResourceUtil.getConfigByName("wm.movesta");
//
} catch (Exception e) { // } catch (Exception e) {
//
} // }
t.setMoveSta(movesta); t.setMoveSta(movesta);
wmToMoveGoodsService.saveOrUpdate(t); wmToMoveGoodsService.saveOrUpdate(t);
D0.setOK(true); D0.setOK(true);

View File

@ -49,15 +49,15 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
} }
@Override @Override
public List<DictEntity> queryDict(String dicTable, String dicCode, String dicText){ public List<DictEntity> queryDict(String dicTable, String dicCode, String dicText) {
List<DictEntity> dictList = null; List<DictEntity> dictList = null;
//step.1 如果没有字典表则使用系统字典表 //step.1 如果没有字典表则使用系统字典表
if(StringUtil.isEmpty(dicTable)){ if (StringUtil.isEmpty(dicTable)) {
dictList = jeecgDictDao.querySystemDict(dicCode); dictList = jeecgDictDao.querySystemDict(dicCode);
for(DictEntity t:dictList){ for (DictEntity t : dictList) {
t.setTypename(MutiLangUtil.getMutiLangInstance().getLang(t.getTypename())); t.setTypename(MutiLangUtil.getMutiLangInstance().getLang(t.getTypename()));
} }
}else { } else {
dicText = StringUtil.isEmpty(dicText, dicCode); dicText = StringUtil.isEmpty(dicText, dicCode);
dictList = jeecgDictDao.queryCustomDict(dicTable, dicCode, dicText); dictList = jeecgDictDao.queryCustomDict(dicTable, dicCode, dicText);
} }
@ -80,7 +80,11 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
/*start dangzhenghui 201703016TASK #1784 【online bug】Online 表单保存的时候,报错*/ /*start dangzhenghui 201703016TASK #1784 【online bug】Online 表单保存的时候,报错*/
log.setOperatetime(new Date()); log.setOperatetime(new Date());
/* end dangzhenghui 201703016TASK #1784 【online bug】Online 表单保存的时候,报错*/ /* end dangzhenghui 201703016TASK #1784 【online bug】Online 表单保存的时候,报错*/
log.setTSUser(ResourceUtil.getSessionUserName()); try {
log.setTSUser(ResourceUtil.getSessionUser());
} catch (Exception e) {
e.printStackTrace();
}
commonDao.save(log); commonDao.save(log);
} }
@ -94,15 +98,15 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
@Override @Override
public TSType getType(String typecode, String typename, TSTypegroup tsTypegroup) { public TSType getType(String typecode, String typename, TSTypegroup tsTypegroup) {
//TSType actType = commonDao.findUniqueByProperty(TSType.class, "typecode", typecode,tsTypegroup.getId()); //TSType actType = commonDao.findUniqueByProperty(TSType.class, "typecode", typecode,tsTypegroup.getId());
List<TSType> ls = commonDao.findHql("from TSType where typecode = ? and typegroupid = ?",typecode,tsTypegroup.getId()); List<TSType> ls = commonDao.findHql("from TSType where typecode = ? and typegroupid = ?", typecode, tsTypegroup.getId());
TSType actType = null; TSType actType = null;
if (ls == null || ls.size()==0) { if (ls == null || ls.size() == 0) {
actType = new TSType(); actType = new TSType();
actType.setTypecode(typecode); actType.setTypecode(typecode);
actType.setTypename(typename); actType.setTypename(typename);
actType.setTSTypegroup(tsTypegroup); actType.setTSTypegroup(tsTypegroup);
commonDao.save(actType); commonDao.save(actType);
}else{ } else {
actType = ls.get(0); actType = ls.get(0);
} }
return actType; return actType;
@ -168,6 +172,7 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
/** /**
* ID Id Codes * ID Id Codes
*
* @param roleId * @param roleId
* @param functionId * @param functionId
* @return * @return
@ -195,6 +200,7 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
/** /**
* ID Id Codes * ID Id Codes
*
* @param userId * @param userId
* @param functionId * @param functionId
* @return * @return
@ -222,6 +228,7 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
} }
return operationCodes; return operationCodes;
} }
/** /**
* *
* JS * JS
@ -231,29 +238,29 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
StringBuilder out = new StringBuilder(); StringBuilder out = new StringBuilder();
out.append("<script type=\"text/javascript\">"); out.append("<script type=\"text/javascript\">");
out.append("$(document).ready(function(){"); out.append("$(document).ready(function(){");
if(ResourceUtil.getSessionUserName().getUserName().equals("admin")|| !Globals.BUTTON_AUTHORITY_CHECK){ if (ResourceUtil.getSessionUserName().getUserName().equals("admin") || !Globals.BUTTON_AUTHORITY_CHECK) {
return ""; return "";
}else{ } else {
HttpServletRequest request = ContextHolderUtils.getRequest(); HttpServletRequest request = ContextHolderUtils.getRequest();
Set<String> operationCodes = (Set<String>) request.getAttribute(Globals.OPERATIONCODES); Set<String> operationCodes = (Set<String>) request.getAttribute(Globals.OPERATIONCODES);
if (null!=operationCodes) { if (null != operationCodes) {
for (String MyoperationCode : operationCodes) { for (String MyoperationCode : operationCodes) {
if (oConvertUtils.isEmpty(MyoperationCode)) { if (oConvertUtils.isEmpty(MyoperationCode)) {
break; break;
} }
TSOperation operation = this.getEntity(TSOperation.class, MyoperationCode); TSOperation operation = this.getEntity(TSOperation.class, MyoperationCode);
if (operation.getOperationcode().startsWith(".") || operation.getOperationcode().startsWith("#")){ if (operation.getOperationcode().startsWith(".") || operation.getOperationcode().startsWith("#")) {
if (operation.getOperationType().intValue()==Globals.OPERATION_TYPE_HIDE){ if (operation.getOperationType().intValue() == Globals.OPERATION_TYPE_HIDE) {
//out.append("$(\""+name+"\").find(\"#"+operation.getOperationcode().replaceAll(" ", "")+"\").hide();"); //out.append("$(\""+name+"\").find(\"#"+operation.getOperationcode().replaceAll(" ", "")+"\").hide();");
out.append("$(\""+operation.getOperationcode().replaceAll(" ", "")+"\").hide();"); out.append("$(\"" + operation.getOperationcode().replaceAll(" ", "") + "\").hide();");
}else { } else {
//out.append("$(\""+name+"\").find(\"#"+operation.getOperationcode().replaceAll(" ", "")+"\").find(\":input\").attr(\"disabled\",\"disabled\");"); //out.append("$(\""+name+"\").find(\"#"+operation.getOperationcode().replaceAll(" ", "")+"\").find(\":input\").attr(\"disabled\",\"disabled\");");
out.append("$(\""+operation.getOperationcode().replaceAll(" ", "")+"\").attr(\"disabled\",\"disabled\");"); out.append("$(\"" + operation.getOperationcode().replaceAll(" ", "") + "\").attr(\"disabled\",\"disabled\");");
out.append("$(\""+operation.getOperationcode().replaceAll(" ", "")+"\").find(\":input\").attr(\"disabled\",\"disabled\");"); out.append("$(\"" + operation.getOperationcode().replaceAll(" ", "") + "\").find(\":input\").attr(\"disabled\",\"disabled\");");
} }
} }
} }
}else{ } else {
return ""; return "";
} }
@ -292,10 +299,10 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
String newOrgCode = ""; String newOrgCode = "";
if(!StringUtils.hasText(pid)) { // 第一级编码 if (!StringUtils.hasText(pid)) { // 第一级编码
String sql = "select max(t.org_code) orgCode from t_s_depart t where t.parentdepartid is null"; String sql = "select max(t.org_code) orgCode from t_s_depart t where t.parentdepartid is null";
Map<String, Object> pOrgCodeMap = commonDao.findOneForJdbc(sql); Map<String, Object> pOrgCodeMap = commonDao.findOneForJdbc(sql);
if(pOrgCodeMap.get("orgCode") != null) { if (pOrgCodeMap.get("orgCode") != null) {
String curOrgCode = pOrgCodeMap.get("orgCode").toString(); String curOrgCode = pOrgCodeMap.get("orgCode").toString();
newOrgCode = String.format("%0" + orgCodeLength + "d", Integer.valueOf(curOrgCode) + 1); newOrgCode = String.format("%0" + orgCodeLength + "d", Integer.valueOf(curOrgCode) + 1);
} else { } else {
@ -304,7 +311,7 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
} else { // 下级编码 } else { // 下级编码
String sql = "select max(t.org_code) orgCode from t_s_depart t where t.parentdepartid = ?"; String sql = "select max(t.org_code) orgCode from t_s_depart t where t.parentdepartid = ?";
Map<String, Object> orgCodeMap = commonDao.findOneForJdbc(sql, pid); Map<String, Object> orgCodeMap = commonDao.findOneForJdbc(sql, pid);
if(orgCodeMap.get("orgCode") != null) { // 当前基本有编码时 if (orgCodeMap.get("orgCode") != null) { // 当前基本有编码时
String curOrgCode = orgCodeMap.get("orgCode").toString(); String curOrgCode = orgCodeMap.get("orgCode").toString();
String pOrgCode = curOrgCode.substring(0, curOrgCode.length() - orgCodeLength); String pOrgCode = curOrgCode.substring(0, curOrgCode.length() - orgCodeLength);
String subOrgCode = curOrgCode.substring(curOrgCode.length() - orgCodeLength, curOrgCode.length()); String subOrgCode = curOrgCode.substring(curOrgCode.length() - orgCodeLength, curOrgCode.length());
@ -367,8 +374,10 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
} }
return dataRulecodes; return dataRulecodes;
} }
/** /**
* *
*
* @return * @return
*/ */
@Override @Override
@ -378,16 +387,20 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
ResourceUtil.allTSIcons.put(tsIcon.getId(), tsIcon); ResourceUtil.allTSIcons.put(tsIcon.getId(), tsIcon);
} }
} }
/** /**
* *
*
* @param icon * @param icon
*/ */
@Override @Override
public void upTSIcons(TSIcon icon) { public void upTSIcons(TSIcon icon) {
ResourceUtil.allTSIcons.put(icon.getId(), icon); ResourceUtil.allTSIcons.put(icon.getId(), icon);
} }
/** /**
* *
*
* @param icon * @param icon
*/ */
@Override @Override

View File

@ -203,7 +203,7 @@ wms.yskz=A
sys.del=database sys.del=database
wm.alldown=yes wm.alldown=yes
wm.movesta=已完成 wm.movesta=???
cus.role=KH cus.role=KH
sys.weight=off sys.weight=off