Commit 845851fa by duanhq

库存详情列表,订单发货,审核修改 v 1.2.0

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@21700 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 451dc23f
...@@ -134,10 +134,10 @@ public class IndentController extends BaseController{ ...@@ -134,10 +134,10 @@ public class IndentController extends BaseController{
* @return ResultObject * @return ResultObject
* @Description 订货单审核通过 * @Description 订货单审核通过
*/ */
@RequestMapping(value = "/checkDevice", method = RequestMethod.POST) @RequestMapping(value = "/checkIndent", method = RequestMethod.POST)
public ResultObject checkDevice(HttpServletRequest request, Integer id) { public ResultObject checkIndent(HttpServletRequest request, Integer id) {
Integer userId = UserUtils.getUserId(request); Integer userId = UserUtils.getUserId(request);
int result = indentService.checkDevice(id,userId); int result = indentService.checkIndent(id,userId);
//发送短信提示审核通过 //发送短信提示审核通过
if(result == 1){ if(result == 1){
SysIndent sysIndent = indentService.selectByPrimaryKey(id); SysIndent sysIndent = indentService.selectByPrimaryKey(id);
...@@ -156,7 +156,7 @@ public class IndentController extends BaseController{ ...@@ -156,7 +156,7 @@ public class IndentController extends BaseController{
*@Description 发货 *@Description 发货
*/ */
@RequestMapping(value = "/sendDevice", method = RequestMethod.POST) @RequestMapping(value = "/sendDevice", method = RequestMethod.POST)
public ResultObject sendDevice(HttpServletRequest request, SysIndentLogistics sysIndentLogistics) { public ResultObject sendDevice(HttpServletRequest request,SysIndentLogistics sysIndentLogistics) {
Integer userId = UserUtils.getUserId(request); Integer userId = UserUtils.getUserId(request);
Integer result = indentService.sendDevice(userId,sysIndentLogistics); Integer result = indentService.sendDevice(userId,sysIndentLogistics);
......
...@@ -22,7 +22,9 @@ public class DeviceRepertoryReq { ...@@ -22,7 +22,9 @@ public class DeviceRepertoryReq {
@ExcelColumn(value = "设备名称",index = 2) @ExcelColumn(value = "设备名称",index = 2)
private String deviceName; private String deviceName;
/**
* 服务商库存
*/
@ExcelColumn(value = "服务商库存",index = 3) @ExcelColumn(value = "服务商库存",index = 3)
private Integer serviceDeviceNum; private Integer serviceDeviceNum;
...@@ -32,6 +34,16 @@ public class DeviceRepertoryReq { ...@@ -32,6 +34,16 @@ public class DeviceRepertoryReq {
@ExcelColumn(value = "下属技工库存",index = 5) @ExcelColumn(value = "下属技工库存",index = 5)
private Integer mechanicDeviceNum; private Integer mechanicDeviceNum;
private String deviceType;
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public Integer getUserId() { public Integer getUserId() {
return userId; return userId;
} }
......
...@@ -19,5 +19,5 @@ public interface SysIndentMapper { ...@@ -19,5 +19,5 @@ public interface SysIndentMapper {
int getIndentCount(SysIndent indent); int getIndentCount(SysIndent indent);
Integer getSendDeviceNum(@Param("userId")Integer userId); Integer getSendDeviceNum(@Param("userId") Integer userId, @Param("deviceType")String deviceType);
} }
\ No newline at end of file \ No newline at end of file
...@@ -23,6 +23,16 @@ public class SysIndentLogistics { ...@@ -23,6 +23,16 @@ public class SysIndentLogistics {
private Date updateTime; private Date updateTime;
private String logisticsDate;
public String getLogisticsDate() {
return logisticsDate;
}
public void setLogisticsDate(String logisticsDate) {
this.logisticsDate = logisticsDate;
}
public Integer getId() { public Integer getId() {
return id; return id;
} }
......
...@@ -58,7 +58,7 @@ public interface IndentService { ...@@ -58,7 +58,7 @@ public interface IndentService {
* @Description: TODO 订货单审核通过 * @Description: TODO 订货单审核通过
* *
*/ */
int checkDevice(Integer id,Integer userId); int checkIndent(Integer id,Integer userId);
/** /**
* *
......
...@@ -49,7 +49,10 @@ public class DeviceRepertoryServiceImpl implements DeviceRepertoryService { ...@@ -49,7 +49,10 @@ public class DeviceRepertoryServiceImpl implements DeviceRepertoryService {
Integer userId = deviceRepertoryReq.getUserId(); Integer userId = deviceRepertoryReq.getUserId();
//在途库存 //在途库存
Integer sendDeviceNum = 0; Integer sendDeviceNum = 0;
sendDeviceNum += sysIndentMapper.getSendDeviceNum(userId); Integer indentDeviceNum = sysIndentMapper.getSendDeviceNum(userId,deviceRepertoryReq.getDeviceType());
if(indentDeviceNum != null){
sendDeviceNum += indentDeviceNum;
}
deviceRepertoryReq.setSendDeviceNum(sendDeviceNum); deviceRepertoryReq.setSendDeviceNum(sendDeviceNum);
//下属技工库存 //下属技工库存
......
...@@ -91,11 +91,12 @@ public class IndentServiceImpl implements IndentService { ...@@ -91,11 +91,12 @@ public class IndentServiceImpl implements IndentService {
//添加到物流信息表 //添加到物流信息表
sysIndentLogistics.setCreateBy(userId); sysIndentLogistics.setCreateBy(userId);
sysIndentLogistics.setCreateTime(new Date()); sysIndentLogistics.setCreateTime(new Date());
sysIndentLogistics.setLogisticsTime(DateUtil.parseDateYmd(sysIndentLogistics.getLogisticsDate()));
return sysIndentLogisticsMapper.insertSelective(sysIndentLogistics); return sysIndentLogisticsMapper.insertSelective(sysIndentLogistics);
} }
@Override @Override
public int checkDevice(Integer id,Integer userId) { public int checkIndent(Integer id,Integer userId) {
SysIndent sysIndent = new SysIndent(); SysIndent sysIndent = new SysIndent();
sysIndent.setId(id); sysIndent.setId(id);
sysIndent.setIndentStatus(IndentStatusEnum.INDENT_WAITDELIVER.getIndentStatus()); sysIndent.setIndentStatus(IndentStatusEnum.INDENT_WAITDELIVER.getIndentStatus());
......
...@@ -274,6 +274,7 @@ ...@@ -274,6 +274,7 @@
SELECT SELECT
sdr.user_id userId, sdr.user_id userId,
sdr.device_num serviceDeviceNum, sdr.device_num serviceDeviceNum,
sdr.device_type deviceType,
su.name name, su.name name,
sdd.data_value deviceName sdd.data_value deviceName
FROM FROM
......
...@@ -245,6 +245,7 @@ ...@@ -245,6 +245,7 @@
select SUM(device_amount) select SUM(device_amount)
from sys_indent from sys_indent
WHERE indent_status=30 AND is_canceled = 0 AND WHERE indent_status=30 AND is_canceled = 0 AND
device_type = #{deviceType} AND
user_id in ( user_id in (
select select
ssm.mechanic_id ssm.mechanic_id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!