Commit 25ee65f7 by zhengxj

finish 订单激活和检修 on 20190220 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@17511 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 228f9ae5
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
...@@ -22,10 +22,6 @@ ...@@ -22,10 +22,6 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>
...@@ -6,6 +6,11 @@ ...@@ -6,6 +6,11 @@
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name> <name>org.eclipse.jdt.core.javabuilder</name>
<arguments> <arguments>
</arguments> </arguments>
...@@ -19,5 +24,6 @@ ...@@ -19,5 +24,6 @@
<natures> <natures>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures> </natures>
</projectDescription> </projectDescription>
...@@ -53,12 +53,14 @@ import com.glsx.ordercenter.mapper.SysMechanicMapper; ...@@ -53,12 +53,14 @@ import com.glsx.ordercenter.mapper.SysMechanicMapper;
import com.glsx.ordercenter.mapper.SysMerchantMapper; import com.glsx.ordercenter.mapper.SysMerchantMapper;
import com.glsx.ordercenter.mapper.SysOrderMapper; import com.glsx.ordercenter.mapper.SysOrderMapper;
import com.glsx.ordercenter.mapper.SysOrderRepairMapper; import com.glsx.ordercenter.mapper.SysOrderRepairMapper;
import com.glsx.ordercenter.mapper.SysOrderStatusMapper;
import com.glsx.ordercenter.mapper.SysUserMapper; import com.glsx.ordercenter.mapper.SysUserMapper;
import com.glsx.ordercenter.pojo.SysOrder; import com.glsx.ordercenter.pojo.SysOrder;
import com.glsx.ordercenter.pojo.SysOrderExample; import com.glsx.ordercenter.pojo.SysOrderExample;
import com.glsx.ordercenter.pojo.SysOrderExample.Criteria; import com.glsx.ordercenter.pojo.SysOrderExample.Criteria;
import com.glsx.ordercenter.pojo.SysOrderRepair; import com.glsx.ordercenter.pojo.SysOrderRepair;
import com.glsx.ordercenter.pojo.SysOrderRepairExample; import com.glsx.ordercenter.pojo.SysOrderRepairExample;
import com.glsx.ordercenter.pojo.SysOrderStatus;
import com.glsx.ordercenter.pojo.user.SysMechanic; import com.glsx.ordercenter.pojo.user.SysMechanic;
import com.glsx.ordercenter.pojo.user.SysMechanicExample; import com.glsx.ordercenter.pojo.user.SysMechanicExample;
import com.glsx.ordercenter.pojo.user.SysMerchant; import com.glsx.ordercenter.pojo.user.SysMerchant;
...@@ -94,6 +96,10 @@ public class OrderServiceImpl implements IOrderService { ...@@ -94,6 +96,10 @@ public class OrderServiceImpl implements IOrderService {
@Autowired @Autowired
private IAreaService areaService; private IAreaService areaService;
@Autowired
private SysOrderStatusMapper orderStatusMapper;
/** /**
* *
...@@ -960,7 +966,20 @@ public class OrderServiceImpl implements IOrderService { ...@@ -960,7 +966,20 @@ public class OrderServiceImpl implements IOrderService {
SysOrder sysOrder= new SysOrder(); SysOrder sysOrder= new SysOrder();
BeanUtils.copyProperties(orderActivateReq, sysOrder); BeanUtils.copyProperties(orderActivateReq, sysOrder);
// TODO 更新订单状态 // TODO 更新订单状态
return orderDao.updateByPrimaryKeySelective(sysOrder); sysOrder.setActiveStatus((byte)7);
Date date= new Date();
sysOrder.setUpdateTime(date);
int i=orderDao.updateByPrimaryKeySelective(sysOrder);
if(i==1){
SysOrderStatus sysOrderStatus=new SysOrderStatus();
sysOrderStatus.setOrderId(sysOrder.getId());
sysOrderStatus.setActiveStatus((byte)8);
sysOrderStatus.setUpdateTime(date);
sysOrderStatus.setRemark(orderActivateReq.getInstallRemark());
orderStatusMapper.insertSelective(sysOrderStatus);
}
return i;
} }
/* (non-Javadoc) /* (non-Javadoc)
...@@ -971,6 +990,19 @@ public class OrderServiceImpl implements IOrderService { ...@@ -971,6 +990,19 @@ public class OrderServiceImpl implements IOrderService {
SysOrder sysOrder= new SysOrder(); SysOrder sysOrder= new SysOrder();
BeanUtils.copyProperties(orderRepairReq, sysOrder); BeanUtils.copyProperties(orderRepairReq, sysOrder);
// TODO 更新订单状态 // TODO 更新订单状态
sysOrder.setActiveStatus((byte)8);
Date date= new Date();
sysOrder.setUpdateTime(date);
int i=orderDao.updateByPrimaryKeySelective(sysOrder);
if(i==1){
SysOrderStatus sysOrderStatus=new SysOrderStatus();
sysOrderStatus.setOrderId(sysOrder.getId());
sysOrderStatus.setActiveStatus((byte)8);
sysOrderStatus.setUpdateTime(date);
sysOrderStatus.setRemark(orderRepairReq.getRepairRemark());
orderStatusMapper.insertSelective(sysOrderStatus);
}
return orderDao.updateByPrimaryKeySelective(sysOrder); return orderDao.updateByPrimaryKeySelective(sysOrder);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!