修改删除和进出场金额存储
This commit is contained in:
parent
e8b1bb6ea7
commit
49bfdcf8d9
|
|
@ -75,4 +75,11 @@ public interface CarTypeMapper {
|
|||
* @return
|
||||
*/
|
||||
List<CarProVo> getProListSelected(CarProVo data);
|
||||
|
||||
/**
|
||||
* 查询合同下
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
int getNumByContract(CarTypeVo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,10 @@ public class CarTypeServiceImpl implements CarTypeService{
|
|||
@Override
|
||||
public ServerResponse updateTypeData(CarTypeVo data) {
|
||||
try{
|
||||
int htNun=mapper.getNumByContract(data);
|
||||
if(htNun>0){
|
||||
return ServerResponse.createErroe("该类型存在合同不允许修改");
|
||||
}
|
||||
String userId= UserUtil.getLoginUser().getUserId()+"";
|
||||
data.setUpdater(userId);
|
||||
String level=data.getLevel();
|
||||
|
|
@ -109,6 +113,10 @@ public class CarTypeServiceImpl implements CarTypeService{
|
|||
@Override
|
||||
public ServerResponse deleteType(CarTypeVo data) {
|
||||
try{
|
||||
int htNun=mapper.getNumByContract(data);
|
||||
if(htNun>0){
|
||||
return ServerResponse.createErroe("改类型存在合同不允许删除");
|
||||
}
|
||||
int childNum=mapper.getChildNum(data);
|
||||
if(childNum>0){
|
||||
return ServerResponse.createSuccess("改节点下存在子节点不允许删除",data);
|
||||
|
|
|
|||
|
|
@ -112,4 +112,11 @@
|
|||
from bm_project
|
||||
where is_active=1
|
||||
</select>
|
||||
<select id="getNumByContract" resultType="java.lang.Integer">
|
||||
SELECT count(1)
|
||||
from car_contract_type cct
|
||||
left join car_contract cc on cc.id=cct.contract_id
|
||||
where cc.is_active=1 and cct.model_id=#{id}
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
dc_unit,es_cost,car_out_id,day_or_m,remark,car_num
|
||||
)values (#{outId},#{planId},#{modelId},#{planType},#{contractId},#{supId},#{carId},#{goodsName},
|
||||
#{gls},#{startAddress},#{endAddress},#{priceId},#{glsPrice},#{glsMoney},#{useAddress},
|
||||
#{planDay},#{driverUserId},#{operaUserId},#{dayPrice},#{monthPrice},#{jcGls},#{jcGlsPrice},#{dcMoney},#{dcUnit}
|
||||
#{planDay},#{driverUserId},#{operaUserId},#{dayPrice},#{monthPrice},#{jcGls},#{jcMoney},#{dcMoney},#{dcUnit}
|
||||
,#{cost},#{carOutId},#{isDayOrMonth},#{remark},#{carNum})
|
||||
</insert>
|
||||
<insert id="addDispatchCarDetailsDataRecord" keyProperty="detailsId" useGeneratedKeys="true">
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
need_num needNum, dispatch_num dispatchNum,need_num-dispatch_num-IFNULL(outData.num,0) noDispatchNum,
|
||||
cpa.apply_type applyType, cpa.status_type statusType,cpa.user_name userName,
|
||||
if(cpa.dispatch_num>0,'已派车',if(cpa.dispatch_status=0,'待审核','待派车')) statusName,
|
||||
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=1,'已驳回','已驳回') ) ) auditStatus
|
||||
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=1,'已通过','已驳回') ) ) auditStatus
|
||||
from car_plan_apply cpa
|
||||
left join bm_project pro on pro.bid_id=cpa.pro_id
|
||||
left join car_plan_apply_sup cpas on cpa.id=cpas.apply_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue