Просмотр исходного кода

Merge remote-tracking branch 'origin/test' into dev

anderx лет назад: 5
Родитель
Сommit
0fc254f624

+ 7 - 0
src/main/java/com/goafanti/common/dao/TChangeDunMapper.java

@@ -90,6 +90,13 @@ public interface TChangeDunMapper {
 
 
 	void deleteByCtid(Integer id);
+	
+	/**
+	 * 
+	 * @param ctid  变更项目编号
+	 * @param tid	项目编号
+	 */
+	void updateByCTid(@Param("ctid")Integer ctid, @Param("tid")Integer tid);
 
 	
 

+ 7 - 0
src/main/java/com/goafanti/common/mapper/TChangeDunMapper.xml

@@ -509,6 +509,13 @@
   		</if>
   </update>
   
+   <update id="updateByTid">
+  		update t_change_dun set tid= #{tid} 
+  		where 1=1 
+  		<if test="cid !=null">
+  		and ctid= #{ctid}
+  		</if>
+  </update>
     <delete id="deleteByCtid" parameterType="java.lang.Integer">
     
     delete from t_change_dun

+ 2 - 0
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -690,11 +690,13 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			tOrderTaskMapper.insertSelective(ot);
 			cd.setTid(ot.getId());
 			tChangeTaskMapper.updateByPrimaryKeySelective(cd);
+			tChangeDunMapper.updateByCTid(cd.getId(), ot.getId());
 			}else if (cd.getType()==2) {
 				ot.setId(cd.getTid());
 				ot.setCommodityPrice(cd.getCommodityPrice());
 				ot.setCommodityQuantity(cd.getCommodityQuantity());
 				tOrderTaskMapper.updateByPrimaryKeySelective(ot);
+				
 			}else if(cd.getType()==3) {
 				tOrderTaskMapper.deleteByPrimaryKey(cd.getTid());
 			}