Commit bd79acac authored by tangwei's avatar tangwei

修改添加

parent a9bf1e6c
......@@ -64,11 +64,10 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
*
* ***/
public FireStationDto add(FireStationDto model) {
FireStation entity = this.prepareEntity(model);
OrgUsr orgUsr=orgUsrMapper.selectById(model.getBizCompanyId());
model.setBizCompany(orgUsr.getBizOrgName());
model.setBizCompanyCode(orgUsr.getBizOrgCode());
FireStation entity = this.prepareEntity(model);
this.save(entity);
return Bean.toModel(entity, model);
}
......@@ -78,10 +77,10 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
*
* ***/
public FireStationDto Update(FireStationDto model) {
FireStation entity = this.prepareEntity(model);
OrgUsr orgUsr=orgUsrMapper.selectById(model.getBizCompanyId());
model.setBizCompany(orgUsr.getBizOrgName());
model.setBizCompanyCode(orgUsr.getBizOrgCode());
FireStation entity = this.prepareEntity(model);
this.updateById(entity);
return Bean.toModel(entity, model);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment