生产pda界面刀具功能修改

master
zpl 3 years ago
parent 955d30a2db
commit 05bbfd02dc

@ -134,4 +134,22 @@ public class CutterLogController {
public R removeByIds(List<String> ids){
return R.ok(cutterLogService.removeByIds(ids));
}
/**
* sfcstepId使
* @return
*/
@ResponseBody
@PostMapping("/findToolInfoBySfc")
public R findToolInfoBySfc(@RequestBody CutterLog cutterLog){
List<CutterLog> result;
try{
result = cutterLogService.findToolInfoBySfc(cutterLog);
return R.ok(result);
}catch (Exception e){
return R.failed(e.getMessage());
}
}
}

@ -94,8 +94,30 @@ public class CutterLog extends Model<CutterLog> {
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**刀具描述**/
@TableField(exist = false)
private String description;
/**规格**/
@TableField(exist = false)
private String specification;
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getSpecification() {
return specification;
}
public void setSpecification(String specification) {
this.specification = specification;
}
public String getHandle() {
return handle;
}

@ -28,4 +28,7 @@ public interface CutterLogService extends IService<CutterLog> {
List<CutterLog> selectList(CutterLog cutterLog);
void doAdd(Map<String, Object> map);
List<CutterLog> findToolInfoBySfc(CutterLog cutterLog);
}

@ -15,9 +15,7 @@ import com.foreverwin.mesnac.meapi.dto.SfcDto;
import com.foreverwin.mesnac.production.mapper.CutterLogMapper;
import com.foreverwin.mesnac.production.mapper.SfcCrossMapper;
import com.foreverwin.mesnac.production.model.CutterLog;
import com.foreverwin.mesnac.common.model.Tool;
import com.foreverwin.mesnac.production.service.CutterLogService;
import com.foreverwin.mesnac.common.service.ToolService;
import com.foreverwin.modular.core.exception.BaseException;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
@ -52,6 +50,8 @@ public class CutterLogServiceImpl extends ServiceImpl<CutterLogMapper, CutterLog
private CommonService commonService;
@Autowired
private ToolService toolService;
@Autowired
private CutterLogService cutterLogService;
@Override
public IPage<CutterLog> selectPage(FrontPage<CutterLog> frontPage, CutterLog cutterLog) {
@ -123,5 +123,22 @@ public class CutterLogServiceImpl extends ServiceImpl<CutterLogMapper, CutterLog
}
@Override
public List<CutterLog> findToolInfoBySfc(CutterLog cutterLog) {
String site = CommonMethods.getSite();
cutterLog.setSite(site);
List<CutterLog> cutterLogList = cutterLogService.selectList(cutterLog);
if (cutterLogList != null && cutterLogList.size() > 0){
for (CutterLog cutter:cutterLogList) {
Tool byId = toolService.getById(HandleEnum.TOOL.getHandle(site, cutter.getCutter()));
cutter.setDescription(byId.getDescription());
cutter.setSpecification(byId.getSpecification());
}
return cutterLogList;
}else {
return null;
}
}
}
Loading…
Cancel
Save