Commit 9a02e794 by 宋祥

Merge branch 'dev' of ssh://10.70.33.7:32359/smart/hp-smart into dev

parents 57edc4f2 24767f11
...@@ -233,7 +233,7 @@ public class DaoUtils { ...@@ -233,7 +233,7 @@ public class DaoUtils {
String userId; String userId;
try { try {
userId = MapUtils.getString(map, "updatedBy"); userId = MapUtils.getString(map, "updatedBy");
if (StringUtils.isEmpty(userId)) { if (StringUtils.isBlank(userId)) {
userId = UserSession.getLoginName(); userId = UserSession.getLoginName();
userId = userId == null || userId.length() > 32 ? "System" : userId; userId = userId == null || userId.length() > 32 ? "System" : userId;
} }
...@@ -244,7 +244,7 @@ public class DaoUtils { ...@@ -244,7 +244,7 @@ public class DaoUtils {
// 修改人名称 // 修改人名称
String userName = MapUtils.getString(map, "updatedName"); String userName = MapUtils.getString(map, "updatedName");
try { try {
if (StringUtils.isEmpty(userName)) { if (StringUtils.isBlank(userName)) {
userName = UserSession.getLoginCName(); userName = UserSession.getLoginCName();
} }
} catch (Exception e) { } catch (Exception e) {
......
...@@ -117,7 +117,16 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -117,7 +117,16 @@ public class ServiceHPSC002 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map); hppz002.fromMap(map);
DaoUtils.update("HPSC001.update", hppz002.toMap()); BigDecimal num = hppz002.getNum();
BigDecimal unitWt = hppz002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue())));
hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hppz002.setTotalWt(totalWt);
if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) {
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
}
DaoUtils.update("HPSC002.update", hppz002.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
......
...@@ -95,11 +95,12 @@ ...@@ -95,11 +95,12 @@
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<dynamic prepend="ORDER BY"> ORDER BY CREATED_TIME DESC
<isEmpty property="orderBy"> <!-- <dynamic prepend="ORDER BY">-->
CREATED_TIME DESC <!-- <isEmpty property="orderBy">-->
</isEmpty> <!-- CREATED_TIME DESC-->
</dynamic> <!-- </isEmpty>-->
<!-- </dynamic>-->
</select> </select>
......
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