Commit 061b9ca6 by zhanghj

V1.2.0--完善增加订货单功能代码

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@21811 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 8e6d60cf
......@@ -63,7 +63,7 @@ public class IndentServiceImpl implements IndentService {
@Transactional
public ResultObject add(HttpServletRequest request, SysIndent indent) {
// TODO Auto-generated method stub
Integer userId = UserUtils.getUserId(request);
Integer currentUserId = UserUtils.getUserId(request);
Integer terminalType = indent.getTerminalType();
Integer sendType = BizConstants.INDENT_SEND_TYPE_GLSX;
......@@ -71,7 +71,9 @@ public class IndentServiceImpl implements IndentService {
* 技工端发订货单,先判断发货方式
*/
if (Constants.USER_TYPE_MECHANIC == terminalType) {
JSONObject result = userClient.getMechanicById(userId);
//接受人为当前用户
indent.setUserId(currentUserId);
JSONObject result = userClient.getMechanicById(currentUserId);
if (result != null && result.getIntValue("code") == ResultCodeEnum.SUCCESS.getCode()) {
JSONObject object = result.getJSONObject("data");
int userSendType = object.getIntValue("sendType");
......@@ -81,9 +83,9 @@ public class IndentServiceImpl implements IndentService {
}
}
indent.setSendType(sendType);
indent.setCreateBy(userId);
indent.setCreateBy(currentUserId);
indent.setCreateTime(new Date());
indent.setUpdateBy(userId);
indent.setUpdateBy(currentUserId);
indent.setUpdateTime(new Date());
Integer receiveAddressId = indent.getReceiveAddressId();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!