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 {
String userId;
try {
userId = MapUtils.getString(map, "updatedBy");
if (StringUtils.isEmpty(userId)) {
if (StringUtils.isBlank(userId)) {
userId = UserSession.getLoginName();
userId = userId == null || userId.length() > 32 ? "System" : userId;
}
......@@ -244,7 +244,7 @@ public class DaoUtils {
// 修改人名称
String userName = MapUtils.getString(map, "updatedName");
try {
if (StringUtils.isEmpty(userName)) {
if (StringUtils.isBlank(userName)) {
userName = UserSession.getLoginCName();
}
} catch (Exception e) {
......
......@@ -117,7 +117,16 @@ public class ServiceHPSC002 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
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.setMsg("修改成功!");
......
......@@ -95,11 +95,12 @@
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
CREATED_TIME DESC
</isEmpty>
</dynamic>
ORDER BY CREATED_TIME DESC
<!-- <dynamic prepend="ORDER BY">-->
<!-- <isEmpty property="orderBy">-->
<!-- CREATED_TIME DESC-->
<!-- </isEmpty>-->
<!-- </dynamic>-->
</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